Package adams.gui.flow.tree
Class Tree
-
- All Implemented Interfaces:
CleanUpHandler
,DragGestureListener
,DragSourceListener
,DropTargetListener
,ImageObserver
,MenuContainer
,Serializable
,EventListener
,Accessible
,Scrollable
public class Tree extends DragAndDropTree implements CleanUpHandler
A custom tree for displaying the structure of a flow.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Tree.TreePopupSubmenu
Container object for a custom submenu in the tree popup.static class
Tree.TreeState
Container object for the tree state.-
Nested classes/interfaces inherited from class adams.gui.core.DragAndDropTree
DragAndDropTree.DropMenu, DragAndDropTree.DropPosition
-
Nested classes/interfaces inherited from class javax.swing.JTree
JTree.AccessibleJTree, JTree.DropLocation, JTree.DynamicUtilTreeNode, JTree.EmptySelectionModel, JTree.TreeModelHandler, JTree.TreeSelectionRedirector
-
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
-
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
-
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
-
Field Summary
Fields Modifier and Type Field Description protected HashSet<ActorChangeListener>
m_ActorChangeListeners
the listeners for changes in the actors.protected String
m_ActorNameColor
the HTML color string of the actor names (e.g., 'black' or '#000000').protected String
m_ActorNameSize
the HTML font tag size of the actor names (e.g., '3' or '-1').protected boolean
m_AllowKeyboardShortcuts
whether to allow keyboard shortcuts.protected boolean
m_AllowNodePopup
whether to allow the popup menu.protected boolean
m_AllowNodeQuickAction
whether to allow the quick action menu.protected String
m_AnnotationsColor
the HTML color string of the annotations (e.g., 'blue' or '#0000FF').protected String
m_AnnotationsSize
the HTML font tag size of the annotations (e.g., '3' or '-2').protected String
m_BookmarkHighlightBackground
the background HTML color string of the bookmark highlights (e.g., 'orange' or '#FFDD00').protected Node
m_CurrentEditingNode
the node that is currently being edited.protected Node
m_CurrentEditingParent
the parent of the currently edited node or node to be added.protected boolean
m_Debug
whether it is a debug flow (ie copy).protected File
m_File
the file this actor is based on (if at all).protected boolean
m_IgnoreNameChanges
whether to ignore name changes of actors (suppressing application of post-processors).protected String
m_InputOutputColor
the HTML color string of the input/output info (e.g., 'green' or '#008800').protected String[]
m_InputOutputPrefixes
the input/output class prefixes to remove.protected String
m_InputOutputSize
the HTML font tag size of the input/output info (e.g., '3' or '-2').protected List<AbstractKeyboardAction>
m_KeyboardActions
the keyboard actions.protected String
m_LastSearchString
the last search string used.protected AbstractActorTemplate
m_LastTemplate
the last template that was added via 'Add template'.protected TreeOperations.InsertPosition
m_LastTemplateInsertPosition
the position of the last template that was added via 'Add template'.protected boolean
m_Modified
whether the setup was modified or not.protected List<Object>
m_NodePopupCache
the classes for the tree popup.protected TreeOperations
m_Operations
for complex operations.protected FlowPanel
m_Owner
the owner.protected String
m_PlaceholdersColor
the HTML color string of the placeholders (e.g., 'navy' or '#0000FF').protected String
m_PlaceholdersSize
the HTML font tag size of the placeholders (e.g., '3' or '-2').protected String
m_QuickInfoColor
the HTML color string of the quick info (e.g., 'green' or '#008800').protected String
m_QuickInfoSize
the HTML font tag size of the quick info (e.g., '3' or '-2').protected boolean
m_RecordAdd
whether to record the adding of actors to improve suggestions.protected boolean
m_RecordEnclose
whether to record the enclosing of actors to improve suggestions.protected Tree
m_Self
the tree itself.protected List<TreePopupAction>
m_Shortcuts
the actions with shortcuts.protected boolean
m_ShowAnnotations
whether to show the annotations or not.protected boolean
m_ShowInputOutput
whether to display the input/output info or not.protected boolean
m_ShowQuickInfo
whether to display the quick info or not.protected String
m_VariableHighlightBackground
the background HTML color string of the variable highlights (e.g., 'red' or '#FFDD88').-
Fields inherited from class adams.gui.core.DragAndDropTree
m_ColorCueLine, m_CueLineExtension, m_DragSource, m_DropTarget, m_ExpansionDelay, m_ExpansionExecutor, m_NodeDroppedListeners, m_Offset, m_RectCueLine, m_SourceNode
-
Fields inherited from class javax.swing.JTree
ANCHOR_SELECTION_PATH_PROPERTY, CELL_EDITOR_PROPERTY, CELL_RENDERER_PROPERTY, cellEditor, cellRenderer, editable, EDITABLE_PROPERTY, EXPANDS_SELECTED_PATHS_PROPERTY, INVOKES_STOP_CELL_EDITING_PROPERTY, invokesStopCellEditing, LARGE_MODEL_PROPERTY, largeModel, LEAD_SELECTION_PATH_PROPERTY, ROOT_VISIBLE_PROPERTY, rootVisible, ROW_HEIGHT_PROPERTY, rowHeight, SCROLLS_ON_EXPAND_PROPERTY, scrollsOnExpand, SELECTION_MODEL_PROPERTY, selectionModel, selectionRedirector, SHOWS_ROOT_HANDLES_PROPERTY, showsRootHandles, TOGGLE_CLICK_COUNT_PROPERTY, toggleClickCount, TREE_MODEL_PROPERTY, treeModel, treeModelListener, VISIBLE_ROW_COUNT_PROPERTY, visibleRowCount
-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
Fields inherited from class java.awt.Component
accessibleContext, 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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addActorChangeListener(ActorChangeListener l)
Adds the listener to the internal list of listeners.void
addUndoPoint(String comment)
Adds an undo point with the given comment.void
buildTree(Actor root)
Builds the tree with the given root.void
buildTree(Node root)
Builds the tree with the given root node.protected boolean
canDrop(Transferable source, TreeNode target, DragAndDropTree.DropPosition position)
Checks whether the source can be dropped here.protected boolean
canPasteActor()
Checks whether an actor can be pasted.protected boolean
canRemoveActors(TreePath[] paths)
Checks whether the specified actors can be removed, e.g., "cut" and placed on the clipboard.protected boolean
canStartDrag(BaseTreeNode source)
Checks whether the source node can be dragged at all.void
cleanUp()
Cleans up data structures, frees up memory.BasePopupMenu
createNodePopupMenu(MouseEvent e)
Generates a popup if possible for the given mouse event.BasePopupMenu
createNodeQuickActionMenu(StateContainer state)
Generates a quick action popup if possible for the given state.BasePopupMenu
createNodeQuickActionMenu(MouseEvent e)
Generates a quick action popup if possible for the given mouse event.void
enableBreakpoints(boolean enable)
Enables/disables all breakpoint actors.protected void
enableBreakpoints(Node parent, boolean enable)
Enables/disables all breakpoint actors.void
find()
Searches for actor names in the tree.Actor
getActor()
Returns the underlying flow.Actor
getActor(StringBuilder errors)
Returns the underlying flow.String
getActorNameColor()
Returns the HTML color string for the actor names.String
getActorNameSize()
Returns the HTML font tag size string for the actor names.boolean
getAllowKeyboardShortcuts()
Returns whether the keyboard shortcuts are allowed.boolean
getAllowNodePopup()
Returns whether the node popup is allowed.boolean
getAllowNodeQuickAction()
Returns whether the node quick action menu is allowed.String
getAnnotationsColor()
Returns the HTML color string for the annotations.String
getAnnotationsSize()
Returns the HTML font tag size string for the annotations.String
getBookmarkHighlightBackground()
Returns the HTML background color string for the bookmark highlights.List<String>
getCommandLines()
Returns the nested commandlines of the actors.Node
getCurrentEditingNode()
Returns the node currently being edited.Node
getCurrentEditingParent()
Returns the parent of the node currently being edited or being added.protected String
getDropMenuActionCaption(DragAndDropTree.DropMenu action)
Returns the string for the specified action.protected ImageIcon
getDropMenuActionIcon(DragAndDropTree.DropMenu action)
Returns the icon for the drop action.FlowEditorPanel
getEditor()
Returns the owning editor.List<String>
getExpandedFullNames()
Returns the full actor names of expanded nodes.File
getFile()
Returns the file this flow is associated with.boolean
getIgnoreNameChanges()
Returns whether name changes of actors are ignored and no dialog is prompting the user whether to propagate the changes throughout the flow.String
getInputOutputColor()
Returns the HTML color string for the input/output information.String[]
getInputOutputPrefixes()
Returns the class name prefixes to remove from the input/output info.String
getInputOutputSize()
Returns the HTML font tag size string for the input/output information.List<AbstractKeyboardAction>
getKeyboardActions()
Returns the keyboard actions in use.String
getLastSearchString()
Returns the last search string in use.protected Actor
getNearestActor(Node parent, int startIndex, boolean forward)
Returns the nearest actor in the children of the provided parent node that is not disabled.TreeOperations
getOperations()
Returns the object for handling complex operations.FlowPanel
getOwner()
Returns the owning panel.TreePath
getPath(Node node)
Tries to find the node in the tree and returns the path to it.String
getPlaceholdersColor()
Returns the HTML color string for the placeholders.String
getPlaceholdersSize()
Returns the HTML font tag size string for the placeholders.String
getQuickInfoColor()
Returns the HTML color string for the quick info.String
getQuickInfoSize()
Returns the HTML font tag size string for the quick info.boolean
getRecordAdd()
Returns whether to record the adding of actors in order to improve the suggestions.boolean
getRecordEnclose()
Returns whether to record the enclosing of actors in order to improve the suggestions.Actor
getRootActor()
Returns the top-level actor (without any children).Node
getRootNode()
Returns the root node.double
getScaleFactor()
Returns the scale factor for the text/icons.Actor
getSelectedActor()
Returns the currently selected actor.Actor[]
getSelectedActors()
Returns the currently selected actors.String
getSelectedFullName()
Returns the full name of the currently selected actor.Node
getSelectedNode()
Returns the currently selected node.List<String>
getSelectionFullNames()
Returns the full names list of nodes that are selected.TreePath[]
getSelectionPaths()
Returns the paths of all selected values.int[]
getSelectionRows()
Returns the selected rows.boolean
getShowAnnotations()
Returns whether the annotations are shown or not.boolean
getShowInputOutput()
Returns whether the input/output information is shown or not.boolean
getShowQuickInfo()
Returns whether the quick info is shown or not.Tree.TreeState
getState()
Returns the current state of the tree (tree, expansions, modified).protected StateContainer
getTreeState(MouseEvent e)
Returns the state to be used for the popup menu.protected StateContainer
getTreeState(TreePath[] paths, Node currNode)
Returns the state to be used for the popup menu or keyboard shortcuts.String
getVariableHighlightBackground()
Returns the HTML background color string for the variable highlights.protected void
initialize()
Further initialization of the tree.boolean
isDebug()
Returns the debug flag.protected boolean
isDragEnabled()
Returns whether dragging is enabled.protected boolean
isDropEnabled()
Returns whether dropping is enabled.boolean
isFlow()
Returns whether the actor is of type Flow or not.boolean
isModified()
Returns whether the tree is modified.protected Node
locate(Node parent, ActorPath path)
Tries to locate the node specified by the path parts.Node
locate(String path)
Locates the node in the tree based on the specified path.void
locateAndDisplay(String path)
Locates and selects the node in the tree based on the specified path.void
locateAndDisplay(String path, boolean focus)
Locates and selects the node in the tree based on the specified path.protected DragAndDropTreeNodeCollection
newNodeCollection(BaseTreeNode[] nodes)
Creates a new collection for transfer.protected BaseTreeNode[]
newTreeNodes(Transferable data)
Creates a new TreeNode for this tree.void
nodeStructureChanged(Node node)
Shortcut method for notifying model about node structure change.void
notifyActorChangeListeners(ActorChangeEvent e)
Notifies all listeners.void
refreshTabs()
Refreshes the tabs.void
removeActorChangeListener(ActorChangeListener l)
Removes the listener from the internal list of listeners.void
setActor(Actor value)
Sets the flow actor to display.void
setActorNameColor(String value)
Sets the HTML color string for the actor names.void
setActorNameSize(String value)
Sets the HTML font tag size string for the actor names.void
setAllowKeyboardShortcuts(boolean value)
Sets whether to allow keyboard shortcuts.void
setAllowNodePopup(boolean value)
Sets whether to allow the node popup.void
setAllowNodeQuickAction(boolean value)
Sets whether to allow the node quick action menu.void
setAnnotationsColor(String value)
Sets the HTML color string for the annotations.void
setAnnotationsSize(String value)
Sets the HTML font tag size string for the annotations.void
setBookmarkHighlightBackground(String value)
Sets the HTML background color string for the bookmark highlights.void
setDebug(boolean value)
Sets the debug flag.void
setEditable(boolean value)
Sets the tree editable or read-only.void
setExpandedFullNames(List<String> names)
Sets the expanded state of the nodes located via their full names.void
setFile(File value)
Sets the file this flow is associated with.void
setIgnoreNameChanges(boolean value)
Sets whether to ignore name changes of actors and don't prompt a dialog with the user having the option to update the name throughout the glow.void
setInputOutputColor(String value)
Sets the HTML color string for the input/output information.void
setInputOutputPrefixes(String[] value)
Sets the class name prefixes to remove from the input/output info.void
setInputOutputSize(String value)
Sets the HTML font tag size string for the input/output information.void
setKeyboardActions(List<AbstractKeyboardAction> value)
Sets the keyboard actions to use.void
setLastSearchString(String value)
Sets the last search string in use.void
setModified(boolean value)
Sets whether the tree is modified or not.void
setOwner(FlowPanel value)
Sets the owning panel.void
setPlaceholdersColor(String value)
Sets the HTML color string for the placeholders.void
setPlaceholdersSize(String value)
Sets the HTML font tag size string for the quick info.void
setQuickInfoColor(String value)
Sets the HTML color string for the quick info.void
setQuickInfoSize(String value)
Sets the HTML font tag size string for the quick info.void
setRecordAdd(boolean value)
Sets whether to record the adding of actors in order to improve the suggestions.void
setRecordEnclose(boolean value)
Sets whether to record the enclosing of actors in order to improve the suggestions.void
setScaleFactor(double value)
Sets the scale factor for the text/icons.boolean
setSelectedFullName(String name)
Sets the selected node using its full name.void
setSelectionFullNames(List<String> names)
Sets the selected nodes based on their full names.void
setSelectionModel(TreeSelectionModel selectionModel)
Sets the tree's selection model.void
setShowAnnotations(boolean value)
Sets whether to show the annotations or not.void
setShowInputOutput(boolean value)
Sets whether to show the input/output information or not.void
setShowQuickInfo(boolean value)
Sets whether to show the quick info or not.void
setState(Tree.TreeState value)
Sets the current state of the tree (tree, expansions, modified).void
setVariableHighlightBackground(String value)
Sets the HTML background color string for the variable highlights.void
showNodePopupMenu(MouseEvent e)
Shows a popup if possible for the given mouse event.void
showNodeQuickActionMenu(MouseEvent e)
Shows a quick action popup if possible for the given mouse event.void
toggleEnabledState(TreePath[] paths)
Toggles the enabled state of actors.boolean
updateActorName(Node node, boolean force)
Ensures that the name of the actor stored in the node is unique among its siblings.void
updateCurrentEditing(Node parent, Node node)
Updates the current editing position.void
updateLastTemplate(AbstractActorTemplate template, TreeOperations.InsertPosition position)
Updates the last template that was used.-
Methods inherited from class adams.gui.core.DragAndDropTree
addNodeDroppedListener, canStartDrag, doDrop, dragDropEnd, dragEnter, dragEnter, dragExit, dragExit, dragGestureRecognized, dragOver, dragOver, drop, dropActionChanged, dropActionChanged, getExpansionDelay, notifyNodeDroppedListeners, removeNodeDroppedListener, selectCursor, setExpansionDelay, showDropMenu
-
Methods inherited from class adams.gui.core.BaseTree
collapse, collapseAll, collapseAll, collapseAll, collapseRoot, expand, expand, expandAll, expandAll, expandAll, expandRoot, getCommonAncestor, getExpandedState, getExpandedStateList, getExpandedTreePaths, getExpandedTreePaths, getFirstVisibleRow, getLastVisibleRow, getParentDialog, getParentFrame, getParentInternalFrame, isRootSelected, redraw, redraw, setExpandedState, setExpandedStateList, setExpandedTreePaths, setExpandedTreePaths, toggleAll, toggleAll, toPlainText, toPlainText, toString, toString
-
Methods inherited from class javax.swing.JTree
addSelectionInterval, addSelectionPath, addSelectionPaths, addSelectionRow, addSelectionRows, addTreeExpansionListener, addTreeSelectionListener, addTreeWillExpandListener, cancelEditing, clearSelection, clearToggledPaths, collapsePath, collapseRow, convertValueToText, createTreeModel, createTreeModelListener, expandPath, expandRow, fireTreeCollapsed, fireTreeExpanded, fireTreeWillCollapse, fireTreeWillExpand, fireValueChanged, getAccessibleContext, getAnchorSelectionPath, getCellEditor, getCellRenderer, getClosestPathForLocation, getClosestRowForLocation, getDefaultTreeModel, getDescendantToggledPaths, getDragEnabled, getDropLocation, getDropMode, getEditingPath, getExpandedDescendants, getExpandsSelectedPaths, getInvokesStopCellEditing, getLastSelectedPathComponent, getLeadSelectionPath, getLeadSelectionRow, getMaxSelectionRow, getMinSelectionRow, getModel, getNextMatch, getPathBetweenRows, getPathBounds, getPathForLocation, getPathForRow, getPreferredScrollableViewportSize, getRowBounds, getRowCount, getRowForLocation, getRowForPath, getRowHeight, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getScrollsOnExpand, getSelectionCount, getSelectionModel, getSelectionPath, getShowsRootHandles, getToggleClickCount, getToolTipText, getTreeExpansionListeners, getTreeSelectionListeners, getTreeWillExpandListeners, getUI, getUIClassID, getVisibleRowCount, hasBeenExpanded, isCollapsed, isCollapsed, isEditable, isEditing, isExpanded, isExpanded, isFixedRowHeight, isLargeModel, isPathEditable, isPathSelected, isRootVisible, isRowSelected, isSelectionEmpty, isVisible, makeVisible, paramString, removeDescendantSelectedPaths, removeDescendantToggledPaths, removeSelectionInterval, removeSelectionPath, removeSelectionPaths, removeSelectionRow, removeSelectionRows, removeTreeExpansionListener, removeTreeSelectionListener, removeTreeWillExpandListener, scrollPathToVisible, scrollRowToVisible, setAnchorSelectionPath, setCellEditor, setCellRenderer, setDragEnabled, setDropMode, setExpandedState, setExpandsSelectedPaths, setInvokesStopCellEditing, setLargeModel, setLeadSelectionPath, setModel, setRootVisible, setRowHeight, setScrollsOnExpand, setSelectionInterval, setSelectionPath, setSelectionPaths, setSelectionRow, setSelectionRows, setShowsRootHandles, setToggleClickCount, setUI, setVisibleRowCount, startEditingAtPath, stopEditing, treeDidChange, updateUI
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, 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, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, 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, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, 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, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
m_Self
protected Tree m_Self
the tree itself.
-
m_Owner
protected FlowPanel m_Owner
the owner.
-
m_ActorChangeListeners
protected HashSet<ActorChangeListener> m_ActorChangeListeners
the listeners for changes in the actors.
-
m_Modified
protected boolean m_Modified
whether the setup was modified or not.
-
m_File
protected File m_File
the file this actor is based on (if at all).
-
m_LastSearchString
protected String m_LastSearchString
the last search string used.
-
m_ActorNameColor
protected String m_ActorNameColor
the HTML color string of the actor names (e.g., 'black' or '#000000').
-
m_ActorNameSize
protected String m_ActorNameSize
the HTML font tag size of the actor names (e.g., '3' or '-1').
-
m_QuickInfoColor
protected String m_QuickInfoColor
the HTML color string of the quick info (e.g., 'green' or '#008800').
-
m_QuickInfoSize
protected String m_QuickInfoSize
the HTML font tag size of the quick info (e.g., '3' or '-2').
-
m_AnnotationsColor
protected String m_AnnotationsColor
the HTML color string of the annotations (e.g., 'blue' or '#0000FF').
-
m_AnnotationsSize
protected String m_AnnotationsSize
the HTML font tag size of the annotations (e.g., '3' or '-2').
-
m_InputOutputColor
protected String m_InputOutputColor
the HTML color string of the input/output info (e.g., 'green' or '#008800').
-
m_InputOutputSize
protected String m_InputOutputSize
the HTML font tag size of the input/output info (e.g., '3' or '-2').
-
m_PlaceholdersColor
protected String m_PlaceholdersColor
the HTML color string of the placeholders (e.g., 'navy' or '#0000FF').
-
m_PlaceholdersSize
protected String m_PlaceholdersSize
the HTML font tag size of the placeholders (e.g., '3' or '-2').
-
m_VariableHighlightBackground
protected String m_VariableHighlightBackground
the background HTML color string of the variable highlights (e.g., 'red' or '#FFDD88').
-
m_BookmarkHighlightBackground
protected String m_BookmarkHighlightBackground
the background HTML color string of the bookmark highlights (e.g., 'orange' or '#FFDD00').
-
m_ShowQuickInfo
protected boolean m_ShowQuickInfo
whether to display the quick info or not.
-
m_ShowAnnotations
protected boolean m_ShowAnnotations
whether to show the annotations or not.
-
m_ShowInputOutput
protected boolean m_ShowInputOutput
whether to display the input/output info or not.
-
m_InputOutputPrefixes
protected String[] m_InputOutputPrefixes
the input/output class prefixes to remove.
-
m_CurrentEditingNode
protected Node m_CurrentEditingNode
the node that is currently being edited.
-
m_CurrentEditingParent
protected Node m_CurrentEditingParent
the parent of the currently edited node or node to be added.
-
m_LastTemplate
protected AbstractActorTemplate m_LastTemplate
the last template that was added via 'Add template'.
-
m_LastTemplateInsertPosition
protected TreeOperations.InsertPosition m_LastTemplateInsertPosition
the position of the last template that was added via 'Add template'.
-
m_IgnoreNameChanges
protected boolean m_IgnoreNameChanges
whether to ignore name changes of actors (suppressing application of post-processors).
-
m_Shortcuts
protected List<TreePopupAction> m_Shortcuts
the actions with shortcuts.
-
m_KeyboardActions
protected List<AbstractKeyboardAction> m_KeyboardActions
the keyboard actions.
-
m_RecordAdd
protected boolean m_RecordAdd
whether to record the adding of actors to improve suggestions.
-
m_RecordEnclose
protected boolean m_RecordEnclose
whether to record the enclosing of actors to improve suggestions.
-
m_AllowNodePopup
protected boolean m_AllowNodePopup
whether to allow the popup menu.
-
m_AllowNodeQuickAction
protected boolean m_AllowNodeQuickAction
whether to allow the quick action menu.
-
m_AllowKeyboardShortcuts
protected boolean m_AllowKeyboardShortcuts
whether to allow keyboard shortcuts.
-
m_Operations
protected TreeOperations m_Operations
for complex operations.
-
m_Debug
protected boolean m_Debug
whether it is a debug flow (ie copy).
-
-
Method Detail
-
initialize
protected void initialize()
Further initialization of the tree.- Overrides:
initialize
in classDragAndDropTree
-
getOperations
public TreeOperations getOperations()
Returns the object for handling complex operations.- Returns:
- the tree operations
-
setSelectionModel
public void setSelectionModel(TreeSelectionModel selectionModel)
Sets the tree's selection model. When anull
value is specified an emptyselectionModel
is used, which does not allow selections.- Overrides:
setSelectionModel
in classJTree
- Parameters:
selectionModel
- theTreeSelectionModel
to use, ornull
to disable selections- See Also:
TreeSelectionModel
-
buildTree
public void buildTree(Actor root)
Builds the tree with the given root.- Parameters:
root
- the root actor, can be null
-
buildTree
public void buildTree(Node root)
Builds the tree with the given root node.- Parameters:
root
- the root node, can be null
-
getExpandedFullNames
public List<String> getExpandedFullNames()
Returns the full actor names of expanded nodes.- Returns:
- the full names
-
setExpandedFullNames
public void setExpandedFullNames(List<String> names)
Sets the expanded state of the nodes located via their full names.- Parameters:
names
- the full names
-
getSelectionFullNames
public List<String> getSelectionFullNames()
Returns the full names list of nodes that are selected.- Returns:
- the full names
-
setSelectionFullNames
public void setSelectionFullNames(List<String> names)
Sets the selected nodes based on their full names.- Parameters:
names
- the full names
-
updateActorName
public boolean updateActorName(Node node, boolean force)
Ensures that the name of the actor stored in the node is unique among its siblings. ForFixedNameActorHandler
parents, the desired name is determined.- Parameters:
node
- the actor to checkforce
- whether to force the updating- Returns:
- true if the actor's name was modified
-
setOwner
public void setOwner(FlowPanel value)
Sets the owning panel.- Parameters:
value
- the owner, null if not available
-
getOwner
public FlowPanel getOwner()
Returns the owning panel.- Returns:
- the panel, null if not available
-
getEditor
public FlowEditorPanel getEditor()
Returns the owning editor.- Returns:
- the editor, null if not available
-
setAllowNodePopup
public void setAllowNodePopup(boolean value)
Sets whether to allow the node popup.- Parameters:
value
- true if to allow
-
getAllowNodePopup
public boolean getAllowNodePopup()
Returns whether the node popup is allowed.- Returns:
- true if allowed
-
setAllowNodeQuickAction
public void setAllowNodeQuickAction(boolean value)
Sets whether to allow the node quick action menu.- Parameters:
value
- true if to allow
-
getAllowNodeQuickAction
public boolean getAllowNodeQuickAction()
Returns whether the node quick action menu is allowed.- Returns:
- true if allowed
-
setAllowKeyboardShortcuts
public void setAllowKeyboardShortcuts(boolean value)
Sets whether to allow keyboard shortcuts.- Parameters:
value
- true if to allow
-
getAllowKeyboardShortcuts
public boolean getAllowKeyboardShortcuts()
Returns whether the keyboard shortcuts are allowed.- Returns:
- true if allowed
-
setActorNameColor
public void setActorNameColor(String value)
Sets the HTML color string for the actor names.- Parameters:
value
- the HTML color string
-
getActorNameColor
public String getActorNameColor()
Returns the HTML color string for the actor names.- Returns:
- the HTML color string
-
setActorNameSize
public void setActorNameSize(String value)
Sets the HTML font tag size string for the actor names.- Parameters:
value
- the HTML font tag size string
-
getActorNameSize
public String getActorNameSize()
Returns the HTML font tag size string for the actor names.- Returns:
- the HTML font tag size string
-
setAnnotationsColor
public void setAnnotationsColor(String value)
Sets the HTML color string for the annotations.- Parameters:
value
- the HTML color string
-
getAnnotationsColor
public String getAnnotationsColor()
Returns the HTML color string for the annotations.- Returns:
- the HTML color string
-
setAnnotationsSize
public void setAnnotationsSize(String value)
Sets the HTML font tag size string for the annotations.- Parameters:
value
- the HTML font tag size string
-
getAnnotationsSize
public String getAnnotationsSize()
Returns the HTML font tag size string for the annotations.- Returns:
- the HTML font tag size string
-
setQuickInfoColor
public void setQuickInfoColor(String value)
Sets the HTML color string for the quick info.- Parameters:
value
- the HTML color string
-
getQuickInfoColor
public String getQuickInfoColor()
Returns the HTML color string for the quick info.- Returns:
- the HTML color string
-
setQuickInfoSize
public void setQuickInfoSize(String value)
Sets the HTML font tag size string for the quick info.- Parameters:
value
- the HTML font tag size string
-
getQuickInfoSize
public String getQuickInfoSize()
Returns the HTML font tag size string for the quick info.- Returns:
- the HTML font tag size string
-
setInputOutputColor
public void setInputOutputColor(String value)
Sets the HTML color string for the input/output information.- Parameters:
value
- the HTML color string
-
getInputOutputColor
public String getInputOutputColor()
Returns the HTML color string for the input/output information.- Returns:
- the HTML color string
-
setInputOutputSize
public void setInputOutputSize(String value)
Sets the HTML font tag size string for the input/output information.- Parameters:
value
- the HTML font tag size string
-
getInputOutputSize
public String getInputOutputSize()
Returns the HTML font tag size string for the input/output information.- Returns:
- the HTML font tag size string
-
setPlaceholdersColor
public void setPlaceholdersColor(String value)
Sets the HTML color string for the placeholders.- Parameters:
value
- the HTML color string
-
getPlaceholdersColor
public String getPlaceholdersColor()
Returns the HTML color string for the placeholders.- Returns:
- the HTML color string
-
setPlaceholdersSize
public void setPlaceholdersSize(String value)
Sets the HTML font tag size string for the quick info.- Parameters:
value
- the HTML font tag size string
-
getPlaceholdersSize
public String getPlaceholdersSize()
Returns the HTML font tag size string for the placeholders.- Returns:
- the HTML font tag size string
-
setVariableHighlightBackground
public void setVariableHighlightBackground(String value)
Sets the HTML background color string for the variable highlights.- Parameters:
value
- the HTML color string
-
getVariableHighlightBackground
public String getVariableHighlightBackground()
Returns the HTML background color string for the variable highlights.- Returns:
- the HTML color string
-
setBookmarkHighlightBackground
public void setBookmarkHighlightBackground(String value)
Sets the HTML background color string for the bookmark highlights.- Parameters:
value
- the HTML color string
-
getBookmarkHighlightBackground
public String getBookmarkHighlightBackground()
Returns the HTML background color string for the bookmark highlights.- Returns:
- the HTML color string
-
setIgnoreNameChanges
public void setIgnoreNameChanges(boolean value)
Sets whether to ignore name changes of actors and don't prompt a dialog with the user having the option to update the name throughout the glow.- Parameters:
value
- if true then name changes are ignored
-
getIgnoreNameChanges
public boolean getIgnoreNameChanges()
Returns whether name changes of actors are ignored and no dialog is prompting the user whether to propagate the changes throughout the flow.- Returns:
- true if the name changes are ignored
-
setRecordAdd
public void setRecordAdd(boolean value)
Sets whether to record the adding of actors in order to improve the suggestions.- Parameters:
value
- true if to record
-
getRecordAdd
public boolean getRecordAdd()
Returns whether to record the adding of actors in order to improve the suggestions.- Returns:
- true if to record
-
setRecordEnclose
public void setRecordEnclose(boolean value)
Sets whether to record the enclosing of actors in order to improve the suggestions.- Parameters:
value
- true if to record
-
getRecordEnclose
public boolean getRecordEnclose()
Returns whether to record the enclosing of actors in order to improve the suggestions.- Returns:
- true if to record
-
setKeyboardActions
public void setKeyboardActions(List<AbstractKeyboardAction> value)
Sets the keyboard actions to use.- Parameters:
value
- the actions
-
getKeyboardActions
public List<AbstractKeyboardAction> getKeyboardActions()
Returns the keyboard actions in use.- Returns:
- the actions
-
nodeStructureChanged
public void nodeStructureChanged(Node node)
Shortcut method for notifying model about node structure change.- Parameters:
node
- the node the triggered the structural change
-
canPasteActor
protected boolean canPasteActor()
Checks whether an actor can be pasted.- Returns:
- true if pasting is possible
-
canRemoveActors
protected boolean canRemoveActors(TreePath[] paths)
Checks whether the specified actors can be removed, e.g., "cut" and placed on the clipboard.- Parameters:
paths
- the paths to the actors- Returns:
- true if the actors can be removed
-
getTreeState
protected StateContainer getTreeState(MouseEvent e)
Returns the state to be used for the popup menu.- Parameters:
e
- the event- Returns:
- the state, null if no popup possible
-
getTreeState
protected StateContainer getTreeState(TreePath[] paths, Node currNode)
Returns the state to be used for the popup menu or keyboard shortcuts.- Parameters:
paths
- the selected paths to work withcurrNode
- the currently active node- Returns:
- the state
-
showNodePopupMenu
public void showNodePopupMenu(MouseEvent e)
Shows a popup if possible for the given mouse event.- Parameters:
e
- the event
-
createNodePopupMenu
public BasePopupMenu createNodePopupMenu(MouseEvent e)
Generates a popup if possible for the given mouse event.- Parameters:
e
- the event- Returns:
- the popup menu, null if not possible
-
showNodeQuickActionMenu
public void showNodeQuickActionMenu(MouseEvent e)
Shows a quick action popup if possible for the given mouse event.- Parameters:
e
- the event
-
createNodeQuickActionMenu
public BasePopupMenu createNodeQuickActionMenu(MouseEvent e)
Generates a quick action popup if possible for the given mouse event.- Parameters:
e
- the event- Returns:
- the popup menu, null if not possible
-
createNodeQuickActionMenu
public BasePopupMenu createNodeQuickActionMenu(StateContainer state)
Generates a quick action popup if possible for the given state.- Parameters:
state
- the state container- Returns:
- the popup menu, null if not possible
-
addUndoPoint
public void addUndoPoint(String comment)
Adds an undo point with the given comment.- Parameters:
comment
- the comment for the undo point
-
toggleEnabledState
public void toggleEnabledState(TreePath[] paths)
Toggles the enabled state of actors.- Parameters:
paths
- the paths to the actors
-
getNearestActor
protected Actor getNearestActor(Node parent, int startIndex, boolean forward)
Returns the nearest actor in the children of the provided parent node that is not disabled.- Parameters:
parent
- the parent node to searchstartIndex
- the starting index in the childrenforward
- whether to search forward or backwards- Returns:
- the nearest actor, null if none found
-
addActorChangeListener
public void addActorChangeListener(ActorChangeListener l)
Adds the listener to the internal list of listeners.- Parameters:
l
- the listener to add
-
removeActorChangeListener
public void removeActorChangeListener(ActorChangeListener l)
Removes the listener from the internal list of listeners.- Parameters:
l
- the listener to remove
-
notifyActorChangeListeners
public void notifyActorChangeListeners(ActorChangeEvent e)
Notifies all listeners.- Parameters:
e
- the event to send
-
setActor
public void setActor(Actor value)
Sets the flow actor to display.- Parameters:
value
- the flow actor
-
getActor
public Actor getActor()
Returns the underlying flow.
WARNING: Recreates an actor hierarchy based on the tree. Method gets very slow for large flows. If you only need the root actor, then use getRootActor() instead.- Returns:
- the flow or null if none stored yet
- See Also:
getRootActor()
,Node.getFullActor()
-
getActor
public Actor getActor(StringBuilder errors)
Returns the underlying flow.
WARNING: Recreates an actor hierarchy based on the tree. Method gets very slow for large flows. If you only need the root actor, then use getRootActor() instead.- Parameters:
errors
- for storing any errors, use null to ignore- Returns:
- the flow or null if none stored yet
- See Also:
getRootActor()
,Node.getFullActor()
-
getRootActor
public Actor getRootActor()
Returns the top-level actor (without any children).- Returns:
- the flow or null if none stored yet
- See Also:
getActor()
-
getRootNode
public Node getRootNode()
Returns the root node.- Returns:
- the root, null if not available
-
getCommandLines
public List<String> getCommandLines()
Returns the nested commandlines of the actors. Node level equals the number of leading blanks.- Returns:
- the nested commandlines
-
isFlow
public boolean isFlow()
Returns whether the actor is of type Flow or not.- Returns:
- true if actor is a Flow
-
setModified
public void setModified(boolean value)
Sets whether the tree is modified or not.- Parameters:
value
- true if tree is modified- See Also:
isDebug()
-
isModified
public boolean isModified()
Returns whether the tree is modified.- Returns:
- true if modified
-
setFile
public void setFile(File value)
Sets the file this flow is associated with.- Parameters:
value
- the associated file, null if not associated with a file
-
getFile
public File getFile()
Returns the file this flow is associated with.- Returns:
- the file, null if not associated with file
-
getSelectionRows
public int[] getSelectionRows()
Returns the selected rows. Sorted from smallest to largest row.- Overrides:
getSelectionRows
in classJTree
- Returns:
- the selected rows, 0-length array if none selected
-
getSelectionPaths
public TreePath[] getSelectionPaths()
Returns the paths of all selected values. Sorted from smallest to largest selection row.- Overrides:
getSelectionPaths
in classJTree
- Returns:
- an array of
TreePath
objects indicating the selected nodes, orempty array
if nothing is currently selected
-
getSelectedNode
public Node getSelectedNode()
Returns the currently selected node.- Returns:
- the selected node, null if none selected
-
getSelectedActor
public Actor getSelectedActor()
Returns the currently selected actor.- Returns:
- the selected actor, null if none selected
-
getSelectedActors
public Actor[] getSelectedActors()
Returns the currently selected actors.- Returns:
- the selected actors, 0-length array if none selected
-
getSelectedFullName
public String getSelectedFullName()
Returns the full name of the currently selected actor.- Returns:
- the full name of the selected actor, null if none selected
-
setSelectedFullName
public boolean setSelectedFullName(String name)
Sets the selected node using its full name.- Parameters:
name
- the full name- Returns:
- true if located and selected
-
locate
protected Node locate(Node parent, ActorPath path)
Tries to locate the node specified by the path parts.- Parameters:
parent
- the parent to start withpath
- the path elements to traverse (below the parent)- Returns:
- the located node or null if none found
-
locate
public Node locate(String path)
Locates the node in the tree based on the specified path.- Parameters:
path
- the path of the node to locate- Returns:
- the located node or null if none found
-
locateAndDisplay
public void locateAndDisplay(String path)
Locates and selects the node in the tree based on the specified path. Does not focus the tree.- Parameters:
path
- the path of the node to locate
-
locateAndDisplay
public void locateAndDisplay(String path, boolean focus)
Locates and selects the node in the tree based on the specified path.- Parameters:
path
- the path of the node to locatefocus
- whether to focus the tree
-
getPath
public TreePath getPath(Node node)
Tries to find the node in the tree and returns the path to it.- Parameters:
node
- the node to look for- Returns:
- the path if the node was found, null otherwise
-
find
public void find()
Searches for actor names in the tree.
-
setLastSearchString
public void setLastSearchString(String value)
Sets the last search string in use.- Parameters:
value
- the search string
-
getLastSearchString
public String getLastSearchString()
Returns the last search string in use.- Returns:
- the search string
-
setShowQuickInfo
public void setShowQuickInfo(boolean value)
Sets whether to show the quick info or not.- Parameters:
value
- if true then the quick info will be displayed
-
getShowQuickInfo
public boolean getShowQuickInfo()
Returns whether the quick info is shown or not.- Returns:
- true if the quick info is shown
-
setShowAnnotations
public void setShowAnnotations(boolean value)
Sets whether to show the annotations or not.- Parameters:
value
- if true then the annotations will be displayed
-
getShowAnnotations
public boolean getShowAnnotations()
Returns whether the annotations are shown or not.- Returns:
- true if the annotations are shown
-
setShowInputOutput
public void setShowInputOutput(boolean value)
Sets whether to show the input/output information or not.- Parameters:
value
- if true then the input/output information will be displayed
-
getShowInputOutput
public boolean getShowInputOutput()
Returns whether the input/output information is shown or not.- Returns:
- true if the input/output information is shown
-
setInputOutputPrefixes
public void setInputOutputPrefixes(String[] value)
Sets the class name prefixes to remove from the input/output info.- Parameters:
value
- the prefixes
-
getInputOutputPrefixes
public String[] getInputOutputPrefixes()
Returns the class name prefixes to remove from the input/output info.- Returns:
- the prefixes
-
setScaleFactor
public void setScaleFactor(double value)
Sets the scale factor for the text/icons.- Parameters:
value
- the scale factor (1.0 is actual size)
-
getScaleFactor
public double getScaleFactor()
Returns the scale factor for the text/icons.- Returns:
- the scale factor (1.0 is actual size)
-
setState
public void setState(Tree.TreeState value)
Sets the current state of the tree (tree, expansions, modified).- Parameters:
value
- the state to use
-
getState
public Tree.TreeState getState()
Returns the current state of the tree (tree, expansions, modified). Is used for undo/redo.- Returns:
- the current state
-
getDropMenuActionCaption
protected String getDropMenuActionCaption(DragAndDropTree.DropMenu action)
Returns the string for the specified action.- Overrides:
getDropMenuActionCaption
in classDragAndDropTree
- Parameters:
action
- the action to get the string for- Returns:
- the caption
-
getDropMenuActionIcon
protected ImageIcon getDropMenuActionIcon(DragAndDropTree.DropMenu action)
Returns the icon for the drop action.- Overrides:
getDropMenuActionIcon
in classDragAndDropTree
- Parameters:
action
- the action to get the icon for- Returns:
- the icon or null if none available
-
isDragEnabled
protected boolean isDragEnabled()
Returns whether dragging is enabled.- Overrides:
isDragEnabled
in classDragAndDropTree
- Returns:
- always true
-
isDropEnabled
protected boolean isDropEnabled()
Returns whether dropping is enabled.- Overrides:
isDropEnabled
in classDragAndDropTree
- Returns:
- always true
-
canStartDrag
protected boolean canStartDrag(BaseTreeNode source)
Checks whether the source node can be dragged at all.
The parent of the source node must a MutableActorHandler- Parameters:
source
- the source node that is about to be dragged- Returns:
- true if the source node can be dragged
-
canDrop
protected boolean canDrop(Transferable source, TreeNode target, DragAndDropTree.DropPosition position)
Checks whether the source can be dropped here.- Overrides:
canDrop
in classDragAndDropTree
- Parameters:
source
- the source nodetarget
- the target nodeposition
- where to drop the data- Returns:
- true if can be dropped
- See Also:
BaseTreeNode
-
enableBreakpoints
protected void enableBreakpoints(Node parent, boolean enable)
Enables/disables all breakpoint actors.- Parameters:
parent
- the parent node to start recursion fromenable
- if true all breakpoint actors get enabled, otherwise disabled
-
enableBreakpoints
public void enableBreakpoints(boolean enable)
Enables/disables all breakpoint actors.- Parameters:
enable
- if true all breakpoint actors get enabled, otherwise disabled
-
setEditable
public void setEditable(boolean value)
Sets the tree editable or read-only. Also, forces the tree to redraw.- Overrides:
setEditable
in classJTree
- Parameters:
value
- if false the tree will be read-only
-
getCurrentEditingNode
public Node getCurrentEditingNode()
Returns the node currently being edited.- Returns:
- the node, null if none being edited
-
getCurrentEditingParent
public Node getCurrentEditingParent()
Returns the parent of the node currently being edited or being added.- Returns:
- the node, null if none being edited/added
-
updateCurrentEditing
public void updateCurrentEditing(Node parent, Node node)
Updates the current editing position.- Parameters:
parent
- the parent of the current nodenode
- the current node
-
newNodeCollection
protected DragAndDropTreeNodeCollection newNodeCollection(BaseTreeNode[] nodes)
Creates a new collection for transfer.- Overrides:
newNodeCollection
in classDragAndDropTree
- Parameters:
nodes
- the nodes to package- Returns:
- the new collection
-
newTreeNodes
protected BaseTreeNode[] newTreeNodes(Transferable data)
Creates a new TreeNode for this tree.- Overrides:
newTreeNodes
in classDragAndDropTree
- Parameters:
data
- the data to use- Returns:
- the new nodes
-
refreshTabs
public void refreshTabs()
Refreshes the tabs.
-
updateLastTemplate
public void updateLastTemplate(AbstractActorTemplate template, TreeOperations.InsertPosition position)
Updates the last template that was used.- Parameters:
template
- the templateposition
- how the template was inserted
-
setDebug
public void setDebug(boolean value)
Sets the debug flag.- Parameters:
value
- true if it is a debug flow, ie copy
-
isDebug
public boolean isDebug()
Returns the debug flag.- Returns:
- true if it is a debug flow, ie copy
-
cleanUp
public void cleanUp()
Cleans up data structures, frees up memory.- Specified by:
cleanUp
in interfaceCleanUpHandler
-
-