com.levigo.jadice.swing.annotation.commands
Class AbstractAnnotationCommand

java.lang.Object
  extended by com.levigo.util.swing.action.injection.InjectedCommand
      extended by com.levigo.util.swing.action.AbstractContextCommand
          extended by com.levigo.jadice.swing.commands.AbstractPageViewCommand
              extended by com.levigo.jadice.swing.commands.AbstractDocumentCommand
                  extended by 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 Contextobject.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.levigo.jadice.swing.commands.AbstractDocumentCommand
AbstractDocumentCommand.Scope
 
Field Summary
 
Fields inherited from class com.levigo.jadice.swing.commands.AbstractDocumentCommand
document
 
Constructor Summary
AbstractAnnotationCommand()
           
 
Method Summary
protected  boolean canExecute()
          Subclasses may override this method to perform argument validation beyond the validation that happens automatically during the injection phase.
protected  AnnotationPageSegment getAnnoPageSegment()
          Returns the AnnotationPageSegment, if it is contained in the document, otherwise null will be returned
protected  AnnotationRenderSettings getAnnoRenderSettings()
          Gets the annotation rendering settings.
protected  AnnotationProfile getAnnotationProfile()
           
protected  Collection<Annotation> getAnnotations()
          Returns the annotations contained in the AnnotationPageSegment, if it exists.
protected  AnnotationTool getAnnotationTool()
           
protected  List<Annotation> getSelectedAnnotations()
          Returns the currently selected annotations.
 
Methods inherited from class com.levigo.jadice.swing.commands.AbstractDocumentCommand
getRenderControls, getScope, setScope
 
Methods inherited from class com.levigo.jadice.swing.commands.AbstractPageViewCommand
getPageView, setPageView
 
Methods inherited from class com.levigo.util.swing.action.AbstractContextCommand
getContext, propagateContextChange, setContext
 
Methods inherited from class com.levigo.util.swing.action.injection.InjectedCommand
canExecute, execute, execute, getKey, isAvailable, isSelected, isSelected, setKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractAnnotationCommand

public AbstractAnnotationCommand()
Method Detail

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.