Class FolderNode
java.lang.Object
com.inductiveautomation.ignition.designer.navtree.model.AbstractNavTreeNode
com.inductiveautomation.ignition.designer.navtree.model.AbstractResourceNavTreeNode
com.inductiveautomation.ignition.designer.navtree.model.FolderNode
- All Implemented Interfaces:
Iterable<AbstractNavTreeNode>,TreeNode
- Direct Known Subclasses:
PipelineFolderNode,ResourceFolderNode,ScriptPackageNode,SfcFolderNode,StyleClassFolderNode,TemplateFolderNode,WindowFolderNode
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classstatic classNested classes/interfaces inherited from class com.inductiveautomation.ignition.designer.navtree.model.AbstractResourceNavTreeNode
AbstractResourceNavTreeNode.OverrideResult, AbstractResourceNavTreeNode.OverrideResultStatusNested classes/interfaces inherited from class com.inductiveautomation.ignition.designer.navtree.model.AbstractNavTreeNode
AbstractNavTreeNode.DeleteReason, AbstractNavTreeNode.PopupAction -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Iconprotected ActionAction available for use in subclasses to add a new folder.static Comparator<ProjectResource>Sorts resources by path, but with folders firstprotected intFields inherited from class com.inductiveautomation.ignition.designer.navtree.model.AbstractResourceNavTreeNode
context, editDocumentationAction, editDocumentationMenuItem, exportAction, inheritedIcon, overrideAction, overrideEnabledAction, overrideEnabledMenuItem, protectedAction, protectedMenuItem, resourceId, resourcePath, restricted, revertAction, revertMenuItemFields inherited from class com.inductiveautomation.ignition.designer.navtree.model.AbstractNavTreeNode
bold, children, childrenLoaded, copyAction, copyPathAction, cutAction, deleteAction, depth, discardOverridesAction, icon, italic, log, model, name, parent, pasteAction, renameAction, selectionModel, text, thumbnail, tooltip -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFolderNode(DesignerContext context, ProjectResource resource, int scope) protectedFolderNode(DesignerContext context, ProjectResource resource, int scope, boolean isModuleNode) protectedFolderNode(DesignerContext context, ResourcePath path, int scope) protectedFolderNode(DesignerContext context, ResourcePath path, int scope, boolean isModuleNode) protectedFolderNode(DesignerContext context, ResourceType resourceType, int scope) Root resource folder constructor.protectedFolderNode(DesignerContext context, ResourceType resourceType, int scope, boolean isModuleNode) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidaddRevertMenuItem(JPopupMenu menu) protected booleanProtect against dropping on self, immediate parent, and descendantprotected abstract AbstractNavTreeNodecreateChildNode(ProjectResource resource) Returns an alternate icon for when this node is expanded, if applicable.protected ResourcePathgetPath()voidinstall(AbstractNavTreeNode parent) booleanOverride to return true if you want this node to be an edit action handler for its children.booleanTrue if this node's resource is present and overriding a resource from a parent project.booleanprotected booleanIndicates whether this node is the "root" of a given tree; primarily used to offer different edit optionsprotected List<AbstractNavTreeNode>Called before this node responds from any of the children-related TreeNode functions, if a list of children wasn't already set.protected voidmodifyOverrideAction(BaseAction baseAction) If subclasses need to modify the#overrideActionthey can modify this method.override()protected booleanpastingOnSelf(List<? extends AbstractNavTreeNode> selectedChildren, Transferable transferable) Returns true (meaning paste should be aborted) if the given folder is being dropped on itselfprotected DesignableProjectproject()protected booleanReturns true if the project resource is a child of mine.protected voidprotected voidsetupEditActions(TreePath[] paths, List<AbstractNavTreeNode> selection) Searches for a common edit action handling parent, and initializes each popup action by callingAbstractNavTreeNode.PopupAction.setSelection(AbstractNavTreeNode, AbstractNavTreeNode, List)protected voidCalled when the node is removed from the tree.Methods inherited from class com.inductiveautomation.ignition.designer.navtree.model.AbstractResourceNavTreeNode
addActionsForInheritedNodes, addBadges, addConcurrentUsersBadges, addDeleteOrDiscardOverridesMenuItem, addDocumentationMenuItem, addEditActions, addExportMenuItem, addInheritedBadge, addNotesBadge, addOverriddenBadge, addOverrideOrDiscardOverridesMenuItem, addProtectMenuItem, alterName, canCopy, canDelete, commitIfOpen, editDocumentation, gatherChildrenIds, getAdditionalExportIds, getDeleteAction, getInheritanceString, getInvalidNameErrorMessage, getPopupActions, getProjectResource, getResourceId, getResourcePath, inherited, isChanged, isEditable, isInherited, isLocal, isOpen, isOverrideEnabled, isRestricted, isValid, notInherited, onDoubleClick, onEdit, onResourceModified, open, overridden, revert, selectChild, setOverrideEnabled, setProtected, setRevertedResourcePathMethods inherited from class com.inductiveautomation.ignition.designer.navtree.model.AbstractNavTreeNode
addEditActions, 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, getIcon, getIndex, getModel, getName, getParent, getSelectionModel, getSortOrder, getText, getThumbnail, getTooltip, getWorkspaceName, initPopupMenu, isBold, isItalic, isLeaf, isModuleNode, isSelected, isValidName, iterator, newLogger, notifyChildNameChanged, onChildrenSelected, onSelected, pathToRoot, performOnAllChildren, recreate, recreate, refresh, reload, select, select, setBold, setChildren, setIcon, setItalic, setText, setThumbnail, setTooltip, showPopupMenu, toString, uninstallChildren, useThumbnailTooltip, visitIfLoadedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
resourceScope
protected int resourceScope -
expandedIcon
-
newFolderAction
Action available for use in subclasses to add a new folder. Will use the installed module id to create. -
RESOURCE_COMPARATOR
Sorts resources by path, but with folders first
-
-
Constructor Details
-
FolderNode
-
FolderNode
protected FolderNode(DesignerContext context, ProjectResource resource, int scope, boolean isModuleNode) -
FolderNode
Root resource folder constructor. -
FolderNode
-
FolderNode
protected FolderNode(DesignerContext context, ResourceType resourceType, int scope, boolean isModuleNode) -
FolderNode
-
-
Method Details
-
isTopLevelNode
protected boolean isTopLevelNode()Description copied from class:AbstractNavTreeNodeIndicates whether this node is the "root" of a given tree; primarily used to offer different edit options- Overrides:
isTopLevelNodein classAbstractNavTreeNode
-
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 classAbstractResourceNavTreeNode
-
setupEditActions
Description copied from class:AbstractNavTreeNodeSearches for a common edit action handling parent, and initializes each popup action by callingAbstractNavTreeNode.PopupAction.setSelection(AbstractNavTreeNode, AbstractNavTreeNode, List)- Overrides:
setupEditActionsin classAbstractResourceNavTreeNode
-
isProtectedEnabled
public boolean isProtectedEnabled()- Overrides:
isProtectedEnabledin classAbstractResourceNavTreeNode
-
project
-
uninstall
protected void uninstall()Description copied from class:AbstractNavTreeNodeCalled when the node is removed from the tree. Override to provide meaningful implementation.- Overrides:
uninstallin classAbstractResourceNavTreeNode
-
getExpandedIcon
Description copied from class:AbstractNavTreeNodeReturns an alternate icon for when this node is expanded, if applicable. Default implementation simply returns getIcon()- Overrides:
getExpandedIconin classAbstractNavTreeNode
-
addOverrideEnabledMenuItem
- Overrides:
addOverrideEnabledMenuItemin classAbstractResourceNavTreeNode
-
addRevertMenuItem
- Overrides:
addRevertMenuItemin classAbstractResourceNavTreeNode
-
setName
- Overrides:
setNamein classAbstractNavTreeNode
-
requiresRecreate
Returns true if the project resource is a child of mine. -
loadChildren
Description copied from class:AbstractNavTreeNodeCalled 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:
loadChildrenin classAbstractNavTreeNode
-
getPath
-
canPaste
Protect against dropping on self, immediate parent, and descendant -
pastingOnSelf
protected boolean pastingOnSelf(List<? extends AbstractNavTreeNode> selectedChildren, Transferable transferable) Returns true (meaning paste should be aborted) if the given folder is being dropped on itself -
getResourceType
-
createChildNode
-
override
- Overrides:
overridein classAbstractResourceNavTreeNode
-
modifyOverrideAction
Description copied from class:AbstractResourceNavTreeNodeIf subclasses need to modify the#overrideActionthey can modify this method. As an example theFolderNodeclass needs to modify the general text that's displayed to a more specific text related to use as it relates to the folder, such as turning a singular noun to a plural, since folders can contain more than one items to override.- Overrides:
modifyOverrideActionin classAbstractResourceNavTreeNode
-
isOverridden
public boolean isOverridden()Description copied from class:AbstractResourceNavTreeNodeTrue if this node's resource is present and overriding a resource from a parent project.- Overrides:
isOverriddenin classAbstractResourceNavTreeNode
-