Package com.levigo.jadice.web.client.ui
Class AbstractAnnotationToolbarInitializer<T extends StateIcon>
java.lang.Object
com.levigo.jadice.web.client.ui.AbstractAnnotationToolbarInitializer<T>
- All Implemented Interfaces:
AnnotationProfiles.Handler
,AnnotationToolbarInitializer
- Direct Known Subclasses:
DefaultAnnotationToolbarInitializer
,IconFontAnnotationToolbarInitializer
public abstract class AbstractAnnotationToolbarInitializer<T extends StateIcon>
extends Object
implements AnnotationToolbarInitializer
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractAnnotationToolbarInitializer
(AnnotationProfileAwareToolbar.Orientation orientation, AbstractBar dynamicToolbar) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
add
(AnnotationProfile profile, Bar toolbar, TypeRef typeRef) protected void
add
(AnnotationProfile profile, Bar toolbar, TypeSetElement t) protected abstract JadiceSubmenuButton
createSubmenuButtonWithIcon
(T icon) Returns the host component for the annotation editor.protected T
protected abstract T
protected abstract T
getSubmenuIcon
(String name) initCreateAnnotationCommand
(AnnotationProfile profile, AnnotationFactory factory) Returns aCreateAnnotationCommand
for the passed factory and profile.void
onLoaded
(AnnotationProfile result) Invoked when theAnnotationProfiles.Request
has been loaded
.
-
Constructor Details
-
AbstractAnnotationToolbarInitializer
public AbstractAnnotationToolbarInitializer(AnnotationProfileAwareToolbar.Orientation orientation, AbstractBar dynamicToolbar)
-
-
Method Details
-
onLoaded
Description copied from interface:AnnotationProfiles.Handler
Invoked when theAnnotationProfiles.Request
has been loaded
.- Specified by:
onLoaded
in interfaceAnnotationProfiles.Handler
- Parameters:
result
- the requestedAnnotationProfile
ornull
if the requested profile could not be found.
-
getIcon
-
add
-
initCreateAnnotationCommand
public CreateAnnotationCommand initCreateAnnotationCommand(AnnotationProfile profile, AnnotationFactory factory) Returns aCreateAnnotationCommand
for the passed factory and profile. Overwrite this method to set individual command-behaviour likeCreateAnnotationCommand.CreateMode
.- Specified by:
initCreateAnnotationCommand
in interfaceAnnotationToolbarInitializer
- Parameters:
profile
-factory
-- Returns:
- the CreateAnnotationCommand
-
getEditorHost
Description copied from interface:AnnotationToolbarInitializer
Returns the host component for the annotation editor.- Specified by:
getEditorHost
in interfaceAnnotationToolbarInitializer
- Returns:
- The host component.
-
add
-
getIcon
-