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.OverrideResultStatus
Nested classes/interfaces inherited from class com.inductiveautomation.ignition.designer.navtree.model.AbstractNavTreeNode
AbstractNavTreeNode.DeleteReason, AbstractNavTreeNode.PopupAction
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Action
protected final Action
static final Badge
Fields inherited from class com.inductiveautomation.ignition.designer.tabbedworkspace.ResourceNode
workspace
Fields 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
ConstructorsModifierConstructorDescriptionprotected
EventScriptNode
(TabbedResourceWorkspace workspace, ResourcePath resourcePath, Icon icon, @Nullable String titleKey, Supplier<Consumer<ResourceBuilder>> defaultResourceBuilder) protected
EventScriptNode
(TabbedResourceWorkspace 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
doDelete
(List<? extends AbstractNavTreeNode> selectedChildren, AbstractNavTreeNode.DeleteReason reason) Called when the delete action is performed, if confirmDelete returned trueprotected Icon
protected Icon
boolean
Override this and return true if you want your node's text to be editable.void
Called when this node is selected in the treeprotected void
open()
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, uninstall
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, getResourceId, getResourcePath, inherited, 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
-
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:
getOpenIcon
in classResourceNode
- Returns:
- The node icon to use when the resource is open for editing
-
getClosedIcon
- Overrides:
getClosedIcon
in classResourceNode
- Returns:
- The node icon to use when the resource is not being edited
-
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
-
onSelected
public void onSelected()Description copied from class:AbstractNavTreeNode
Called when this node is selected in the tree- Overrides:
onSelected
in classResourceNode
-
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()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:
open
in classResourceNode
-