Class CreateAnnotationCommand
java.lang.Object
com.levigo.jadice.web.client.util.command.InjectedCommand
com.levigo.jadice.web.client.commands.AbstractContextCommand
com.levigo.jadice.web.client.commands.AbstractPageViewCommand
com.levigo.jadice.web.client.commands.AbstractMouseCommand
com.levigo.jadice.web.client.commands.AbstractDocumentCommand
com.levigo.jadice.web.client.commands.CreateAnnotationCommand
- All Implemented Interfaces:
Command,com.levigo.jadice.web.client.util.internal.HasDebugId
public class CreateAnnotationCommand
extends AbstractDocumentCommand
implements com.levigo.jadice.web.client.util.internal.HasDebugId
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.levigo.jadice.web.client.commands.AbstractDocumentCommand
AbstractDocumentCommand.Scope -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanChecks if this command can be executed.protected voidexecute()This method is called in order to execute the command.getID()The ID of the command.protected booleanReturns the selected state of this command.voidsetAnnotationFactory(AnnotationProfile profile, AnnotationFactory factory) voidsetCreateMode(CreateAnnotationCommand.CreateMode createMode) voidsetEditorHost(AbstractBar editorHost) Sets the context toolbar for the annotation tool.voidsetMouseEvent(com.google.gwt.event.dom.client.MouseEvent<?> mouseEvent) Methods inherited from class com.levigo.jadice.web.client.commands.AbstractDocumentCommand
getDocument, getRenderControls, getScope, setScopeMethods inherited from class com.levigo.jadice.web.client.commands.AbstractMouseCommand
clearInjections, isDoubleClickedMethods inherited from class com.levigo.jadice.web.client.commands.AbstractPageViewCommand
getPageView, setPageViewMethods inherited from class com.levigo.jadice.web.client.commands.AbstractContextCommand
getContext, propagateContextChange, setContextMethods inherited from class com.levigo.jadice.web.client.util.command.InjectedCommand
canExecute, execute, getKey, isSelected, setKeyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.levigo.jadice.web.client.util.command.Command
isAvailable, isAvailable
-
Constructor Details
-
CreateAnnotationCommand
public CreateAnnotationCommand()
-
-
Method Details
-
getDebugId
- Specified by:
getDebugIdin interfacecom.levigo.jadice.web.client.util.internal.HasDebugId
-
setAnnotationFactory
-
execute
protected void execute()Description copied from class:InjectedCommandThis method is called in order to execute the command. It is only called, after the arguments have been validated and injected and only ifInjectedCommand.canExecute()has returnedtrue.- Specified by:
executein classInjectedCommand
-
isSelected
protected boolean isSelected()Description copied from class:InjectedCommandReturns the selected state of this command. This is typically used only for commands with a meaningful selection state.- Overrides:
isSelectedin classInjectedCommand- Returns:
- the selected state
-
canExecute
protected boolean canExecute()Description copied from class:AbstractDocumentCommandChecks if this command can be executed.- Overrides:
canExecutein classAbstractDocumentCommand- Returns:
- true, if
InjectedCommand.execute(java.util.Collection<java.lang.Object>)can be called, false else
-
setEditorHost
Sets the context toolbar for the annotation tool.- Parameters:
editorHost- the context toolbar.
-
getCreateMode
-
setCreateMode
-
setMouseEvent
public void setMouseEvent(com.google.gwt.event.dom.client.MouseEvent<?> mouseEvent) - Overrides:
setMouseEventin classAbstractMouseCommand
-
getID
Description copied from interface:CommandThe ID of the command. This is typically the command class name. If the Command is parameterized the ID should comprise the class name + parameter information.- Specified by:
getIDin interfaceCommand- Overrides:
getIDin classAbstractDocumentCommand- Returns:
- the ID of the command
-