Class ModuleNode
- java.lang.Object
-
- com.inductiveautomation.ignition.designer.navtree.model.AbstractNavTreeNode
-
- com.inductiveautomation.ignition.designer.navtree.model.AbstractResourceNavTreeNode
-
- com.inductiveautomation.ignition.designer.scripteditor.workspace.ModuleNode
-
- All Implemented Interfaces:
java.lang.Iterable<AbstractNavTreeNode>
,javax.swing.tree.TreeNode
public class ModuleNode extends AbstractResourceNavTreeNode
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.inductiveautomation.ignition.designer.navtree.model.AbstractNavTreeNode
AbstractNavTreeNode.DeleteReason, AbstractNavTreeNode.PopupAction
-
-
Field Summary
-
Fields inherited from class com.inductiveautomation.ignition.designer.navtree.model.AbstractResourceNavTreeNode
context, inheritedIcon, overrideAction, overrideEnabledAction, overrideEnabledMenuItem, protectedAction, protectedMenuItem, resourceId, resourcePath, restricted
-
Fields inherited from class com.inductiveautomation.ignition.designer.navtree.model.AbstractNavTreeNode
bold, children, childrenLoaded, copyAction, copyPathAction, cutAction, deleteAction, depth, icon, italic, log, model, name, parent, pasteAction, renameAction, selectionModel, text, thumbnail, tooltip
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ModuleNode(DesignerContext context, ScriptWorkspace workspace, ProjectResourceId resourceId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addEditActions(javax.swing.JPopupMenu menu)
void
commitIfOpen()
Implement this to commit the resource that is open for editing.java.lang.String
getWorkspaceName()
Returns the name of the desired workspace for this node.protected boolean
isOpen()
Override this to indicate whether or not this resource is open for editingboolean
isValid(java.lang.String aName)
Override this if you want special naming rules for your node.void
onSelected()
Called when this node is selected in the treeprotected void
open()
Implement this to open this resource up for editingprotected void
uninstall()
Called when the node is removed from the tree.-
Methods inherited from class com.inductiveautomation.ignition.designer.navtree.model.AbstractResourceNavTreeNode
addBadges, addConcurrentUsersBadges, addOverrideEnabledMenuItem, addProtectMenuItem, alterName, canCopy, canDelete, gatherChildrenIds, getIcon, getInvalidNameErrorMessage, getPopupActions, getProjectResource, getResourceId, getResourcePath, install, isChanged, isEditable, isInherited, isLocal, isOverrideEnabled, isProtectedEnabled, isRestricted, onDoubleClick, onEdit, onResourceModified, selectChild, setOverrideEnabled, setProtected, setupEditActions
-
Methods inherited from class com.inductiveautomation.ignition.designer.navtree.model.AbstractNavTreeNode
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, getDeleteAction, getDepth, getExpandedIcon, getIndex, getModel, getName, getParent, getSelectionModel, getSortOrder, getText, getThumbnail, getTooltip, initPopupMenu, isBold, isEditActionHandler, isItalic, isLeaf, isSelected, isTopLevelNode, isValidName, iterator, loadChildren, newLogger, notifyChildNameChanged, onChildrenSelected, pathToRoot, recreate, recreate, refresh, reload, select, select, setBold, setChildren, setIcon, setItalic, setName, setText, setThumbnail, setTooltip, showPopupMenu, toString, uninstallChildren, useThumbnailTooltip, visitIfLoaded
-
-
-
-
Constructor Detail
-
ModuleNode
protected ModuleNode(DesignerContext context, ScriptWorkspace workspace, ProjectResourceId resourceId)
-
-
Method Detail
-
addEditActions
protected void addEditActions(javax.swing.JPopupMenu menu)
- Overrides:
addEditActions
in classAbstractResourceNavTreeNode
-
getWorkspaceName
public java.lang.String getWorkspaceName()
Description copied from class:AbstractNavTreeNode
Returns the name of the desired workspace for this node. Default behavior is to delegate to the parent. null mean's don't affect workspace selection.- Overrides:
getWorkspaceName
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
-
commitIfOpen
public void commitIfOpen()
Description copied from class:AbstractResourceNavTreeNode
Implement this to commit the resource that is open for editing.- Overrides:
commitIfOpen
in classAbstractResourceNavTreeNode
-
onSelected
public void onSelected()
Description copied from class:AbstractNavTreeNode
Called when this node is selected in the tree- Overrides:
onSelected
in classAbstractNavTreeNode
-
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
-
isValid
public boolean isValid(@Nonnull java.lang.String aName)
Description copied from class:AbstractResourceNavTreeNode
Override this if you want special naming rules for your node. Note that project imports assume RESOURCE_NAME_PATTERN is valid for all resource types. Write unit tests for overrides.- Overrides:
isValid
in classAbstractResourceNavTreeNode
- Parameters:
aName
- name to evaluate- Returns:
- true if matches the pattern
-
-