Class AbstractDocumentCommand
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
- All Implemented Interfaces:
Command
- Direct Known Subclasses:
AbstractAnnotationCommand,AbstractMessagingCapableDocumentCommand,AbstractToggleSearchCommand,AttachGridCommand,CreateAnnotationCommand,FitPageOnceCommand,GradationCurveCommand,HighlightTextCommand,RedoCommand,ResampleFilterCommand,RotateCommand,SpinCommand,TextAwareAnnotationCommand,UndoCommand,ZoomCommand,ZoomToCommand
Abstract superclass for all commands, which need a viewer and a document for functionality.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe supported scopes for this command. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanChecks if this command can be executed.protected DocumentgetID()The ID of the command.protected RenderControlsgetRenderControls(boolean create) Return aRenderControlsfor the currentscope.getScope()Returns the current scope of this command.voidSets the scope of this command.Methods inherited from class com.levigo.jadice.web.client.commands.AbstractMouseCommand
clearInjections, isDoubleClicked, setMouseEventMethods 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, execute, getKey, isSelected, 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
-
AbstractDocumentCommand
public AbstractDocumentCommand()
-
-
Method Details
-
canExecute
protected boolean canExecute()Checks if this command can be executed.- Overrides:
canExecutein classAbstractPageViewCommand- Returns:
- true, if
InjectedCommand.execute(java.util.Collection<java.lang.Object>)can be called, false else
-
getDocument
-
setScope
Sets the scope of this command.Supported scopes are PAGEVIEW (default), DOCUMENT and PAGE
- Parameters:
scope- the scope to be configured
-
getScope
Returns the current scope of this command.- Returns:
- the current scope of this command
-
getRenderControls
Return aRenderControlsfor the currentscope.Depending on the scope this method will either return the document controls of the current document or the page controls for the current page in the target
PageView.- Parameters:
create- if the command should work in a per-page way (getScope()==AbstractDocumentCommand.Scope.PAGE) and no page control is available, this parameter decides whether to create a new render controls for the page or to return the document render controls.- Returns:
- RenderControls
-
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.- Returns:
- the ID of the command
-