|
GraphLab Project | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgraphlab.platform.core.AbstractAction
graphlab.ui.AbstractExtensionAction<t>
public abstract class AbstractExtensionAction<t extends Extension>
the base class for creating extension handlers 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())
Field Summary | |
---|---|
protected javax.swing.JButton |
extraButton
a button which will be added to the right of menu item |
GMenuItem |
menuItem
|
protected javax.swing.JMenu |
parentMenu
|
t |
target
|
Fields inherited from class graphlab.platform.core.AbstractAction |
---|
blackboard |
Constructor Summary | |
---|---|
AbstractExtensionAction(BlackBoard bb,
t sp)
|
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
occurs whenever extraButton pressed = |
protected void |
createExtensionCommandsForCommandLine()
|
protected GMenuItem |
createMenuItem(java.lang.String name,
java.lang.String actionId,
BlackBoard bb)
if you want to create custom menues for your extension (i.e. |
protected java.lang.String |
getMenuNamePrefix()
to put a prefix before the name of your extension menu override this method |
protected int |
getMenuPlace()
It is a XML-Based UI concept |
protected javax.swing.JMenu |
getParentMenu()
gets a menu for adding the sub menu, if returns null, no submenu will added! |
abstract java.lang.String |
getParentMenuName()
returns the menu name that the menuitem of this action is its child |
t |
getTarget()
|
protected boolean |
isInsertExtraButtonToMenuItem()
determines wheter to insert an extra button at the right side of mene item, normally this is true whenever the target extension implements Parametrizable (have some parameters) on this mode on pressing the button a dialog for setting the parameters will be shown, and then it will be executed, if the user clicks the menu item directly the extension will be performed without asking of parameters. |
void |
performAction(java.lang.String eventKey,
java.lang.Object value)
like Action |
abstract void |
performExtension()
|
java.lang.Object |
performExtensionInCommandLine()
inorder if you created a new type of extension and for that extension you want to do some thing different when it is called on commandline (i.e. |
void |
removeCreatedUIComponents()
removes all UI Components that are created for the extension (menues, ...) |
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.platform.core.AbstractAction |
---|
disable, enable, getBlackBoard, getLastListenedEventKey, isEnable, keyChanged, listen4Event, setBlackBoard, unListenEvent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected javax.swing.JMenu parentMenu
public GMenuItem menuItem
protected javax.swing.JButton extraButton
public t extends Extension target
Constructor Detail |
---|
public AbstractExtensionAction(BlackBoard bb, t sp)
Method Detail |
---|
public t getTarget()
protected int getMenuPlace()
protected final GMenuItem createMenuItem(java.lang.String name, java.lang.String actionId, BlackBoard bb)
name
- actionId
- bb
-
AlgorithmExtensionAction
protected boolean isInsertExtraButtonToMenuItem()
Parametrizable
,
@Parameter
,
AlgorithmExtensionAction
public java.lang.Object performExtensionInCommandLine()
GraphGeneratorExtensionAction
protected void createExtensionCommandsForCommandLine()
protected java.lang.String getMenuNamePrefix()
protected javax.swing.JMenu getParentMenu()
public boolean testAndSetParameters(java.lang.Object o)
o
-
public void removeCreatedUIComponents()
public abstract java.lang.String getParentMenuName()
public final void performAction(java.lang.String eventKey, java.lang.Object value)
AbstractAction
performAction
in interface Action
performAction
in class AbstractAction
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public abstract void performExtension()
|
GraphLab Project | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |