Search this API

y.view.tabular
Interface TableGroupNodeRealizer.Table

All Superinterfaces:
TableGroupNodeRealizer.ColumnContainer, TableGroupNodeRealizer.RowContainer
Enclosing class:
TableGroupNodeRealizer

public static interface TableGroupNodeRealizer.Table
extends TableGroupNodeRealizer.RowContainer, TableGroupNodeRealizer.ColumnContainer

Stores the top-level columns and rows of a TableGroupNodeRealizer and provides methods for finding columns and rows according to contained nodes or coordinates as well as methods to move a node into a column or row.

 

Method Summary
 TableGroupNodeRealizer.Column columnAt(double x, double y)
          Returns the innermost column that contains the specified point or null if no column in the table's model contains the specified point.
 TableGroupNodeRealizer.Column getColumn(Node node)
          Returns the (innermost) column that contains the specified node's center or null if no column in the table's model contains the specified node's center.
 YInsets getInsets()
          Returns the insets of the table.
 TableGroupNodeRealizer getRealizer()
          Returns the node realizer to which the table belongs.
 TableGroupNodeRealizer.Row getRow(Node node)
          Returns the (innermost) row that contains the specified node's center or null if no row in the table's model contains the specified node's center.
 void moveToColumn(Node node, TableGroupNodeRealizer.Column column)
          Moves the specified node to the specified column.
 void moveToRow(Node node, TableGroupNodeRealizer.Row row)
          Moves the specified node to the specified row.
 TableGroupNodeRealizer.Row rowAt(double x, double y)
          Returns the innermost row that contains the specified point or null if no row in the table's model contains the specified point.
 java.util.Collection selectedColumns()
          Returns all of the currently selected columns.
 java.util.Collection selectedRows()
          Returns all of the currently selected rows.
 void setInsets(YInsets insets)
          Sets the insets for the table.
 
Methods inherited from interface y.view.tabular.TableGroupNodeRealizer.RowContainer
addRow, addRow, getRow, getRows, rowCount
 
Methods inherited from interface y.view.tabular.TableGroupNodeRealizer.ColumnContainer
addColumn, addColumn, columnCount, getColumn, getColumns
 

Method Detail

getRealizer

TableGroupNodeRealizer getRealizer()
Returns the node realizer to which the table belongs.

Returns:
the node realizer to which the table belongs.

rowAt

TableGroupNodeRealizer.Row rowAt(double x,
                                 double y)
Returns the innermost row that contains the specified point or null if no row in the table's model contains the specified point.

Parameters:
x - the x-coordinate of the point to encompass.
y - the y-coordinate of the point to encompass.
Returns:
the innermost row that contains the specified point or null if no row in the table's model contains the specified point.

getRow

TableGroupNodeRealizer.Row getRow(Node node)
Returns the (innermost) row that contains the specified node's center or null if no row in the table's model contains the specified node's center.

Parameters:
node - the Node for which the containing row is to be determined
Returns:
the row that contains the specified node's center or null if there is no such row.
Throws:
java.lang.IllegalArgumentException - if
  • the specified node is null, or
  • the specified node and the node associated to the table's realizer do not belong to the same graph instance.
java.lang.IllegalStateException - if the realizer to which the table belongs is not bound to any node.

moveToRow

void moveToRow(Node node,
               TableGroupNodeRealizer.Row row)
Moves the specified node to the specified row. More precisely, the specified node will be vertically centered in the specified row and moved horizontally in such a way that the node's center will be contained in the specified row's bounds while staying as close to its previous (horizontal) position as possible.

The specified row may not contain any child columns.

Parameters:
node - the Node to be moved.
row - the Row to which to move the node.
Throws:
java.lang.IllegalArgumentException - if
  • the specified row contains child rows,
  • the node associated to the specified row's realizer does not belong to any graph instance, or
  • the specified node and the node associated to the specified row's realizer do not belong to the same graph instance.
java.lang.IllegalStateException - if the realizer to which the specified row belongs is not bound to any node.

selectedRows

java.util.Collection selectedRows()
Returns all of the currently selected rows.

Returns:
all of the currently selected rows.

columnAt

TableGroupNodeRealizer.Column columnAt(double x,
                                       double y)
Returns the innermost column that contains the specified point or null if no column in the table's model contains the specified point.

Parameters:
x - the x-coordinate of the point to encompass.
y - the y-coordinate of the point to encompass.
Returns:
the innermost column that contains the specified point or null if no column in the table's model contains the specified point.

getColumn

TableGroupNodeRealizer.Column getColumn(Node node)
Returns the (innermost) column that contains the specified node's center or null if no column in the table's model contains the specified node's center.

Parameters:
node - the Node for which the containing column is to be determined
Returns:
the column that contains the specified node's center or null if there is no such column.
Throws:
java.lang.IllegalArgumentException - if
  • the specified node is null, or
  • the specified node and the node associated to the table's realizer do not belong to the same graph instance.
java.lang.IllegalStateException - if the realizer to which the table belongs is not bound to any node.

moveToColumn

void moveToColumn(Node node,
                  TableGroupNodeRealizer.Column column)
Moves the specified node to the specified column. More precisely, the specified node will be horizontally centered in the specified column and moved vertically in such a way that the node's center will be contained in the specified column's bounds while staying as close to its previous (vertical) position as possible.

The specified column may not contain any child columns.

Parameters:
node - the Node to be moved.
column - the Column to which to move the node.
Throws:
java.lang.IllegalArgumentException - if
  • the specified column contains child columns,
  • the node associated to the specified column's realizer does not belong to any graph instance, or
  • the specified node and the node associated to the specified column's realizer do not belong to the same graph instance.
java.lang.IllegalStateException - if the realizer to which the specified column belongs is not bound to any node.

selectedColumns

java.util.Collection selectedColumns()
Returns all of the currently selected columns.

Returns:
all of the currently selected columns.

setInsets

void setInsets(YInsets insets)
Sets the insets for the table. If the specified insets object is null, a zero insets object, i.e. an instance with top, left, bottom, and right all being 0 will be used instead. Specified insets should never contain negative values; if they do the table behavior is undefined.

Parameters:
insets - the new table insets.
See Also:
getInsets()

getInsets

YInsets getInsets()
Returns the insets of the table.

Returns:
the insets of the table.
See Also:
setInsets(y.geom.YInsets)

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.