graphlab.ui
Class AbstractExtensionAction

java.lang.Object
  extended by graphlab.main.core.action.AbstractAction
      extended by graphlab.ui.AbstractExtensionAction
All Implemented Interfaces:
Action, Notifiable
Direct Known Subclasses:
AlgorithmExtensionAction, AtomAnimatorExtensionAction, EdgeMetrExtensionAction, GraphActionExtensionAction, GraphGeneratorExtensionAction, GraphReaderExtensionAction, GraphReportExtensionAction, GraphWriterExtensionAction, VertexMetrExtensionAction

public abstract class AbstractExtensionAction
extends AbstractAction

the implementing class will have a menu assigned to it automatically the name of the menu will be from the constructors parametr(sp) and the will also listen to UI.getUIEvent(sp.getName())

Author:
azin azadi

Field Summary
 
Fields inherited from class graphlab.main.core.action.AbstractAction
listeningEvents
 
Constructor Summary
AbstractExtensionAction(BlackBoard bb, Extension sp)
           
 
Method Summary
 java.lang.String getMenuNamePrefix()
           
abstract  java.lang.String getParentMenuName()
          returns the menu name that the menuitem of this action is its child
abstract  void performJob(java.lang.String name)
          like Action
 void removeCreatedUIComponents()
          removes all UI Components that are created for the extension (menues, ...)
 void setEvent(Event e)
          sets the current event of action so automatically addListener in the black board for the event.
 boolean testAndSetParameters(java.lang.Object o)
          first checks if o instanceof Parametrizable if so, shows an editor for it's Parameters.
 
Methods inherited from class graphlab.main.core.action.AbstractAction
disable, doJob, enable, getBlackBoard, isEnable, setBlackBoard
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractExtensionAction

public AbstractExtensionAction(BlackBoard bb,
                               Extension sp)
Method Detail

getMenuNamePrefix

public java.lang.String getMenuNamePrefix()

setEvent

public void setEvent(Event e)
Description copied from class: AbstractAction
sets the current event of action so automatically addListener in the black board for the event. if you want to addListener for multiple events, you should use the listen4Events method

Parameters:
e - the Event for listening

testAndSetParameters

public boolean testAndSetParameters(java.lang.Object o)
first checks if o instanceof Parametrizable if so, shows an editor for it's Parameters.

Parameters:
o -
Returns:
true if o isn't an instance of Parametrizable or the user cancells the editing

removeCreatedUIComponents

public void removeCreatedUIComponents()
removes all UI Components that are created for the extension (menues, ...)


getParentMenuName

public abstract java.lang.String getParentMenuName()
returns the menu name that the menuitem of this action is its child


performJob

public abstract void performJob(java.lang.String name)
Description copied from class: AbstractAction
like Action

Specified by:
performJob in class AbstractAction