Class NodeAddAction
java.lang.Object
javax.swing.AbstractAction
com.marginallyclever.donatello.actions.undoable.NodeAddAction
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,EventListener
,Action
Launches the "Add Node" dialog. If the user clicks "Ok" then the selected
Node
type is added to the
current editor Graph
.- Since:
- 2022-02-21
- Author:
- Dan Royer
- See Also:
-
Field Summary
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
-
Constructor Summary
ConstructorsConstructorDescriptionNodeAddAction
(String name, Donatello editor, NodeFactoryPanel nodeFactoryPanel) Constructor for subclasses to call. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Launches the "Add Node" dialog.void
Adds the given node to the editor's graph and creates an undoable edit.Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Constructor Details
-
NodeAddAction
Constructor for subclasses to call.- Parameters:
name
- the name of this action visible on buttons and menu items.
-
-
Method Details
-
actionPerformed
Launches the "Add Node" dialog.- Parameters:
e
- the event to be processed
-
commitAdd
Adds the given node to the editor's graph and creates an undoable edit.- Parameters:
n
- the node to add.
-
getNodeFactoryPanel
-