JIDE 3.5.15

com.jidesoft.grid
Class AbstractCalculatedColumn

java.lang.Object
  extended by javax.swing.table.TableColumn
      extended by com.jidesoft.grid.AbstractCalculatedColumn
All Implemented Interfaces:
CalculatedColumn, Serializable
Direct Known Subclasses:
ExpressionCalculatedColumn, SingleColumn

public abstract class AbstractCalculatedColumn
extends TableColumn
implements CalculatedColumn

This is an abstract implementation of CalculatedColumn interface. It implements most methods except getValueAt and getDependingColumns.

It also provides support for ObjectGrouper to group different values into the same group so that the column has less possible values.

See Also:
Serialized Form

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
  AbstractCalculatedColumn(TableModel model)
           
protected AbstractCalculatedColumn(TableModel model, ObjectGrouper objectGrouper)
           
protected AbstractCalculatedColumn(TableModel model, String newColumnName)
           
protected AbstractCalculatedColumn(TableModel model, String newColumnName, Class<?> newColumnClass)
           
protected AbstractCalculatedColumn(TableModel model, String columnName, ObjectGrouper objectGrouper)
           
 
Method Summary
 TableModel getActualModel()
          Gets the actual table model.
 Class<?> getColumnClass()
          Gets the class of this column.
 Object getColumnIdentifier()
          Gets the column identifier.
 String getColumnName()
          Gets the column name.
 ConverterContext getConverterContext()
           
 EditorContext getEditorContext()
           
static Object getGroupValue(ObjectGrouper grouper, Object value)
           
 ObjectGrouper getObjectGrouper()
           
 void setColumnClass(Class<?> columnClass)
           
 void setColumnName(String columnName)
           
 void setConverterContext(ConverterContext converterContext)
           
 void setEditorContext(EditorContext editorContext)
           
 void setObjectGrouper(ObjectGrouper objectGrouper)
           
 
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, toString, wait, wait, wait
 
Methods inherited from interface com.jidesoft.grid.CalculatedColumn
getDependingColumns, getValueAt
 

Constructor Detail

AbstractCalculatedColumn

public AbstractCalculatedColumn(TableModel model)

AbstractCalculatedColumn

protected AbstractCalculatedColumn(TableModel model,
                                   String newColumnName)

AbstractCalculatedColumn

protected AbstractCalculatedColumn(TableModel model,
                                   String newColumnName,
                                   Class<?> newColumnClass)

AbstractCalculatedColumn

protected AbstractCalculatedColumn(TableModel model,
                                   ObjectGrouper objectGrouper)

AbstractCalculatedColumn

protected AbstractCalculatedColumn(TableModel model,
                                   String columnName,
                                   ObjectGrouper objectGrouper)
Method Detail

getActualModel

public TableModel getActualModel()
Description copied from interface: CalculatedColumn
Gets the actual table model. Since this is calculated column, it is calculated from an existing column or existing columns in the actual table model.

Specified by:
getActualModel in interface CalculatedColumn
Returns:
the actual table model.

getColumnName

public String getColumnName()
Description copied from interface: CalculatedColumn
Gets the column name. The column name is displayed on the table column header.

Specified by:
getColumnName in interface CalculatedColumn
Returns:
the column name.

getColumnIdentifier

public Object getColumnIdentifier()
Description copied from interface: CalculatedColumn
Gets the column identifier. The column identifier should be unique in a table model.

Specified by:
getColumnIdentifier in interface CalculatedColumn
Returns:
the column identifier.

setColumnName

public void setColumnName(String columnName)

getColumnClass

public Class<?> getColumnClass()
Description copied from interface: CalculatedColumn
Gets the class of this column.

Specified by:
getColumnClass in interface CalculatedColumn
Returns:
the column class.

setColumnClass

public void setColumnClass(Class<?> columnClass)

getObjectGrouper

public ObjectGrouper getObjectGrouper()

setObjectGrouper

public void setObjectGrouper(ObjectGrouper objectGrouper)

getEditorContext

public EditorContext getEditorContext()

setEditorContext

public void setEditorContext(EditorContext editorContext)

getConverterContext

public ConverterContext getConverterContext()

setConverterContext

public void setConverterContext(ConverterContext converterContext)

getGroupValue

public static Object getGroupValue(ObjectGrouper grouper,
                                   Object value)

JIDE 3.5.15