Class StyleClassFolderNode
- java.lang.Object
-
- com.inductiveautomation.ignition.designer.navtree.model.AbstractNavTreeNode
-
- com.inductiveautomation.ignition.designer.navtree.model.AbstractResourceNavTreeNode
-
- com.inductiveautomation.ignition.designer.navtree.model.FolderNode
-
- com.inductiveautomation.perspective.designer.styles.StyleClassFolderNode
-
- All Implemented Interfaces:
java.lang.Iterable<AbstractNavTreeNode>
,javax.swing.tree.TreeNode
public class StyleClassFolderNode extends FolderNode
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.inductiveautomation.ignition.designer.navtree.model.FolderNode
FolderNode.NewFolderAction
-
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.FolderNode
expandedIcon, newFolderAction, RESOURCE_COMPARATOR, resourceScope
-
Fields inherited from class com.inductiveautomation.ignition.designer.navtree.model.AbstractResourceNavTreeNode
context, 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, icon, italic, log, model, name, parent, pasteAction, renameAction, selectionModel, text, thumbnail, tooltip
-
-
Constructor Summary
Constructors Constructor Description StyleClassFolderNode(DesignerContext context)
Root nodeStyleClassFolderNode(DesignerContext context, ProjectResource resource)
Child node
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canDrag(java.util.List<AbstractNavTreeNode> draggedChildren)
Can the nodes controlled by this action handling node be dragged?boolean
canDrop(AbstractNavTreeNode dropTarget, java.util.List<java.awt.datatransfer.DataFlavor> flavors)
boolean
canPaste(java.util.List<AbstractNavTreeNode> selectedChildren, java.awt.datatransfer.Transferable data)
Can this action handler handle a paste given the data flavors currently available in the clipboard? data may be null.protected AbstractNavTreeNode
createChildNode(ProjectResource resource)
java.awt.datatransfer.Transferable
doCopy(java.util.List<? extends AbstractNavTreeNode> selectedChildren)
Called when the copy action is performed.java.awt.datatransfer.Transferable
doCut(java.util.List<? extends AbstractNavTreeNode> selectedChildren)
Called when the cut action is performed.void
doDelete(java.util.List<? extends AbstractNavTreeNode> children, AbstractNavTreeNode.DeleteReason reason)
Called when the delete action is performed, if confirmDelete returned trueboolean
doPaste(java.util.List<? extends AbstractNavTreeNode> selectedChildren, java.awt.datatransfer.Transferable data, boolean isDrop)
Called when the paste action is performedjavax.swing.Icon
getExpandedIcon()
Returns an alternate icon for when this node is expanded, if applicable.protected java.lang.String
getInvalidNameErrorMessage(java.lang.String attemptedName)
java.lang.String
getWorkspaceName()
Returns the name of the desired workspace for this node.protected void
initPopupMenu(javax.swing.JPopupMenu menu, javax.swing.tree.TreePath[] paths, java.util.List<AbstractNavTreeNode> selection, int modifiers)
Default implementation calls setupEditActions(), and then addEditActions()boolean
isEditable()
Override this and return true if you want your node's text to be editable.boolean
isEditActionHandler()
Override to return true if you want this node to be an edit action handler for its children.boolean
isValidName(java.lang.String aName)
void
onSelected()
Called when this node is selected in the tree-
Methods inherited from class com.inductiveautomation.ignition.designer.navtree.model.FolderNode
addOverrideEnabledMenuItem, addRevertMenuItem, canPaste, getPath, getResourceType, install, isProtectedEnabled, isTopLevelNode, loadChildren, pastingOnSelf, project, setName, setupEditActions, uninstall
-
Methods inherited from class com.inductiveautomation.ignition.designer.navtree.model.AbstractResourceNavTreeNode
addBadges, addConcurrentUsersBadges, addEditActions, addExportMenuItem, addProtectMenuItem, alterName, canCopy, canDelete, commitIfOpen, gatherChildrenIds, getIcon, getPopupActions, getProjectResource, getResourceId, getResourcePath, isChanged, isInherited, isLocal, isOpen, isOverridden, isOverrideEnabled, isRestricted, isValid, onDoubleClick, onEdit, onResourceModified, open, revert, selectChild, setOverrideEnabled, setProtected
-
Methods inherited from class com.inductiveautomation.ignition.designer.navtree.model.AbstractNavTreeNode
checkChildren, children, confirmDelete, createResourceCopy, debug, debug, dispatchSelectionEvent, expand, expandAndSelect, findChild, findCommonEditActionHandler, findDropHandler, findEditActionHandler, forceChildrenReload, getAllowsChildren, getChildAt, getChildCount, getClipboard, getDeleteAction, getDepth, getIndex, getModel, getName, getParent, getSelectionModel, getSortOrder, getText, getThumbnail, getTooltip, isBold, isItalic, isLeaf, isSelected, iterator, newLogger, notifyChildNameChanged, onChildrenSelected, pathToRoot, recreate, recreate, refresh, reload, select, select, setBold, setChildren, setIcon, setItalic, setText, setThumbnail, setTooltip, showPopupMenu, toString, uninstallChildren, useThumbnailTooltip, visitIfLoaded
-
-
-
-
Constructor Detail
-
StyleClassFolderNode
public StyleClassFolderNode(DesignerContext context)
Root node
-
StyleClassFolderNode
public StyleClassFolderNode(DesignerContext context, ProjectResource resource)
Child node
-
-
Method Detail
-
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
-
getExpandedIcon
public javax.swing.Icon getExpandedIcon()
Description copied from class:AbstractNavTreeNode
Returns an alternate icon for when this node is expanded, if applicable. Default implementation simply returns getIcon()- Overrides:
getExpandedIcon
in classFolderNode
-
createChildNode
protected AbstractNavTreeNode createChildNode(ProjectResource resource)
- Specified by:
createChildNode
in classFolderNode
-
onSelected
public void onSelected()
Description copied from class:AbstractNavTreeNode
Called when this node is selected in the tree- Overrides:
onSelected
in classAbstractNavTreeNode
-
doDelete
public void doDelete(java.util.List<? extends AbstractNavTreeNode> children, AbstractNavTreeNode.DeleteReason reason)
Description copied from class:AbstractNavTreeNode
Called when the delete action is performed, if confirmDelete returned true- Overrides:
doDelete
in classAbstractNavTreeNode
-
doCopy
public java.awt.datatransfer.Transferable doCopy(java.util.List<? extends AbstractNavTreeNode> selectedChildren)
Description copied from class:AbstractNavTreeNode
Called when the copy action is performed.- Overrides:
doCopy
in classAbstractNavTreeNode
- Returns:
- the current selection as a
Transferable
, or null if the copy failed. Will be added to the system clipboard.
-
doCut
public java.awt.datatransfer.Transferable doCut(java.util.List<? extends AbstractNavTreeNode> selectedChildren)
Description copied from class:AbstractNavTreeNode
Called when the cut action is performed.- Overrides:
doCut
in classAbstractNavTreeNode
- Returns:
- the current selection as a
Transferable
, or null if the cut failed. Will be added to the system clipboard.
-
canPaste
public boolean canPaste(java.util.List<AbstractNavTreeNode> selectedChildren, java.awt.datatransfer.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
-
canDrag
public boolean canDrag(java.util.List<AbstractNavTreeNode> draggedChildren)
Description copied from class:AbstractNavTreeNode
Can the nodes controlled by this action handling node be dragged?- Overrides:
canDrag
in classAbstractNavTreeNode
-
canDrop
public boolean canDrop(AbstractNavTreeNode dropTarget, java.util.List<java.awt.datatransfer.DataFlavor> flavors)
- Overrides:
canDrop
in classAbstractNavTreeNode
-
doPaste
public boolean doPaste(java.util.List<? extends AbstractNavTreeNode> selectedChildren, java.awt.datatransfer.Transferable data, boolean isDrop)
Description copied from class:AbstractNavTreeNode
Called when the paste action is performed- Overrides:
doPaste
in classAbstractNavTreeNode
data
- The current contents of the clipboard to paste.isDrop
- Indicates whether this paste originated from a drop action. If false, originated from a keyboard or menu paste shortcut.- Returns:
- whether or not the paste successfully completed.
-
isEditActionHandler
public boolean isEditActionHandler()
Description copied from class:AbstractNavTreeNode
Override to return true if you want this node to be an edit action handler for its children.- Overrides:
isEditActionHandler
in classFolderNode
-
isValidName
public boolean isValidName(@Nonnull java.lang.String aName)
- Overrides:
isValidName
in classAbstractNavTreeNode
-
getInvalidNameErrorMessage
protected java.lang.String getInvalidNameErrorMessage(java.lang.String attemptedName)
- Overrides:
getInvalidNameErrorMessage
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
-
initPopupMenu
protected void initPopupMenu(javax.swing.JPopupMenu menu, javax.swing.tree.TreePath[] paths, java.util.List<AbstractNavTreeNode> selection, int modifiers)
Description copied from class:AbstractNavTreeNode
Default implementation calls setupEditActions(), and then addEditActions()- Overrides:
initPopupMenu
in classAbstractNavTreeNode
-
-