Enum ColumnClass
- java.lang.Object
-
- java.lang.Enum<ColumnClass>
-
- net.sf.jguiraffe.gui.builder.components.tags.table.ColumnClass
-
- All Implemented Interfaces:
Serializable
,Comparable<ColumnClass>
public enum ColumnClass extends Enum<ColumnClass>
An enumeration class that defines logic column classes.
The column of a table can contain data of different types, e.g. strings, numbers, dates, or icons. Depending on the data type a different renderer has to be used to ensure that the data is correctly displayed.
Different UI toolkits may use different mechanisms to associate a table column with a specific renderer. The JGUIraffe library defines an enumeration of logic column classes for the most frequently used data types. The constants defined in this enumeration class can be passed to the
columnClass
attribute of theTableColumnTag
tag. If the standard column classes defined here are not sufficient, it is also possible to set a fully qualified Java class name.- Version:
- $Id: ColumnClass.java 205 2012-01-29 18:29:57Z oheger $
- Author:
- Oliver Heger
- See Also:
TableColumnTag
,TableColumnTag.setColumnClass(Object)
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ColumnClass
valueOf(String name)
Returns the enum constant of this type with the specified name.static ColumnClass[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
STRING
public static final ColumnClass STRING
The column class String. This is appropriate for plain texts to be displayed. If the content of a cell is an arbitrary Java object, its string representation is displayed.
-
NUMBER
public static final ColumnClass NUMBER
The column class Number. This class can be used for integer numbers.
-
FLOAT
public static final ColumnClass FLOAT
The column class Float. This class can be used for floating point numbers (with either single or double precision).
-
DATE
public static final ColumnClass DATE
The column class Date. Use this class for date values.
-
BOOLEAN
public static final ColumnClass BOOLEAN
The column class Boolean. This is the class of choice for boolean data. Depending on the capabilities of the UI toolkit used, data of this type may be rendered in a special way, e.g. as a checkbox.
-
ICON
public static final ColumnClass ICON
The column class Icon. If this class is set, a renderer for displaying icons is used.
-
-
Method Detail
-
values
public static ColumnClass[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ColumnClass c : ColumnClass.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ColumnClass valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-