public class IlvDefaultDataColumnInfo extends IlvAbstractDataColumnInfo implements Cloneable, Serializable
IlvDataColumnInfo
interface.
It stores the column properties (type, empty value replacement, and so on) locally in this instance.
Constructor and Description |
---|
IlvDefaultDataColumnInfo()
Creates a column info with an empty name and value type String.
|
IlvDefaultDataColumnInfo(String name,
Class type)
Creates a column info with the given name and value type.
|
IlvDefaultDataColumnInfo(String name,
Class type,
boolean enumerated)
Creates a column info with the given name and value type, possibly
enumerated.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Returns a copy of this object.
|
Object |
getEmptyValue()
Returns the replacement value when a record has no value
for this column.
|
Object |
getEnumValue(int i)
Returns one of the possible values.
|
List |
getEnumValues()
Returns the list of possible values if this column is enumerated.
|
Object |
getMaxValue()
Returns the theoretical maximum value of this column.
|
Object |
getMinValue()
Returns the theoretical minimum value of this column.
|
String |
getName()
Returns the name of the column.
|
Class |
getType()
Returns the value type of the column.
|
boolean |
isEnumerated()
Returns
true if this column stores enumerated values,
meaning that there are only a few possible values. |
void |
setEmptyValue(Object emptyValue)
Sets the replacement value when a record has no value for this column.
|
void |
setEnumerated(boolean enumerated)
Sets the column to enumerated or not.
|
void |
setEnumValue(int i,
Object value)
Sets one of the possible values.
|
void |
setEnumValues(List enumValues)
Sets the list of possible values if this column is enumerated.
|
void |
setMaxValue(Object max)
Sets the theoretical maximum value of this column.
|
void |
setMinValue(Object min)
Sets the theoretical minimum value of this column.
|
void |
setName(String name)
Sets the name of the column.
|
void |
setType(Class type)
Sets the type of the values of this column.
|
addDataColumnListener, fireColumnEvent, removeDataColumnListener
public IlvDefaultDataColumnInfo()
public IlvDefaultDataColumnInfo(String name, Class type)
public String getName()
The name is used in the chart display. It is used for accessing
the column data only in some implementation of
IlvModelWithColumns
(such as IlvFlatListModel
or IlvTreeListModel
).
getName
in interface IlvStaticColumnInfo
public void setName(String name)
When using this function, you should make sure that two columns
of the same IlvModelWithColumns
do not have the same name.
This method should not be called once this instance is already
connected to an IlvModelWithColumns
because no notification
is sent when the name changes.
public Class getType()
getType
in interface IlvStaticColumnInfo
public void setType(Class type)
This method should not be called once this instance is already
connected to an IlvModelWithColumns
because no notification
is sent when the type changes.
public Object getEmptyValue()
getEmptyValue
in interface IlvDataColumnInfo
getType()
class.public void setEmptyValue(Object emptyValue)
emptyValue
- The new replacement for an empty value, should belong to
the getType()
class.public boolean isEnumerated()
true
if this column stores enumerated values,
meaning that there are only a few possible values.isEnumerated
in interface IlvDataColumnInfo
public void setEnumerated(boolean enumerated)
public List getEnumValues()
getEnumValues
in interface IlvDataColumnInfo
getType()
class, or null
if the
possible values are not fixed but depend on the contents of the
model, or null
if isEnumerated()
is
false
.public void setEnumValues(List enumValues)
enumValues
- A list of non-null objects, each belonging to the
getType()
class.public Object getEnumValue(int i)
Note: This method can only be called after setEnumValues(java.util.List)
has been called with a non-null list as argument.
public void setEnumValue(int i, Object value)
Note: This method can only be called after setEnumValues(java.util.List)
has been called with a non-null list as argument.
public Object getMinValue()
getMinValue
in interface IlvDataColumnInfo
getType()
class,
or null
when there is no theoretical minimum.public void setMinValue(Object min)
min
- A non-null object belonging to the getType()
class, or null
when there is no theoretical
minimum.public Object getMaxValue()
getMaxValue
in interface IlvDataColumnInfo
getType()
class,
or null
when there is no theoretical maximum.public void setMaxValue(Object max)
max
- A non-null object belonging to the getType()
class, or null
when there is no theoretical
maximum.public Object clone()
clone
in interface IlvStaticColumnInfo
clone
in class IlvAbstractDataColumnInfo
Cloneable
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.