TreeViewNode

open class TreeViewNode : DiagramNode, Scrollable

Represents nodes that can draw hierarchical data. Thic class inherits DiagramNode and implements Scrollable.

  • Initializes a new instance of the TreeViewNode class.

    Declaration

    Swift

    public override init()

    Return Value

    The newly created TreeViewNode object.

  • Draws the TreeViewNode using the specified canvas object.

    Declaration

    Swift

    open override func drawLocal(_ canvas: Canvas, options: RenderOptions)

    Parameters

    canvas

    A canvas object where the TreeViewNode should be rendered.

    options

    Provides options for the drawing operation.

  • Loads this TreeViewNode from the specified XML context and element. Overrides DiagramNode.loadFromXml.

    Declaration

    Swift

    open override func loadFromXml(_ element: XmlElement, context: XmlContext)

    Parameters

    element

    The XmlElement, which contains this TreeViewNode.

    context

    The XmlContext, which contains this TreeViewNode.

  • Saves this TreeViewNode into the specified XML context and element. Overrides DiagramNode.saveToXml.

    Declaration

    Swift

    open override func saveToXml(_ element: XmlElement, context: XmlContext)

    Parameters

    element

    The XmlElement, where the TreeViewNode will be saved.

    context

    The XmlContext, where the TreeViewNode will be saved.

  • Gets the id for the class. Overrides DiagramNode.getClassId.

    Declaration

    Swift

    open override func getClassId() -> String

    Return Value

    The id of the class.

  • Create state storage for the diagram item.

    Declaration

    Swift

    open override func createState() -> DiagramItemState
  • Saves the state of the diagram item.

    Declaration

    Swift

    open override func saveState() -> DiagramItemState
  • Restores the state of the diagram item.

    Declaration

    Swift

    open override func restoreState(_ state: DiagramItemState)
  • Gets the maximum scroll position.

    Declaration

    Swift

    open func getMaxScrollPos() -> Double

    Return Value

    The maximum scroll position.

  • Gets the current scroll position.

    Declaration

    Swift

    open func getCurrentScrollPos() -> Double

    Return Value

    The current scroll position.

  • Sets the current scroll position.

    Declaration

    Swift

    open func setCurrentScrollPos(_ pos: Double)

    Parameters

    pos

    The scroll position to set.

  • Checks if the scroll mode is integral e.g. if true the scroll values are round numbers, the first item shall always be visible; if false scroll positions change in floating point numbers and the first item might be partially hidden.

    Declaration

    Swift

    open func integralScrollMode() -> Bool

    Return Value

    true if the scroll mode is integral; otherwise false. For TreeViewNode the integral scroll mode is false.

  • Gets the height of the caption.

    Declaration

    Swift

    open func getCaptionHeight() -> Double

    Return Value

    The caption height.

  • Gets the height of the items that are completely visible.

    Declaration

    Swift

    open func getHeightOfCompletelyVisibleItems() -> Double

    Return Value

    The height.

  • Gets the index of the last visible item.

    Declaration

    Swift

    open func getNumberOfLastVisibleItems() -> Int

    Return Value

    the index.

  • Gets the count of the items.

    Declaration

    Swift

    open func getItemsNumber() -> Int

    Return Value

    The item count.

  • Undocumented

    Declaration

    Swift

    open override func getTextToEdit() -> String
  • Undocumented

    Declaration

    Swift

    open override func setEditedText(_ text: String)
  • Undocumented

    Declaration

    Swift

    open override func getEditRect(_ item: DiagramItem?, pointerPosition: Point) -> Rect
  • Looks for a Style that defines an appearance property’s value in specified Theme. Overrides DiagramNode.resolveInheritedStyle(...).

    Declaration

    Swift

    open override func resolveInheritedStyle(_ check: StyleCheck, theme: Theme?) -> Style?

    Parameters

    check

    A StyleCheck predicate that verifies if property is set.

    Return Value

    The Style if resolved, or nil otherwise.

  • Gets the count of children of this TreeViewNode.

    Declaration

    Swift

    open func countItems() -> Int

    Return Value

    the count.

  • Checks if any of the TreeViewNode’s manipulators contain the specified point.

    Declaration

    Swift

    open override func hitTestManipulators(_ point: Point) -> Manipulator?

    Parameters

    point

    The Point to check.

    Return Value

    The Manipulator, which contains the specified Point; nil if none is found.

  • Gets all links connected to this node. Overrides DiagramNode.getAllLinks().

    Declaration

    Swift

    open override func getAllLinks() -> [DiagramLink]

    Return Value

    An array with DiagramLink-s.

  • Gets all links coming to this node. Overrides DiagramNode.getAllLinks().

    Declaration

    Swift

    open override func getAllIncomingLinks() -> [DiagramLink]

    Return Value

    An array with all incoming DiagramLink-s.

  • Gets a collection of all links going out of this node. Overrides DiagramNode.getAllIncomingLinks().

    Declaration

    Swift

    open override func getAllOutgoingLinks() -> [DiagramLink]

    Return Value

    An array with DiagramLink-s that go out of the TreeViewNode.

  • Performs the operation on all children of this TreeViewItem.

    Declaration

    Swift

    open func forAllItems(_ operation: (TreeViewItem) -> Void)
  • Creates a ConnectionPoint for this TreeViewNode with the specified DiagramLink, at the specified point.

    Declaration

    Swift

    open override func createConnectionPoint(_ link: DiagramLink, point: Point, incoming: Bool) -> ConnectionPoint

    Parameters

    link

    The DiagramLink for which a ConnectionPoint is created.

    point

    The Point where the ConnectionPoint will be created.

    incoming

    true if the link is incoming; otherwise false.

    Return Value

    The ConnectionPoint.

  • Gets the bounding rectangle of the TreeViewItem.

    Declaration

    Swift

    open func getItemRect(_ treeItem: TreeViewItem) -> Rect

    Parameters

    treeItem

    Return Value

    The bounding rectangle.

  • Specifies a list wih all root TreeViewItem-s.

    Declaration

    Swift

    open var rootItems: [TreeViewItem]
  • Specifies the caption height.

    Declaration

    Swift

    open var captionHeight: Double
  • Specifies the scroll position

    Declaration

    Swift

    open var scrollPosition: Double
  • Specifies the scroll bar. The value can be nil.

    Declaration

    Swift

    open var scrollBar: ScrollBar?
  • Specifies the count of items drawn.

    Declaration

    Swift

    open var drawnItems: Int
  • The index of the first drawn item.

    Declaration

    Swift

    open var firstDrawn: Int
  • The clipping rectangle for tis TreeViewNode.

    Declaration

    Swift

    open var clipRect: Rect
  • The image for this TreeViewNode. Value can be nil.

    Declaration

    Swift

    open var image: UIImage?