java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.marginallyclever.donatello.Donatello
- All Implemented Interfaces:
ImageObserver
,MenuContainer
,Serializable
,Accessible
Donatello
is a Graphic User Interface to edit a Graph
.- Since:
- 2022-02-01
- Author:
- Dan Royer
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Component
Component.BaselineResizeBehavior
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FileNameExtensionFilter
Used by save and load actionsfinal com.marginallyclever.nodegraphcore.Graph
TheGraph
to edit.Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addEdit
(UndoableEdit undoableEdit) void
void
clear()
Clears the internal graph and resets everything.void
com.marginallyclever.nodegraphcore.Graph
Returns the stored graph marked as copied.com.marginallyclever.nodegraphcore.Graph
getGraph()
Returns the graph being edited.boolean
Returns the cursor location when the popup began.List
<com.marginallyclever.nodegraphcore.Node> Returns all selected nodes.void
static void
Main entry point.void
moveSelectedNodes
(int dx, int dy) Move all selected nodes some relative cartesian amount.void
void
setCopiedGraph
(com.marginallyclever.nodegraphcore.Graph graph) Store a copy of some part of the graph for later.void
setKeepGoing
(boolean keepGoing) static void
void
setSelectedNode
(com.marginallyclever.nodegraphcore.Node n) Sets the list of selected nodes to one item.void
setSelectedNodes
(List<com.marginallyclever.nodegraphcore.Node> list) Sets the list of selected nodes.void
void
submit
(com.marginallyclever.nodegraphcore.Node node) void
swapTool
(com.marginallyclever.donatello.contextsensitivetools.ContextSensitiveTool tool) void
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
FILE_FILTER
Used by save and load actions -
graph
public final com.marginallyclever.nodegraphcore.Graph graphTheGraph
to edit.
-
-
Constructor Details
-
Donatello
public Donatello() -
Donatello
public Donatello(com.marginallyclever.nodegraphcore.Graph graph)
-
-
Method Details
-
connectNodeFactory
-
getKeepGoing
public boolean getKeepGoing() -
setKeepGoing
public void setKeepGoing(boolean keepGoing) -
setupMenuBar
public void setupMenuBar() -
swapTool
public void swapTool(com.marginallyclever.donatello.contextsensitivetools.ContextSensitiveTool tool) -
moveSelectedNodes
public void moveSelectedNodes(int dx, int dy) Move all selected nodes some relative cartesian amount.- Parameters:
dx
- the x-axis amount.dy
- the y-axis amount.
-
setSelectedNode
public void setSelectedNode(com.marginallyclever.nodegraphcore.Node n) Sets the list of selected nodes to one item.- Parameters:
n
- the new selected node.
-
setSelectedNodes
Sets the list of selected nodes.- Parameters:
list
- the new list of selected nodes.
-
getSelectedNodes
Returns all selected nodes. To change the selected nodes do not edit this list. Instead, callsetSelectedNodes(List)
orsetSelectedNode(Node)
.- Returns:
- all selected nodes.
-
getGraph
public com.marginallyclever.nodegraphcore.Graph getGraph()Returns the graph being edited.- Returns:
- the graph being edited.
-
getPopupPoint
Returns the cursor location when the popup began.- Returns:
- the cursor location when the popup began.
-
setCopiedGraph
public void setCopiedGraph(com.marginallyclever.nodegraphcore.Graph graph) Store a copy of some part of the graph for later.- Parameters:
graph
- the graph to set as copied.
-
getCopiedGraph
public com.marginallyclever.nodegraphcore.Graph getCopiedGraph()Returns the stored graph marked as copied.- Returns:
- the stored graph marked as copied.
-
clear
public void clear()Clears the internal graph and resets everything. -
getPaintArea
-
setLookAndFeel
public static void setLookAndFeel() -
addEdit
-
lockClock
public void lockClock() -
unlockClock
public void unlockClock() -
main
-
submit
public void submit(com.marginallyclever.nodegraphcore.Node node) -
getNodeFactoryPanel
-
addSelectionListener
-
removeSelectionListener
-