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
,AbstractServerOperationCommand
,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 enum
The supported scopes for this command. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Checks if this command can be executed.protected Document
getID()
The ID of the command.protected RenderControls
getRenderControls
(boolean create) Return aRenderControls
for the currentscope
.getScope()
Returns the current scope of this command.void
Sets the scope of this command.Methods inherited from class com.levigo.jadice.web.client.commands.AbstractMouseCommand
clearInjections, isDoubleClicked, setMouseEvent
Methods inherited from class com.levigo.jadice.web.client.commands.AbstractPageViewCommand
getPageView, setPageView
Methods inherited from class com.levigo.jadice.web.client.commands.AbstractContextCommand
getContext, propagateContextChange, setContext
Methods inherited from class com.levigo.jadice.web.client.util.command.InjectedCommand
canExecute, execute, execute, getKey, isSelected, isSelected, setKey
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
canExecute
in 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 aRenderControls
for 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:Command
The 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
-