JIDE 3.5.15

com.jidesoft.grid
Class TableColumnGroup

java.lang.Object
  extended by javax.swing.table.TableColumn
      extended by com.jidesoft.grid.TableColumnGroup
All Implemented Interfaces:
PropertyChangeListener, Serializable, EventListener

public class TableColumnGroup
extends TableColumn
implements PropertyChangeListener

TableColumnGroup is used by NestedTableHeader to implement nested column header feature.

See Also:
Serialized Form

Field Summary
protected  Vector _columns
           
protected  TableColumnGroup _parent
           
protected  int margin
           
 
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
TableColumnGroup(JTableHeader tableHeader, String text)
           
TableColumnGroup(String text)
           
TableColumnGroup(TableCellRenderer renderer, String text)
           
 
Method Summary
 void add(Object obj)
          Adds TableColumn or TableColumnGroup to this TableColumnGroup.
protected  TableCellRenderer createDefaultHeaderRenderer()
           
 int getChildCount()
          Gets the number of children in this TableColumnGroup.
 List getChildren()
          Gets the list of TableColumns or TableColumnGroups that are in this TableColumnGroup.
 int getColumnIndex()
          Gets the column index for this TableColumnGroup.
protected  int getColumnIndex(TableColumnGroup tableColumnGroup)
           
 TableCellRenderer getDefaultHeaderRenderer()
           
 TableCellRenderer getHeaderRenderer()
          Gets the header renderer.
 int getLastColumnIndex()
          Gets the last column index for this TableColumnGroup.
protected  int getLastColumnIndex(TableColumnGroup tableColumnGroup)
           
 TableColumnGroup getParent()
          Gets the parent of this TableColumnGroup.
 Dimension getSize(JTable table)
          Gets the size of the TableColumnGroup.
 JTableHeader getTableHeader()
           
 String getToolTipText()
          Gets the ToolTip text.
protected  boolean isVisibleColumn(TableColumn col)
           
 void propertyChange(PropertyChangeEvent evt)
           
 void remove(Object obj)
          Removes TableColumn or TableColumnGroup to this TableColumnGroup.
 void setHeaderValue(Object headerValue)
           
protected  void setParent(TableColumnGroup parent)
          Sets the parent of this TableColumnGroup.
 void setTableHeader(JTableHeader tableHeader)
           
 void setToolTipText(String toolTipText)
          Sets the ToolTip text.
 
Methods inherited from class javax.swing.table.TableColumn
addPropertyChangeListener, disableResizedPosting, enableResizedPosting, getCellEditor, getCellRenderer, getHeaderValue, getIdentifier, getMaxWidth, getMinWidth, getModelIndex, getPreferredWidth, getPropertyChangeListeners, getResizable, getWidth, removePropertyChangeListener, setCellEditor, setCellRenderer, setHeaderRenderer, setIdentifier, setMaxWidth, setMinWidth, setModelIndex, setPreferredWidth, setResizable, setWidth, sizeWidthToFit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_columns

protected Vector _columns

margin

protected int margin

_parent

protected TableColumnGroup _parent
Constructor Detail

TableColumnGroup

public TableColumnGroup(String text)

TableColumnGroup

public TableColumnGroup(TableCellRenderer renderer,
                        String text)

TableColumnGroup

public TableColumnGroup(JTableHeader tableHeader,
                        String text)
Method Detail

getTableHeader

public JTableHeader getTableHeader()

setTableHeader

public void setTableHeader(JTableHeader tableHeader)

setHeaderValue

public void setHeaderValue(Object headerValue)
Overrides:
setHeaderValue in class TableColumn

createDefaultHeaderRenderer

protected TableCellRenderer createDefaultHeaderRenderer()
Overrides:
createDefaultHeaderRenderer in class TableColumn

getHeaderRenderer

public TableCellRenderer getHeaderRenderer()
Gets the header renderer. If there is nothing set on this TableColumnGroup, it will ask its parent for the header renderer.

Overrides:
getHeaderRenderer in class TableColumn
Returns:
the header renderer

getDefaultHeaderRenderer

public TableCellRenderer getDefaultHeaderRenderer()

getSize

public Dimension getSize(JTable table)
Gets the size of the TableColumnGroup.

Parameters:
table - the table.
Returns:
the size of the TableColumnGroup.

getParent

public TableColumnGroup getParent()
Gets the parent of this TableColumnGroup.

Returns:
the parent of this TableColumnGroup.

getColumnIndex

public int getColumnIndex()
Gets the column index for this TableColumnGroup. By default, we will use the column index of first table column in this TableColumnGroup.

Returns:
the column index.

getLastColumnIndex

public int getLastColumnIndex()
Gets the last column index for this TableColumnGroup. By default, we will use the column index of the last table column in this TableColumnGroup.

Returns:
the last column index.

getColumnIndex

protected int getColumnIndex(TableColumnGroup tableColumnGroup)

getLastColumnIndex

protected int getLastColumnIndex(TableColumnGroup tableColumnGroup)

setParent

protected void setParent(TableColumnGroup parent)
Sets the parent of this TableColumnGroup. If you call add(Object) to add a TableColumnGroup, we will call this method automatically.

Parameters:
parent - the parent of this TableColumnGroup.

getChildren

public List getChildren()
Gets the list of TableColumns or TableColumnGroups that are in this TableColumnGroup.

Returns:
the children of this TableColumnGroup.

getChildCount

public int getChildCount()
Gets the number of children in this TableColumnGroup.

Returns:
the number of children in this TableColumnGroup.

isVisibleColumn

protected boolean isVisibleColumn(TableColumn col)

add

public void add(Object obj)
Adds TableColumn or TableColumnGroup to this TableColumnGroup.

Parameters:
obj - TableColumn or TableColumnGroup

remove

public void remove(Object obj)
Removes TableColumn or TableColumnGroup to this TableColumnGroup.

Parameters:
obj - TableColumn or TableColumnGroup

propertyChange

public void propertyChange(PropertyChangeEvent evt)
Specified by:
propertyChange in interface PropertyChangeListener

getToolTipText

public String getToolTipText()
Gets the ToolTip text.

Returns:
the ToolTip text.
Since:
3.4.7

setToolTipText

public void setToolTipText(String toolTipText)
Sets the ToolTip text.

Parameters:
toolTipText - the ToolTip text
Since:
3.4.7

JIDE 3.5.15