Default implementation of the ITable interface.
Type Details
- yfiles module
- view-table
- yfiles-umd modules
- view-table, view
- Legacy UMD name
- yfiles.graph.Table
See Also
Constructors
Default constructor that creates an empty table
Parameters
A map of options to pass to the method.
- insets - Insets
- rowDefaults - IStripeDefaults
The defaults for rows. This option sets the rowDefaults property on the created object.
- columnDefaults - IStripeDefaults
The defaults for Columns. This option sets the columnDefaults property on the created object.
Properties
Gets or sets the defaults for Columns.
Remarks
The settings that are obtained from the instance influence newly created elements only. Setting different defaults later does not influence existing elements.
If no value is set explicitly a default will be created using createColumnDefaults upon first read access.
See Also
Implements
Gets the toplevel IColumns in this table.
Gets a TableDecorator instance for use with this table.
Defined in
Gets or sets the insets for this table.
Remarks
See Also
Implements
Gets the layout of the table, relative to an owner node.
Implements
Gets the virtual root of the column hierarchy
Remarks
See Also
Implements
Gets the virtual root of the row hierarchy
Remarks
See Also
Implements
Gets or sets the defaults for rows.
Remarks
The settings that are obtained from the instance influence newly created elements only. Setting different defaults later does not influence existing elements.
If no value is set explicitly a default will be created using createRowDefaults upon first read access.
See Also
Implements
Gets the toplevel IRows in this table.
Methods
addLabel
(owner: IStripe, text: string, layoutParameter?: ILabelModelParameter, style?: ILabelStyle, preferredSize?: Size, tag?: Object) : ILabelAdd a label to the given owner using the text as the initial label text and label model parameter and style.
Parameters
A map of options to pass to the method.
- owner - IStripe
- the owner to add the label to.
- text - string
- the initial text of the label
- layoutParameter - ILabelModelParameter
- The label model parameter instance to use.
- style - ILabelStyle
- The style to use for the label
- preferredSize - Size
- The initial values to use for the preferredSize.
- tag - Object
- the initial tag to assign.
Returns
- ↪ILabel
- the newly created label
See Also
Implements
Adjusts the preferredSize property of a label to fit the suggested size of its ILabelStyleRenderer.
Remarks
Parameters
A map of options to pass to the method.
- label - ILabel
- The label to adjust the size for.
See Also
Defined in
calculateLabelPreferredSize
(stripe: IStripe, style: ILabelStyle, layoutParameter: ILabelModelParameter, text: string, tag: Object) : SizeCalculates the preferred size of a label with the given properties.
Parameters
A map of options to pass to the method.
- stripe - IStripe
- The item that will own the label.
- style - ILabelStyle
- The label style.
- layoutParameter - ILabelModelParameter
- The label model parameter.
- text - string
- The text.
- tag - Object
- The tag for the label.
Returns
- ↪Size
- The size as calculated by the ILabelStyleRenderer.
Defined in
Removes all stripes from a table.
Create a clone of this object.
Called during clone to create a copy of column
Remarks
column
implements the ICloneable interface, the column
instance is cloned, otherwise, the original instance is returned unchanged.Parameters
A map of options to pass to the method.
- column - IColumn
- The column that should be copied during a clone operation.
Returns
- ↪IColumn
- A clone of
column
if possible, otherwise the original reference tocolumn
Called during clone to create a copy of originalDefaults
Remarks
originalDefaults
. If you need to create a deep clone of originalDefaults
, you'll have to perform the cloning yourself.Parameters
A map of options to pass to the method.
- originalDefaults - IStripeDefaults
- The default settings that should be copied during a clone operation.
Returns
- ↪IStripeDefaults
- The original reference to
originalDefaults
Called during clone to create a copy of row
Remarks
row
implements the ICloneable interface, the row
instance is cloned, otherwise, the original instance is returned unchanged.Parameters
A map of options to pass to the method.
- row - IRow
- The row that should be copied during a clone operation.
Returns
- ↪IRow
- A clone of
row
if possible, otherwise the original reference torow
createChildColumn
(owner: IColumn, width?: number, minWidth?: number, insets?: Insets, style?: IStripeStyle, tag?: Object, index?: number) : IColumnCreate a new column as the index
th child of owner
with the given parameters.
Parameters
A map of options to pass to the method.
- owner - IColumn
- The owner of the new column.
- width - number
- The actual width of the column.
- minWidth - number
- The minimal width of the column.
- insets - Insets
- The insets of the column.
- style - IStripeStyle
- The style of the column.
- tag - Object
- The tag of the column
- index - number
- The position in the child list.
- labels - string[]
- An array of labels to add to the newly created node. Each item will be passed to the addLabel method.
- childColumns - number[]
- An array of rows to create as children of this row. Each item will be passed to the createChildColumn method.
Returns
- ↪IColumn
- A new column instance
See Also
Implements
createChildRow
(owner: IRow, height?: number, minHeight?: number, insets?: Insets, style?: IStripeStyle, tag?: Object, index?: number) : IRowCreate a new row as the index
th child of owner
with the given parameters.
Parameters
A map of options to pass to the method.
- owner - IRow
- The owner of the new row.
- height - number
- The actual height of the row.
- minHeight - number
- The minimal height of the row.
- insets - Insets
- The insets of the row.
- style - IStripeStyle
- The style of the row.
- tag - Object
- The tag of the row
- index - number
- The position in the child list.
- labels - string[]
- An array of labels to add to the newly created node. Each item will be passed to the addLabel method.
- childRows - number[]
- An array of rows to create as children of this row. Each item will be passed to the createChildRow method.
Returns
- ↪IRow
- A new row instance
See Also
Implements
createColumn
(width?: number, minWidth?: number, insets?: Insets, style?: IStripeStyle, tag?: Object, index?: number) : IColumnCreates and returns a column as last child of table
.
Remarks
Parameters
A map of options to pass to the method.
- width - number
- The actual width of the column.
- minWidth - number
- The minimal width of the column.
- insets - Insets
- The insets of the column.
- style - IStripeStyle
- The style of the column.
- tag - Object
- The tag of the column
- index - number
- The position in the child list.
Returns
- ↪IColumn
- A newly created column instance
See Also
Defined in
Creates the Column defaults.
Returns
- ↪IStripeDefaults
- A new instance of the StripeDefaults class which is used for newly created columns.
Creates a columns
x rows
.
Remarks
table
Parameters
A map of options to pass to the method.
- columns - number
- The number of columns to test.
- rows - number
- The number of rows to test.
Defined in
Creates the label model parameter for a given ILabelOwner.
Remarks
table
to obtain the parameter instance.Parameters
A map of options to pass to the method.
Returns
- ↪ILabelModelParameter
- The default label model parameter to use for newly created labels at the item.
See Also
Defined in
Creates an instance of the default label style for the given stripe
.
Remarks
Parameters
A map of options to pass to the method.
- stripe - IStripe
- The item the newly created label will belong to.
Returns
- ↪ILabelStyle
- The style instance to use for newly created stripes.
Defined in
createRow
(height?: number, minHeight?: number, insets?: Insets, style?: IStripeStyle, tag?: Object, index?: number) : IRowCreates and returns a row as last child of table
.
Remarks
Parameters
A map of options to pass to the method.
- height - number
- The actual height of the row.
- minHeight - number
- The minimal height of the row.
- insets - Insets
- The insets of the row.
- style - IStripeStyle
- The style of the row.
- tag - Object
- The tag of the row
- index - number
- The position in the child list.
Returns
- ↪IRow
- A newly created row instance
See Also
Defined in
Creates the row defaults.
Returns
- ↪IStripeDefaults
- A new instance of the StripeDefaults class that is used for newly created rows.
Finds a column underneath a certain point.
Remarks
Parameters
A map of options to pass to the method.
- node - INode
- The node this table is currently bound to
- location - Point
- The location to test.
- filter - function(IStripe):boolean
- Additional predicate to further restrict the results.
Signature Details
function(obj: IStripe) : boolean
Represents the method that defines a set of criteria and determines whether the specified object meets those criteria.Parameters
- obj - IStripe
- The object to compare against the criteria defined within the method represented by this delegate.
Returns
- boolean
true
if obj meets the criteria defined within the method represented by this delegate; otherwise,false
.
Returns
- ↪IColumn
- The topmost column that has been found for the location or
null
.
Defined in
Finds a row underneath a certain point.
Remarks
Parameters
A map of options to pass to the method.
- node - INode
- The node this table is currently bound to
- location - Point
- The location to test.
- filter - function(IStripe):boolean
- Additional predicate to further restrict the results.
Signature Details
function(obj: IStripe) : boolean
Represents the method that defines a set of criteria and determines whether the specified object meets those criteria.Parameters
- obj - IStripe
- The object to compare against the criteria defined within the method represented by this delegate.
Returns
- boolean
true
if obj meets the criteria defined within the method represented by this delegate; otherwise,false
.
Returns
- ↪IRow
- The topmost row that has been found for the location or
null
.
Defined in
findStripes
(node: INode, location: Point, stripeTypes: StripeTypes, filter?: function(IStripe):boolean) : IEnumerable<IStripe>Finds all stripes underneath a certain point.
Remarks
Parameters
A map of options to pass to the method.
- node - INode
- The node this table is currently bound to
- location - Point
- The location to test.
- stripeTypes - StripeTypes
- An enumeration value of StripeTypes to specify the stripe type.
- filter - function(IStripe):boolean
- Additional predicate to further restrict the hit test results.
Signature Details
function(obj: IStripe) : boolean
Represents the method that defines a set of criteria and determines whether the specified object meets those criteria.Parameters
- obj - IStripe
- The object to compare against the criteria defined within the method represented by this delegate.
Returns
- boolean
true
if obj meets the criteria defined within the method represented by this delegate; otherwise,false
.
Returns
- ↪IEnumerable<IStripe>
- The stripes that have been found for the location or
null
.
See Also
Defined in
Calculates the relative bounds of a table cell that is determined by column
and row
Remarks
column
and row
must live in the provided table
instance. Otherwise, an ArgumentError is thrown.Parameters
A map of options to pass to the method.
Returns
- ↪Rect
- The relative bounds of a the cell determined by
column
androw
Throws
- Exception({ name: 'ArgumentError' })
- If
column
androw
are part of a different table instance.
Defined in
Returns an instance that implements the given type or null
.
Remarks
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 reobtained for subsequent use.Type Parameters
- T: any
Parameters
A map of options to pass to the method.
- type - Class<T>
- The type for which an instance shall be returned.
Returns
- ↪T
- an instance that is assignable to type or
null
See Also
Implements
Called after a label has been added to a stripe.
Remarks
Parameters
A map of options to pass to the method.
- label - ILabel
- The label that has just been added.
Called after a label has changed.
Remarks
Parameters
A map of options to pass to the method.
- label - ILabel
- The label that has changed.
Called after a label has been removed from its stripe.
Remarks
Parameters
A map of options to pass to the method.
- owner - ILabelOwner
- The old owner of the label.
- label - ILabel
- The label that has just been removed.
Called after a stripe has changed.
Remarks
Parameters
A map of options to pass to the method.
Called after a stripe has been created and added to a table.
Remarks
Parameters
A map of options to pass to the method.
- stripe - IStripe
- The stripe that has just been created.
Called after a stripe has been removed from its owner.
Remarks
Parameters
A map of options to pass to the method.
Removes stripe
from its parent container.
Remarks
stripe
to the parent of the stripe.Parameters
A map of options to pass to the method.
- stripe - IStripe
- The stripe to remove
See Also
Implements
Removes the given label from its owner.
Removes stripe
and all of its descendants from table
.
Remarks
Parameters
A map of options to pass to the method.
- stripe - IStripe
- The stripe to remove
See Also
Defined in
Sets the label model parameter for the given label.
Parameters
A map of options to pass to the method.
- label - ILabel
- The label.
- layoutParameter - ILabelModelParameter
- The new parameter.
Throws
- Exception({ name: 'ArgumentError' })
- If the parameter cannot be used for this label or if the label is not associated with this table instance.
Implements
Sets the preferred size of the label.
Parameters
A map of options to pass to the method.
Throws
- Exception({ name: 'ArgumentError' })
- If the label is not associated with this table instance.
See Also
Implements
Sets the minimum size of stripe
.
Remarks
stripe
.Parameters
A map of options to pass to the method.
- stripe - IStripe
- The stripe to change
- minimumSize - number
- The new minimum size of the stripe
Implements
Sets the style of stripe
.
Parameters
A map of options to pass to the method.
- stripe - IStripe
- The stripe to change
- style - IStripeStyle
- The new style of the stripe
See Also
Implements
Assigns the given style instance by reference to the label.
Remarks
Parameters
A map of options to pass to the method.
- label - ILabel
- The label that will be assigned the new style
- style - ILabelStyle
- The style instance that will be assigned to the label.
Throws
- Exception({ name: 'ArgumentError' })
- If the label is not associated with this table instance.
See Also
Implements
Events
Occurs when a label has been added to this graph instance.
See Also
Overrides
Event Registration
addLabelAddedListener(function(this, ItemEventArgs<ILabel>):void)
Event Deregistration
removeLabelAddedListener(function(this, ItemEventArgs<ILabel>):void)
Signature Details
function(sender: this, evt: ItemEventArgs<ILabel>)
Parameters
- sender - this
- The source of the event.
- evt - ItemEventArgs<ILabel>
- An object that contains the event data.
Occurs when a label has been changed, for instance, if its style has been replaced.
See Also
Overrides
Event Registration
addLabelChangedListener(function(this, ItemEventArgs<ILabel>):void)
Event Deregistration
removeLabelChangedListener(function(this, ItemEventArgs<ILabel>):void)
Signature Details
function(sender: this, evt: ItemEventArgs<ILabel>)
Parameters
- sender - this
- The source of the event.
- evt - ItemEventArgs<ILabel>
- An object that contains the event data.
Occurs when a label has been removed from this graph instance.
Remarks
This event will also be triggered, prior to the removal of the owner of the label.
Implementations may choose to use the LabelEventArgs to carry additional label owner information. The owner property will be set to the owner of the label that owned it before the removal.
See Also
Overrides
Event Registration
addLabelRemovedListener(function(this, LabelEventArgs):void)
Event Deregistration
removeLabelRemovedListener(function(this, LabelEventArgs):void)
Signature Details
function(sender: this, evt: LabelEventArgs)
Parameters
- sender - this
- The source of the event.
- evt - LabelEventArgs
- An object that contains the event data.
Occurs when a stripe has been changed, for instance, if its style has been replaced.
See Also
Overrides
Event Registration
addStripeChangedListener(function(this, StripeEventArgs):void)
Event Deregistration
removeStripeChangedListener(function(this, StripeEventArgs):void)
Signature Details
function(sender: this, evt: StripeEventArgs)
Parameters
- sender - this
- The source of the event.
- evt - StripeEventArgs
- An object that contains the event data.
Occurs when a stripe has been added.
See Also
Overrides
Event Registration
addStripeCreatedListener(function(this, ItemEventArgs<IStripe>):void)
Event Deregistration
removeStripeCreatedListener(function(this, ItemEventArgs<IStripe>):void)
Signature Details
function(sender: this, evt: ItemEventArgs<IStripe>)
Parameters
- sender - this
- The source of the event.
- evt - ItemEventArgs<IStripe>
- An object that contains the event data.
Occurs when a stripe has been removed from its parent.
See Also
Overrides
Event Registration
addStripeRemovedListener(function(this, StripeEventArgs):void)
Event Deregistration
removeStripeRemovedListener(function(this, StripeEventArgs):void)
Signature Details
function(sender: this, evt: StripeEventArgs)
Parameters
- sender - this
- The source of the event.
- evt - StripeEventArgs
- An object that contains the event data.
Constants
Gets an IContextLookup that provides the default implementations returned by an IColumn's lookup.
Remarks
Gets an IContextLookup that provides the default implementations returned by an IRow's lookup.
Remarks
Gets an IContextLookup that provides the default implementations returned by an IStripe's lookup.
Remarks
Static Methods
Installs the undo support for use with all tables that are bound to nodes in graph
.
Remarks
graph
for its undo support dynamically whenever undo support is queried in the table. In contrast to installStaticUndoSupport the undo support installed with this method will thus always be the one which is the currently available support for the graph
.Parameters
A map of options to pass to the method.
- graph - IGraph
- The graph where the nodes exist or will be created/changed and where the undo support should come from.
See Also
Installs the undo support for use with all tables that are bound to nodes in graph
.
Remarks
This methods installs the undo support which manages the graph
at the time this method is called. In contrast to installDynamicUndoSupport the installed undo support will not change when the graph
's undo support changes.
This method adds undo support both for existing nodes in graph
as well as for newly created or changed nodes.
Parameters
A map of options to pass to the method.
- graph - IGraph
- The graph where the nodes exist or will be created/changed.
See Also
Uninstalls the undo support that has previously been installed with installDynamicUndoSupport
Parameters
A map of options to pass to the method.
- graph - IGraph
- The graph where the tables are installed for which the undo support should be cleared.
Uninstalls the undo support that has previously been installed with installStaticUndoSupport
Parameters
A map of options to pass to the method.
- graph - IGraph
- The graph where the tables are installed for which the undo support should be cleared.