|
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.DefaultTableViewModel
default implementation for Interface TableViewModel
Copyright 2004 SAP AG
| Field Summary | |
protected Vector |
columns
|
protected Vector |
dataVector
|
protected IndexedLinkedList |
keyColumn
|
protected Vector |
visibleColumns
|
| Constructor Summary | |
DefaultTableViewModel()
constructs a empty table data model |
|
DefaultTableViewModel(Object[] columnNames)
constrcuts a DefaultTableViewModel without table data, only the table column names |
|
DefaultTableViewModel(Object[][] data,
Object[] columnNames)
constructs a table data model with a data array and column names |
|
DefaultTableViewModel(Object[][] data,
Object[] columnNames,
boolean columnAutoCreated)
constructs a table data model with a data array and column names |
|
DefaultTableViewModel(Vector columnNames)
constructs a DefaultTableViewModel without table data, only columnNames |
|
DefaultTableViewModel(Vector data,
Vector columnNames)
constructs a table data model with the data vector and the column names |
|
DefaultTableViewModel(Vector data,
Vector columnNames,
boolean columnAutoCreated)
constructs a table model with the data as a Vector and columnnames as a Vector. with the third boolean parameter columnAutoCreated, you can determine if the visible columns (for display) should be automatically created or not. |
|
| Method Summary | |
TableColumn |
addColumn(String columnKey)
adds a column which should be rendered. |
void |
addKeyColumn(int columnIndex)
adds a key column |
TableColumn |
getColumn(String columnID)
returns the column with the specified name |
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 name of the column at columnIndex |
Vector |
getColumns()
returns the columns |
IndexedLinkedList |
getKeyColumn()
returns the key column for the table |
int |
getRowCount()
returns the number of rows in the model |
AbstractDataType |
getValueAt(int rowIndex,
int columnIndex)
returns the value at rowIndex and columnIndex |
AbstractDataType |
getValueAt(int rowIndex,
String columnKey)
returns the value at rowIndex and column with the name
columnName |
void |
removeColumn(String columnKey)
removes a column from the model |
void |
setColumnName(String columnName,
int columnIndex)
sets the name of a column |
void |
setColumnName(String columnName,
String columnKey)
sets the name of a column |
void |
setDataVector(Object[][] data,
Object[] columnNames)
sets the data vector of the table model |
void |
setDataVector(Object[][] data,
Object[] columnNames,
boolean columnAutoCreated)
sets the data vector of the table model |
void |
setKeyColumn(int columnIndex)
sets the key column for the table. |
void |
setValueAt(AbstractDataType aValue,
int rowIndex,
int columnIndex)
sets the value at rowIndex and columnIndex |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Vector dataVector
protected Vector columns
protected Vector visibleColumns
protected IndexedLinkedList keyColumn
| Constructor Detail |
public DefaultTableViewModel()
public DefaultTableViewModel(Vector columnNames)
columnNames - the vector which contains the columnNames
public DefaultTableViewModel(Vector data,
Vector columnNames)
data - the vector which contains the datacolumnNames - the vector which contains the columnNames
public DefaultTableViewModel(Vector data,
Vector columnNames,
boolean columnAutoCreated)
data - the vector which contains the datacolumnNames - the vector which contains the columnNamescolumnAutoCreated - a boolean variable which determins if the visible columns
should be automatically created or not.public DefaultTableViewModel(Object[] columnNames)
public DefaultTableViewModel(Object[][] data,
Object[] columnNames)
public DefaultTableViewModel(Object[][] data,
Object[] columnNames,
boolean columnAutoCreated)
| Method Detail |
public void setDataVector(Object[][] data,
Object[] columnNames)
public void setDataVector(Object[][] data,
Object[] columnNames,
boolean columnAutoCreated)
public int getRowCount()
getRowCount in interface TableViewModelTableViewModel.getColumnCount()public int getColumnCount()
getColumnCount in interface TableViewModelTableViewModel.getRowCount()public String getColumnName(int columnIndex)
columnIndex
getColumnName in interface TableViewModelcolumnIndex - the index of the column
public void setColumnName(String columnName,
int columnIndex)
setColumnName in interface TableViewModel
public void setColumnName(String columnName,
String columnKey)
columnName - the name which should be used for the specified columncolumnKey - the key of the column which should be used to identify the column
public AbstractDataType getValueAt(int rowIndex,
int columnIndex)
rowIndex and columnIndex
getValueAt in interface TableViewModelrowIndex - the row whose value is to be queriedcolumnIndex - the column whose value is to be queried
public AbstractDataType getValueAt(int rowIndex,
String columnKey)
rowIndex and column with the name
columnName
getValueAt in interface TableViewModelrowIndex - the row indexcolumnKey - the name of the column whose value is to be retrieved
public void setValueAt(AbstractDataType aValue,
int rowIndex,
int columnIndex)
rowIndex and columnIndex
setValueAt in interface TableViewModelaValue - the value that the table cell at rowIndex and
columNindex should haverowIndex - the index of the rowcolumnIndex - the index of the columnpublic Vector getColumns()
getColumns in interface TableViewModelpublic TableColumn getColumnAt(int columnIndex)
columnIndex
getColumnAt in interface TableViewModelcolumnIndex - the index of the column
columnIndexTableColumnpublic TableColumn getColumn(String columnID)
public void setKeyColumn(int columnIndex)
setKeyColumn in interface TableViewModelcolumnIndex - the index of the key columnpublic void addKeyColumn(int columnIndex)
addKeyColumn in interface TableViewModelcolumnIndex - the index of the key columnpublic TableColumn addColumn(String columnKey)
addColumn in interface TableViewModelcolumnKey - the key of the column which should be used to identify a columnpublic void removeColumn(String columnKey)
removeColumn in interface TableViewModelcolumnKey - the key of the column which should be used to identify a columnpublic IndexedLinkedList getKeyColumn()
getKeyColumn in interface TableViewModelIndexedLinkedList
|
SAP NetWeaver 2004S SPS 10 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||