org.jcreme.swing.table.columnmodel
Class TableColumnType

java.lang.Object
  extended byorg.jcreme.enumerations.Enumeration
      extended byorg.jcreme.swing.table.columnmodel.TableColumnType
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable

public class TableColumnType
extends Enumeration

This class enables to link a TableColumn subclass to its editor and to its memento.

Version:
$Revision: 1.2 $
Author:
$Author: dbregeon $
See Also:
Serialized Form

Field Summary
protected static java.util.Hashtable fromName
          The TableColumnType instances by their name.
static TableColumnType SORTABLE_TABLE_COLUMN
           
static TableColumnType TABLE_COLUMN
           
 
Fields inherited from class org.jcreme.enumerations.Enumeration
 
Constructor Summary
protected TableColumnType(java.lang.String name)
          Creates a new instance of TableColorModel
 
Method Summary
static TableColumnType get(java.lang.String name)
          This method retrieves a TableColumnType from its name.
static TableColumnType getFromImplementation(java.lang.Class clazz)
          Enables to find the TableColumnType associated to a TableColumn implementation.
protected  java.util.Hashtable getFromName()
          This method is for internal use only.
 java.lang.Class getTableColumnClass()
          Gives access to the implementation class of the TableColumn.
 java.lang.Class getTableColumnEditorClass()
          Gives access to the TableColumnEditor class to use with this TableColumnType.
 java.lang.Class getTableColumnMementoClass()
          Gives access to the TableColumnMemento class to use with this TableColorModelType.
static TableColumnType[] getTableColumns()
          This methods gives the instances of this class.
static Enumeration[] getValues()
          This method enables to retrieve all the possible values of an Enumeration class.
 void setTableColumnClass(java.lang.Class clazz)
          Enables to set the actual Class that implements the TableColumn.
 void setTableColumnEditorClass(java.lang.Class clazz)
          Enables to set the TableColumnEditor to use for this type of TableColumn.
 void setTableColumnMementoClass(java.lang.Class clazz)
          Enables to set the TableColorModelMemento to use for this type of TableColorModel.
 
Methods inherited from class org.jcreme.enumerations.Enumeration
compareTo, getName, readResolve, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fromName

protected static final java.util.Hashtable fromName
The TableColumnType instances by their name.


TABLE_COLUMN

public static final TableColumnType TABLE_COLUMN

SORTABLE_TABLE_COLUMN

public static final TableColumnType SORTABLE_TABLE_COLUMN
Constructor Detail

TableColumnType

protected TableColumnType(java.lang.String name)
Creates a new instance of TableColorModel

Parameters:
name -
Method Detail

getFromName

protected java.util.Hashtable getFromName()
Description copied from class: Enumeration
This method is for internal use only.

Specified by:
getFromName in class Enumeration
Returns:
the Hashtable that links the enumerated values names with the actual enumerated value.
See Also:
Enumeration.getFromName()

get

public static TableColumnType get(java.lang.String name)
This method retrieves a TableColumnType from its name. It creates a new one if it does not already exist.

Parameters:
name - the name of the TableColumnType.
Returns:
the TableColumnType that is associated to this name.

getTableColumnClass

public java.lang.Class getTableColumnClass()
Gives access to the implementation class of the TableColumn.

Returns:
the implementation class of the TableColumn.

setTableColumnClass

public void setTableColumnClass(java.lang.Class clazz)
Enables to set the actual Class that implements the TableColumn.

Parameters:
clazz - the implementation of the TableColumn.

getTableColumnEditorClass

public java.lang.Class getTableColumnEditorClass()
Gives access to the TableColumnEditor class to use with this TableColumnType.

Returns:
the TableColumnEditor class to use for this type of TableColumn.

setTableColumnEditorClass

public void setTableColumnEditorClass(java.lang.Class clazz)
Enables to set the TableColumnEditor to use for this type of TableColumn. If the provided class is not a subclass TableColumnEditor it is silently ignored.

Parameters:
clazz - the TableColumnEditor subclass to use.

getTableColumnMementoClass

public java.lang.Class getTableColumnMementoClass()
Gives access to the TableColumnMemento class to use with this TableColorModelType.

Returns:
the TableColumnMemento class to use for this type of TableColorModel.

setTableColumnMementoClass

public void setTableColumnMementoClass(java.lang.Class clazz)
Enables to set the TableColorModelMemento to use for this type of TableColorModel. If the provided class is not a subclass TableColorModelMemento it is silently ignored.

Parameters:
clazz - the TableColorModelMemento subclass to use.

getTableColumns

public static TableColumnType[] getTableColumns()
This methods gives the instances of this class.

Returns:
all the instances of this class.

getValues

public static Enumeration[] getValues()
This method enables to retrieve all the possible values of an Enumeration class.

Returns:
the values for this class.

getFromImplementation

public static TableColumnType getFromImplementation(java.lang.Class clazz)
Enables to find the TableColumnType associated to a TableColumn implementation.

Parameters:
clazz - the implementation class.
Returns:
the associated TableColumnType, or null if it does not exist.


Copyright 2006 null. All Rights Reserved.