|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectprojectviewer.action.Action
An action defines an action to be taken when the user presses some menu item in the tree's context menu or a button on the toolbar.
Field Summary | |
protected java.lang.String |
action
|
protected javax.swing.JComponent |
cmItem
|
protected org.gjt.sp.jedit.gui.RolloverButton |
tbButton
|
protected ProjectViewer |
viewer
|
Constructor Summary | |
protected |
Action()
Creates a regular action. |
protected |
Action(java.lang.String action)
Creates an action tied to an action name. |
Method Summary | |
java.lang.Object |
clone()
Clones the current action, returning a copy of it. |
org.gjt.sp.jedit.gui.RolloverButton |
getButton()
Returns the toolbar button that triggers this action. |
javax.swing.Icon |
getIcon()
Returns the icon to be shown on the toolbar button. |
javax.swing.JComponent |
getMenuItem()
Returns the menu item that triggers this action. |
abstract java.lang.String |
getText()
Returns a String that will be shown as the text of the menu item or the tooltip of the toolbar button. |
void |
prepareForNode(VPTNode node)
When a node is selected (for the toolbar button) or when the context menu is shown (for the menu item), this method is called and the selected node is passed, so the action can choose whether the action will be available or not for that node. |
void |
setViewer(ProjectViewer viewer)
Sets the viewer where this action is being used. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.awt.event.ActionListener |
actionPerformed |
Field Detail |
protected ProjectViewer viewer
protected org.gjt.sp.jedit.gui.RolloverButton tbButton
protected javax.swing.JComponent cmItem
protected java.lang.String action
Constructor Detail |
protected Action()
protected Action(java.lang.String action)
Method Detail |
public abstract java.lang.String getText()
public void prepareForNode(VPTNode node)
By default, does nothing.
node
- The selected node, or "null" if multiple nodes are
selected.public javax.swing.Icon getIcon()
public javax.swing.JComponent getMenuItem()
public org.gjt.sp.jedit.gui.RolloverButton getButton()
public java.lang.Object clone()
public void setViewer(ProjectViewer viewer)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |