com.levigo.util.swing.action
Class AbstractContextCommand

java.lang.Object
  extended by com.levigo.util.swing.action.injection.InjectedCommand
      extended by com.levigo.util.swing.action.AbstractContextCommand
All Implemented Interfaces:
Command
Direct Known Subclasses:
AbstractPageViewCommand

public abstract class AbstractContextCommand
extends InjectedCommand

Abstract base class for context aware injected commands.

Author:
Carolin Koehler

Constructor Summary
AbstractContextCommand()
           
 
Method Summary
protected  Context getContext()
           
protected  void propagateContextChange()
          Propagate a change of the context from which this command is currently being executed.
 void setContext(Context context)
          Invoked by command injection.
 
Methods inherited from class com.levigo.util.swing.action.injection.InjectedCommand
canExecute, 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

AbstractContextCommand

public AbstractContextCommand()
Method Detail

getContext

protected Context getContext()
Returns:
the context

propagateContextChange

protected void propagateContextChange()
Propagate a change of the context from which this command is currently being executed. Silently skip propagating a change, if there is no current context.


setContext

public void setContext(Context context)
Invoked by command injection.

Developers should not invoke this method in any direct way.

Parameters:
context -


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.