|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.TableColumn
com.citra.table.GroupTableColumn
public class GroupTableColumn
GroupTableColumn is a TableColumn subclass that contains a collection of 'children' columns and a group column parent.
Field Summary | |
---|---|
protected Vector |
children
the vector of this group table column children. |
protected int |
height
the height of the group column |
protected int |
margin
this group table column's margin. |
protected GroupTableColumn |
parent
this group table column's parent. |
protected boolean |
showChildren
boolean that controls the visibility of the columns underneath this group column. |
Fields inherited from class javax.swing.table.TableColumn |
---|
CELL_RENDERER_PROPERTY, cellEditor, cellRenderer, COLUMN_WIDTH_PROPERTY, HEADER_RENDERER_PROPERTY, HEADER_VALUE_PROPERTY, headerRenderer, headerValue, identifier, isResizable, maxWidth, minWidth, modelIndex, resizedPostingDisableCount, width |
Constructor Summary | |
---|---|
GroupTableColumn(Object headerValue)
Constructs a GroupTableColumn. |
|
GroupTableColumn(Object headerValue,
int width)
Constructs a GroupTableColumn. |
|
GroupTableColumn(Object headerValue,
int width,
TableCellRenderer cellRenderer,
TableCellEditor cellEditor)
Constructs a GroupTableColumn. |
Method Summary | |
---|---|
void |
addColumn(TableColumn aColumn)
Appends aColumn to the end of the children vector. |
void |
clear()
Removes all columns from the children vector. |
int |
getDepth()
Returns the depth of the model rooted at this group column: the longest distance from this group column that ends to a simple TableColumn. |
int |
getHeight()
Retrieves the height of the group column, as it appears in the header. |
int |
getLevel()
Returns the number of levels above this group column: the distance from the root column to this column. |
GroupTableColumn |
getParent()
Returns this group column's parent or null if this group column has no parent. |
int |
getPreferredWidth()
Returns the preferred width of the TableColumn . |
boolean |
getShowChildren()
Determines the visibility of the columns underneath this group column. |
TableColumn |
getTableColumnAt(int index)
Returns the table column at index . |
int |
getTableColumnCount()
Returns the number of this group column's children. |
Enumeration |
getTableColumns()
Returns an enumeration of this group column's children. |
Vector |
getTableColumnsArray()
Returns a list of all table columns that are this column's descendants. |
int |
getTrueTableColumnCount()
Returns the number of children table columns that are not instances of GroupTableColumn. |
Enumeration |
getTrueTableColumns()
Returns an enumeration of all table columns that are not instances of GroupTableColumn. |
Vector |
getTrueTableColumnsArray()
Returns a list of all table columns that are not instances of GroupTableColumn. |
int |
getWidth()
Returns the width of the TableColumn . |
int |
getWidth(int endIndex)
Returns the total width of the columns up to and NOT including the column at endIndex . |
int |
indexOfColumn(TableColumn aColumn)
Returns the index at which the supplied table column is found in the vector of children. |
void |
insertColumn(TableColumn aColumn,
int index)
Inserts aColumn to the children vector at index. |
void |
moveColumn(int fromIndex,
int toIndex)
Moves a child column. |
void |
removeColumn(int columnIndex)
Removes the column specified by columnIndex from the children vector. |
void |
removeColumn(TableColumn aColumn)
Removes aColumn from the children vector. |
void |
setColumnMargin(int newMargin)
Sets the column margin to newMargin . |
void |
setParent(GroupTableColumn parent)
Assigns a new parent group column. |
void |
setShowChildren(boolean showChildren)
Assigns the visibility behaviour of the columns underneath this group column. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Vector children
protected GroupTableColumn parent
protected int margin
protected boolean showChildren
protected int height
Constructor Detail |
---|
public GroupTableColumn(Object headerValue)
public GroupTableColumn(Object headerValue, int width)
public GroupTableColumn(Object headerValue, int width, TableCellRenderer cellRenderer, TableCellEditor cellEditor)
Method Detail |
---|
public void addColumn(TableColumn aColumn)
aColumn
- the column to add.public void clear()
public int getDepth()
public int getHeight()
public int getLevel()
public GroupTableColumn getParent()
public int getPreferredWidth()
TableColumn
.
The default preferred width is 75.
getPreferredWidth
in class TableColumn
preferredWidth
propertyTableColumn.setPreferredWidth(int)
public boolean getShowChildren()
public TableColumn getTableColumnAt(int index)
index
.
index
- the index of the table column to retrieve.
index
.public int getTableColumnCount()
public Enumeration getTableColumns()
public int getTrueTableColumnCount()
public Enumeration getTrueTableColumns()
public Vector getTableColumnsArray()
public Vector getTrueTableColumnsArray()
public int getWidth()
TableColumn
. The default width is
75.
getWidth
in class TableColumn
width
propertyTableColumn.setWidth(int)
public int getWidth(int endIndex)
endIndex
.
endIndex
- the index of the column up to which the total width is retrieved.
endIndex
.public int indexOfColumn(TableColumn aColumn)
aColumn
- the table column to find.
public void insertColumn(TableColumn aColumn, int index)
aColumn
- the column to insertindex
- the position to insert the column atpublic void moveColumn(int fromIndex, int toIndex)
fromIndex
- the column index to move fromtoIndex
- the column index to move topublic void removeColumn(int columnIndex)
columnIndex
from the children vector.
columnIndex
- the index of the column to remove.public void removeColumn(TableColumn aColumn)
aColumn
- the column to remove.public void setColumnMargin(int newMargin)
newMargin
.
This method also sets the margin for the group column's children.
newMargin
- the new margin to set.public void setParent(GroupTableColumn parent)
parent
- the new parent group column to assign.public void setShowChildren(boolean showChildren)
showChildren
- true if the children columns will be visible, false otherwise.
|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |