Class EventScriptNode
java.lang.Object
com.inductiveautomation.ignition.designer.navtree.model.AbstractNavTreeNode
com.inductiveautomation.ignition.designer.navtree.model.AbstractResourceNavTreeNode
com.inductiveautomation.ignition.designer.tabbedworkspace.ResourceNode
com.inductiveautomation.ignition.designer.scripteditor.workspace.EventScriptNode
- All Implemented Interfaces:
Iterable<AbstractNavTreeNode>,TreeNode
- Direct Known Subclasses:
AccelerometerScriptTab.AccelerometerScriptNode,AuthChallengeScriptTab.AuthChallengeScriptNode,BarcodeScriptTab.BarcodeScriptNode,BluetoothScriptTab.BluetoothScriptNode,NfcScanScriptTab.NfcScanScriptNode,PageStartupScriptTab.PageStartupScriptNode,ShutdownScriptTab.ShutdownScriptNode,StartupScriptTab.StartupScriptNode,UpdateScriptTab.UpdateScriptNode
Abstract node for event script nodes, providing common actions
like close and commit, and close and revert.
-
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
FieldsModifier and TypeFieldDescriptionprotected final Actionprotected final Actionstatic final BadgeFields inherited from class com.inductiveautomation.ignition.designer.tabbedworkspace.ResourceNode
workspaceFields 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
ConstructorsModifierConstructorDescriptionprotectedEventScriptNode(TabbedResourceWorkspace workspace, ResourcePath resourcePath, Icon icon, @Nullable String titleKey, Supplier<Consumer<ResourceBuilder>> defaultResourceBuilder) protectedEventScriptNode(TabbedResourceWorkspace 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.voiddoDelete(List<? extends AbstractNavTreeNode> selectedChildren, AbstractNavTreeNode.DeleteReason reason) Called when the delete action is performed, if confirmDelete returned trueprotected Iconprotected IconbooleanOverride this and return true if you want your node's text to be editable.voidCalled when this node is selected in the treeprotected voidopen()Opens the node, creating the resource with the default script if it does not exist.Methods inherited from class com.inductiveautomation.ignition.designer.tabbedworkspace.ResourceNode
closeAndCommit, commitIfOpen, getProjectResource, install, isOpen, onEditorClosed, onEditorOpened, onEditorSelected, onEditorUnselected, uninstallMethods 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, getResourceId, getResourcePath, inherited, 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
-
closeAndCommit
-
closeAndRevert
-
DISABLED_BADGE
-
-
Constructor Details
-
EventScriptNode
protected EventScriptNode(TabbedResourceWorkspace workspace, ResourcePath resourcePath, Icon icon, Supplier<Consumer<ResourceBuilder>> defaultResourceBuilder) -
EventScriptNode
protected EventScriptNode(TabbedResourceWorkspace workspace, ResourcePath resourcePath, Icon icon, @Nullable @Nullable String titleKey, Supplier<Consumer<ResourceBuilder>> defaultResourceBuilder)
-
-
Method Details
-
getOpenIcon
- Overrides:
getOpenIconin classResourceNode- Returns:
- The node icon to use when the resource is open for editing
-
getClosedIcon
- Overrides:
getClosedIconin classResourceNode- Returns:
- The node icon to use when the resource is not being edited
-
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
-
onSelected
public void onSelected()Description copied from class:AbstractNavTreeNodeCalled when this node is selected in the tree- Overrides:
onSelectedin classResourceNode
-
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()Opens the node, creating the resource with the default script if it does not exist. If the resource at the specified path is empty, a new resource is created using the provided resource builder.- Overrides:
openin classResourceNode
-