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.OverrideResultStatus
Nested 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, revertMenuItem
Fields 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 TypeMethodDescriptionvoid
addBadges
(BadgeTreeCellRenderer renderer, boolean selected) Add 'badges' to indicate meta information about this nodeprotected void
addEditActions
(JPopupMenu menu) boolean
canCopy
(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.boolean
canDelete
(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.boolean
canPaste
(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.void
void
Implement this to commit the resource that is open for editing.void
doDelete
(List<? extends AbstractNavTreeNode> selectedChildren, AbstractNavTreeNode.DeleteReason reason) Called when the delete action is performed, if confirmDelete returned trueboolean
Override this and return true if you want your node's text to be editable.protected boolean
isOpen()
Override this to indicate whether or not this resource is open for editingvoid
Called when this node is selected in the treeprotected void
open()
Implement this to open this resource up for editingprotected void
Called 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, setupEditActions
Methods 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, visitIfLoaded
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:AbstractNavTreeNode
Called when this node is selected in the tree- Overrides:
onSelected
in classAbstractNavTreeNode
-
addEditActions
- Overrides:
addEditActions
in classAbstractResourceNavTreeNode
-
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 classAbstractResourceNavTreeNode
-
canDelete
Description copied from class:AbstractNavTreeNode
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.- Overrides:
canDelete
in classAbstractResourceNavTreeNode
-
canCopy
Description copied from class:AbstractNavTreeNode
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.- Overrides:
canCopy
in classAbstractResourceNavTreeNode
-
canPaste
public boolean canPaste(List<AbstractNavTreeNode> selectedChildren, @Nullable @Nullable Transferable data) Description copied from class:AbstractNavTreeNode
Can this action handler handle a paste given the data flavors currently available in the clipboard? data may be null.- Overrides:
canPaste
in classAbstractNavTreeNode
-
open
protected void open()Description copied from class:AbstractResourceNavTreeNode
Implement this to open this resource up for editing- Overrides:
open
in classAbstractResourceNavTreeNode
-
isOpen
protected boolean isOpen()Description copied from class:AbstractResourceNavTreeNode
Override this to indicate whether or not this resource is open for editing- Overrides:
isOpen
in classAbstractResourceNavTreeNode
-
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 classAbstractResourceNavTreeNode
-
commitIfOpen
public void commitIfOpen()Description copied from class:AbstractResourceNavTreeNode
Implement this to commit the resource that is open for editing.- Overrides:
commitIfOpen
in classAbstractResourceNavTreeNode
-
closeAndCommit
public void closeAndCommit()
-