org.crosswire.common.swing
Class RowColumns

java.lang.Object
  extended by javax.swing.table.DefaultTableColumnModel
      extended by org.crosswire.common.swing.RowColumns
All Implemented Interfaces:
PropertyChangeListener, Serializable, EventListener, ListSelectionListener, TableColumnModel

public abstract class RowColumns
extends DefaultTableColumnModel

Defines the prototypes needed to display a RowTable. Also defines some column indexed concrete methods to access the prototypes.

Author:
DM Smith [ dmsmith555 at yahoo dot com]
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.DefaultTableColumnModel
changeEvent, columnMargin, columnSelectionAllowed, listenerList, selectionModel, tableColumns, totalColumnWidth
 
Constructor Summary
RowColumns()
           
 
Method Summary
 int getCharacterWidth(int columnIndex)
          Method getCharacterWidth gets the width of the column, expressed in Standard Characters
abstract  int[] getCharacterWidths()
          Method getCharacterWidths gets the widths of all the columns, expressed in Standard Width Characters.
 Class getClass(int columnIndex)
          Method getClass gets the class of a given column
abstract  Class[] getClasses()
          Method getClasses indicates the type of the data in a column
 int getCount()
          Method getCount is the number of columns in the table.
abstract  boolean[] getFixedWidths()
          Method getFixedWidths gives whether a column is not resizable (true) or resizable (false)
abstract  String[] getHeaders()
          Method getHeaders gets the headers for all the columns
 String getHeaderToolTip(int columnIndex)
          Method getClass gets the class of a given column
abstract  String[] getHeaderToolTips()
          Method getHeaderToolTips gets the tooltips for the headers for all the columns
 String getName(int columnIndex)
          Method getName gets the header for the given column
abstract  int[] getSortKeys()
          Method getSortKeys returns the primary (array of size 1) or composite key (size > 1) used for default sorting and for secondary sorting.
abstract  String getTableName()
          Method getTableName provides the string for a Titled Border.
abstract  Object getValueAt(Object row, int columnIndex)
          Method getValueAt gets the contents of a cell from a row.
 boolean isFixedWidth(int columnIndex)
          Method isFixedWidth indicates whether a column is fixed
 
Methods inherited from class javax.swing.table.DefaultTableColumnModel
addColumn, addColumnModelListener, createSelectionModel, fireColumnAdded, fireColumnMarginChanged, fireColumnMoved, fireColumnRemoved, fireColumnSelectionChanged, getColumn, getColumnCount, getColumnIndex, getColumnIndexAtX, getColumnMargin, getColumnModelListeners, getColumns, getColumnSelectionAllowed, getListeners, getSelectedColumnCount, getSelectedColumns, getSelectionModel, getTotalColumnWidth, moveColumn, propertyChange, recalcWidthCache, removeColumn, removeColumnModelListener, setColumnMargin, setColumnSelectionAllowed, setSelectionModel, valueChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RowColumns

public RowColumns()
Method Detail

getHeaders

public abstract String[] getHeaders()
Method getHeaders gets the headers for all the columns

Returns:
String[] of table headers.

getHeaderToolTips

public abstract String[] getHeaderToolTips()
Method getHeaderToolTips gets the tooltips for the headers for all the columns

Returns:
String[] of table header's tooltips.

getCharacterWidths

public abstract int[] getCharacterWidths()
Method getCharacterWidths gets the widths of all the columns, expressed in Standard Width Characters.

Returns:
int[] of widths in standard characters

getFixedWidths

public abstract boolean[] getFixedWidths()
Method getFixedWidths gives whether a column is not resizable (true) or resizable (false)

Returns:
boolean[] of whether a column is fixed

getClasses

public abstract Class[] getClasses()
Method getClasses indicates the type of the data in a column

Returns:
Class[] of data types of the columns

getSortKeys

public abstract int[] getSortKeys()
Method getSortKeys returns the primary (array of size 1) or composite key (size > 1) used for default sorting and for secondary sorting.

Returns:
int[] of the order of columns participating in sort.

getValueAt

public abstract Object getValueAt(Object row,
                                  int columnIndex)
Method getValueAt gets the contents of a cell from a row.

Parameters:
row - the row
columnIndex - int
Returns:
Object The content of a cell from a row

getTableName

public abstract String getTableName()
Method getTableName provides the string for a Titled Border.

Returns:
String the table name

getCount

public int getCount()
Method getCount is the number of columns in the table.

Returns:
int the number of columns in the table.

getClass

public Class getClass(int columnIndex)
Method getClass gets the class of a given column

Parameters:
columnIndex - int
Returns:
Class of the given column

getName

public String getName(int columnIndex)
Method getName gets the header for the given column

Parameters:
columnIndex - int
Returns:
String the header name of the given column

getHeaderToolTip

public String getHeaderToolTip(int columnIndex)
Method getClass gets the class of a given column

Parameters:
columnIndex - int
Returns:
Class of the given column

isFixedWidth

public boolean isFixedWidth(int columnIndex)
Method isFixedWidth indicates whether a column is fixed

Parameters:
columnIndex - int
Returns:
boolean, true if the column cannot be resized

getCharacterWidth

public int getCharacterWidth(int columnIndex)
Method getCharacterWidth gets the width of the column, expressed in Standard Characters

Parameters:
columnIndex - int
Returns:
int the number of characters wide the column is to be.

Copyright ? 2003-2004