Class ClientScriptNode
java.lang.Object
com.inductiveautomation.ignition.designer.navtree.model.AbstractNavTreeNode
com.inductiveautomation.ignition.designer.navtree.model.AbstractResourceNavTreeNode
com.inductiveautomation.factorypmi.designer.workspace.nav.ClientScriptNode
- All Implemented Interfaces:
Iterable<AbstractNavTreeNode>,TreeNode
Represents a node in the navigation tree specifically for client script configurations.
This class works with Vision WindowWorkspace and script event resource editors.
-
Nested Class Summary
Nested 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
FieldsFields 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
ConstructorsConstructorDescriptionClientScriptNode(WindowWorkspace workspace, ResourcePath resourcePath, Icon icon, Supplier<Consumer<ResourceBuilder>> defaultResourceBuilder) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBadges(BadgeTreeCellRenderer renderer, boolean selected) Add 'badges' to indicate meta information about this nodeprotected voidaddEditActions(JPopupMenu menu) booleancanCopy(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(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(List<AbstractNavTreeNode> selectedChildren, @Nullable Transferable data) Can this action handler handle a paste given the data flavors currently available in the clipboard? data may be null.voidvoidImplement this to commit the resource that is open for editing.voiddoDelete(List<? extends AbstractNavTreeNode> selectedChildren, AbstractNavTreeNode.DeleteReason reason) Called when the delete action is performed, if confirmDelete returned truebooleanOverride this and return true if you want your node's text to be editable.protected booleanisOpen()Override this to indicate whether or not this resource is open for editingvoidCalled when this node is selected in the treeprotected voidopen()Implement this to open this resource up for editingprotected voidCalled when the node is removed from the tree.Methods inherited from class com.inductiveautomation.ignition.designer.navtree.model.AbstractResourceNavTreeNode
addActionsForInheritedNodes, addConcurrentUsersBadges, addDeleteOrDiscardOverridesMenuItem, addDocumentationMenuItem, addExportMenuItem, addInheritedBadge, addNotesBadge, addOverriddenBadge, addOverrideEnabledMenuItem, addOverrideOrDiscardOverridesMenuItem, addProtectMenuItem, addRevertMenuItem, alterName, editDocumentation, gatherChildrenIds, getAdditionalExportIds, getDeleteAction, getInheritanceString, getInvalidNameErrorMessage, getPopupActions, getProjectResource, getResourceId, getResourcePath, inherited, install, isChanged, isEditActionHandler, isInherited, isLocal, isOverridden, isOverrideEnabled, isProtectedEnabled, isRestricted, isValid, modifyOverrideAction, notInherited, onDoubleClick, onEdit, onResourceModified, overridden, override, revert, selectChild, setOverrideEnabled, setProtected, setRevertedResourcePath, setupEditActionsMethods inherited from class com.inductiveautomation.ignition.designer.navtree.model.AbstractNavTreeNode
addEditActions, canDrag, canDrop, checkChildren, children, confirmDelete, createResourceCopy, debug, debug, dispatchSelectionEvent, doCopy, doCut, 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, isItalic, isLeaf, isModuleNode, isSelected, isTopLevelNode, isValidName, iterator, loadChildren, newLogger, notifyChildNameChanged, onChildrenSelected, pathToRoot, performOnAllChildren, recreate, recreate, refresh, reload, select, select, setBold, setChildren, setIcon, setItalic, setName, 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
-
workspace
-
-
Constructor Details
-
ClientScriptNode
public ClientScriptNode(WindowWorkspace workspace, ResourcePath resourcePath, Icon icon, Supplier<Consumer<ResourceBuilder>> defaultResourceBuilder)
-
-
Method Details
-
onSelected
public void onSelected()Description copied from class:AbstractNavTreeNodeCalled when this node is selected in the tree- Overrides:
onSelectedin classAbstractNavTreeNode
-
addEditActions
- Overrides:
addEditActionsin classAbstractResourceNavTreeNode
-
isEditable
public boolean isEditable()Description copied from class:AbstractNavTreeNodeOverride this and return true if you want your node's text to be editable. SeeAbstractNavTreeNode.onEdit(String)- Overrides:
isEditablein classAbstractResourceNavTreeNode
-
canDelete
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
-
canCopy
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
-
canPaste
public boolean canPaste(List<AbstractNavTreeNode> selectedChildren, @Nullable @Nullable 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
-
open
protected void open()Description copied from class:AbstractResourceNavTreeNodeImplement this to open this resource up for editing- Overrides:
openin classAbstractResourceNavTreeNode
-
isOpen
protected boolean isOpen()Description copied from class:AbstractResourceNavTreeNodeOverride this to indicate whether or not this resource is open for editing- Overrides:
isOpenin classAbstractResourceNavTreeNode
-
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
-
commitIfOpen
public void commitIfOpen()Description copied from class:AbstractResourceNavTreeNodeImplement this to commit the resource that is open for editing.- Overrides:
commitIfOpenin classAbstractResourceNavTreeNode
-
closeAndCommit
public void closeAndCommit()
-