|
||||||||||
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 FormConstructor Summary | |
---|---|
ColumnDefinition()
Constructs a ColumnDefinition . |
|
ColumnDefinition(String pName)
Constructs a ColumnDefinition with the specified name. |
|
ColumnDefinition(String pName,
IDataType pDataType)
Constructs a ColumnDefinition with the specified name. |
Method Summary | |
---|---|
ColumnDefinition |
clone()
Clone an ColumnDefinition . |
Object[] |
getAllowedValues()
Gets the allowed values for this column. |
String |
getComment()
Returns the comment for this column. |
IDataType |
getDataType()
Returns the IDataType for this ColumnDefinition . |
String |
getDefaultLabel()
It creates an default column label. |
Object |
getDefaultValue()
Gets the default value of this column. |
String |
getLabel()
Returns the label of the column. |
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 |
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 |
isWritable()
Returns whether this column will be stored. |
void |
setAllowedValues(Object[] pValues)
Sets the allowed values for this column. |
void |
setComment(String pComment)
Sets the comment for this column. |
void |
setDataType(IDataType pDataType)
Sets the IDataType for this ColumnDefinition . |
void |
setDefaultValue(Object pValue)
Sets the default value of this column. |
void |
setLabel(String pLabel)
Sets the label of this column. |
void |
setMovable(boolean pMoveable)
Sets whether this column can be moved. |
void |
setName(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 |
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. |
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(String pName)
ColumnDefinition
with the specified name.
pName
- is the for every RowDefinition
unique namepublic ColumnDefinition(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 String toString()
toString
in class Object
public ColumnDefinition clone()
ColumnDefinition
.
clone
in class Object
ColumnDefinition
Object.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
RowDefinition
IRowDefinition
public IRowDefinition getRowDefinition()
IRowDefinition
for this ColumnDefinition
.
One ColumnDefinition
belongs to exact one IRowDefinition
.
IRowDefinition
where this ColumnDefinition
will be added.IRowDefinition
public void setName(String pName) throws ModelException
pName
- column name
ModelException
- if the ColumnDefinition
already added to another
RowDefinition
public 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
RowDefinition
IDataType
public IDataType getDataType()
IDataType
for this ColumnDefinition
.
IDataType
for this ColumnDefinition
.IDataType
public 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.IDataBook
public boolean isWritable()
IDataBook
interface will not store
values for this column.
IDataBook
public void setLabel(String pLabel)
pLabel
- the label of the ColumnDefinitionpublic String getLabel()
public void setComment(String pComment)
pComment
- the comment for this columnpublic 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 String getDefaultLabel()
public void setDefaultValue(Object pValue)
pValue
- the default valuepublic Object getDefaultValue()
null
if the column has no default valuepublic void setAllowedValues(Object[] pValues)
pValues
- the allowed values or null
when any value is allowedpublic Object[] getAllowedValues()
Object
[] with values, possible for the column.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 |