Interface that describes a row in a ITable instance.
ImplementsInheritance Hierarchy

Remarks

Default implementations of this interface are created by the factory methods in the ITable interface and its implementations, therefore, it usually shouldn't be necessary to implement this interface yourself.

See Also

Developer's Guide

API

createChildRow

Members

Show:

Properties

Returns the actual minimum size a stripe can acquire.
This is the maximum of minimumSize and the horizontal or vertical padding.
readonly
The current actual dimension of the stripe.
This is always the stripe size which is actually used for the stripe. For leaf stripes, this is the same as size, otherwise, it is the accumulated size of all descendants with taking nested padding into account.
readonly

See Also

Developer's Guide
Gets the child rows.
This collection may be empty. Each entry in this collection has this instance as parentRow.
readonlyabstract
Gets the direct children of stripe in a table hierarchy.
For IColumn instances, this returns childColumns, for IRow instances, this returns childRows
readonly

See Also

API
childColumns, childRows
Returns a collection of all descendants of stripe.
The descendants are returned in top to bottom order.
readonly
Gets the index of stripe in its parentStripe collection of childStripes.
readonly

Defined in

IStripe.index
Checks whether stripe is the root item of a stripe hierarchy.
readonly

See Also

API
root

Defined in

IStripe.isRoot
Gets a collection of labels that are owned by this instance.

This gives access to a read-only live view of the labels, i.e. the collection can change over time, as well as the labels contained in it. If a snapshot of the current state is needed, one needs to copy the collection and its contents.

To modify the label collection for instances of the default implementations that were created via the factory methods on IGraph, use addLabel and remove.

readonlyabstract

Examples

Adding labels to a node.
// add label with given text, default style, and default placement
// and determine the preferred size automatically

const label1 = graph.addLabel(node, 'Some Label')

// add label with given text, placement, style, size, and tag (user object)
const label2 = graph.addLabel(
  node,
  'Some Label',
  InteriorNodeLabelModel.CENTER,
  new LabelStyle(),
  new Size(10, 150),
  userObject,
)

// add label with given text and style but default placement
// and determine the preferred size automatically
const label3 = graph.addLabel({
  owner: node,
  text: 'Some Label',
  style: new LabelStyle(),
})
Iterating over all labels of a node.
for (const label of node.labels) {
  // ...
}
Removing a label from a node.
graph.remove(label)

See Also

Developer's Guide
API
addLabel, remove, owner
Gets a live view of the relative layout of the stripe.
The layout of a stripe is a rectangle in the coordinate system that is relative to the upper left corner of the parent. Since this method will yield a live view, it is up to the client to copy the values of the instance if a snapshot of the state is needed.
readonlyabstract

See Also

Developer's Guide

Defined in

IStripe.layout
Returns a collection of all descendants of stripe that are leaves and therefore don't have any child stripes.
readonly

Defined in

IStripe.leaves
Gets the minimal permissible value for size.
This value determines how much the stripe may be shrunk by interactive manipulation.
readonlyabstract
Gets the padding for this stripe.
This padding is applied in addition to any implicit padding provided by the child stripes. To find out the actual padding that is currently in effect, use totalPadding.
readonlyabstract

Defined in

IStripe.padding
Gets the parent of this row.
In a table, each row has a parent, except for the rootRow hierarchy root.
readonlyabstract
Gets the parent of stripe in a table hierarchy.
For IColumn instances, this returns parentColumn, for IRow instances, this returns parentRow
readonly

See Also

API
parentColumn, parentRow
Gets the root of the stripe hierarchy of stripe in a table hierarchy.
If the stripe is part of an ITable instance, this returns rootColumn for IColumn instances and parentRow for rootRow instances. Otherwise null is returned.
readonly

See Also

API
rootColumn, rootRow, isRoot

Defined in

IStripe.root
Gets the current changeable dimension of the stripe.
This is always the stripe size which is not implicitly determined by other stripes, i.e. the height for IRow instances and the width for IColumn instances.
readonlyabstract

Defined in

IStripe.size
Gets the style for this stripe.
readonlyabstract

Defined in

IStripe.style
Gets the ITable instance where this stripe is installed.
readonlyabstract

Defined in

IStripe.table
Gets or sets the tag object associated with this item instance.
The tag is an optional user-defined object which can be used to store arbitrary data related to this item. The item itself just provides the storage for the object.
abstract

Property Value

The user object associated with this item instance.

Examples

Setting a model item's tag
owner.tag = newTag
Getting the tag from a model item
const tag = owner.tag

See Also

Tags are presented in detail in the section The Graph Model.
Developer's Guide

Defined in

ITagOwner.tag
Gets the padding that is currently in effect for this stripe.
This value is determined by the accumulated padding of all ancestor, sibling, and descendant padding. This padding may be larger than padding.
readonly

See Also

Developer's Guide

Methods

Returns the layout of stripe in absolute coordinates.
Since layout is relative to the owning node's left corner, you need to provide an node node to calculate the absolute layout.

Parameters

node: INode
The node relative to which the stripe layout is calculated. This should be the same node where table for stripe is associated to.

Return Value

Rect
The layout of the supplied stripe in absolute coordinates.
Returns an instance that implements the given type or null.
Typically, this method will be called to obtain a different view or aspect of the current instance. This is quite similar to casting or using a super type or interface of this instance, but is not limited to inheritance or compile-time constraints. An instance implementing this method is not required to return non-null implementations for the types, nor does it have to return the same instance any time. Also, it depends on the type and context whether the instance returned stays up to date or needs to be re-obtained for further use.
abstract

Parameters

type: Constructor<T>
the type for which an instance shall be returned

Return Value

T
an instance that is assignable to the type or null

See Also

Developer's Guide

Defined in

ILookup.lookup