|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.spardat.xma.mdl.WModel
at.spardat.xma.mdl.table.TableBaseWM
at.spardat.xma.mdl.table.TableWM
at.spardat.xma.mdl.table.TableWMClient
The implementation of a TableWM widget model implementation at the client side.
| Field Summary | |
protected XMATableColumn[] |
columns_
Specifies column information. |
| Fields inherited from class at.spardat.xma.mdl.table.TableWM |
updateCount_ |
| Fields inherited from class at.spardat.xma.mdl.table.TableBaseWM |
columnCount_, isAtServer_ |
| Fields inherited from class at.spardat.xma.mdl.WModel |
S_NULL |
| Fields inherited from interface at.spardat.xma.mdl.table.ITableWMClient |
S_NON_SORTABLE |
| Fields inherited from interface at.spardat.xma.mdl.table.ITableWM |
S_LAST, S_MULTI_SELECT, S_ONE_WAY |
| Constructor Summary | |
TableWMClient(short id,
Page pm,
int columnCount,
int style)
Constructor. |
|
| Method Summary | |
XMATableColumn |
getColumn(int i)
Returns the column at the provided zero based index. |
at.spardat.enterprise.fmt.IFmt |
getFormatter(int columnIndex)
Returns the formatter set for the column at index columnIndex or null if none has been set. |
int |
getSortingColumn()
Returns the index of the column sorting the table or -1 if the table is not sorted by any column. |
static TableRow |
getTableRowFor(java.lang.Object uiTableItem)
Returns the model's TableRow to the given TableItem. |
UIDelegateClient |
getUIDelegate()
Returns the attached UIDelegateClient. |
boolean |
handle(ModelChangeEvent event)
All events that might change a WidgetModel are executed via this method. |
boolean |
hasSortIndicator()
Shows if this table shows a sort indicator at the sorting column's header. |
boolean |
isEditable()
Returns true if this model's widget may be modified by the end-user. |
boolean |
isEnabled()
Returns true, if this model's widget is enabled. |
boolean |
isSortable(int columnIndex)
Returns true if the column at index columnIndex may be sorted. |
boolean |
isSortingColumnAscending()
Shows if the sorted column sorts ascending (1 click) or descening(2 clicks). |
boolean |
isVisible(int columnIndex)
Returns the visibility state of a particular column. |
void |
selectByUIIndex(int index)
Selects the row at a provided index in the UI-control (SWT-table) associated with this widget-model. |
void |
setEditable(boolean what)
Sets the editable-state of this models's widget. |
void |
setEnabled(boolean what)
Sets the enabled-state of this model's widget. |
void |
setFormatter(int columnIndex,
at.spardat.enterprise.fmt.IFmt formatter)
Sets the formatter to use for column at index columnIndex. |
void |
setSortable(int columnIndex,
boolean what)
Sets the property if the column at index columnIndex may be sorted by the user or not. |
void |
setSortIndicator(boolean showSortIndicator)
If this method is set to true than a sort indicator (a small up or down arrow) is shown at the column's header, which sorts the table. |
void |
setVisible(int columnIndex,
boolean what)
Sets the property whether the column at index columnIndex is visible or not. |
void |
sort(int columnIndex)
Sorts the table contents on the UI using a particular column as sort order column. |
void |
sortNatural()
Displays the rows in their natural order, i.e., as inserted in the table model. |
| Methods inherited from class at.spardat.xma.mdl.table.TableWM |
add, changed, cleanUpAfterServerEvent, clear, commit, containsKey, describe, deselect, deselectAll, equalsCS, estimateMemory, externalize, getRow, getRow, getSelected, getSelection, getSelectionCount, indexOf, internalize, internalRemoveRows, isMultiSelect, isOneWay, isSelected, isStrict, randomlyChange, removeRow, removeRow, rollback, select, selectByModelIndex, size |
| Methods inherited from class at.spardat.xma.mdl.table.TableBaseWM |
getColumnCount, getPage |
| Methods inherited from class at.spardat.xma.mdl.WModel |
getId, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface at.spardat.xma.mdl.table.ITableWM |
clear, containsKey, getColumnCount, getRow, getRow, indexOf, isOneWay, removeRow, removeRow, selectByModelIndex, size |
| Methods inherited from interface at.spardat.xma.mdl.ISelectable |
deselect, deselectAll, getSelected, getSelection, getSelectionCount, isMultiSelect, isSelected, isStrict, select |
| Field Detail |
protected XMATableColumn[] columns_
| Constructor Detail |
public TableWMClient(short id,
Page pm,
int columnCount,
int style)
id - uniquely identifies the model within its pagepm - the enclosing page model this widget model belongs to.columnCount - the number of columns this table hasstyle - bit or combination of the style constants S_* of this class and its superclass.| Method Detail |
public void setFormatter(int columnIndex,
at.spardat.enterprise.fmt.IFmt formatter)
setFormatter in interface ITableWMClientcolumnIndex - the zero based index of the columnformatter - the IFmt object determining the string layout of a column cell.
java.lang.ArrayIndexOutOfBoundsException - if columnIndex not valid.
public void setSortable(int columnIndex,
boolean what)
setSortable in interface ITableWMClientcolumnIndex - the zero based index of the columnwhat - false if sorting of the column should be supressed, true otherwise.public boolean isSortable(int columnIndex)
isSortable in interface ITableWMClientpublic void sort(int columnIndex)
The table won't be sorted if any of the following is true:
sort in interface ITableWMClientcolumnIndex - the index of the column to be sorted.public at.spardat.enterprise.fmt.IFmt getFormatter(int columnIndex)
getFormatter in interface ITableWMClient
public void setVisible(int columnIndex,
boolean what)
columnIndex - zero based index of the columnwhat - true indicates that the column should be visible.public boolean isVisible(int columnIndex)
isVisible in interface ITableWMClientcolumnIndex - zero based index of the column
public UIDelegateClient getUIDelegate()
IWModelClient
getUIDelegate in interface IWModelClientIWModelClient.getUIDelegate()public boolean handle(ModelChangeEvent event)
WModel
handle in class TableWMWModel.handle(at.spardat.xma.mdl.ModelChangeEvent)public XMATableColumn getColumn(int i)
getColumn in interface ITableWMClienti - zero based index indentifying a column
ArrayIndexOutOfBounds - if i greater equal getColumnCount or
less than zero.public void selectByUIIndex(int index)
ITableWMClientNote that the UI must be constructed in order for this method to work.
selectByUIIndex in interface ITableWMClientITableWMClient.selectByUIIndex(int)public boolean isEditable()
IWModelClient
isEditable in interface IWModelClientIWModelClient.isEditable()public boolean isEnabled()
IWModelClient
isEnabled in interface IWModelClientIWModelClient.isEnabled()public void setEditable(boolean what)
IWModelClientUsually, this method is called on all widget-models of a page to set the whole page to a read-only mode.
If this method is not called, the default is true.
setEditable in interface IWModelClientwhat - true if the model's widget should be editable, false otherwise.IWModelClient.setEditable(boolean)public void setEnabled(boolean what)
IWModelClient
setEnabled in interface IWModelClientwhat - the state to set.IWModelClient.setEnabled(boolean)public void sortNatural()
ITableWMClientThis method may be used to undo an earlier call to sort. Besides that, the user might have changed the sort order by klicking on the table headers.
sortNatural in interface ITableWMClientITableWMClient.sortNatural()public int getSortingColumn()
ITableWMClient
getSortingColumn in interface ITableWMClientITableWMClient.getSortingColumn()public boolean isSortingColumnAscending()
ITableWMClient
isSortingColumnAscending in interface ITableWMClientITableWMClient.isSortingColumnAscending()public boolean hasSortIndicator()
ITableWMClient
hasSortIndicator in interface ITableWMClientITableWMClient.hasSortIndicator()public void setSortIndicator(boolean showSortIndicator)
ITableWMClient
setSortIndicator in interface ITableWMClientshowSortIndicator - true - show a sort indicator at the sorting column's header / false - no sort indicator is shownITableWMClient.setSortIndicator(boolean)public static TableRow getTableRowFor(java.lang.Object uiTableItem)
uiTableItem - SWT-TableItem if SWT is the UI-library you are using. Must not be null.
The SWT-TableItem must not be disposed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||