|
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
com.jgraph.pad.action.JGraphpadEditAction
Implements all actions of the edit menu. The selectPath and selectTree actions are implemented by plugins.
| Nested Class Summary | |
static class |
JGraphpadEditAction.AllActions
Bundle of all actions in this class. |
| Nested classes inherited from class com.jgraph.editor.JGraphEditorAction |
JGraphEditorAction.Bundle |
| Field Summary | |
protected Action |
fallbackAction
Fallback action if the focus-owner is not a graph. |
protected static Object |
lastFoundCell
Holds the last found cell for a search. |
protected static Pattern |
lastSearchPattern
Holds the last search expression. |
static String |
NAME_CLEARSELECTION
Specifies the name for the clearSelection action. |
static String |
NAME_COPY
Specifies the name for the copy action. |
static String |
NAME_CUT
Specifies the name for the cut action. |
static String |
NAME_DELETE
Specifies the name for the delete action. |
static String |
NAME_DESELECTEDGES
Specifies the name for the deselectEdges action. |
static String |
NAME_DESELECTVERTICES
Specifies the name for the deselectVertices action. |
static String |
NAME_EDIT
Specifies the name for the edit action. |
static String |
NAME_FIND
Specifies the name for the find action. |
static String |
NAME_FINDAGAIN
Specifies the name for the findAgain action. |
static String |
NAME_INVERTSELECTION
Specifies the name for the invertSelection action. |
static String |
NAME_PASTE
Specifies the name for the paste action. |
static String |
NAME_REDO
Specifies the name for the redo action. |
static String |
NAME_SELECTALL
Specifies the name for the selectAll action. |
static String |
NAME_SELECTEDGES
Specifies the name for the selectEdges action. |
static String |
NAME_SELECTVERTICES
Specifies the name for the selectVertices action. |
static String |
NAME_UNDO
Specifies the name for the undo action. |
| Fields inherited from class com.jgraph.editor.JGraphEditorAction |
isToggleAction, PROPERTY_ISSELECTED, PROPERTY_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 | |
JGraphpadEditAction(String name)
Constructs a new edit action for the specified name. |
|
| Method Summary | |
void |
actionPerformed(ActionEvent e)
Executes the action based on the action name. |
protected void |
doEdit(org.jgraph.JGraph graph)
Starts editing the selection cell in the specified graph. |
void |
doFindAgain(org.jgraph.JGraph graph)
Displays a dialog for lastSearchPattern if it is null and
performs a search using regular expression matching starting at
lastFoundCell. |
void |
doInvertSelection(org.jgraph.JGraph graph)
Inverts the selection in the specified graph by selecting all cells for which isParentSelected(JGraph, Object) returns false. |
protected void |
doRedo(JGraphEditorDiagramPane diagramPane)
Undos the last operation in the specified diagram pane. |
protected void |
doSelect(org.jgraph.JGraph graph,
boolean all,
boolean edges,
boolean deselect)
Adds or removes the specified cells to/from the selection. |
protected void |
doUndo(JGraphEditorDiagramPane diagramPane)
Undos the last operation in the specified diagram pane. |
Action |
getFallbackAction()
Returns the fallback action. |
protected boolean |
isParentSelected(org.jgraph.JGraph graph,
Object cell)
Helper method that returns true if either the cell or one of its parent is selected in graph. |
| Methods inherited from class com.jgraph.editor.JGraphEditorAction |
getActiveFrame, getFrame, getJGraphpadPane, getJGraphpadPane, getName, getParentGraph, getPermanentFocusOwner, getPermanentFocusOwnerDiagram, getPermanentFocusOwnerDiagramPane, getPermanentFocusOwnerGraph, getPermanentFocusOwnerOrParent, getString, isSelected, isToggleAction, isVisible, setEnabled, setSelected, setToggleAction, setVisible |
| 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 |
| Field Detail |
protected static Pattern lastSearchPattern
protected static Object lastFoundCell
public static final String NAME_CUT
cut action.
public static final String NAME_COPY
copy action.
public static final String NAME_PASTE
paste action.
public static final String NAME_DELETE
delete action.
public static final String NAME_EDIT
edit action.
public static final String NAME_FIND
find action.
public static final String NAME_FINDAGAIN
findAgain action.
public static final String NAME_UNDO
undo action.
public static final String NAME_REDO
redo action.
public static final String NAME_SELECTALL
selectAll action.
public static final String NAME_CLEARSELECTION
clearSelection action.
public static final String NAME_SELECTVERTICES
selectVertices action.
public static final String NAME_SELECTEDGES
selectEdges action.
public static final String NAME_DESELECTVERTICES
deselectVertices action.
public static final String NAME_DESELECTEDGES
deselectEdges action.
public static final String NAME_INVERTSELECTION
invertSelection action.
protected Action fallbackAction
| Constructor Detail |
public JGraphpadEditAction(String name)
fallbackAction for text components in case of supported actions.
name - The name of the action to be created.| Method Detail |
public void actionPerformed(ActionEvent e)
e - The object that describes the event.
protected void doSelect(org.jgraph.JGraph graph,
boolean all,
boolean edges,
boolean deselect)
all is true then edges is ignored.
graph - The graph to perform the operation in.all - Whether all cells should be selected.edges - Whether edges or vertices should be selected.deselect - Whether to remove the cells from the selection.public void doInvertSelection(org.jgraph.JGraph graph)
isParentSelected(JGraph, Object) returns false.
graph - The graph to perform the operation in.
protected boolean isParentSelected(org.jgraph.JGraph graph,
Object cell)
graph.
graph - The graph to check if the cell is selected in.cell - The cell that is to be tested for selection.
protected void doUndo(JGraphEditorDiagramPane diagramPane)
diagramPane - The diagram pane to perform the operation in.protected void doRedo(JGraphEditorDiagramPane diagramPane)
diagramPane - The diagram pane to perform the operation in.protected void doEdit(org.jgraph.JGraph graph)
graph - The graph to perform the operation in.public void doFindAgain(org.jgraph.JGraph graph)
lastSearchPattern if it is null and
performs a search using regular expression matching starting at
lastFoundCell. The found cell is selected and scrolled to. If
no cell is found an error message is displayed.
graph - The graph to perform the operation in.public Action getFallbackAction()
|
JGraphpad Pro
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||