public abstract class PackageNode extends FolderNode
FolderNode.NewFolderActionAbstractNavTreeNode.DeleteReason, AbstractNavTreeNode.PopupAction, AbstractNavTreeNode.ResourceChangeListenerProjectChangeListener.ResourceModification| Modifier and Type | Field and Description |
|---|---|
protected javax.swing.Action |
newModuleAction |
protected javax.swing.Action |
newPackageAction |
protected ScriptWorkspace |
workspace |
allowRenameOnAdd, context, folderId, moduleId, newFolderAction, resourceId, resourceScopebold, 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 |
|---|
PackageNode(DesignerContext context,
ScriptWorkspace workspace,
ProjectResource folder) |
PackageNode(DesignerContext context,
ScriptWorkspace workspace,
java.lang.String moduleId,
int scope,
java.util.UUID rootId) |
| Modifier and Type | Method and Description |
|---|---|
static long |
addNewScript(DesignerContext context,
DesignerProjectContext projectCtx,
java.util.UUID parentFolder,
java.lang.String resourceType) |
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 r) |
protected abstract AbstractNavTreeNode |
createPackageNode(DesignerContext context,
ScriptWorkspace workspace,
ProjectResource folder) |
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.
|
protected abstract java.lang.String |
getModuleId() |
protected abstract java.lang.String |
getNodeScope() |
protected abstract java.lang.String |
getResourceType() |
protected abstract java.util.UUID |
getRootUUID() |
protected abstract int |
getScope() |
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.
|
protected boolean |
isRootFolder() |
void |
onEdit(java.lang.String newTextValue)
Called after this node has been edited in the tree.
|
canPaste, getFolderId, getProjectResource, isAllowRenameOnAdd, isProtectedEnabled, loadChildren, project, projectCtx, projectResourceModified, projectUpdated, setAllowRenameOnAdd, setName, setupEditActions, uninstallgatherChildrenIds, install, isProtected, selectChild, setProtectedaddBadges, 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, getSortOrder, getText, getThumbnail, getTooltip, isBold, 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 ScriptWorkspace workspace
protected javax.swing.Action newModuleAction
protected javax.swing.Action newPackageAction
public PackageNode(DesignerContext context, ScriptWorkspace workspace, java.lang.String moduleId, int scope, java.util.UUID rootId)
public PackageNode(DesignerContext context, ScriptWorkspace workspace, ProjectResource folder)
public static long addNewScript(DesignerContext context, DesignerProjectContext projectCtx, java.util.UUID parentFolder, java.lang.String resourceType) throws java.lang.Exception
java.lang.Exceptionprotected AbstractNavTreeNode createChildNode(ProjectResource r)
createChildNode in class FolderNodeprotected void initPopupMenu(javax.swing.JPopupMenu menu,
javax.swing.tree.TreePath[] paths,
java.util.List<AbstractNavTreeNode> selection,
int modifiers)
AbstractNavTreeNodeinitPopupMenu in class AbstractNavTreeNodepublic javax.swing.Icon getExpandedIcon()
AbstractNavTreeNodegetExpandedIcon in class FolderNodepublic boolean isEditActionHandler()
AbstractNavTreeNodeisEditActionHandler in class AbstractNavTreeNodepublic java.lang.String getWorkspaceName()
AbstractNavTreeNodegetWorkspaceName in class AbstractNavTreeNodepublic boolean isEditable()
AbstractNavTreeNodeAbstractNavTreeNode.onEdit(String)isEditable in class FolderNodepublic void onEdit(java.lang.String newTextValue)
AbstractNavTreeNodeonEdit in class FolderNodepublic boolean canDelete(java.util.List<AbstractNavTreeNode> selectedChildren)
AbstractNavTreeNodeAbstractNavTreeNode.canCopy(java.util.List) both return true, the cut action will also be enabled.canDelete in class AbstractNavTreeNodepublic void doDelete(java.util.List<? extends AbstractNavTreeNode> children, AbstractNavTreeNode.DeleteReason reason)
AbstractNavTreeNodedoDelete in class AbstractNavTreeNodepublic boolean canCopy(java.util.List<AbstractNavTreeNode> selectedChildren)
AbstractNavTreeNodeAbstractNavTreeNode.canDelete(java.util.List) both return true, the cut action will also be enabled.canCopy in class AbstractNavTreeNodepublic java.awt.datatransfer.Transferable doCopy(java.util.List<? extends AbstractNavTreeNode> selectedChildren)
AbstractNavTreeNodedoCopy in class AbstractNavTreeNodeTransferable, or null if the copy failed. Will be added to
the system clipboard.public boolean canDrag(java.util.List<AbstractNavTreeNode> draggedChildren)
AbstractNavTreeNodecanDrag in class AbstractNavTreeNodepublic boolean canDrop(AbstractNavTreeNode dropTarget, java.util.List<java.awt.datatransfer.DataFlavor> flavors)
canDrop in class AbstractNavTreeNodepublic boolean canPaste(java.util.List<AbstractNavTreeNode> selectedChildren, java.awt.datatransfer.Transferable clipboard)
AbstractNavTreeNodecanPaste in class AbstractNavTreeNodepublic boolean doPaste(java.util.List<? extends AbstractNavTreeNode> selectedChildren, java.awt.datatransfer.Transferable clipboardContents, boolean isDrop)
AbstractNavTreeNodedoPaste in class AbstractNavTreeNodeclipboardContents - 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 java.awt.datatransfer.Transferable doCut(java.util.List<? extends AbstractNavTreeNode> selectedChildren)
AbstractNavTreeNodedoCut in class AbstractNavTreeNodeTransferable, or null if the cut failed. Will be added to the
system clipboard.protected boolean isRootFolder()
protected abstract java.lang.String getResourceType()
protected abstract java.lang.String getNodeScope()
protected abstract int getScope()
protected abstract java.lang.String getModuleId()
protected abstract java.util.UUID getRootUUID()
protected abstract AbstractNavTreeNode createPackageNode(DesignerContext context, ScriptWorkspace workspace, ProjectResource folder)