|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IRowDefinition
The IRowDefinition defines the layout of the model. It defines
columns by using the ColumnDefinition.
ColumnDefinition| Field Summary | |
|---|---|
static java.lang.String[] |
ALL_COLUMNS
A constant for using all columns. |
| Method Summary | |
|---|---|
void |
addColumnDefinition(ColumnDefinition pColumnDefinition)
Adds the given ColumnDefinition. |
void |
addControl(IControl pControl)
Adds the given IControl so that it is
notified if the IRowDefinition
changes. |
void |
addDataBook(IDataBook pDataBook)
Adds the given IDataBook at this IRowDefinition, which
means that the given IDataBook is using this
IRowDefinition. |
IRowDefinition |
createRowDefinition(java.lang.String[] pColumnNames)
Creates a IRowDefinition with only the ColumnDefinitions
which have been specified. |
int |
getColumnCount()
Gets the count of added
ColumnDefinitions. |
ColumnDefinition |
getColumnDefinition(int pColumnIndex)
Gets the ColumnDefinition with the given index. |
ColumnDefinition |
getColumnDefinition(java.lang.String pColumnName)
Gets the ColumnDefinition with the given name. |
int |
getColumnDefinitionIndex(java.lang.String pColumnName)
Gets the index of the ColumnDefinition with the given name. |
int[] |
getColumnDefinitionIndexes(java.lang.String[] pColumnNames)
Returns the indexes of the ColumnDefinitions with the given
names. |
ColumnDefinition[] |
getColumnDefinitions()
Gets all added ColumnDefinitions as array. |
java.lang.String[] |
getColumnNames()
Gets the names of all added ColumnDefinitions. |
ColumnView |
getColumnView(java.lang.Class<? extends IControl> pTargetControl)
Gets the ColumnView to use for the given IControl. |
java.lang.Class<? extends IControl>[] |
getColumnViewClasses()
Gets all classes for which ColumnView are set. |
IControl[] |
getControls()
Returns all added IControls. |
IDataBook[] |
getDataBooks()
Gets the array if IDataBooks which have been added. |
java.lang.String[] |
getPrimaryKeyColumnNames()
Gets the names of all added ColumnDefinitions which represent a primary key column. |
java.lang.String[] |
getReadOnly()
Gets the names of the columns which are read only. |
void |
removeControl(IControl pControl)
Removes the given IControl. |
void |
removeDataBook(IDataBook pDataBook)
Removes the given IDataBook from this IRowDefinition. |
void |
setColumnView(java.lang.Class<? extends IControl> pTargetControl,
ColumnView pColumnView)
Sets the ColumnView for the given IControl. |
void |
setPrimaryKeyColumnNames(java.lang.String[] pColumnNames)
Sets the names of all added ColumnDefinitions which represent a primary key column. |
void |
setReadOnly(java.lang.String[] pColumnNames)
Sets that specified columns as read only. |
| Field Detail |
|---|
static final java.lang.String[] ALL_COLUMNS
| Method Detail |
|---|
void addDataBook(IDataBook pDataBook)
throws ModelException
IDataBook at this IRowDefinition, which
means that the given IDataBook is using this
IRowDefinition.
The added IDataBook has to remove itself when appropriate.
pDataBook - the IDataBook to register.
ModelException - if adding it was not possible.getDataBooks(),
removeDataBook(IDataBook)void removeDataBook(IDataBook pDataBook)
IDataBook from this IRowDefinition.
The registered IDataBook has to remove itself when appropriate.
pDataBook - the IDataBook to remove.addDataBook(IDataBook),
getDataBooks()IDataBook[] getDataBooks()
IDataBooks which have been added.
IDataBooks which have been added. Note that
this array is only a clone and changing it won't change the
internal state of the IRowDefinition.addDataBook(IDataBook),
removeDataBook(IDataBook)
IRowDefinition createRowDefinition(java.lang.String[] pColumnNames)
throws ModelException
IRowDefinition with only the ColumnDefinitions
which have been specified.
If the given column names is null this instance is returned,
additionally the instances of the IRowDefinitions can be cached,
so that they same instance is returned for the same column names.
pColumnNames - the names of the ColumnDefinitions to copy.
IRowDefinition with only the ColumnDefinitions
which have been specified.
ModelException - if the IRowDefinition couldn't be
constructed.
void addColumnDefinition(ColumnDefinition pColumnDefinition)
throws ModelException
ColumnDefinition.
Implementations need to check that the given ColumnDefinition is
not added to another
IRowDefinition. Also it is not allowed to add a
ColumnDefinition after an IDataBook has been
added.
pColumnDefinition - the ColumnDefinition to add.
ModelException - if there is already a ColumnDefinition
with that name or if the given ColumnDefinition is
already added to another IRowDefinition or a
IDataBook has already been
added.
ColumnDefinition getColumnDefinition(java.lang.String pColumnName)
throws ModelException
ColumnDefinition with the given name.
pColumnName - name of the ColumnDefinition to get.
ColumnDefinition with the given name.
ModelException - if there is no ColumnDefinition with that
name.ColumnDefinition getColumnDefinition(int pColumnIndex)
ColumnDefinition with the given index.
pColumnIndex - index of the ColumnDefinition.
ColumnDefinition with the given index.
java.lang.IndexOutOfBoundsException - if the index is out of bounds.int getColumnDefinitionIndex(java.lang.String pColumnName)
ColumnDefinition with the given name.
Returns -1 if there is no ColumnDefinition with the given
name.
pColumnName - name of the ColumnDefinition.
ColumnDefinition with the given name,
-1 if there is none.getColumnDefinitionIndexes(String[])int[] getColumnDefinitionIndexes(java.lang.String[] pColumnNames)
ColumnDefinitions with the given
names.
If any of the given names does not exist, the resulting array will
contain -1 at that position.
pColumnNames - the names of the ColumnDefinitions.
ColumnDefinitions with the given
names, -1 for non existing names.getColumnDefinitionIndex(String)int getColumnCount()
added
ColumnDefinitions.
added
ColumnDefinitions.addColumnDefinition(ColumnDefinition)ColumnDefinition[] getColumnDefinitions()
ColumnDefinitions as array.
The returned array is a copy, so changing the array will not change
the IRowDefinition.
ColumnDefinitions as array.java.lang.String[] getColumnNames()
added ColumnDefinitions.
added ColumnDefinitions.addColumnDefinition(ColumnDefinition)java.lang.String[] getPrimaryKeyColumnNames()
added ColumnDefinitions which represent a primary key column.
added ColumnDefinitions.getPrimaryKeyColumnNames()
void setPrimaryKeyColumnNames(java.lang.String[] pColumnNames)
throws ModelException
added ColumnDefinitions which represent a primary key column.
pColumnNames - the new String[] with the column names to set the
primary key
ModelException - if an IDataBook has already been
added.getPrimaryKeyColumnNames()java.lang.Class<? extends IControl>[] getColumnViewClasses()
ColumnView are set.
ColumnView are set.getColumnView(Class),
setColumnView(Class, ColumnView)ColumnView getColumnView(java.lang.Class<? extends IControl> pTargetControl)
ColumnView to use for the given IControl. The
given IControl class can also be null to get the default
ColumnView.
If there is no ColumnView for the given class the default one
will be returned.
The ColumnView is stored to the base interface, so it does not
matter if you use the interface or the implementing class.
pTargetControl - the class of the IControl for which to get
the ColumnView, can be null for the default
one.
ColumnView for the given IControl class.getColumnViewClasses(),
setColumnView(Class, ColumnView)
void setColumnView(java.lang.Class<? extends IControl> pTargetControl,
ColumnView pColumnView)
throws ModelException
ColumnView for the given IControl. The given
IControl class can also be null to set the default
ColumnView.
The ColumnView is stored to the base interface, so it does not
matter if you use the interface or the implementing class.
pTargetControl - the class of the IControl for which to set
the ColumnView, can be null to set the default
one.pColumnView - the ColumnView for the given IControl
class.
ModelException - if any of the column names specified in the
ColumnView does not exist in this
IRowDefinition.getColumnViewClasses(),
getColumnView(Class)
void setReadOnly(java.lang.String[] pColumnNames)
throws ModelException
pColumnNames - the names of all read only columns, null for
all.
ModelException - if any of the column names does not exist.getReadOnly()java.lang.String[] getReadOnly()
setReadOnly(String[])void addControl(IControl pControl)
IControl so that it is
notified if the IRowDefinition
changes.
pControl - the IControl to add.getControls(),
removeControl(IControl)void removeControl(IControl pControl)
IControl.
pControl - the IControl to remove.addControl(IControl),
getControls()IControl[] getControls()
IControls.
IControls.addControl(IControl),
removeControl(IControl)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||