public abstract class FolderNode extends AbstractResourceNavTreeNode implements ProjectChangeListener
| Modifier and Type | Class and Description |
|---|---|
static class |
FolderNode.NewFolderAction |
AbstractNavTreeNode.DeleteReason, AbstractNavTreeNode.PopupAction, AbstractNavTreeNode.ResourceChangeListenerProjectChangeListener.ResourceModification| Modifier and Type | Field and Description |
|---|---|
protected static boolean |
allowRenameOnAdd |
protected DesignerContext |
context |
protected java.util.UUID |
folderId |
protected java.lang.String |
moduleId |
protected javax.swing.Action |
newFolderAction
Action available for use in subclasses to add a new folder.
|
protected long |
resourceId |
protected int |
resourceScope |
bold, children, childrenLoaded, copyAction, cutAction, deleteAction, depth, icon, italic, log, model, name, NAME_PATTERN, parent, pasteAction, protectedAction, protectedMenuItem, renameAction, selectionModel, text, thumbnail, tooltip| Modifier | Constructor and Description |
|---|---|
protected |
FolderNode(DesignerContext context,
ProjectResource folderResource) |
protected |
FolderNode(DesignerContext context,
java.lang.String moduleId,
int scope,
java.util.UUID folderId)
Constructor for root folders that aren't represented by any ProjectResource.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canPaste(java.util.List<javax.swing.tree.TreePath> paths,
javax.swing.tree.TreePath droppedOn)
Protect against dropping on self, immediate parent, and descendant
|
protected abstract AbstractNavTreeNode |
createChildNode(ProjectResource resource) |
javax.swing.Icon |
getExpandedIcon()
Returns an alternate icon for when this node is expanded, if applicable.
|
java.util.UUID |
getFolderId() |
ProjectResource |
getProjectResource()
The ProjectResource that this node represents
|
static boolean |
isAllowRenameOnAdd() |
boolean |
isEditable()
Override this and return true if you want your node's text to be editable.
|
boolean |
isProtectedEnabled()
This method is overridden by AbstractProtectableResourceNavTreeNode to check the if the user has the required
role to protect resources.
|
protected java.util.List<AbstractNavTreeNode> |
loadChildren()
Called before this node responds from any of the children-related TreeNode functions, if a list of children
wasn't already set.
|
void |
onEdit(java.lang.String newTextValue)
Called after this node has been edited in the tree.
|
protected Project |
project() |
protected DesignerProjectContext |
projectCtx()
Returns the project context to use.
|
void |
projectResourceModified(ProjectResource resource,
ProjectChangeListener.ResourceModification changeType)
Notifies listeners when modules from this designer session alter the current project.
|
void |
projectUpdated(Project diff)
Notifies the listener that the project has been updated externally, by the result of a File-Update or a Save.
|
static void |
setAllowRenameOnAdd(boolean allowRenameOnAdd) |
protected void |
setName(java.lang.String name) |
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.
|
gatherChildrenIds, install, isProtected, selectChild, setProtectedaddBadges, 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, getIcon, getIndex, getModel, getName, getParent, getSelectionModel, getSortOrder, getText, getThumbnail, getTooltip, getWorkspaceName, initPopupMenu, isBold, isEditActionHandler, isItalic, isLeaf, isSelected, isValidName, iterator, newLogger, notifyChildNameChanged, onChildrenSelected, onDoubleClick, onSelected, pathToRoot, recreate, refresh, reload, select, select, setBold, setChildren, setIcon, setItalic, setText, setThumbnail, setTooltip, showPopup, showPopupMenu, toString, uninstallChildren, useThumbnailTooltipprotected static boolean allowRenameOnAdd
protected DesignerContext context
protected long resourceId
protected java.util.UUID folderId
protected java.lang.String moduleId
protected int resourceScope
protected javax.swing.Action newFolderAction
protected FolderNode(DesignerContext context, java.lang.String moduleId, int scope, java.util.UUID folderId)
protected FolderNode(DesignerContext context, ProjectResource folderResource)
protected DesignerProjectContext projectCtx()
projectCtx in class AbstractResourceNavTreeNodeprotected void setupEditActions(javax.swing.tree.TreePath[] paths,
java.util.List<AbstractNavTreeNode> selection)
AbstractNavTreeNodesetupEditActions in class AbstractResourceNavTreeNodepublic boolean isProtectedEnabled()
AbstractNavTreeNodeisProtectedEnabled in class AbstractResourceNavTreeNodepublic boolean isEditable()
AbstractNavTreeNodeAbstractNavTreeNode.onEdit(String)isEditable in class AbstractNavTreeNodepublic static boolean isAllowRenameOnAdd()
public static void setAllowRenameOnAdd(boolean allowRenameOnAdd)
public void onEdit(java.lang.String newTextValue)
AbstractNavTreeNodeonEdit in class AbstractNavTreeNodeprotected void uninstall()
AbstractNavTreeNodeuninstall in class AbstractResourceNavTreeNodeprotected Project project()
public java.util.UUID getFolderId()
public javax.swing.Icon getExpandedIcon()
AbstractNavTreeNodegetExpandedIcon in class AbstractNavTreeNodepublic ProjectResource getProjectResource()
AbstractResourceNavTreeNodegetProjectResource in class AbstractResourceNavTreeNodeprotected void setName(java.lang.String name)
setName in class AbstractNavTreeNodepublic void projectResourceModified(ProjectResource resource, ProjectChangeListener.ResourceModification changeType)
ProjectChangeListenerprojectResourceModified in interface ProjectChangeListenerpublic void projectUpdated(Project diff)
ProjectChangeListenerprojectUpdated in interface ProjectChangeListenerprotected java.util.List<AbstractNavTreeNode> loadChildren()
AbstractNavTreeNodeloadChildren in class AbstractNavTreeNodeprotected boolean canPaste(java.util.List<javax.swing.tree.TreePath> paths,
javax.swing.tree.TreePath droppedOn)
protected abstract AbstractNavTreeNode createChildNode(ProjectResource resource)