public class ResourceFolderNode extends FolderNode
FolderNode.NewFolderAction
AbstractNavTreeNode.DeleteReason, AbstractNavTreeNode.PopupAction, AbstractNavTreeNode.ResourceChangeListener
ProjectChangeListener.ResourceModification
Modifier and Type | Field and Description |
---|---|
protected TabbedResourceWorkspace |
workspace |
allowRenameOnAdd, context, folderId, moduleId, newFolderAction, resourceId, resourceScope
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 |
---|
ResourceFolderNode(DesignerContext context,
TabbedResourceWorkspace workspace)
Constructor for root folder node
|
ResourceFolderNode(DesignerContext context,
TabbedResourceWorkspace workspace,
ProjectResource resource)
Constructor for sub folders
|
Modifier and Type | Method and Description |
---|---|
protected void |
addOtherMenuItems(javax.swing.JPopupMenu menu) |
boolean |
canCopy(java.util.List<AbstractNavTreeNode> selectedChildren)
Can this edit action handler handle the copy action, given its current selection? Note that if this and
AbstractNavTreeNode.canDelete(java.util.List) both return true, the cut action will also be enabled. |
boolean |
canDelete(java.util.List<AbstractNavTreeNode> selectedChildren)
Can this edit action handler handle the delete action, given its current selection? Note that if this and
AbstractNavTreeNode.canCopy(java.util.List) both return true, the cut action will also be enabled. |
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 clipboard)
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 true
|
boolean |
doPaste(java.util.List<? extends AbstractNavTreeNode> selectedChildren,
java.awt.datatransfer.Transferable clipboardContents,
boolean isDrop)
Called when the paste action is performed
|
javax.swing.Icon |
getExpandedIcon()
Returns an alternate icon for when this node is expanded, if applicable.
|
int |
getSortOrder()
Returns the relative sort order for peers.
|
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 |
isEditActionHandler()
Override to return true if you want this node to be an edit action handler for its children.
|
protected boolean |
isRootFolder() |
void |
onSelected()
Called when this node is selected in the tree
|
protected DesignerProjectContext |
projectCtx()
Returns the project context to use.
|
canPaste, getFolderId, getProjectResource, isAllowRenameOnAdd, isEditable, isProtectedEnabled, loadChildren, onEdit, project, projectResourceModified, projectUpdated, setAllowRenameOnAdd, setName, setupEditActions, uninstall
gatherChildrenIds, install, isProtected, selectChild, setProtected
addBadges, addEditActions, checkChildren, children, confirmDelete, createProjectCopy, debug, debug, dispatchSelectionEvent, expand, findChild, findCommonEditActionHandler, findDropHandler, findEditActionHandler, forceChildrenReload, getAllowsChildren, getChildAt, getChildCount, getClipboard, getCommonEditActionHandler, getDepth, getIcon, getIndex, getModel, getName, getParent, getSelectionModel, getText, getThumbnail, getTooltip, isBold, isItalic, isLeaf, isSelected, isValidName, iterator, newLogger, notifyChildNameChanged, onChildrenSelected, onDoubleClick, pathToRoot, recreate, refresh, reload, select, select, setBold, setChildren, setIcon, setItalic, setText, setThumbnail, setTooltip, showPopup, showPopupMenu, toString, uninstallChildren, useThumbnailTooltip
protected final TabbedResourceWorkspace workspace
public ResourceFolderNode(DesignerContext context, TabbedResourceWorkspace workspace)
public ResourceFolderNode(DesignerContext context, TabbedResourceWorkspace workspace, ProjectResource resource)
public javax.swing.Icon getExpandedIcon()
AbstractNavTreeNode
getExpandedIcon
in class FolderNode
public java.lang.String getWorkspaceName()
AbstractNavTreeNode
getWorkspaceName
in class AbstractNavTreeNode
protected DesignerProjectContext projectCtx()
FolderNode
projectCtx
in class FolderNode
public int getSortOrder()
AbstractNavTreeNode
getSortOrder
in class AbstractNavTreeNode
protected AbstractNavTreeNode createChildNode(ProjectResource resource)
createChildNode
in class FolderNode
protected void initPopupMenu(javax.swing.JPopupMenu menu, javax.swing.tree.TreePath[] paths, java.util.List<AbstractNavTreeNode> selection, int modifiers)
AbstractNavTreeNode
initPopupMenu
in class AbstractNavTreeNode
protected void addOtherMenuItems(javax.swing.JPopupMenu menu)
protected boolean isRootFolder()
public boolean isEditActionHandler()
AbstractNavTreeNode
isEditActionHandler
in class AbstractNavTreeNode
public void doDelete(java.util.List<? extends AbstractNavTreeNode> children, AbstractNavTreeNode.DeleteReason reason)
AbstractNavTreeNode
doDelete
in class AbstractNavTreeNode
public java.awt.datatransfer.Transferable doCopy(java.util.List<? extends AbstractNavTreeNode> selectedChildren)
AbstractNavTreeNode
doCopy
in class AbstractNavTreeNode
Transferable
, or null if the copy failed. Will be added to
the system clipboard.public java.awt.datatransfer.Transferable doCut(java.util.List<? extends AbstractNavTreeNode> selectedChildren)
AbstractNavTreeNode
doCut
in class AbstractNavTreeNode
Transferable
, or null if the cut failed. Will be added to the
system clipboard.public boolean doPaste(java.util.List<? extends AbstractNavTreeNode> selectedChildren, java.awt.datatransfer.Transferable clipboardContents, boolean isDrop)
AbstractNavTreeNode
doPaste
in class AbstractNavTreeNode
clipboardContents
- 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.public boolean canDelete(java.util.List<AbstractNavTreeNode> selectedChildren)
AbstractNavTreeNode
AbstractNavTreeNode.canCopy(java.util.List)
both return true, the cut action will also be enabled.canDelete
in class AbstractNavTreeNode
public boolean canCopy(java.util.List<AbstractNavTreeNode> selectedChildren)
AbstractNavTreeNode
AbstractNavTreeNode.canDelete(java.util.List)
both return true, the cut action will also be enabled.canCopy
in class AbstractNavTreeNode
public boolean canPaste(java.util.List<AbstractNavTreeNode> selectedChildren, java.awt.datatransfer.Transferable clipboard)
AbstractNavTreeNode
canPaste
in class AbstractNavTreeNode
public boolean canDrag(java.util.List<AbstractNavTreeNode> draggedChildren)
AbstractNavTreeNode
canDrag
in class AbstractNavTreeNode
public boolean canDrop(AbstractNavTreeNode dropTarget, java.util.List<java.awt.datatransfer.DataFlavor> flavors)
canDrop
in class AbstractNavTreeNode
public void onSelected()
AbstractNavTreeNode
onSelected
in class AbstractNavTreeNode