Interface that describes a column in a ITable instance.
Implements
- I
- I
- I
- I
- I
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
- createChildColumn
Members
Show:
Properties
This is the maximum of minimumSize and the horizontal or vertical padding.
readonly
Defined in
IStripe.actualMinSizeThis 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
Defined in
IStripe.actualSizeGets the child columns.
Gets the child columns.
This collection may be empty. Each entry in this collection has this instance as parentColumn.
readonlyabstract
Gets the direct children of stripe in a table hierarchy.
Gets the direct children of
stripe in a table hierarchy.Returns a collection of all descendants of stripe.
Returns a collection of all descendants of
stripe.The descendants are returned in top to bottom order.
readonly
Defined in
IStripe.descendantsreadonly
Defined in
IStripe.indexGets a collection of labels that are owned by this instance.
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
// 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(),
})for (const label of node.labels) {
// ...
}graph.remove(label)See Also
Defined in
ILabelOwner.labelsGets a live view of the relative layout of the stripe.
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.layoutReturns a collection of all descendants of stripe that are leaves and therefore don't have any child stripes.
Returns a collection of all descendants of
stripe that are leaves and therefore don't have any child stripes.readonly
Defined in
IStripe.leavesGets the minimal permissible value for size.
Gets the minimal permissible value for size.
This value determines how much the stripe may be shrunk by interactive manipulation.
readonlyabstract
Defined in
IStripe.minimumSizeGets the padding for this stripe.
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.paddingGets the parent of this column.
Gets the parent of this column.
In a table, each column has a parent, except for the rootColumn hierarchy root.
readonlyabstract
Gets the parent of stripe in a table hierarchy.
Gets the parent of
stripe in a table hierarchy.Gets the root of the stripe hierarchy of stripe in a table hierarchy.
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.rootreadonlyabstract
Defined in
IStripe.sizeGets the style for this stripe.
Gets the style for this stripe.
readonlyabstract
Defined in
IStripe.stylereadonlyabstract
Defined in
IStripe.tableThe 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
owner.tag = newTagconst tag = owner.tagSee Also
- Tags are presented in detail in the section The Graph Model.
Developer's Guide
Defined in
ITagOwner.tagGets the padding that is currently in effect for this stripe.
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
Defined in
IStripe.totalPaddingMethods
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
stripeis associated to.
Return Value
- Rect
- The layout of the supplied stripe in absolute coordinates.
Defined in
IStripe.getAbsoluteBoundsTypically, 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