Interface Command
- All Known Subinterfaces:
WidgetCommand
- All Known Implementing Classes:
AbstractAnnotationCommand
,AbstractBookmarkCommand
,AbstractContextCommand
,AbstractDocumentCommand
,AbstractMouseCommand
,AbstractPageViewCommand
,AbstractServerOperationCommand
,com.levigo.jadice.web.client.commands.internal.AbstractSetCurrentPageCommand
,AbstractToggleSearchCommand
,ActivateRolloutSearchCommand
,ActivateToolbarSearchCommand
,ActivateToolCommand
,AddBookmarkCommand
,AnnotationPropertyEditor
,AnnotationVisibilityCommand
,AttachGridCommand
,AutoActivationCommand
,CancelAreaSelectionCommand
,ColorEditor
,CreateAnnotationCommand
,CreateAnnotationViaApiCommand
,DeleteSelectedAnnotationsCommand
,DownloadExportCommand
,EnableToolCommand
,ExportCommand
,FirstPageCommand
,FitPageCommand
,FitPageOnceCommand
,FontFaceEditor
,FontSizeEditor
,FullscreenCommand
,GoogleMapsTool.GoogleMapsCommand
,GoogleSearchTool.GoogleSearchCommand
,GradationActionCommand
,GradationCurveCommand
,HighlightTextCommand
,HorizontalAlignmentEditor
,HorizontalAlignmentEditor.AlignmentCommand
,IconifiedTextEditor
,InjectedCommand
,InjectedWidgetCommand
,JadiceDocumentViewer.OpenSubmenuCommand
,LastPageCommand
,LineWidthEditor
,LocaleCommand
,NextBookmarkCommand
,NextPageCommand
,OpenFileCommand
,PreviousBookmarkCommand
,PreviousPageCommand
,PrintExportCommand
,RedoCommand
,RemoveAllBookmarksCommand
,RemoveBookmarkCommand
,RemovePagesCommand
,ResampleFilterCommand
,RotateCommand
,SaveAnnotationsCommand
,SelectPageLayoutCommand
,ShowAnnotationEditorCommand
,ShowGradationCommand
,ShowKeyBindingCommand
,ShowResolutionCalibrationWidgetCommand
,SimpleCommand
,SpinCommand
,StartAreaSelectionCommand
,TextEditor
,TextSearchTool.TextSearchCommand
,TextToSpeechTool.TextToSpeechCommand
,ThumbnailToolCommand
,ToggleEditor
,ToggleNotificationsCommand
,TransparencyEditor
,UndoCommand
,WidgetBasedAnnotationPropertyEditor
,WikipediaSearchTool.WikipediaSearchCommand
,ZoomCommand
,ZoomToCommand
public interface Command
Basic interface for all commands.
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
canExecute
(Collection<Object> args) Permission checking for a command works as follows:void
execute
(Collection<Object> args) Execute the command.default String
getID()
The ID of the command.default boolean
Returns an indicator whether the command is available and therefore integrable.default boolean
isAvailable
(Collection<Object> args) Returns an indicator whether the command is available for the given context arguments.default boolean
isSelected
(Collection<Object> args) Returns the selected state of this command.
-
Method Details
-
execute
Execute the command.- Parameters:
args
- arguments for the command (contains all items for all actions inside of the context!)
-
canExecute
Permission checking for a command works as follows:1. Check user privileges if the command is executable.
2. Ask if the command is executable with the given objects.- Parameters:
args
- arguments for the command- Returns:
true
- executable with these arguments,
false
- impossible to execute this command with these arguments
-
isSelected
Returns the selected state of this command. This is typically used only for commands with a meaningful selection state.- Parameters:
args
- arguments for the command- Returns:
true
- selected with these arguments,
false
- not selected with these arguments
-
isAvailable
default boolean isAvailable()Returns an indicator whether the command is available and therefore integrable.- Returns:
true
- availablefalse
- not available
-
isAvailable
Returns an indicator whether the command is available for the given context arguments.- Parameters:
args
- arguments for the command- Returns:
true
- availablefalse
- not available
-
getID
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
-