|
SAP NetWeaver 2004S SPS 10 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sapportals.htmlb.table.JCOTableViewModel
Implementaion for the Interface TableViewModel. This model contains a JCOTable.
Copyright 2004 SAP AG
| Field Summary | |
protected ArrayList |
colspanForCells
|
protected boolean |
columnAutoCreated
|
protected Vector |
columns
|
| Constructor Summary | |
JCOTableViewModel(JCO.Table table)
constructs a table model from a jco table |
|
JCOTableViewModel(JCO.Table table,
boolean columnAutoCreated)
constructs a table model from a jco table if columnAutoCreated is true, the columns will be automatically generated otherwise the columns have to be added to the table via method addColumn() later |
|
| Method Summary | |
TableColumn |
addColumn(String columnName)
adds a column with the name columnName to the table |
void |
addKeyColumn(int columnIndex)
adds the column at columnIndex as one of the key columns |
TableColumn |
getColumnAt(int columnIndex)
returns the column at columnIndex |
int |
getColumnCount()
returns the number of visible columns in the table |
String |
getColumnName(int columnIndex)
returns the title of the column with columnIndex |
Vector |
getColumns()
returns the columns of the table |
IndexedLinkedList |
getKeyColumn()
returns the key column |
int |
getRowCount()
returns the number of rows in the model |
AbstractDataType |
getValueAt(int rowIndex,
int columnIndex)
Returns the value for the cell at columnIndex and
rowIndex. |
AbstractDataType |
getValueAt(int rowIndex,
String columnKey)
returns the value in the column with columnKey
at rowIndex |
boolean |
isColumnAutoCreated()
returns if the columns should be created automatically |
void |
removeColumn(String columnName)
removes a column named with columnName |
void |
setColumnAt(TableColumn column,
int columnIndex)
sets the column |
void |
setColumnName(String columnName,
int columnIndex)
sets the name of the column. |
void |
setKeyColumn(int columnIndex)
sets the column at columnIndex as the key column
The columnIndex is the absolute index of the column in
the TableViewModel, beginning with 1. |
void |
setValueAt(AbstractDataType aValue,
int rowIndex,
int columnIndex)
sets the value at the rowIndex and columnIndex Note: since it's impossible to change the values in a jco table, a exception will be raised here. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Vector columns
protected boolean columnAutoCreated
protected ArrayList colspanForCells
| Constructor Detail |
public JCOTableViewModel(JCO.Table table)
public JCOTableViewModel(JCO.Table table,
boolean columnAutoCreated)
| Method Detail |
public TableColumn addColumn(String columnName)
columnName to the table
addColumn in interface TableViewModelcolumnName - the name of the column which should be addedpublic void removeColumn(String columnName)
columnName
removeColumn in interface TableViewModelcolumnName - the name of the column which should be invisiblepublic int getRowCount()
getRowCount in interface TableViewModelTableViewModel.getColumnCount()public int getColumnCount()
getColumnCount in interface TableViewModelTableViewModel.getRowCount()public String getColumnName(int columnIndex)
getColumnName in interface TableViewModelcolumnIndex - the index of the column whose identifier should be
retrieved
public void setColumnName(String columnName,
int columnIndex)
setColumnName in interface TableViewModelcolumnName - the name of the columncolumnIndex - the index of the column. It's the index of the column
in the visible columns which are put in a vector, beginning with 1
public AbstractDataType getValueAt(int rowIndex,
int columnIndex)
columnIndex and
rowIndex.
getValueAt in interface TableViewModelrowIndex - the row whose value is to be queriedcolumnIndex - the column whose value is to be queried
AbstractDataType
public AbstractDataType getValueAt(int rowIndex,
String columnKey)
columnKey
at rowIndex
getValueAt in interface TableViewModelrowIndex - the index of the rowcolumnKey - the key of the column
public void setValueAt(AbstractDataType aValue,
int rowIndex,
int columnIndex)
setValueAt in interface TableViewModelaValue - the value that the object at rowIndex and
columnIndex should haverowIndex - the index of the rowcolumnIndex - the index of the columnpublic Vector getColumns()
getColumns in interface TableViewModelTableColumnpublic TableColumn getColumnAt(int columnIndex)
columnIndex
getColumnAt in interface TableViewModelcolumnIndex - the index of the column
columnIndexTableColumn
public void setColumnAt(TableColumn column,
int columnIndex)
column - TableColumnpublic boolean isColumnAutoCreated()
public void setKeyColumn(int columnIndex)
columnIndex as the key column
The columnIndex is the absolute index of the column in
the TableViewModel, beginning with 1.
setKeyColumn in interface TableViewModelcolumnIndex - the index of the key columnpublic IndexedLinkedList getKeyColumn()
getKeyColumn in interface TableViewModelIndexedLinkedListpublic void addKeyColumn(int columnIndex)
columnIndex as one of the key columns
addKeyColumn in interface TableViewModelcolumnIndex - the index of the key column
|
SAP NetWeaver 2004S SPS 10 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||