com.levigo.jadice.swing.annotation.commands
Class AbstractAnnotationCommand
java.lang.Object
com.levigo.util.swing.action.injection.InjectedCommand
com.levigo.util.swing.action.AbstractContextCommand
com.levigo.jadice.swing.commands.AbstractPageViewCommand
com.levigo.jadice.swing.commands.AbstractDocumentCommand
com.levigo.jadice.swing.annotation.commands.AbstractAnnotationCommand
- All Implemented Interfaces:
- Command
- Direct Known Subclasses:
- AbstractAnnotationModeCommand, AnnotationDeleteCommand, AnnotationSelectAllCommand, AnnotationVisibilityCommand, EmbeddedAnnotationVisibilityCommand
public abstract class AbstractAnnotationCommand
- extends AbstractDocumentCommand
Abstract superclass for all annotations commands. All of them can use the same methods to get
selected annos, the AnnotationPageSegment or the AnnotationRenderingHints.
Hint:
To work properly the command needs a PageView
instance in the
Context
object.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractAnnotationCommand
public AbstractAnnotationCommand()
getAnnotations
protected Collection<Annotation> getAnnotations()
- Returns the annotations contained in the AnnotationPageSegment, if it exists. Otherwise
null
will be returned.
getSelectedAnnotations
protected List<Annotation> getSelectedAnnotations()
- Returns the currently selected annotations.
getAnnoPageSegment
protected AnnotationPageSegment getAnnoPageSegment()
- Returns the AnnotationPageSegment, if it is contained in the document, otherwise
null
will be returned
getAnnotationTool
protected AnnotationTool getAnnotationTool()
canExecute
protected boolean canExecute()
- Description copied from class:
InjectedCommand
- Subclasses may override this method to perform argument validation beyond the validation that
happens automatically during the injection phase. This method is called after the context has
been found to match the requirements specified via the
Argument
annotations and the
arguments have been injected.
- Overrides:
canExecute
in class AbstractDocumentCommand
- Returns:
true
if the command can/may be executed in the current context,
false
otherwise.
getAnnoRenderSettings
protected AnnotationRenderSettings getAnnoRenderSettings()
- Gets the annotation rendering settings.
getAnnotationProfile
protected AnnotationProfile getAnnotationProfile()
Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.