ca.odell.glazedlists.swt
Class TableFormatKTableFormat

java.lang.Object
  extended by ca.odell.glazedlists.swt.AbstractKTableFormat
      extended by ca.odell.glazedlists.swt.TableFormatKTableFormat
All Implemented Interfaces:
TableFormat, KTableFormat

public class TableFormatKTableFormat
extends AbstractKTableFormat

Adapt TableFormat to KTableFormat. This can be used to quickly develop a KTableFormat using existing TableFormats, such as those created by GlazedLists.tableFormat(java.lang.String[], java.lang.String[]).

Author:
Jesse Wilson

Constructor Summary
TableFormatKTableFormat(TableFormat tableFormat)
          Adapt the specified TableFormat to be used in a KTable.
 
Method Summary
 int getColumnCount()
          The number of columns to display.
 de.kupzog.ktable.KTableCellEditor getColumnEditor(Object baseObject, int column)
          
 Object getColumnHeaderValue(int headerRow, int column)
          Provide a value for the specified header row and column.
 String getColumnName(int column)
          Gets the title of the specified column.
 de.kupzog.ktable.KTableCellRenderer getColumnRenderer(Object baseObject, int column)
          
 Object getColumnValue(Object baseObject, int column)
          Gets the value of the specified field for the specified object.
 int getFixedHeaderRowCount()
          
 
Methods inherited from class ca.odell.glazedlists.swt.AbstractKTableFormat
getColumnTooltip, getColumnWidth, getFixedHeaderColumnCount, getFixedSelectableColumnCount, getRowHeight, getRowHeightMinimum, isColumnResizable, isRowResizable, setColumnWidth, setRowHeight
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableFormatKTableFormat

public TableFormatKTableFormat(TableFormat tableFormat)
Adapt the specified TableFormat to be used in a KTable.

Method Detail

getFixedHeaderRowCount

public int getFixedHeaderRowCount()

Specified by:
getFixedHeaderRowCount in interface KTableFormat
Overrides:
getFixedHeaderRowCount in class AbstractKTableFormat
See Also:
KTableModel.getFixedHeaderRowCount()

getColumnName

public String getColumnName(int column)
Gets the title of the specified column.


getColumnValue

public Object getColumnValue(Object baseObject,
                             int column)
Gets the value of the specified field for the specified object. This is the value that will be passed to the editor and renderer for the column. If you have defined a custom renderer, you may choose to return simply the baseObject.


getColumnHeaderValue

public Object getColumnHeaderValue(int headerRow,
                                   int column)
Provide a value for the specified header row and column. Unlike simple TableFormat, the KTableFormat supports multiple header rows per table. Therefore this method is the preferred way to define the header values for DefaultEventKTableModel.

See Also:
TableFormat.getColumnName(int), KTableModel.getContentAt(int, int)

getColumnCount

public int getColumnCount()
The number of columns to display.


getColumnEditor

public de.kupzog.ktable.KTableCellEditor getColumnEditor(Object baseObject,
                                                         int column)

See Also:
KTableModel.getCellEditor(int, int)

getColumnRenderer

public de.kupzog.ktable.KTableCellRenderer getColumnRenderer(Object baseObject,
                                                             int column)

See Also:
KTableModel.getCellRenderer(int, int)


Glazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by hbrands at 2013-02-12 20:58