Class 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>>
      • Nested classes/interfaces inherited from class com.ait.lienzo.client.core.shape.ContainerNode

        com.ait.lienzo.client.core.shape.ContainerNode.ContainerNodeFactory<C extends com.ait.lienzo.client.core.shape.json.IJSONSerializable<C> & com.ait.lienzo.client.core.shape.IContainer<C,​?>>
      • Nested classes/interfaces inherited from class com.ait.lienzo.client.core.shape.Node

        com.ait.lienzo.client.core.shape.Node.NodeFactory<N extends com.ait.lienzo.client.core.shape.json.IJSONSerializable<N>>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.uberfire.ext.wires.core.api.layout.LayoutManager layoutManager  
      protected org.uberfire.ext.wires.core.api.shapes.ShapesManager shapesManager  
      • Fields inherited from class org.uberfire.ext.wires.core.api.shapes.WiresBaseShape

        controls, id, isControlsVisible, selectionManager
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      boolean acceptChildNode​(WiresBaseTreeNode child)
      TreeNodes can decide to accept child TreeNodes when being dragged from the Palette to a prospective parent
      void addChildNode​(WiresBaseTreeNode child)
      Add a TreeNode as a child to this TreeNode.
      void collapse​(org.uberfire.mvp.Command callback)
      Collapse this TreeNode and all descendants.
      boolean contains​(double cx, double cy)  
      void destroy()  
      void expand​(org.uberfire.mvp.Command callback)
      Expand this TreeNode and all descendants.
      List<WiresBaseTreeNode> getChildren()  
      protected List<WiresBaseTreeNode> getDescendants​(WiresBaseTreeNode node)  
      abstract double getHeight()  
      WiresBaseTreeNode getParentNode()  
      abstract double getWidth()  
      boolean hasChildren()  
      boolean hasCollapsedChildren()  
      void onCollapseEnd()
      Called when the TreeNode has been collapsed.
      void onCollapseProgress​(double pct)
      Called while the TreeNode is being collapsed.
      void onCollapseStart()
      Called when the TreeNode is about to be collapsed.
      void onExpandEnd()
      Called when the TreeNode has been expanded.
      void onExpandProgress​(double pct)
      Called while the TreeNode is being expanded.
      void onExpandStart()
      Called when the TreeNode is about to be expanded.
      void removeChildNode​(WiresBaseTreeNode child)
      Remove a child TreeNode from this TreeNode.
      void setLayoutManager​(org.uberfire.ext.wires.core.api.layout.LayoutManager layoutManager)  
      void setParentNode​(WiresBaseTreeNode parent)  
      void setShapesManager​(org.uberfire.ext.wires.core.api.shapes.ShapesManager shapesManager)  
      com.ait.lienzo.client.core.shape.Group setX​(double x)  
      com.ait.lienzo.client.core.shape.Group setY​(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 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
      • Methods inherited from interface com.ait.lienzo.client.core.shape.json.IJSONSerializable

        toJSONString
      • Methods inherited from interface com.ait.tooling.nativetools.client.NObjectOnWire

        onWire
      • Methods inherited from interface org.uberfire.ext.wires.core.api.shapes.WiresShape

        setSelected
    • Field Detail

      • shapesManager

        protected org.uberfire.ext.wires.core.api.shapes.ShapesManager shapesManager
      • layoutManager

        protected org.uberfire.ext.wires.core.api.layout.LayoutManager layoutManager
    • Constructor Detail

      • WiresBaseTreeNode

        public WiresBaseTreeNode()
    • Method Detail

      • setShapesManager

        public void setShapesManager​(org.uberfire.ext.wires.core.api.shapes.ShapesManager shapesManager)
        Specified by:
        setShapesManager in interface org.uberfire.ext.wires.core.api.shapes.RequiresShapesManager
      • setLayoutManager

        public void setLayoutManager​(org.uberfire.ext.wires.core.api.layout.LayoutManager layoutManager)
        Specified by:
        setLayoutManager in interface org.uberfire.ext.wires.core.api.layout.RequiresLayoutManager
      • contains

        public boolean contains​(double cx,
                                double cy)
        Specified by:
        contains in interface org.uberfire.ext.wires.core.api.shapes.WiresShape
      • destroy

        public void destroy()
        Specified by:
        destroy in interface com.ait.lienzo.client.core.shape.IDestroyable
        Specified by:
        destroy in interface org.uberfire.ext.wires.core.api.shapes.WiresShape
        Overrides:
        destroy in class org.uberfire.ext.wires.core.api.shapes.WiresBaseShape
      • 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 -
      • 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.
      • hasChildren

        public boolean hasChildren()
      • hasCollapsedChildren

        public boolean hasCollapsedChildren()
      • setX

        public com.ait.lienzo.client.core.shape.Group setX​(double x)
        Specified by:
        setX in interface com.ait.lienzo.client.core.shape.IPrimitive<com.ait.lienzo.client.core.shape.Group>
        Overrides:
        setX in class org.uberfire.ext.wires.core.api.shapes.WiresBaseShape
      • setY

        public com.ait.lienzo.client.core.shape.Group setY​(double y)
        Specified by:
        setY in interface com.ait.lienzo.client.core.shape.IPrimitive<com.ait.lienzo.client.core.shape.Group>
        Overrides:
        setY in class org.uberfire.ext.wires.core.api.shapes.WiresBaseShape