TableNode

open class TableNode : DiagramNode, Scrollable

Tables are diagram nodes that can contain multiple cells and can be related to other nodes through their rows. This class inherits DiagramNode and implements Scrollable.

  • Initializes a new instance of the TableNode class.

    Declaration

    Swift

    public override init()
  • Creates a connection point between this node and the specified link at the specified point.

    Declaration

    Swift

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

    Parameters

    link

    A DiagramLink that should be connected to this node.

    point

    The Point at which the link should be connected.

    incoming

    true if link is an incoming link, otherwise, false.

  • 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 a collection of all links entering this node. Overrides DiagramNode.getAllIncomingLinks().

    Declaration

    Swift

    open override func getAllIncomingLinks() -> [DiagramLink]

    Return Value

    An array with DiagramLink-s

  • Get a collection of all [links] ((DiagramLink.html) going out of this node. Overrides DiagramNode.getAllOutgoingLinks().

    Declaration

    Swift

    open override func getAllOutgoingLinks() -> [DiagramLink]

    Return Value

    An array with DiagramLink-s

  • Gets the table row at the specified point.

    Declaration

    Swift

    open func rowFromPoint(_ point: Point) -> Int

    Parameters

    point

    The table row at this Point.

    Return Value

    The index of the table row.

  • 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.

  • Gets the height of the caption.

    Declaration

    Swift

    open func getCaptionHeight() -> Double

    Return Value

    The caption height.

  • Checks if the scroll mode is integral.

    Declaration

    Swift

    open func integralScrollMode() -> Bool

    Return Value

    true if the scroll mode is integral; otherwise false.

  • 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.

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

    Declaration

    Swift

    open func getHeightOfCompletelyVisibleItems() -> Double

    Return Value

    The height.

  • Draws the table node using the specified canvas object.

    Declaration

    Swift

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

    Parameters

    canvas

    A canvas object where the table node should be rendered.

    options

    Provides options for the drawing operation.

  • Checks if any of the node’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.

  • Inserts a row at the specified index.

    Declaration

    Swift

    open func insertRow(_ row: Int)

    Parameters

    row

    The index where the row should be inserted.

  • Deletes the row at the specified index.

    Declaration

    Swift

    open func deleteRow(_ row: Int)

    Parameters

    row

    The index where the row should be deleted.

  • Inserts a column at the specified index.

    Declaration

    Swift

    open func insertColumn(_ col: Int)

    Parameters

    col

    The index where the column should be inserted.

  • Deletes the column at the specified index.

    Declaration

    Swift

    open func deleteColumn(_ col: Int)

    Parameters

    row

    The index where the column should be deleted.

  • Sets new number of rows and columns for this table.

    Declaration

    Swift

    open func redimTable(columns cols: Int, rows: Int)

    Parameters

    cols

    The new number of columns.

    rows

    The new number of rows.

  • Loads this table node from the specified XML context and element. Overrides DiagramItem.loadFromXml.

    Declaration

    Swift

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

    Parameters

    element

    The XmlElement, which contains this table node.

    context

    The XmlContext, which contains this table node.

  • Saves this table node 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 table node will be saved.

    context

    The XmlContext, where the table node 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)
  • 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.

  • 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
  • Gets the Cell at the specified column and row positions.

    Declaration

    Swift

    public subscript(column: Int, row: Int) -> Cell { get }
  • Specifies the frame style of a table cell. One of the CellFrameStyle enumeration values. Default value is CellFrameStyle.simple.

    Declaration

    Swift

    public var cellFrameStyle: CellFrameStyle
  • Specifies a collection of all cells in the table.

    Declaration

    Swift

    open var cells: Grid<Cell>
  • Specifies a collection of all rows in the table.

    Declaration

    Swift

    open var rows: [Row]
  • Specifies a collection of all columns in the table.

    Declaration

    Swift

    open var columns: [Column]
  • Specifies the caption height.

    Declaration

    Swift

    open var captionHeight: Double
  • Specifies the index of the currently scrolled row.

    Declaration

    Swift

    open var currentScrollRow: Int
  • Specifies the scroll bar. The value can be nil.

    Declaration

    Swift

    open var scrollBar: ScrollBar?
  • Specifies the Brush used for painting the background of the table caption.

    Declaration

    Swift

    public var captionBackBrush: Brush?
  • Specifies if the table node is scrollable.

    Declaration

    Swift

    open var scrollable: Bool
  • Specifies if the table has header rows.

    Declaration

    Swift

    open var hasHeaderRows: Bool