nextapp.echo.table
Class TableHeader

java.lang.Object
  extended by nextapp.echo.AbstractComponent
      extended by nextapp.echo.table.TableHeader
All Implemented Interfaces:
java.io.Serializable, Component

public class TableHeader
extends AbstractComponent
implements java.io.Serializable

A representation of a table's header.

See Also:
Serialized Form

Nested Class Summary
static class TableHeader.DefaultHeaderRenderer
          A default renderer for table header cells.
 
Field Summary
static java.lang.String HEIGHT_CHANGED_PROPERTY
           
 
Fields inherited from interface nextapp.echo.Component
BACKGROUND_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FONT_CHANGED_PROPERTY, FOREGROUND_CHANGED_PROPERTY, IDENTIFIER_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, SELECTABLE_CHANGED_PROPERTY, STYLE_BACKGROUND, STYLE_FONT, STYLE_FOREGROUND, UPDATE_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Constructor Summary
TableHeader()
          Creates a table header.
 
Method Summary
 TableCellRenderer getDefaultRenderer()
          Returns the default cell renderer.
 int getHeight()
          Returns the height of the table header.
 Component getRenderedComponent(int column)
          Returns the contents of the header cell at the specified column.
 Table getTable()
          Returns the table component with which this TableHeader is associated.
 void invalidate()
          Marks the table header as needing to be re-rendered.
 void setDefaultRenderer(TableCellRenderer defaultRenderer)
          Sets the default cell renderer that will be used if a column does not have an assigned renderer.
 void setHeight(int newValue)
          Sets the height of the table header.
 void setTable(Table newValue)
          Sets the table component with which this TableHeader is associated.
 void validate()
          Updates the Table component to reflect its model.
 
Methods inherited from class nextapp.echo.AbstractComponent
add, add, addHierarchyListener, addPropertyChangeListener, applyStyle, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getClientId, getComponent, getComponentCount, getComponents, getEchoInstance, getFont, getForeground, getIdentifier, getListenerList, getLocale, getParent, indexOf, init, isAncestorOf, isDifferent, isEnabled, isFocused, isRecursivelyVisible, isRegistered, isSelectableForScriptRecorder, isShowing, isVisible, processHierarchyEvent, remove, remove, removeAll, removeHierarchyListener, removePropertyChangeListener, setBackground, setClientId, setEnabled, setFocused, setFont, setForeground, setIdentifier, setLocale, setParent, setRegistered, setSelectableForScriptRecorder, setVisible, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HEIGHT_CHANGED_PROPERTY

public static final java.lang.String HEIGHT_CHANGED_PROPERTY
See Also:
Constant Field Values
Constructor Detail

TableHeader

public TableHeader()
Creates a table header.

Method Detail

getDefaultRenderer

public TableCellRenderer getDefaultRenderer()
Returns the default cell renderer.

Returns:
The default cell renderer.

getHeight

public int getHeight()
Returns the height of the table header.

Returns:
The height of the table header. The units of this value are specified by the underlying table's HeightUnits property.

getRenderedComponent

public Component getRenderedComponent(int column)
Returns the contents of the header cell at the specified column. This method should be used only by the rendering peer. This method will not return correct information prior to validation.

Parameters:
column - The column of the rendered header cell component to return.
Returns:
The header component.

getTable

public Table getTable()
Returns the table component with which this TableHeader is associated.

Returns:
The table component with which this TableHeader is associated.

invalidate

public void invalidate()
Marks the table header as needing to be re-rendered.


setDefaultRenderer

public void setDefaultRenderer(TableCellRenderer defaultRenderer)
Sets the default cell renderer that will be used if a column does not have an assigned renderer.

Parameters:
defaultRenderer - The new default renderer.

setTable

public void setTable(Table newValue)
Sets the table component with which this TableHeader is associated.

Parameters:
newValue - The table component with which this TableHeader is associated.

setHeight

public void setHeight(int newValue)
Sets the height of the table header.

Parameters:
newValue - The new height of the table header. The units of this value are specified by the underlying table's HeightUnits property.

validate

public void validate()
Updates the Table component to reflect its model.

Specified by:
validate in interface Component
Overrides:
validate in class AbstractComponent
See Also:
Component.validate()