Class WiresBaseTreeNode
- java.lang.Object
-
- com.ait.lienzo.client.core.shape.Node<T>
-
- com.ait.lienzo.client.core.shape.ContainerNode<T,C>
-
- com.ait.lienzo.client.core.shape.GroupOf<com.ait.lienzo.client.core.shape.IPrimitive<?>,com.ait.lienzo.client.core.shape.Group>
-
- com.ait.lienzo.client.core.shape.Group
-
- org.uberfire.ext.wires.core.api.shapes.WiresBaseShape
-
- org.uberfire.ext.wires.core.trees.client.shapes.WiresBaseTreeNode
-
- All Implemented Interfaces:
com.ait.lienzo.client.core.shape.IContainer<com.ait.lienzo.client.core.shape.Group,com.ait.lienzo.client.core.shape.IPrimitive<?>>,com.ait.lienzo.client.core.shape.IDestroyable,com.ait.lienzo.client.core.shape.IDrawable<com.ait.lienzo.client.core.shape.Group>,com.ait.lienzo.client.core.shape.IPrimitive<com.ait.lienzo.client.core.shape.Group>,com.ait.lienzo.client.core.shape.json.IJSONSerializable<com.ait.lienzo.client.core.shape.Group>,com.ait.lienzo.client.core.shape.wires.IControlHandleFactory,com.ait.tooling.nativetools.client.NObjectOnWire,org.uberfire.ext.wires.core.api.layout.RequiresLayoutManager,org.uberfire.ext.wires.core.api.selection.RequiresSelectionManager,org.uberfire.ext.wires.core.api.shapes.RequiresShapesManager,org.uberfire.ext.wires.core.api.shapes.WiresShape
public abstract class WiresBaseTreeNode extends org.uberfire.ext.wires.core.api.shapes.WiresBaseShape implements org.uberfire.ext.wires.core.api.shapes.RequiresShapesManager, org.uberfire.ext.wires.core.api.layout.RequiresLayoutManager
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.ait.lienzo.client.core.shape.Group
com.ait.lienzo.client.core.shape.Group.GroupFactory
-
Nested classes/interfaces inherited from class com.ait.lienzo.client.core.shape.GroupOf
com.ait.lienzo.client.core.shape.GroupOf.GroupOfFactory<T extends com.ait.lienzo.client.core.shape.IPrimitive<?>,C extends com.ait.lienzo.client.core.shape.GroupOf<T,C>>
-
-
Field Summary
Fields Modifier and Type Field Description protected org.uberfire.ext.wires.core.api.layout.LayoutManagerlayoutManagerprotected org.uberfire.ext.wires.core.api.shapes.ShapesManagershapesManager
-
Constructor Summary
Constructors Constructor Description WiresBaseTreeNode()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanacceptChildNode(WiresBaseTreeNode child)TreeNodes can decide to accept child TreeNodes when being dragged from the Palette to a prospective parentvoidaddChildNode(WiresBaseTreeNode child)Add a TreeNode as a child to this TreeNode.voidcollapse(org.uberfire.mvp.Command callback)Collapse this TreeNode and all descendants.booleancontains(double cx, double cy)voiddestroy()voidexpand(org.uberfire.mvp.Command callback)Expand this TreeNode and all descendants.List<WiresBaseTreeNode>getChildren()protected List<WiresBaseTreeNode>getDescendants(WiresBaseTreeNode node)abstract doublegetHeight()WiresBaseTreeNodegetParentNode()abstract doublegetWidth()booleanhasChildren()booleanhasCollapsedChildren()voidonCollapseEnd()Called when the TreeNode has been collapsed.voidonCollapseProgress(double pct)Called while the TreeNode is being collapsed.voidonCollapseStart()Called when the TreeNode is about to be collapsed.voidonExpandEnd()Called when the TreeNode has been expanded.voidonExpandProgress(double pct)Called while the TreeNode is being expanded.voidonExpandStart()Called when the TreeNode is about to be expanded.voidremoveChildNode(WiresBaseTreeNode child)Remove a child TreeNode from this TreeNode.voidsetLayoutManager(org.uberfire.ext.wires.core.api.layout.LayoutManager layoutManager)voidsetParentNode(WiresBaseTreeNode parent)voidsetShapesManager(org.uberfire.ext.wires.core.api.shapes.ShapesManager shapesManager)com.ait.lienzo.client.core.shape.GroupsetX(double x)com.ait.lienzo.client.core.shape.GroupsetY(double y)-
Methods inherited from class org.uberfire.ext.wires.core.api.shapes.WiresBaseShape
addControl, getControlTarget, getId, hideControls, isControlsVisible, removeControl, setControls, setSelectionManager, showControls
-
Methods inherited from class com.ait.lienzo.client.core.shape.Group
asGroup, getDefaultStorageEngine
-
Methods inherited from class com.ait.lienzo.client.core.shape.GroupOf
add, add, asContainer, asGroupOf, asPrimitive, attachToLayerColorMap, batch, destroy, detachFromLayerColorMap, draw, find, getAlpha, getBoundingBoxAttributes, getControlHandleFactory, getControlHandles, getControlHandles, getDragBounds, getDragConstraint, getDragConstraints, getDragMode, getEventPropagationMode, getFactory, getFillAlpha, getGroupType, getLocation, getOffset, getRotation, getRotationDegrees, getScale, getShear, getStrokeAlpha, getTransformingAttributes, getX, getY, isDraggable, isDragging, isEditable, moveDown, moveToBottom, moveToTop, moveUp, refresh, remove, removeAll, removeFromParent, setAlpha, setControlHandleFactory, setDragBounds, setDragConstraint, setDragConstraints, setDraggable, setDragging, setDragMode, setEditable, setEventPropagationMode, setFillAlpha, setGroupType, setLocation, setOffset, setOffset, setOffset, setRotation, setRotationDegrees, setScale, setScale, setScale, setShear, setShear, setStrokeAlpha, toJSONObject
-
Methods inherited from class com.ait.lienzo.client.core.shape.ContainerNode
asContainerNode, copy, drawWithoutTransforms, find, findByID, getBoundingBox, getChildNodes, getChildNodes, getPathClipper, getStorageBounds, getStorageEngine, length, moveDown, moveToBottom, moveToTop, moveUp, setPathClipper, setStorageBounds, setStorageEngine
-
Methods inherited from class com.ait.lienzo.client.core.shape.Node
addAttributesChangedHandler, addEnsureHandler, addNodeDragEndHandler, addNodeDragMoveHandler, addNodeDragStartHandler, addNodeGestureChangeHandler, addNodeGestureEndHandler, addNodeGestureStartHandler, addNodeMouseClickHandler, addNodeMouseDoubleClickHandler, addNodeMouseDownHandler, addNodeMouseEnterHandler, addNodeMouseExitHandler, addNodeMouseMoveHandler, addNodeMouseOutHandler, addNodeMouseOverHandler, addNodeMouseUpHandler, addNodeMouseWheelHandler, addNodeTouchCancelHandler, addNodeTouchEndHandler, addNodeTouchMoveHandler, addNodeTouchStartHandler, addParentsLocations, animate, animate, asAttributes, asAttributes, asGuide, asLayer, asList, asMultiPointShape, asNode, asScene, asShape, asViewport, cancelAttributesChangedBatcher, cast, copyUnchecked, doAnimating, drawWithTransforms, drawWithTransforms, equals, fireEvent, getAbsoluteLocation, getAbsoluteTransform, getAttributes, getAttributeSheet, getBoundingPoints, getBoundingPoints, getComputedBoundingPoints, getComputedLocation, getID, getLayer, getMetaData, getName, getNodeType, getOverLayer, getParent, getPossibleNodeTransform, getRequiredAttributes, getScene, getScratchPad, getUserData, getViewport, hashCode, hasMetaData, isAnimating, isEventHandled, isEventHandledGlobally, isListening, isVisible, onWire, setAttributesChangedBatcher, setID, setListening, setName, setNodeType, setParent, setUserData, setVisible, toJSONString, toString, unAnimating, uuid
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.ait.lienzo.client.core.shape.IDrawable
addAttributesChangedHandler, addNodeDragEndHandler, addNodeDragMoveHandler, addNodeDragStartHandler, addNodeGestureChangeHandler, addNodeGestureEndHandler, addNodeGestureStartHandler, addNodeMouseClickHandler, addNodeMouseDoubleClickHandler, addNodeMouseDownHandler, addNodeMouseEnterHandler, addNodeMouseExitHandler, addNodeMouseMoveHandler, addNodeMouseOutHandler, addNodeMouseOverHandler, addNodeMouseUpHandler, addNodeMouseWheelHandler, addNodeTouchCancelHandler, addNodeTouchEndHandler, addNodeTouchMoveHandler, addNodeTouchStartHandler, animate, animate, asContainerNode, asGuide, asLayer, asMultiPointShape, asNode, asScene, asShape, asViewport, cancelAttributesChangedBatcher, copy, drawWithTransforms, fireEvent, getAbsoluteLocation, getAbsoluteTransform, getAttributes, getAttributeSheet, getBoundingBox, getBoundingPoints, getComputedBoundingPoints, getComputedLocation, getID, getLayer, getMetaData, getName, getNodeType, getOverLayer, getParent, getRequiredAttributes, getScene, getScratchPad, getUserData, getViewport, hasMetaData, isEventHandled, isListening, isVisible, setAttributesChangedBatcher, setID, setListening, setName, setUserData, setVisible, uuid
-
-
-
-
Method Detail
-
setShapesManager
public void setShapesManager(org.uberfire.ext.wires.core.api.shapes.ShapesManager shapesManager)
- Specified by:
setShapesManagerin interfaceorg.uberfire.ext.wires.core.api.shapes.RequiresShapesManager
-
setLayoutManager
public void setLayoutManager(org.uberfire.ext.wires.core.api.layout.LayoutManager layoutManager)
- Specified by:
setLayoutManagerin interfaceorg.uberfire.ext.wires.core.api.layout.RequiresLayoutManager
-
contains
public boolean contains(double cx, double cy)- Specified by:
containsin interfaceorg.uberfire.ext.wires.core.api.shapes.WiresShape
-
destroy
public void destroy()
- Specified by:
destroyin interfacecom.ait.lienzo.client.core.shape.IDestroyable- Specified by:
destroyin interfaceorg.uberfire.ext.wires.core.api.shapes.WiresShape- Overrides:
destroyin classorg.uberfire.ext.wires.core.api.shapes.WiresBaseShape
-
getParentNode
public WiresBaseTreeNode getParentNode()
-
setParentNode
public void setParentNode(WiresBaseTreeNode parent)
-
acceptChildNode
public boolean acceptChildNode(WiresBaseTreeNode child)
TreeNodes can decide to accept child TreeNodes when being dragged from the Palette to a prospective parent- Parameters:
child- TreeNode that will be added to this TreeNode as a child- Returns:
- true if the child can be added to this TreeNode
-
addChildNode
public void addChildNode(WiresBaseTreeNode child)
Add a TreeNode as a child to this TreeNode. A connector is automatically created and maintained for the child. Connectors are "outgoing" from the parent to a child.- Parameters:
child-
-
removeChildNode
public void removeChildNode(WiresBaseTreeNode child)
Remove a child TreeNode from this TreeNode. Connectors are automatically cleared up.- Parameters:
child-
-
getChildren
public List<WiresBaseTreeNode> getChildren()
-
getWidth
public abstract double getWidth()
-
getHeight
public abstract double getHeight()
-
collapse
public void collapse(org.uberfire.mvp.Command callback)
Collapse this TreeNode and all descendants.- Parameters:
callback- The callback is invoked when the animation completes.
-
onCollapseStart
public void onCollapseStart()
Called when the TreeNode is about to be collapsed. Default implementation does nothing.
-
onCollapseProgress
public void onCollapseProgress(double pct)
Called while the TreeNode is being collapsed. Default implementation does nothing.- Parameters:
pct- 0.0 to 1.0 where 1.0 is collapsed
-
onCollapseEnd
public void onCollapseEnd()
Called when the TreeNode has been collapsed. Default implementation does nothing.
-
expand
public void expand(org.uberfire.mvp.Command callback)
Expand this TreeNode and all descendants. Nested collapsed TreeNodes are not expanded.- Parameters:
callback- The callback is invoked when the animation completes.
-
onExpandStart
public void onExpandStart()
Called when the TreeNode is about to be expanded. Default implementation does nothing.
-
onExpandProgress
public void onExpandProgress(double pct)
Called while the TreeNode is being expanded. Default implementation does nothing.- Parameters:
pct- 0.0 to 1.0 where 1.0 is expanded
-
onExpandEnd
public void onExpandEnd()
Called when the TreeNode has been expanded. Default implementation does nothing.
-
getDescendants
protected List<WiresBaseTreeNode> getDescendants(WiresBaseTreeNode node)
-
hasChildren
public boolean hasChildren()
-
hasCollapsedChildren
public boolean hasCollapsedChildren()
-
setX
public com.ait.lienzo.client.core.shape.Group setX(double x)
- Specified by:
setXin interfacecom.ait.lienzo.client.core.shape.IPrimitive<com.ait.lienzo.client.core.shape.Group>- Overrides:
setXin classorg.uberfire.ext.wires.core.api.shapes.WiresBaseShape
-
setY
public com.ait.lienzo.client.core.shape.Group setY(double y)
- Specified by:
setYin interfacecom.ait.lienzo.client.core.shape.IPrimitive<com.ait.lienzo.client.core.shape.Group>- Overrides:
setYin classorg.uberfire.ext.wires.core.api.shapes.WiresBaseShape
-
-