TreeItemExpander

open class TreeItemExpander : Expander

Expands TreeViewItem-s. This class overrides Expander.

  • Initializes a new instance of the TreeItemExpander class.

    Declaration

    Swift

    public init(item: DiagramItem, treeItem: TreeViewItem)

    Parameters

    item

    The DiagramItem associated with this expander.

    treeItem

    The TreeViewItem to expand.

    Return Value

    The newly created TreeItemExpander object.

  • Handles the click event.

    Declaration

    Swift

    open override func onClick(_ point: Point)

    Parameters

    point

    The point where the click has occurred.

  • Draws the expanded item at the specified canvas.

    Declaration

    Swift

    open override func draw(_ canvas: Canvas)

    Parameters

    canvas

    The canvas where the expande items are rendered.

  • Specifies if drag events are needed.

    Declaration

    Swift

    open override func needsDragEvents(_ point: Point) -> Bool

    Parameters

    point

    A point on the diagram.

  • Handles the onTouchDown event.

    Declaration

    Swift

    open override func onTouchDown(_ point: Point)

    Parameters

    point

    The point where the touch has occurred.

  • Handles the onTouchMove event.

    Declaration

    Swift

    open override func onTouchMove(_ point: Point)

    Parameters

    point

    The point where the move has occurred.

  • Handles the onTouchUp event.

    Declaration

    Swift

    open override func onTouchUp(_ point: Point)

    Parameters

    point

    The point where the touch was lifted.

  • Specifies if the tree is expanded.

    Declaration

    Swift

    open override var expanded: Bool { get }

    Return Value

    true if the TreeViewItem is expanded; otherwise false.