|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.table.TableColumn net.sf.jga.swing.GenericTableColumn<R,C>
public class GenericTableColumn<R,C>
Column class used in conjunction with GenericTableModel. It is up to the user to ensure that the contents of the list are of the correct type, otherwise, a ClassCastException will be thrown during the component's paint routine.
Copyright © 2003-2005 David A. Hall
Field Summary |
---|
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 | |
---|---|
GenericTableColumn(java.lang.Class<C> coltype,
UnaryFunctor<R,C> getFn)
Builds a read-only column that will apply the given functor to objects of the given class to get the value of specific cells. |
|
GenericTableColumn(java.lang.Class<C> coltype,
UnaryFunctor<R,C> getFn,
BinaryFunctor<R,C,C> setFn)
Builds a potentially editable column that will apply the given functors to objects of the given class to get and set the value of specific cells. |
|
GenericTableColumn(java.lang.Class<C> coltype,
UnaryFunctor<R,C> getFn,
BinaryFunctor<R,C,C> setFn,
javax.swing.table.TableCellRenderer renderer,
javax.swing.table.TableCellEditor editor)
Builds a potentially editable column that will apply the given functors to objects of the given class to get and set the value of specific cells. |
|
GenericTableColumn(java.lang.Class<C> coltype,
UnaryFunctor<R,C> getFn,
BinaryFunctor<R,C,C> setFn,
UnaryFunctor<C,java.lang.String> formatter,
UnaryFunctor<java.lang.String,C> parser)
Builds a potentially editable column that will apply the given functors to objects of the given class to get and set the value of specific cells. |
Method Summary | |
---|---|
java.lang.Class<C> |
getColumnClass()
|
C |
getValueAt(R rowvalue)
|
boolean |
isEditable()
|
void |
setValueAt(R rowvalue,
java.lang.Object obj)
|
java.lang.String |
toString()
|
Methods inherited from class javax.swing.table.TableColumn |
---|
addPropertyChangeListener, createDefaultHeaderRenderer, disableResizedPosting, enableResizedPosting, getCellEditor, getCellRenderer, getHeaderRenderer, getHeaderValue, getIdentifier, getMaxWidth, getMinWidth, getModelIndex, getPreferredWidth, getPropertyChangeListeners, getResizable, getWidth, removePropertyChangeListener, setCellEditor, setCellRenderer, setHeaderRenderer, setHeaderValue, setIdentifier, setMaxWidth, setMinWidth, setModelIndex, setPreferredWidth, setResizable, setWidth, sizeWidthToFit |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GenericTableColumn(java.lang.Class<C> coltype, UnaryFunctor<R,C> getFn)
public GenericTableColumn(java.lang.Class<C> coltype, UnaryFunctor<R,C> getFn, BinaryFunctor<R,C,C> setFn)
public GenericTableColumn(java.lang.Class<C> coltype, UnaryFunctor<R,C> getFn, BinaryFunctor<R,C,C> setFn, UnaryFunctor<C,java.lang.String> formatter, UnaryFunctor<java.lang.String,C> parser)
public GenericTableColumn(java.lang.Class<C> coltype, UnaryFunctor<R,C> getFn, BinaryFunctor<R,C,C> setFn, javax.swing.table.TableCellRenderer renderer, javax.swing.table.TableCellEditor editor)
Method Detail |
---|
public C getValueAt(R rowvalue)
public void setValueAt(R rowvalue, java.lang.Object obj)
public boolean isEditable()
public java.lang.Class<C> getColumnClass()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |