Search this API

y.view.tabular
Interface TableGroupNodeRealizer.Row

All Superinterfaces:
TableGroupNodeRealizer.RowContainer
Enclosing class:
TableGroupNodeRealizer

public static interface TableGroupNodeRealizer.Row
extends TableGroupNodeRealizer.RowContainer

A Row is a horizontal stripe of a given height within a node represented by a TableGroupNodeRealizer.

A row can be created using the addRow methods of a RowContainer.

Client code should not hold onto instances of rows that have been removed from their container.

See Also:
TableGroupNodeRealizer.RowContainer.addRow(), TableGroupNodeRealizer.RowContainer.addRow(int)
 
Your browser does not support SVG content.

Method Summary
 java.awt.geom.Rectangle2D calculateBounds()
          Calculates the bounding box of the row.
 double getHeight()
          Returns the height of the row.
 int getIndex()
          Returns the position of the row in its container.
 YInsets getInsets()
          Returns the insets of the row.
 double getMinimumHeight()
          Returns the minimum height of the row.
 NodeList getNodes()
          Returns a cursor over all nodes that lie inside the row.
 TableGroupNodeRealizer.RowContainer getParent()
          Returns the container that holds the row.
 boolean isSelected()
          Returns whether or not the row is selected.
 void remove()
          Removes the row from its container.
 void setHeight(double height)
          Specifies the height for the row.
 void setIndex(int index)
          Move the row to the specified position in its container.
 void setInsets(YInsets insets)
          Sets the insets for the row.
 void setMinimumHeight(double minimumHeight)
          Specifies the minimum height for the row.
 void setParent(TableGroupNodeRealizer.RowContainer container)
          Moves the row from its current container to the specified container.
 void setSelected(boolean selected)
          Sets the selected state of the row.
 
Methods inherited from interface y.view.tabular.TableGroupNodeRealizer.RowContainer
addRow, addRow, getRow, getRows, rowCount
 

Method Detail

getParent

TableGroupNodeRealizer.RowContainer getParent()
Returns the container that holds the row.

Returns:
the container that holds the row.
See Also:
setParent(y.view.tabular.TableGroupNodeRealizer.RowContainer)

setParent

void setParent(TableGroupNodeRealizer.RowContainer container)
Moves the row from its current container to the specified container.

Parameters:
container - the new container for the row.
Throws:
java.lang.IllegalStateException - if the row has already been removed from its container.
java.lang.IllegalArgumentException - if the specified container is null, the row is an ancestor of the specified container, or if the specified container does belong to different TableGroupNodeRealizer instance.
See Also:
getParent()

getIndex

int getIndex()
Returns the position of the row in its container. If the row does not belong to any container, -1 is returned.

Returns:
the position of the row in its container.
See Also:
setIndex(int)

setIndex

void setIndex(int index)
Move the row to the specified position in its container. This method effectively reorders the rows in the container.

Parameters:
index - the new position of the row.
Throws:
java.lang.IllegalStateException - if the row does not belong to any container.
See Also:
getIndex()

remove

void remove()
Removes the row from its container.

Throws:
java.lang.IllegalStateException - if the row does not belong to any container or if it is the sole row of the table.

getNodes

NodeList getNodes()
Returns a cursor over all nodes that lie inside the row. A node is considered to lie within the row, if the node's center is contained in the row's bounding box.

Returns:
a cursor over all nodes that lie inside the row.

isSelected

boolean isSelected()
Returns whether or not the row is selected. By default a row is not selected.

Returns:
whether or not the row is selected.
See Also:
setSelected(boolean)

setSelected

void setSelected(boolean selected)
Sets the selected state of the row. By default a row is not selected.

Parameters:
selected - the new selected state.
See Also:
isSelected()

setMinimumHeight

void setMinimumHeight(double minimumHeight)
Specifies the minimum height for the row. If the specified minimum height is greater than the current height of the row, the current height is set to the new minimum height.

Parameters:
minimumHeight - the new minimum height for the row.
See Also:
getMinimumHeight()

getMinimumHeight

double getMinimumHeight()
Returns the minimum height of the row.

Returns:
the minimum height of the row.
See Also:
setMinimumHeight(double)

setHeight

void setHeight(double height)
Specifies the height for the row. If the specified height is less than the current minimum height, the height is set to the minimum height.

Parameters:
height - the new height for the row.
See Also:
getHeight()

getHeight

double getHeight()
Returns the height of the row.

Returns:
the height of the row.
See Also:
setHeight(double)

calculateBounds

java.awt.geom.Rectangle2D calculateBounds()
Calculates the bounding box of the row.

Returns:
the bounding box of the row.
Throws:
java.lang.IllegalStateException - if the row has been removed from its parent container.

setInsets

void setInsets(YInsets insets)
Sets the insets for the row. 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 row behavior is undefined.

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

getInsets

YInsets getInsets()
Returns the insets of the row.

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

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