org.vizzini.ui.table
Class ColumnDescriptor

java.lang.Object
  extended by org.vizzini.ui.table.ColumnDescriptor
All Implemented Interfaces:
Serializable

public class ColumnDescriptor
extends Object
implements Serializable

Provides a column descriptor for use with a DescribedTable. Encapsulates the column information such as column name, property name, and class.

Since:
v0.2
Version:
v0.2
Author:
Jeffrey M. Thompson
See Also:
Serialized Form

Field Summary
protected static Class DEFAULT_COLUMN_CLASS
          Default column class.
protected static String DEFAULT_COLUMN_NAME
          Default column name.
protected static boolean DEFAULT_EDITABLE
          Default editable flag.
protected static String DEFAULT_PROPERTY_NAME
          Default property name.
protected static boolean DEFAULT_VISIBLE
          Default visible flag.
 
Constructor Summary
ColumnDescriptor()
          Construct this object.
ColumnDescriptor(String columnName)
          Construct this object.
ColumnDescriptor(String columnName, String propertyName)
          Construct this object.
ColumnDescriptor(String columnName, String propertyName, Class columnClass)
          Construct this object.
ColumnDescriptor(String columnName, String propertyName, Class columnClass, boolean editable)
          Construct this object.
ColumnDescriptor(String columnName, String propertyName, Class columnClass, boolean editable, boolean visible)
          Construct this object.
 
Method Summary
 TableCellRenderer getCellRenderer()
          Return the table cell renderer.
 Class getColumnClass()
          Return the class of objects in this column.
 String getColumnName()
          Return the column name.
 List getEnumList()
           
 String getPropertyName()
          Return the property name.
 boolean isEditable()
          Return true if this column is editable.
 boolean isEnumerated()
          Return true if this column is enumerated.
 boolean isVisible()
          Return true if this column is visible.
 void setCellRenderer(TableCellRenderer cellRenderer)
          Set the cell renderer.
 void setColumnClass(Class aClass)
          Set the column class.
 void setColumnName(String columnName)
          Set the column name.
 void setEditable(boolean editable)
          Set the editable flag.
 void setEnumList(List enumList)
          Set the enumerated list.
 void setPropertyName(String propertyName)
          Set the property name.
 void setVisible(boolean visible)
          Set the visible flag.
 String toString()
          Return a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_COLUMN_NAME

protected static final String DEFAULT_COLUMN_NAME
Default column name.

See Also:
Constant Field Values

DEFAULT_PROPERTY_NAME

protected static final String DEFAULT_PROPERTY_NAME
Default property name.

See Also:
Constant Field Values

DEFAULT_COLUMN_CLASS

protected static final Class DEFAULT_COLUMN_CLASS
Default column class.


DEFAULT_EDITABLE

protected static final boolean DEFAULT_EDITABLE
Default editable flag.

See Also:
Constant Field Values

DEFAULT_VISIBLE

protected static final boolean DEFAULT_VISIBLE
Default visible flag.

See Also:
Constant Field Values
Constructor Detail

ColumnDescriptor

public ColumnDescriptor()
Construct this object. Defaults:
name - Column
property - toString
columnClass - java.lang.Object
editable - false
visible - true

Since:
v0.2

ColumnDescriptor

public ColumnDescriptor(String columnName)
Construct this object. Defaults:
property - toString
columnClass - java.lang.Object
editable - false
visible - true

Parameters:
columnName - The name of the column.
Since:
v0.2

ColumnDescriptor

public ColumnDescriptor(String columnName,
                        String propertyName)
Construct this object. Defaults:
columnClass - java.lang.Object
editable - false
visible - true

Parameters:
columnName - The name of the column.
propertyName - The name of the data property shown in this column.
Since:
v0.2

ColumnDescriptor

public ColumnDescriptor(String columnName,
                        String propertyName,
                        Class columnClass)
Construct this object. Defaults:
name - Column
property - toString
columnClass - java.lang.Object
editable - false
visible - true

Parameters:
columnName - The name of the column.
propertyName - The name of the data property shown in this column.
columnClass - The class of objects in the column.
Since:
v0.2

ColumnDescriptor

public ColumnDescriptor(String columnName,
                        String propertyName,
                        Class columnClass,
                        boolean editable)
Construct this object. Defaults:
name - Column
property - toString
columnClass - java.lang.Object
editable - false
visible - true

Parameters:
columnName - The name of the column.
propertyName - The name of the data property shown in this column.
columnClass - The class of objects in the column.
editable - Flag indicating if this column is editable.
Since:
v0.2

ColumnDescriptor

public ColumnDescriptor(String columnName,
                        String propertyName,
                        Class columnClass,
                        boolean editable,
                        boolean visible)
Construct this object. Defaults:
name - Column
property - toString
columnClass - java.lang.Object
editable - false
visible - true

Parameters:
columnName - The name of the column.
propertyName - The name of the data property shown in this column.
columnClass - The class of objects in the column.
editable - Flag indicating if this column is editable.
Since:
v0.2
Method Detail

getCellRenderer

public TableCellRenderer getCellRenderer()
Return the table cell renderer.

Since:
v0.2

getColumnClass

public Class getColumnClass()
Return the class of objects in this column.

Since:
v0.2

getColumnName

public String getColumnName()
Return the column name.

Since:
v0.2

getEnumList

public List getEnumList()
Since:
v0.2

getPropertyName

public String getPropertyName()
Return the property name.

Since:
v0.2

isEditable

public boolean isEditable()
Return true if this column is editable.

Since:
v0.2

isEnumerated

public boolean isEnumerated()
Return true if this column is enumerated.

Since:
v0.2

isVisible

public boolean isVisible()
Return true if this column is visible.

Since:
v0.2

setCellRenderer

public void setCellRenderer(TableCellRenderer cellRenderer)
Set the cell renderer.

Parameters:
cellRenderer - Cell renderer.
Since:
v0.2

setColumnClass

public void setColumnClass(Class aClass)
Set the column class.

Parameters:
aClass - The new column class.
Since:
v0.2

setColumnName

public void setColumnName(String columnName)
Set the column name.

Parameters:
columnName - The new column name.
Since:
v0.2

setEditable

public void setEditable(boolean editable)
Set the editable flag.

Parameters:
editable - The new editable flag.
Since:
v0.2

setEnumList

public void setEnumList(List enumList)
Set the enumerated list.

Parameters:
enumList - The new enumerated list.
Since:
v0.2

setPropertyName

public void setPropertyName(String propertyName)
Set the property name. The property name can be cascaded by using a dot separator. For example, "producer.name".

Parameters:
propertyName - The new property name.
Since:
v0.2

setVisible

public void setVisible(boolean visible)
Set the visible flag.

Parameters:
visible - The new visible flag.
Since:
v0.2

toString

public String toString()
Return a string representation of this object.

Overrides:
toString in class Object
Since:
v0.2


Copyright © 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02