|
JGraphpad Pro
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.swing.AbstractAction
com.jgraph.editor.JGraphEditorAction
The base class for all actions in a JGraph editor kit. An action may be toggleable, in which case the UI factory will create an element that displays the action's selection state, and listen to changes of this state to update the element. The enabled state will also be listened to and the UI elements will be updated accordingly.
| Nested Class Summary | |
static interface |
JGraphEditorAction.Bundle
An interface to manage a set of actions as a single entity. |
| Field Summary | |
protected boolean |
isToggleAction
Holds the toggleable state. |
static String |
PROPERTY_ISSELECTED
Bean property name for isSelected |
static String |
PROPERTY_ISVISIBLE
Bean property name for isVisible |
| Fields inherited from class javax.swing.AbstractAction |
changeSupport, enabled |
| Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
| Constructor Summary | |
JGraphEditorAction(String name)
Constructs a new action for the specified name |
|
JGraphEditorAction(String name,
boolean isToggleAction)
Constructs a new action for the specified name and
isToggleAction state. |
|
| Method Summary | |
static Frame |
getActiveFrame()
Returns the first active frame. |
static Frame |
getFrame(ActionEvent event)
Returns the frame for event if the even source is a
Component or the active frame. |
static JGraphpadPane |
getJGraphpadPane()
Returns the JGraphpadPane inside the active frame. |
static JGraphpadPane |
getJGraphpadPane(JFrame frame)
Returns the JGraphpadPane inside the given frame. |
String |
getName()
Returns the name. |
static org.jgraph.JGraph |
getParentGraph(Component component)
Returns the parent diagram pane of the specified component, or the component itself if it is a editor diagram pane. |
static Component |
getPermanentFocusOwner()
Returns the permanent focus owner. |
static JGraphEditorDiagram |
getPermanentFocusOwnerDiagram()
Returns the diagram for the diagram pane that has the focus. |
static JGraphEditorDiagramPane |
getPermanentFocusOwnerDiagramPane()
Returns the diagram pane that contains the permanent focus owner. |
static org.jgraph.JGraph |
getPermanentFocusOwnerGraph()
Returns the permanent focus owner graph. |
static Component |
getPermanentFocusOwnerOrParent()
Returns the permanent focus owner or the parent scroll pane of it. |
static String |
getString(String key)
Shortcut method to JGraphEditorResources.getString(String). |
boolean |
isSelected()
Returns the selection state. |
boolean |
isToggleAction()
Returns whether the UI elements should display the selection state. |
boolean |
isVisible()
Returns the visible state. |
void |
setEnabled(boolean newValue)
|
void |
setSelected(boolean selected)
Sets the selection state. |
void |
setToggleAction(boolean isToggleAction)
Sets whether the UI elements should display the selection state. |
void |
setVisible(boolean visible)
Sets the visible state. |
| Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener |
| 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 |
public static final String PROPERTY_ISSELECTED
isSelected
public static final String PROPERTY_ISVISIBLE
isVisible
protected boolean isToggleAction
| Constructor Detail |
public JGraphEditorAction(String name)
name - The name of the new action.
public JGraphEditorAction(String name,
boolean isToggleAction)
name and
isToggleAction state.
name - The name of the new action.isToggleAction - Whether the action is a toggle action.| Method Detail |
public void setEnabled(boolean newValue)
public String getName()
public boolean isToggleAction()
public void setToggleAction(boolean isToggleAction)
isToggleAction - The isToggleAction state to set.public boolean isSelected()
public void setSelected(boolean selected)
selected - The selected state to set.Action.putValue(java.lang.String, java.lang.Object)public boolean isVisible()
public void setVisible(boolean visible)
visible - The visible state to set.Action.putValue(java.lang.String, java.lang.Object)public static String getString(String key)
JGraphEditorResources.getString(String).
key - The key to return the resource string for.public static Frame getFrame(ActionEvent event)
event if the even source is a
Component or the active frame.
event - The event to get the frame from.
event or the active frame.getActiveFrame()public static Component getPermanentFocusOwner()
KeyboardFocusManager.getPermanentFocusOwner()public static Component getPermanentFocusOwnerOrParent()
KeyboardFocusManager.getPermanentFocusOwner()public static org.jgraph.JGraph getPermanentFocusOwnerGraph()
KeyboardFocusManager.getPermanentFocusOwner()public static JGraphEditorDiagram getPermanentFocusOwnerDiagram()
public static JGraphEditorDiagramPane getPermanentFocusOwnerDiagramPane()
public static Frame getActiveFrame()
Window.isActive()public static JGraphpadPane getJGraphpadPane()
public static JGraphpadPane getJGraphpadPane(JFrame frame)
public static org.jgraph.JGraph getParentGraph(Component component)
component.
|
JGraphpad Pro
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||