|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IRowDefinition
An IRowDefinition
contains all ColumnDefinition
's of a
IDataRow
.
ColumnDefinition
Method Summary | |
---|---|
void |
addColumnDefinition(ColumnDefinition pColumnDefinition)
Adds an ColumnDefinition to this IRowDefinition . |
void |
addControl(IControl pControl)
Adds a IControl to the IRowDefinition . |
void |
addDataBook(IDataBook pRowDefinitionListener)
It register and adds a IDataBook to this IRowDefinition, which uses this IRowDefintion. |
IRowDefinition |
createRowDefinition(String[] pColumnNames)
Returns a cloned IRowDefinition with only a subset of
ColumnDefinitions , specified by a column name String[] . |
int |
getColumnCount()
Returns the column count of this IRowDefintion . |
ColumnDefinition |
getColumnDefinition(int pColumnIndex)
Returns the ColumnDefinition by index. |
ColumnDefinition |
getColumnDefinition(String pColumnName)
Returns the ColumnDefinition by name. |
int |
getColumnDefinitionIndex(String pColumnName)
Returns the index of the ColumnDefinition name of this
IRowDefinition . |
String[] |
getColumnNames()
Returns the String[] of all column names in this IRowDefintion . |
ColumnView |
getColumnView(Class<? extends IControl> pTargetControl)
Gets the ColumnView to use for GUI controls. |
Class<? extends IControl>[] |
getColumnViewClasses()
Gets all classes, for which column views are set. |
IControl[] |
getControls()
Returns all IControl 's from the IRowDefinition . |
IDataBook[] |
getDataBooks()
It returns the list of IDataBooks corresponding to this IRowDefintion. |
String[] |
getPrimaryKeyColumnNames()
Returns the String[] of all column names in the primary key. |
String[] |
getReadOnly()
Returns all read only (true) column names. |
void |
removeControl(IControl pControl)
Removes the IControl from the IRowDefinition . |
void |
removeDataBook(IDataBook pRowDefinitionListener)
It removes the DataBook reference to this IRowDefinition, which used this IRowDefintion before. |
void |
setColumnView(Class<? extends IControl> pTargetControl,
ColumnView pColumnView)
Sets the column view to use for GUI controls. |
void |
setPrimaryKeyColumnNames(String[] pColumnNames)
Sets all primary key column names. |
void |
setReadOnly(String[] pColumnNames)
Sets the specified column names as read only true. |
Method Detail |
---|
void addDataBook(IDataBook pRowDefinitionListener) throws ModelException
pRowDefinitionListener
- the IDataBook to add
ModelException
- if the xxxColumnsName (eg.xxx=Table) are not existing in the IRowDefinition.void removeDataBook(IDataBook pRowDefinitionListener)
pRowDefinitionListener
- the IDataBook to removeIDataBook[] getDataBooks()
IRowDefinition createRowDefinition(String[] pColumnNames) throws ModelException
IRowDefinition
with only a subset of
ColumnDefinitions
, specified by a column name String[]
.
pColumnNames
- column names to use
IRowDefinition
with only a subset column names
String[]
.
ModelException
- if the IRowDefinition
couldn't constructedvoid addColumnDefinition(ColumnDefinition pColumnDefinition) throws ModelException
ColumnDefinition
to this IRowDefinition
.ColumnDefinition
is only
added in one IRowDefinition
. After an IDataBook is registered (at open())
to this IRowDefinition
, it is not allowed to add columns.
pColumnDefinition
- the new ColumnDefinition
ModelException
- if the ColumnDefinition
name already exists or it is already
added to another IRowDefintion
or if an IDataBook is registered
(at open()) to the IRowDefinition
.ColumnDefinition getColumnDefinition(String pColumnName) throws ModelException
ColumnDefinition
by name.
pColumnName
- name of the ColumnDefinition
ColumnDefinition
by name.
ModelException
- if the ColumnDefinition
name not exists.ColumnDefinition getColumnDefinition(int pColumnIndex)
ColumnDefinition
by index.
pColumnIndex
- index of the ColumnDefinition
ColumnDefinition
by index.
IndexOutOfBoundsException
- if the index is out of boundsint getColumnDefinitionIndex(String pColumnName)
ColumnDefinition
name of this
IRowDefinition
.
pColumnName
- name of the ColumnDefinition
ColumnDefinition
name of this
IRowDefinition
, or -1 if it does not exist.int getColumnCount()
IRowDefintion
.
IRowDefintion
.String[] getColumnNames()
IRowDefintion
.
IRowDefintion
.String[] getPrimaryKeyColumnNames()
void setPrimaryKeyColumnNames(String[] pColumnNames) throws ModelException
DataBook
or if the DataRow
is in use.
pColumnNames
- the new String[] with the column names to set the primary key
ModelException
- if an IDataBook
already registered (at open()) to this
IRowdDefinition
.Class<? extends IControl>[] getColumnViewClasses()
ColumnView getColumnView(Class<? extends IControl> pTargetControl)
ColumnView
to use for GUI controls.IControl
(eg. ITableControl
, ITreeControl
, IEditorControl
)
or null for default.ColumnView
is stored to the base interface or class that is instance of IControl.
So it does not matter if you use
getColumnView(ITableControl)
or getColumnView(ITable)
,
getColumnView(UITable)
because they are all base on ITableControl
.rowDef.setColumnView(null, new ColumnView("NAME"))
then
rowDef.getColumnView(null)
and
rowDef.getColumnView(ITableControl)
and
rowDef.getColumnView(ITreeControl)
...
are returning the same instance set before.rowDef.setColumnView(UITree, new ColumnView("NAME"))
then
rowDef.getColumnView(null)
and
rowDef.getColumnView(ITableControl)
are returning the default.rowDef.getColumnView(ITreeControl)
and
rowDef.getColumnView(UITree)
are returning the same instance set with UITree.
pTargetControl
- the type of target class.
void setColumnView(Class<? extends IControl> pTargetControl, ColumnView pColumnView) throws ModelException
IControl
(eg. ITableControl
, ITreeControl
, IEditorControl
)
or null for default.ColumnView
is stored to the base interface or class that is instance of IControl.
So it does not matter if you use
getColumnView(ITableControl)
or getColumnView(ITable)
,
getColumnView(UITable)
because they are all base on ITableControl
.rowDef.setColumnView(null, new ColumnView("NAME"))
then
rowDef.getColumnView(null)
and
rowDef.getColumnView(ITableControl)
and
rowDef.getColumnView(ITreeControl)
...
are returning the same instance set before.rowDef.setColumnView(UITree, new ColumnView("NAME"))
then
rowDef.getColumnView(null)
and
rowDef.getColumnView(ITableControl)
are returning the default.rowDef.getColumnView(ITreeControl)
and
rowDef.getColumnView(UITree)
are returning the same instance set with UITree.
pTargetControl
- the type of target class.pColumnView
- the column view to use for GUI controls.
ModelException
- if the xxxColumnsName (eg.xxx=Table) are not existing in the IRowDefinition.void setReadOnly(String[] pColumnNames) throws ModelException
pColumnNames
- the column names to use. if null or empty, then all columns are used.
ModelException
- if one column name doesn't exist.String[] getReadOnly()
void addControl(IControl pControl)
IControl
to the IRowDefinition
.IRowDefinition
has changed.
pControl
- the IControl
IControl
void removeControl(IControl pControl)
IControl
from the IRowDefinition
.
pControl
- the IControl
IControl
IControl[] getControls()
IControl
's from the IRowDefinition
.
IControl
's from the IRowDefinition
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |