|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.rad.model.ColumnDefinition
public class ColumnDefinition
A ColumnDefinition is a description of the data type and other
attributes of a table column.
Example:
ColumnDefinition cdName = new ColumnDefinition("name");
// set properties
cdName.setWidth(10);
cdName.setLabel("Name");
cdName.setNull(true);
cdName.setReadOnly(true);
cdName.setWritable(false);
// set RowDefinition;
RowDefinition rdRowDefinition = new RowDefinition();
cdName.setRowDefinition(rdRowDefinition);
IRowDefinition,
IDataType,
Serialized Form| Constructor Summary | |
|---|---|
ColumnDefinition()
Constructs a ColumnDefinition. |
|
ColumnDefinition(java.lang.String pName)
Constructs a ColumnDefinition with the specified name. |
|
ColumnDefinition(java.lang.String pName,
IDataType pDataType)
Constructs a ColumnDefinition with the specified name. |
|
| Method Summary | |
|---|---|
ColumnDefinition |
clone()
Clone an ColumnDefinition. |
java.lang.Object[] |
getAllowedValues()
Gets the allowed values for this column. |
java.lang.String |
getComment()
Returns the comment for this column. |
IDataType |
getDataType()
Returns the IDataType for this ColumnDefinition. |
java.lang.String |
getDefaultLabel()
It creates an default column label. |
java.lang.Object |
getDefaultValue()
Gets the default value of this column. |
java.lang.String |
getLabel()
Returns the label of the column. |
java.lang.String |
getName()
Returns the column name. |
IRowDefinition |
getRowDefinition()
Returns the IRowDefinition for this ColumnDefinition. |
int |
getWidth()
Returns the size of this column, which is used in GUI control to display. |
protected void |
invokeRepaintListeners()
Notifies all controls from the row definition that this column definition has changed. |
boolean |
isFilterable()
true, if this column will be filtered by generic filters. |
boolean |
isMovable()
Returns whether this column can be moved. |
boolean |
isNullable()
Returns true if values in this column may be null. |
boolean |
isReadOnly()
Returns the read only state of this column. |
boolean |
isResizable()
Returns whether this column can be resized. |
boolean |
isSortable()
Returns whether this column can be sorted. |
boolean |
isWritable()
Returns whether this column will be stored. |
void |
setAllowedValues(java.lang.Object[] pValues)
Sets the allowed values for this column. |
void |
setComment(java.lang.String pComment)
Sets the comment for this column. |
void |
setDataType(IDataType pDataType)
Sets the IDataType for this ColumnDefinition. |
void |
setDefaultValue(java.lang.Object pValue)
Sets the default value of this column. |
void |
setFilterable(boolean pFilterable)
Sets whether this column will be filtered by generic filters. |
void |
setLabel(java.lang.String pLabel)
Sets the label of this column. |
void |
setMovable(boolean pMoveable)
Sets whether this column can be moved. |
void |
setName(java.lang.String pName)
Set the name of the column. |
void |
setNullable(boolean pNullable)
Sets whether values in this column may be null. |
void |
setReadOnly(boolean pReadOnly)
Sets whether this column is read only. |
void |
setResizable(boolean pResizeable)
Sets if this column can be resized. |
void |
setRowDefinition(IRowDefinition pRowDefinition)
Sets the IRowDefinition for this ColumnDefinition. |
void |
setSortable(boolean pSortable)
Sets whether this column is sortable. |
void |
setWidth(int pDisplaySize)
Sets the size of this column, which is used in GUI control to display. |
void |
setWritable(boolean pStorable)
Sets whether this column will be stored. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ColumnDefinition()
ColumnDefinition.
public ColumnDefinition(java.lang.String pName)
ColumnDefinition with the specified name.
pName - is the for every RowDefinition unique name
public ColumnDefinition(java.lang.String pName,
IDataType pDataType)
ColumnDefinition with the specified name.
pName - is the for every RowDefinition unique namepDataType - is the IDataType of the ColumnDefinition| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic ColumnDefinition clone()
ColumnDefinition.
clone in class java.lang.ObjectColumnDefinitionObject.clone()
public void setRowDefinition(IRowDefinition pRowDefinition)
throws ModelException
IRowDefinition for this ColumnDefinition.
One ColumnDefinition belongs to exact one IRowDefinition.
pRowDefinition - the IRowDefinition where this ColumnDefinition
will be added
ModelException - if the ColumnDefinition already added to an other
RowDefinitionIRowDefinitionpublic IRowDefinition getRowDefinition()
IRowDefinition for this ColumnDefinition.
One ColumnDefinition belongs to exact one IRowDefinition.
IRowDefinition where this ColumnDefinition
will be added.IRowDefinition
public void setName(java.lang.String pName)
throws ModelException
pName - column name
ModelException - if the ColumnDefinition already added to another
RowDefinitionpublic java.lang.String getName()
public void setDataType(IDataType pDataType)
throws ModelException
IDataType for this ColumnDefinition.
pDataType - the IDataType for this ColumnDefinition.
ModelException - if the ColumnDefinition already added to another
RowDefinitionIDataTypepublic IDataType getDataType()
IDataType for this ColumnDefinition.
IDataType for this ColumnDefinition.IDataTypepublic void setNullable(boolean pNullable)
pNullable - true if values in this column may be null.public boolean isNullable()
public void setWritable(boolean pStorable)
IDataBook interface will not
store values for this column.
pStorable - true if column will be stored.IDataBookpublic boolean isWritable()
IDataBook interface will not store
values for this column.
IDataBookpublic void setFilterable(boolean pFilterable)
pFilterable - true if column will be filtered by generic filters.public boolean isFilterable()
public void setLabel(java.lang.String pLabel)
pLabel - the label of the ColumnDefinitionpublic java.lang.String getLabel()
public void setComment(java.lang.String pComment)
pComment - the comment for this columnpublic java.lang.String getComment()
public int getWidth()
public void setWidth(int pDisplaySize)
pDisplaySize - the display size of this column in characterspublic void setMovable(boolean pMoveable)
pMoveable - true if the column can be movedpublic boolean isMovable()
public void setResizable(boolean pResizeable)
pResizeable - true if the column can be resizedpublic boolean isResizable()
public void setReadOnly(boolean pReadOnly)
pReadOnly - true if this column is read only.public boolean isReadOnly()
public java.lang.String getDefaultLabel()
public void setDefaultValue(java.lang.Object pValue)
pValue - the default valuepublic java.lang.Object getDefaultValue()
null if the column has no default valuepublic void setAllowedValues(java.lang.Object[] pValues)
pValues - the allowed values or null when any value is allowedpublic java.lang.Object[] getAllowedValues()
Object[] with values, possible for the column.public void setSortable(boolean pSortable)
pSortable - true if this column is sortable.public boolean isSortable()
protected void invokeRepaintListeners()
IControl.notifyRepaint()
method will be called.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||