public abstract class AbstractTopLevelContainerNode extends AbstractResourceNavTreeNode implements DesignableWorkspaceListener, ProjectChangeListener
| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractTopLevelContainerNode.SendToAction |
protected class |
AbstractTopLevelContainerNode.SendToMenu |
AbstractNavTreeNode.DeleteReason, AbstractNavTreeNode.PopupAction, AbstractNavTreeNode.ResourceChangeListenerProjectChangeListener.ResourceModification| Modifier and Type | Field and Description |
|---|---|
protected TopLevelContainer |
container |
protected DesignerContext |
context |
protected java.util.UUID |
parentFolder |
protected long |
resourceId |
protected ProjectScope |
scope |
protected com.google.common.base.Supplier<AbstractTopLevelContainerNode.SendToMenu> |
sendToMenu |
protected VisionDesignerImpl |
vision |
protected WindowWorkspace |
workspace |
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 |
AbstractTopLevelContainerNode(VisionDesignerImpl fpmi,
ProjectResource resource,
ProjectScope scope) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBadges(BadgeTreeCellRenderer renderer) |
protected abstract void |
addListeners(TopLevelContainer container) |
protected boolean |
alterName(java.lang.String newTextValue) |
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 |
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.
|
boolean |
confirmDelete(java.util.List<? extends AbstractNavTreeNode> selectedChildren)
Used to confirm the delete.
|
void |
containerClosed(DesignableContainer container) |
void |
containerOpened(DesignableContainer container) |
void |
containerSelected(DesignableContainer container) |
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> selectedChildren,
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
|
protected abstract AbstractNavTreeNode |
findChild(java.awt.Component c) |
boolean |
getAllowsChildren() |
ProjectResource |
getProjectResource()
The ProjectResource that this node represents
|
long |
getResourceId() |
protected abstract java.util.UUID |
getRootFolderUUID() |
java.lang.String |
getText()
The text that will be used to render the node
|
VisionDesignerInterface |
getVision() |
void |
install(AbstractNavTreeNode parent) |
boolean |
isContainerOpen() |
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.
|
void |
itemSelectionChanged(java.util.List<javax.swing.JComponent> newSelection) |
protected boolean |
matches(DesignableContainer container) |
void |
onChildrenSelected(java.util.List<javax.swing.tree.TreePath> paths)
Called when child nodes (deep) are selected under this node.
|
void |
onEdit(java.lang.String newTextValue)
Called after this node has been edited in the tree.
|
void |
onSelected()
Called when this node is selected in the tree
|
protected DesignerProjectContext |
projectCtx()
Returns the project context (local vs global) that this resource belongs to
|
void |
projectResourceModified(ProjectResource resource,
ProjectChangeListener.ResourceModification changeType)
Return the instance of PropertyChangeListener that will listen to the container.
|
void |
projectUpdated(Project diff)
Notifies the listener that the project has been updated externally, by the result of a File-Update or a Save.
|
protected abstract void |
removeListeners(TopLevelContainer container) |
protected void |
setContainer(TopLevelContainer container,
boolean notify) |
void |
uninstall()
Called when the node is removed from the tree.
|
gatherChildrenIds, isProtected, isProtectedEnabled, selectChild, setProtected, setupEditActionsaddEditActions, canDrag, canDrop, checkChildren, children, debug, debug, dispatchSelectionEvent, expand, findChild, findCommonEditActionHandler, findDropHandler, findEditActionHandler, forceChildrenReload, getChildAt, getChildCount, getClipboard, getCommonEditActionHandler, getDepth, getExpandedIcon, getIcon, getIndex, getModel, getName, getParent, getSelectionModel, getSortOrder, getThumbnail, getTooltip, getWorkspaceName, initPopupMenu, isBold, isItalic, isLeaf, isSelected, isValidName, iterator, loadChildren, newLogger, notifyChildNameChanged, onDoubleClick, pathToRoot, recreate, refresh, reload, select, select, setBold, setChildren, setIcon, setItalic, setName, setText, setThumbnail, setTooltip, showPopup, showPopupMenu, toString, uninstallChildren, useThumbnailTooltipprotected VisionDesignerImpl vision
protected WindowWorkspace workspace
protected DesignerContext context
protected long resourceId
protected ProjectScope scope
protected java.util.UUID parentFolder
protected TopLevelContainer container
protected com.google.common.base.Supplier<AbstractTopLevelContainerNode.SendToMenu> sendToMenu
protected AbstractTopLevelContainerNode(VisionDesignerImpl fpmi, ProjectResource resource, ProjectScope scope)
protected DesignerProjectContext projectCtx()
AbstractResourceNavTreeNodeprojectCtx in class AbstractResourceNavTreeNodepublic VisionDesignerInterface getVision()
public void install(AbstractNavTreeNode parent)
install in class AbstractNavTreeNodepublic void uninstall()
AbstractNavTreeNodeuninstall in class AbstractNavTreeNodepublic void addBadges(BadgeTreeCellRenderer renderer)
addBadges in class AbstractNavTreeNodepublic java.lang.String getText()
AbstractNavTreeNodegetText in class AbstractNavTreeNodepublic boolean isEditable()
AbstractNavTreeNodeAbstractNavTreeNode.onEdit(String)isEditable in class AbstractNavTreeNodepublic void onEdit(java.lang.String newTextValue)
AbstractNavTreeNodeonEdit in class AbstractNavTreeNodeprotected boolean alterName(java.lang.String newTextValue)
protected abstract void removeListeners(TopLevelContainer container)
protected abstract void addListeners(TopLevelContainer container)
public void projectResourceModified(ProjectResource resource, ProjectChangeListener.ResourceModification changeType)
projectResourceModified in interface ProjectChangeListenerpublic void projectUpdated(Project diff)
ProjectChangeListenerprojectUpdated in interface ProjectChangeListenerprotected boolean matches(DesignableContainer container)
public void containerClosed(DesignableContainer container)
containerClosed in interface DesignableWorkspaceListenerpublic void containerOpened(DesignableContainer container)
containerOpened in interface DesignableWorkspaceListenerpublic void containerSelected(DesignableContainer container)
containerSelected in interface DesignableWorkspaceListenerpublic void itemSelectionChanged(java.util.List<javax.swing.JComponent> newSelection)
itemSelectionChanged in interface DesignableWorkspaceListenerpublic void onSelected()
AbstractNavTreeNodeonSelected in class AbstractNavTreeNodepublic void onChildrenSelected(java.util.List<javax.swing.tree.TreePath> paths)
AbstractNavTreeNodeonChildrenSelected in class AbstractNavTreeNodepaths - the children selected when the parent node is selectedprotected abstract java.util.UUID getRootFolderUUID()
protected abstract AbstractNavTreeNode findChild(java.awt.Component c)
protected void setContainer(TopLevelContainer container, boolean notify)
public boolean getAllowsChildren()
getAllowsChildren in interface javax.swing.tree.TreeNodegetAllowsChildren in class AbstractNavTreeNodepublic boolean isContainerOpen()
public ProjectResource getProjectResource()
AbstractResourceNavTreeNodegetProjectResource in class AbstractResourceNavTreeNodepublic long getResourceId()
public 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 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 boolean canPaste(java.util.List<AbstractNavTreeNode> selectedChildren, java.awt.datatransfer.Transferable data)
AbstractNavTreeNodecanPaste 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 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.public void doDelete(java.util.List<? extends AbstractNavTreeNode> selectedChildren, AbstractNavTreeNode.DeleteReason reason)
AbstractNavTreeNodedoDelete in class AbstractNavTreeNodepublic boolean confirmDelete(java.util.List<? extends AbstractNavTreeNode> selectedChildren)
AbstractNavTreeNodeconfirmDelete 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 boolean isEditActionHandler()
AbstractNavTreeNodeisEditActionHandler in class AbstractNavTreeNode