Search this API

y.view.tabular
Interface TableGroupNodeRealizer.Column

All Superinterfaces:
TableGroupNodeRealizer.ColumnContainer
Enclosing class:
TableGroupNodeRealizer

public static interface TableGroupNodeRealizer.Column
extends TableGroupNodeRealizer.ColumnContainer

A Column is a vertical stripe of a given width within a node represented by a TableGroupNodeRealizer.

A column can be created using the addColumn methods of a ColumnContainer.

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

See Also:
TableGroupNodeRealizer.ColumnContainer.addColumn(), TableGroupNodeRealizer.ColumnContainer.addColumn(int)
 

Method Summary
 java.awt.geom.Rectangle2D calculateBounds()
          Calculates the bounding box of the column.
 int getIndex()
          Returns the position of the column in its container.
 YInsets getInsets()
          Returns the insets of the column.
 double getMinimumWidth()
          Returns the minimum width of the column.
 NodeList getNodes()
          Returns a cursor over all nodes that lie inside the column.
 TableGroupNodeRealizer.ColumnContainer getParent()
          Returns the container that holds the column.
 double getWidth()
          Returns the width of the column.
 boolean isSelected()
          Returns whether or not the column is selected.
 void remove()
          Removes the column from its container.
 void setIndex(int index)
          Move the column to the specified position in its container.
 void setInsets(YInsets insets)
          Sets the insets for the column.
 void setMinimumWidth(double minimumWidth)
          Specifies the minimum width for the column.
 void setParent(TableGroupNodeRealizer.ColumnContainer container)
          Moves the column from its current container to the specified container.
 void setSelected(boolean selected)
          Sets the selected state of the column.
 void setWidth(double width)
          Specifies the width of the column.
 
Methods inherited from interface y.view.tabular.TableGroupNodeRealizer.ColumnContainer
addColumn, addColumn, columnCount, getColumn, getColumns
 

Method Detail

getParent

TableGroupNodeRealizer.ColumnContainer getParent()
Returns the container that holds the column.

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

setParent

void setParent(TableGroupNodeRealizer.ColumnContainer container)
Moves the column from its current container to the specified container.

Parameters:
container - the new container for the column.
Throws:
java.lang.IllegalStateException - if the column has already been removed from its container.
java.lang.IllegalArgumentException - if the specified container is null, the column 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 column in its container. If the column does not belong to any container, -1 is returned.

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

setIndex

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

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

remove

void remove()
Removes the column from its container.

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

getNodes

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

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

isSelected

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

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

setSelected

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

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

setMinimumWidth

void setMinimumWidth(double minimumWidth)
Specifies the minimum width for the column. If the specified minimum width is greater than the current width of the column, the current width is set to the new minimum width.

Parameters:
minimumWidth - the new minimum width for the column.
See Also:
getMinimumWidth()

getMinimumWidth

double getMinimumWidth()
Returns the minimum width of the column.

Returns:
the minimum width of the column.
See Also:
setMinimumWidth(double)

setWidth

void setWidth(double width)
Specifies the width of the column. If the specified width is less than the current minimum width, the width is set to the minimum width.

Parameters:
width - the new width for the column.
See Also:
getWidth()

getWidth

double getWidth()
Returns the width of the column.

Returns:
the width of the column.
See Also:
setWidth(double)

calculateBounds

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

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

setInsets

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

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

getInsets

YInsets getInsets()
Returns the insets of the column.

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

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