Class ComponentNode
- java.lang.Object
-
- com.inductiveautomation.ignition.designer.navtree.model.AbstractNavTreeNode
-
- com.inductiveautomation.perspective.designer.workspace.nav.ComponentNode
-
- All Implemented Interfaces:
java.lang.Iterable<AbstractNavTreeNode>
,javax.swing.tree.TreeNode
public class ComponentNode extends AbstractNavTreeNode
Created by carlg on 6/13/2017.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.inductiveautomation.ignition.designer.navtree.model.AbstractNavTreeNode
AbstractNavTreeNode.DeleteReason, AbstractNavTreeNode.PopupAction
-
-
Field Summary
-
Fields inherited from class com.inductiveautomation.ignition.designer.navtree.model.AbstractNavTreeNode
bold, children, childrenLoaded, copyAction, copyPathAction, cutAction, depth, icon, italic, log, model, name, parent, pasteAction, renameAction, selectionModel, text, thumbnail, tooltip
-
-
Constructor Summary
Constructors Constructor Description ComponentNode(ViewResourceEditor editor, ComponentStructure component)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBadges(BadgeTreeCellRenderer renderer, boolean selected)
Add 'badges' to indicate meta information about this nodeprotected void
addEditActions(javax.swing.JPopupMenu menu)
java.util.Optional<ComponentNode>
findChild(java.util.List<java.lang.Integer> path)
protected AbstractNavTreeNode.PopupAction
getDeleteAction()
ViewResourceEditor
getEditor()
java.lang.String
getPath()
PipesFolderNode
getPipesFolderNode()
protected java.lang.Iterable<AbstractNavTreeNode.PopupAction>
getPopupActions()
Provide a list ofPopupAction
s that will be set up byAbstractNavTreeNode.setupEditActions(javax.swing.tree.TreePath[], java.util.List<com.inductiveautomation.ignition.designer.navtree.model.AbstractNavTreeNode>)
; that is, will have theirAbstractNavTreeNode.PopupAction.selection
andAbstractNavTreeNode.PopupAction.actionHandler
set.void
install(AbstractNavTreeNode parent)
boolean
isEditable()
Override this and return true if you want your node's text to be editable.protected java.util.List<AbstractNavTreeNode>
loadChildren()
Called before this node responds from any of the children-related TreeNode functions, if a list of children wasn't already set.void
onDeepSelectionChanged(DeepSelectionChangeEvent event)
void
onEdit(java.lang.String newTextValue)
Called after this node has been edited in the tree.protected void
uninstall()
Called when the node is removed from the tree.-
Methods inherited from class com.inductiveautomation.ignition.designer.navtree.model.AbstractNavTreeNode
canCopy, canDelete, canDrag, canDrop, canPaste, checkChildren, children, confirmDelete, createResourceCopy, debug, debug, dispatchSelectionEvent, doCopy, doCut, doDelete, doPaste, expand, expandAndSelect, findChild, findCommonEditActionHandler, findDropHandler, findEditActionHandler, forceChildrenReload, getAllowsChildren, getChildAt, getChildCount, getClipboard, getDepth, getExpandedIcon, getIcon, getIndex, getModel, getName, getParent, getSelectionModel, getSortOrder, getText, getThumbnail, getTooltip, getWorkspaceName, initPopupMenu, isBold, isEditActionHandler, isItalic, isLeaf, isRestricted, isSelected, isTopLevelNode, isValidName, iterator, newLogger, notifyChildNameChanged, onChildrenSelected, onDoubleClick, onSelected, pathToRoot, recreate, recreate, refresh, reload, select, select, setBold, setChildren, setIcon, setItalic, setName, setText, setThumbnail, setTooltip, setupEditActions, showPopupMenu, toString, uninstallChildren, useThumbnailTooltip, visitIfLoaded
-
-
-
-
Constructor Detail
-
ComponentNode
public ComponentNode(@Nullable ViewResourceEditor editor, ComponentStructure component)
-
-
Method Detail
-
getPipesFolderNode
public PipesFolderNode getPipesFolderNode()
-
getEditor
@Nullable public ViewResourceEditor getEditor()
-
install
public void install(AbstractNavTreeNode parent)
- Overrides:
install
in classAbstractNavTreeNode
-
uninstall
protected void uninstall()
Description copied from class:AbstractNavTreeNode
Called when the node is removed from the tree. Override to provide meaningful implementation.- Overrides:
uninstall
in classAbstractNavTreeNode
-
addEditActions
protected void addEditActions(javax.swing.JPopupMenu menu)
- Overrides:
addEditActions
in classAbstractNavTreeNode
-
getPopupActions
protected java.lang.Iterable<AbstractNavTreeNode.PopupAction> getPopupActions()
Description copied from class:AbstractNavTreeNode
Provide a list ofPopupAction
s that will be set up byAbstractNavTreeNode.setupEditActions(javax.swing.tree.TreePath[], java.util.List<com.inductiveautomation.ignition.designer.navtree.model.AbstractNavTreeNode>)
; that is, will have theirAbstractNavTreeNode.PopupAction.selection
andAbstractNavTreeNode.PopupAction.actionHandler
set.- Overrides:
getPopupActions
in classAbstractNavTreeNode
-
getDeleteAction
@Nonnull protected AbstractNavTreeNode.PopupAction getDeleteAction()
- Overrides:
getDeleteAction
in classAbstractNavTreeNode
-
isEditable
public boolean isEditable()
Description copied from class:AbstractNavTreeNode
Override this and return true if you want your node's text to be editable. SeeAbstractNavTreeNode.onEdit(String)
- Overrides:
isEditable
in classAbstractNavTreeNode
-
onEdit
public void onEdit(java.lang.String newTextValue)
Description copied from class:AbstractNavTreeNode
Called after this node has been edited in the tree.- Overrides:
onEdit
in classAbstractNavTreeNode
-
onDeepSelectionChanged
public void onDeepSelectionChanged(DeepSelectionChangeEvent event)
-
getPath
public java.lang.String getPath()
-
addBadges
public void addBadges(BadgeTreeCellRenderer renderer, boolean selected)
Description copied from class:AbstractNavTreeNode
Add 'badges' to indicate meta information about this node- Overrides:
addBadges
in classAbstractNavTreeNode
- Parameters:
renderer
- the renderer; callBadgeTreeCellRenderer.addBadge(Badge)
to add your badge(s)selected
- the state of this node
-
findChild
public java.util.Optional<ComponentNode> findChild(java.util.List<java.lang.Integer> path)
-
loadChildren
protected java.util.List<AbstractNavTreeNode> loadChildren()
Description copied from class:AbstractNavTreeNode
Called before this node responds from any of the children-related TreeNode functions, if a list of children wasn't already set. Override to use lazy child loading.- Overrides:
loadChildren
in classAbstractNavTreeNode
-
-