com.levigo.jadice.swing.commands
Class AbstractPageViewCommand

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
All Implemented Interfaces:
Command, PropertyChangeListener, EventListener
Direct Known Subclasses:
AbstractDocumentCommand, AbstractSelectionCommand, OpenDocumentFromFileCommand, OpenViewerFrameCommand, SelectPageLayoutCommand, ShowPDFPermissionsCommand, ToggleToolActivationPolicyCommand, ToggleToolCommand

public abstract class AbstractPageViewCommand
extends AbstractContextCommand
implements PropertyChangeListener

Abstract superclass for commands which are functional just in conjunction with a PageView instance. All of them can use the same accessor and checking methods.

To work properly there must be at least one PageView instance as Context object.

Author:
Carolin Koehler

Constructor Summary
AbstractPageViewCommand()
           
 
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  PageView getPageView()
          Returns the page view.
 void propertyChange(PropertyChangeEvent evt)
           
 void setPageView(PageView pageView)
          Deprecated. Will be used by injection exclusively.
 
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

AbstractPageViewCommand

public AbstractPageViewCommand()
Method Detail

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 InjectedCommand
Returns:
true if the command can/may be executed in the current context, false otherwise.

propertyChange

public void propertyChange(PropertyChangeEvent evt)
Specified by:
propertyChange in interface PropertyChangeListener

getPageView

protected PageView getPageView()
Returns the page view.

Returns:
page view

setPageView

public void setPageView(PageView pageView)
Deprecated. Will be used by injection exclusively.

Invoked by command injection.

Developers should not invoke this method in any direct way.



Copyright © 2017 levigo holding gmbh. All rights reserved.