echopointng.table
Class SortableTableHeaderRenderer

java.lang.Object
  extended by echopointng.table.SortableTableHeaderRenderer
All Implemented Interfaces:
java.io.Serializable, TableCellRenderer

public class SortableTableHeaderRenderer
extends java.lang.Object
implements TableCellRenderer

Default renderer for SortableTableModel backed Tables.

See Also:
Serialized Form

Constructor Summary
SortableTableHeaderRenderer()
           
 
Method Summary
protected  LayoutData getLayoutData()
           
protected  Button getSortButton(java.lang.String label, int column, SortableTableModel model)
           
protected  ActionListener getSortButtonListener(int column, SortableTableModel model)
           
 Component getTableCellRendererComponent(Table table, java.lang.Object value, int column, int row)
          Returns a component that will be displayed at the specified coordinate in the table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SortableTableHeaderRenderer

public SortableTableHeaderRenderer()
Method Detail

getTableCellRendererComponent

public Component getTableCellRendererComponent(Table table,
                                               java.lang.Object value,
                                               int column,
                                               int row)
Description copied from interface: TableCellRenderer
Returns a component that will be displayed at the specified coordinate in the table.

Specified by:
getTableCellRendererComponent in interface TableCellRenderer
Parameters:
table - the Table for which the rendering is occurring
value - the value retrieved from the TableModel for the specified coordinate
column - the column index to render
row - the row index to render
Returns:
a component representation of the value (This component must be unique. Returning a single instance of a component across multiple calls to this method will result in undefined behavior.)
See Also:
TableCellRenderer.getTableCellRendererComponent(nextapp.echo2.app.Table, java.lang.Object, int, int)

getSortButton

protected Button getSortButton(java.lang.String label,
                               int column,
                               SortableTableModel model)

getLayoutData

protected LayoutData getLayoutData()

getSortButtonListener

protected ActionListener getSortButtonListener(int column,
                                               SortableTableModel model)