Class AbstractTopLevelContainerNode
- java.lang.Object
-
- com.inductiveautomation.ignition.designer.navtree.model.AbstractNavTreeNode
-
- com.inductiveautomation.ignition.designer.navtree.model.AbstractResourceNavTreeNode
-
- com.inductiveautomation.factorypmi.designer.model.navtree.AbstractTopLevelContainerNode
-
- All Implemented Interfaces:
DesignableWorkspaceListener,java.lang.Iterable<AbstractNavTreeNode>,javax.swing.tree.TreeNode
- Direct Known Subclasses:
TemplateNode,WindowNode
public abstract class AbstractTopLevelContainerNode extends AbstractResourceNavTreeNode implements DesignableWorkspaceListener
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.inductiveautomation.ignition.designer.navtree.model.AbstractNavTreeNode
AbstractNavTreeNode.DeleteReason, AbstractNavTreeNode.PopupAction
-
-
Field Summary
Fields Modifier and Type Field Description protected TopLevelContainercontainerprotected VisionDesignerImplvisionprotected WindowWorkspaceworkspace-
Fields inherited from class com.inductiveautomation.ignition.designer.navtree.model.AbstractResourceNavTreeNode
context, exportAction, inheritedIcon, overrideAction, overrideEnabledAction, overrideEnabledMenuItem, protectedAction, protectedMenuItem, resourceId, resourcePath, restricted, revertAction, revertMenuItem
-
Fields inherited from class com.inductiveautomation.ignition.designer.navtree.model.AbstractNavTreeNode
bold, children, childrenLoaded, copyAction, copyPathAction, cutAction, deleteAction, depth, icon, italic, log, model, name, parent, pasteAction, renameAction, selectionModel, text, thumbnail, tooltip
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractTopLevelContainerNode(VisionDesignerImpl vision, ProjectResource resource)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddBadges(BadgeTreeCellRenderer renderer, boolean selected)Add 'badges' to indicate meta information about this nodeprotected abstract voidaddListeners(TopLevelContainer container)booleancanCopy(java.util.List<AbstractNavTreeNode> selectedChildren)Can this edit action handler handle the copy action, given its current selection? Note that if this andAbstractNavTreeNode.canDelete(java.util.List)both return true, the cut action will also be enabled.booleancanDelete(java.util.List<AbstractNavTreeNode> selectedChildren)Can this edit action handler handle the delete action, given its current selection? Note that if this andAbstractNavTreeNode.canCopy(java.util.List)both return true, the cut action will also be enabled.booleancanPaste(java.util.List<AbstractNavTreeNode> selectedChildren, java.awt.datatransfer.Transferable data)Can this action handler handle a paste given the data flavors currently available in the clipboard? data may be null.voidcommitIfOpen()Implement this to commit the resource that is open for editing.booleanconfirmDelete(java.util.List<? extends AbstractNavTreeNode> selectedChildren)Used to confirm the delete.voidcontainerClosed(DesignableContainer container)voidcontainerOpened(DesignableContainer container)voidcontainerSelected(DesignableContainer container)java.awt.datatransfer.TransferabledoCopy(java.util.List<? extends AbstractNavTreeNode> selectedChildren)Called when the copy action is performed.java.awt.datatransfer.TransferabledoCut(java.util.List<? extends AbstractNavTreeNode> selectedChildren)Called when the cut action is performed.voiddoDelete(java.util.List<? extends AbstractNavTreeNode> selectedChildren, AbstractNavTreeNode.DeleteReason reason)Called when the delete action is performed, if confirmDelete returned truebooleandoPaste(java.util.List<? extends AbstractNavTreeNode> selectedChildren, java.awt.datatransfer.Transferable clipboardContents, boolean isDrop)Called when the paste action is performedprotected abstract AbstractNavTreeNodefindChild(java.awt.Component c)booleangetAllowsChildren()VisionDesignerInterfacegetVision()voidinstall(AbstractNavTreeNode parent)booleanisContainerOpen()booleanisEditActionHandler()Override to return true if you want this node to be an edit action handler for its children.protected booleanisOpen()Override this to indicate whether or not this resource is open for editingvoiditemSelectionChanged(java.util.List<javax.swing.JComponent> newSelection)protected booleanmatches(DesignableContainer container)voidonChildrenSelected(java.util.List<javax.swing.tree.TreePath> paths)Called when child nodes (deep) are selected under this node.voidonSelected()Called when this node is selected in the treeprotected abstract voidremoveListeners(TopLevelContainer container)protected voidsetContainer(TopLevelContainer container, boolean notify)voiduninstall()Called when the node is removed from the tree.-
Methods inherited from class com.inductiveautomation.ignition.designer.navtree.model.AbstractResourceNavTreeNode
addConcurrentUsersBadges, addEditActions, addExportMenuItem, addOverrideEnabledMenuItem, addProtectMenuItem, addRevertMenuItem, alterName, gatherChildrenIds, getIcon, getInvalidNameErrorMessage, getPopupActions, getProjectResource, getResourceId, getResourcePath, isChanged, isEditable, isInherited, isLocal, isOverrideEnabled, isProtectedEnabled, isRestricted, isValid, onDoubleClick, onEdit, onResourceModified, open, revert, selectChild, setOverrideEnabled, setProtected, setupEditActions
-
Methods inherited from class com.inductiveautomation.ignition.designer.navtree.model.AbstractNavTreeNode
canDrag, canDrop, checkChildren, children, createResourceCopy, debug, debug, dispatchSelectionEvent, expand, expandAndSelect, findChild, findCommonEditActionHandler, findDropHandler, findEditActionHandler, forceChildrenReload, getChildAt, getChildCount, getClipboard, getDeleteAction, getDepth, getExpandedIcon, getIndex, getModel, getName, getParent, getSelectionModel, getSortOrder, getText, getThumbnail, getTooltip, getWorkspaceName, initPopupMenu, isBold, isItalic, isLeaf, isSelected, isTopLevelNode, isValidName, iterator, loadChildren, newLogger, notifyChildNameChanged, pathToRoot, recreate, recreate, refresh, reload, select, select, setBold, setChildren, setIcon, setItalic, setName, setText, setThumbnail, setTooltip, showPopupMenu, toString, uninstallChildren, useThumbnailTooltip, visitIfLoaded
-
-
-
-
Field Detail
-
vision
protected VisionDesignerImpl vision
-
workspace
protected WindowWorkspace workspace
-
container
protected TopLevelContainer container
-
-
Constructor Detail
-
AbstractTopLevelContainerNode
protected AbstractTopLevelContainerNode(VisionDesignerImpl vision, ProjectResource resource)
-
-
Method Detail
-
getVision
public VisionDesignerInterface getVision()
-
install
public void install(AbstractNavTreeNode parent)
- Overrides:
installin classAbstractResourceNavTreeNode
-
uninstall
public void uninstall()
Description copied from class:AbstractNavTreeNodeCalled when the node is removed from the tree. Override to provide meaningful implementation.- Overrides:
uninstallin classAbstractResourceNavTreeNode
-
addBadges
public void addBadges(BadgeTreeCellRenderer renderer, boolean selected)
Description copied from class:AbstractNavTreeNodeAdd 'badges' to indicate meta information about this node- Overrides:
addBadgesin classAbstractResourceNavTreeNode- Parameters:
renderer- the renderer; callBadgeTreeCellRenderer.addBadge(Badge)to add your badge(s)selected- the state of this node
-
removeListeners
protected abstract void removeListeners(TopLevelContainer container)
-
addListeners
protected abstract void addListeners(TopLevelContainer container)
-
matches
protected boolean matches(DesignableContainer container)
-
containerClosed
public void containerClosed(DesignableContainer container)
- Specified by:
containerClosedin interfaceDesignableWorkspaceListener
-
containerOpened
public void containerOpened(DesignableContainer container)
- Specified by:
containerOpenedin interfaceDesignableWorkspaceListener
-
containerSelected
public void containerSelected(DesignableContainer container)
- Specified by:
containerSelectedin interfaceDesignableWorkspaceListener
-
itemSelectionChanged
public void itemSelectionChanged(java.util.List<javax.swing.JComponent> newSelection)
- Specified by:
itemSelectionChangedin interfaceDesignableWorkspaceListener
-
onSelected
public void onSelected()
Description copied from class:AbstractNavTreeNodeCalled when this node is selected in the tree- Overrides:
onSelectedin classAbstractNavTreeNode
-
onChildrenSelected
public void onChildrenSelected(java.util.List<javax.swing.tree.TreePath> paths)
Description copied from class:AbstractNavTreeNodeCalled when child nodes (deep) are selected under this node.- Overrides:
onChildrenSelectedin classAbstractNavTreeNode- Parameters:
paths- the children selected when the parent node is selected
-
findChild
protected abstract AbstractNavTreeNode findChild(java.awt.Component c)
-
setContainer
protected void setContainer(TopLevelContainer container, boolean notify)
-
getAllowsChildren
public boolean getAllowsChildren()
- Specified by:
getAllowsChildrenin interfacejavax.swing.tree.TreeNode- Overrides:
getAllowsChildrenin classAbstractNavTreeNode
-
isContainerOpen
public boolean isContainerOpen()
-
isOpen
protected boolean isOpen()
Description copied from class:AbstractResourceNavTreeNodeOverride this to indicate whether or not this resource is open for editing- Overrides:
isOpenin classAbstractResourceNavTreeNode
-
commitIfOpen
public void commitIfOpen()
Description copied from class:AbstractResourceNavTreeNodeImplement this to commit the resource that is open for editing.- Overrides:
commitIfOpenin classAbstractResourceNavTreeNode
-
canCopy
public boolean canCopy(java.util.List<AbstractNavTreeNode> selectedChildren)
Description copied from class:AbstractNavTreeNodeCan this edit action handler handle the copy action, given its current selection? Note that if this andAbstractNavTreeNode.canDelete(java.util.List)both return true, the cut action will also be enabled.- Overrides:
canCopyin classAbstractResourceNavTreeNode
-
canDelete
public boolean canDelete(java.util.List<AbstractNavTreeNode> selectedChildren)
Description copied from class:AbstractNavTreeNodeCan this edit action handler handle the delete action, given its current selection? Note that if this andAbstractNavTreeNode.canCopy(java.util.List)both return true, the cut action will also be enabled.- Overrides:
canDeletein classAbstractResourceNavTreeNode
-
canPaste
public boolean canPaste(java.util.List<AbstractNavTreeNode> selectedChildren, java.awt.datatransfer.Transferable data)
Description copied from class:AbstractNavTreeNodeCan this action handler handle a paste given the data flavors currently available in the clipboard? data may be null.- Overrides:
canPastein classAbstractNavTreeNode
-
doCopy
public java.awt.datatransfer.Transferable doCopy(java.util.List<? extends AbstractNavTreeNode> selectedChildren)
Description copied from class:AbstractNavTreeNodeCalled when the copy action is performed.- Overrides:
doCopyin classAbstractNavTreeNode- Returns:
- the current selection as a
Transferable, or null if the copy failed. Will be added to the system clipboard.
-
doCut
public java.awt.datatransfer.Transferable doCut(java.util.List<? extends AbstractNavTreeNode> selectedChildren)
Description copied from class:AbstractNavTreeNodeCalled when the cut action is performed.- Overrides:
doCutin classAbstractNavTreeNode- Returns:
- the current selection as a
Transferable, or null if the cut failed. Will be added to the system clipboard.
-
doDelete
public void doDelete(java.util.List<? extends AbstractNavTreeNode> selectedChildren, AbstractNavTreeNode.DeleteReason reason)
Description copied from class:AbstractNavTreeNodeCalled when the delete action is performed, if confirmDelete returned true- Overrides:
doDeletein classAbstractNavTreeNode
-
confirmDelete
public boolean confirmDelete(java.util.List<? extends AbstractNavTreeNode> selectedChildren)
Description copied from class:AbstractNavTreeNodeUsed to confirm the delete. If true is returned, doDelete will be called.- Overrides:
confirmDeletein classAbstractNavTreeNode
-
doPaste
public boolean doPaste(java.util.List<? extends AbstractNavTreeNode> selectedChildren, java.awt.datatransfer.Transferable clipboardContents, boolean isDrop)
Description copied from class:AbstractNavTreeNodeCalled when the paste action is performed- Overrides:
doPastein classAbstractNavTreeNodeclipboardContents- The current contents of the clipboard to paste.isDrop- Indicates whether this paste originated from a drop action. If false, originated from a keyboard or menu paste shortcut.- Returns:
- whether or not the paste successfully completed.
-
isEditActionHandler
public boolean isEditActionHandler()
Description copied from class:AbstractNavTreeNodeOverride to return true if you want this node to be an edit action handler for its children.- Overrides:
isEditActionHandlerin classAbstractNavTreeNode
-
-