public class LayoutTreeComponent extends java.lang.Object implements DnDTarget, Disposable
DnDDropHandler.WithResult
Disposable.Parent
Constructor and Description |
---|
LayoutTreeComponent(ArtifactEditorImpl artifactsEditor,
ComplexElementSubstitutionParameters substitutionParameters,
ArtifactEditorContext context,
Artifact originalArtifact,
boolean sortElements) |
Modifier and Type | Method and Description |
---|---|
void |
addNewPackagingElement(PackagingElementType<?> type) |
boolean |
checkCanAdd(CompositePackagingElement<?> parentElement,
PackagingElementNode<?> parentNode) |
boolean |
checkCanModify(java.util.Collection<? extends PackagingNodeSource> nodeSources) |
boolean |
checkCanModify(PackagingElement<?> element,
PackagingElementNode<?> node) |
boolean |
checkCanModifyChildren(PackagingElement<?> parentElement,
PackagingElementNode<?> parentNode,
java.util.Collection<? extends PackagingElementNode<?>> children) |
boolean |
checkCanRemove(java.util.List<? extends PackagingElementNode<?>> nodes) |
void |
dispose()
Usually not invoked directly, see class javadoc.
|
void |
drop(DnDEvent aEvent) |
void |
editLayout(java.lang.Runnable action) |
Artifact |
getArtifact() |
LayoutTree |
getLayoutTree() |
CompositePackagingElement<?> |
getRootElement() |
PackagingElementNode<?> |
getRootNode() |
LayoutTreeSelection |
getSelection() |
javax.swing.JPanel |
getTreePanel() |
void |
initTree() |
boolean |
isEditing() |
boolean |
isPropertiesModified() |
boolean |
isSortElements() |
void |
packInto(java.util.List<? extends PackagingSourceItem> items,
java.lang.String pathToJar) |
void |
putElements(java.lang.String path,
java.util.List<? extends PackagingElement<?>> elements) |
void |
putIntoDefaultLocations(java.util.List<? extends PackagingSourceItem> items) |
void |
rebuildTree() |
void |
removeNodes(java.util.List<? extends PackagingElementNode<?>> nodes) |
void |
removeSelectedElements() |
void |
resetElementProperties() |
void |
saveElementProperties() |
Promise<javax.swing.tree.TreePath> |
selectNode(java.lang.String parentPath,
PackagingElement<?> element) |
Promise<javax.swing.tree.TreePath> |
selectNode(java.lang.String parentPath,
java.lang.String nodeName) |
void |
setRootElement(CompositePackagingElement<?> rootElement) |
void |
setSortElements(boolean sortElements) |
void |
startRenaming(javax.swing.tree.TreePath path) |
boolean |
update(DnDEvent aEvent) |
void |
updateAndSelect(PackagingElementNode<?> node,
java.util.List<? extends PackagingElement<?>> toSelect) |
void |
updatePropertiesPanel(boolean force) |
void |
updateRootNode() |
void |
updateTreeNodesPresentation() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cleanUpOnLeave, updateDraggedImage
public LayoutTreeComponent(ArtifactEditorImpl artifactsEditor, ComplexElementSubstitutionParameters substitutionParameters, ArtifactEditorContext context, Artifact originalArtifact, boolean sortElements)
public void setSortElements(boolean sortElements)
public Artifact getArtifact()
public LayoutTree getLayoutTree()
public void updatePropertiesPanel(boolean force)
public void saveElementProperties()
public void rebuildTree()
public LayoutTreeSelection getSelection()
public void addNewPackagingElement(PackagingElementType<?> type)
public boolean checkCanModify(PackagingElement<?> element, PackagingElementNode<?> node)
public boolean checkCanModifyChildren(PackagingElement<?> parentElement, PackagingElementNode<?> parentNode, java.util.Collection<? extends PackagingElementNode<?>> children)
public boolean checkCanModify(java.util.Collection<? extends PackagingNodeSource> nodeSources)
public boolean checkCanAdd(CompositePackagingElement<?> parentElement, PackagingElementNode<?> parentNode)
public boolean checkCanRemove(java.util.List<? extends PackagingElementNode<?>> nodes)
public void updateAndSelect(PackagingElementNode<?> node, java.util.List<? extends PackagingElement<?>> toSelect)
public Promise<javax.swing.tree.TreePath> selectNode(java.lang.String parentPath, PackagingElement<?> element)
public Promise<javax.swing.tree.TreePath> selectNode(java.lang.String parentPath, java.lang.String nodeName)
public void editLayout(java.lang.Runnable action)
public void removeSelectedElements()
public void removeNodes(java.util.List<? extends PackagingElementNode<?>> nodes)
public javax.swing.JPanel getTreePanel()
public void dispose()
Disposable
dispose
in interface Disposable
public boolean update(DnDEvent aEvent)
update
in interface DnDTargetChecker
aEvent
- Drag-n-Drop eventtrue
- if this target is unable to handle the event and parent component should be asked to process it.
false
- if this target is able to handle the event and parent component should NOT be asked to process it.DnDEvent.setDropPossible(boolean, String)
,
DnDEvent.setDropPossible(String, DropActionHandler)
public void drop(DnDEvent aEvent)
drop
in interface DnDDropHandler
public void startRenaming(javax.swing.tree.TreePath path)
public boolean isEditing()
public void setRootElement(CompositePackagingElement<?> rootElement)
public PackagingElementNode<?> getRootNode()
public CompositePackagingElement<?> getRootElement()
public void updateTreeNodesPresentation()
public void updateRootNode()
public void initTree()
public void putIntoDefaultLocations(java.util.List<? extends PackagingSourceItem> items)
public void putElements(java.lang.String path, java.util.List<? extends PackagingElement<?>> elements)
public void packInto(java.util.List<? extends PackagingSourceItem> items, java.lang.String pathToJar)
public boolean isPropertiesModified()
public void resetElementProperties()
public boolean isSortElements()