public abstract class AbstractResourceNavTreeNode extends AbstractNavTreeNode
AbstractNavTreeNode.DeleteReason, AbstractNavTreeNode.PopupAction, AbstractNavTreeNode.ResourceChangeListener
bold, children, childrenLoaded, copyAction, cutAction, deleteAction, depth, icon, italic, log, model, name, NAME_PATTERN, parent, pasteAction, protectedAction, protectedMenuItem, renameAction, selectionModel, text, thumbnail, tooltip
Constructor and Description |
---|
AbstractResourceNavTreeNode() |
Modifier and Type | Method and Description |
---|---|
java.util.Collection<java.lang.Long> |
gatherChildrenIds(Project project)
Returns the id of this resource, or if this is a folder, walks down and finds all resources ids under this folder
(but not folders themselves)
|
abstract ProjectResource |
getProjectResource()
The ProjectResource that this node represents
|
void |
install(AbstractNavTreeNode parent) |
boolean |
isProtected()
Used to display protected Icon for project resources that are able to be protected.
|
boolean |
isProtectedEnabled()
This method is overridden by AbstractProtectableResourceNavTreeNode to check the if the user has the required
role to protect resources.
|
protected abstract DesignerProjectContext |
projectCtx()
Returns the project context (local vs global) that this resource belongs to
|
void |
selectChild(long... ids)
In an invoke later, tries to find a child resource-backed node with the given id to select.
|
void |
setProtected(boolean prot)
If protection is enabled, this is the callback from the checkbox menu item when the user toggles the protection
bit.
|
protected void |
setupEditActions(javax.swing.tree.TreePath[] paths,
java.util.List<AbstractNavTreeNode> selection)
Searches for a common edit action handling parent, and if one exists, sets up the edit actions appropriately.
|
protected void |
uninstall()
Called when the node is removed from the tree.
|
addBadges, addEditActions, canCopy, canDelete, canDrag, canDrop, canPaste, checkChildren, children, confirmDelete, createProjectCopy, debug, debug, dispatchSelectionEvent, doCopy, doCut, doDelete, doPaste, expand, findChild, findCommonEditActionHandler, findDropHandler, findEditActionHandler, forceChildrenReload, getAllowsChildren, getChildAt, getChildCount, getClipboard, getCommonEditActionHandler, getDepth, getExpandedIcon, getIcon, getIndex, getModel, getName, getParent, getSelectionModel, getSortOrder, getText, getThumbnail, getTooltip, getWorkspaceName, initPopupMenu, isBold, isEditable, isEditActionHandler, isItalic, isLeaf, isSelected, isValidName, iterator, loadChildren, newLogger, notifyChildNameChanged, onChildrenSelected, onDoubleClick, onEdit, onSelected, pathToRoot, recreate, refresh, reload, select, select, setBold, setChildren, setIcon, setItalic, setName, setText, setThumbnail, setTooltip, showPopup, showPopupMenu, toString, uninstallChildren, useThumbnailTooltip
public abstract ProjectResource getProjectResource()
protected abstract DesignerProjectContext projectCtx()
public void setProtected(boolean prot)
AbstractNavTreeNode
setProtected
in class AbstractNavTreeNode
public void install(AbstractNavTreeNode parent)
install
in class AbstractNavTreeNode
protected void uninstall()
AbstractNavTreeNode
uninstall
in class AbstractNavTreeNode
public boolean isProtectedEnabled()
AbstractNavTreeNode
isProtectedEnabled
in class AbstractNavTreeNode
protected void setupEditActions(javax.swing.tree.TreePath[] paths, java.util.List<AbstractNavTreeNode> selection)
AbstractNavTreeNode
setupEditActions
in class AbstractNavTreeNode
public boolean isProtected()
AbstractNavTreeNode
isProtected
in class AbstractNavTreeNode
public void selectChild(long... ids)
public java.util.Collection<java.lang.Long> gatherChildrenIds(Project project)