|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.groiss.gui.AbstractComponent
com.groiss.gui.AbstractContainer
com.groiss.gui.component.TableContainer
public class TableContainer
TableContainer component
| Field Summary | |
|---|---|
protected boolean |
colouredRows
|
protected int |
counter
|
protected List |
headerNames
|
protected TableModel |
tm
|
| Fields inherited from class com.groiss.gui.AbstractContainer |
|---|
components |
| Fields inherited from class com.groiss.gui.AbstractComponent |
|---|
actions, ACTIVE, browserMode, DEFAULT, ID, IE, INVISIBLE, isSensitive, label, NS, ON_BLUR, ON_CHANGE, ON_CLICK, ON_DBLCLICK, ON_FOCUS, ON_KEY_DOWN, ON_KEY_PRESS, ON_KEY_UP, ON_LOAD, ON_MOUSE_DOWN, ON_MOUSE_MOVE, ON_MOUSE_OUT, ON_MOUSE_UP, ON_RESET, ON_SELECT, ON_SUBMIT, ON_UNLOAD, outputter, parent, parentElem, READONLY, root, viewMode |
| Constructor Summary | |
|---|---|
TableContainer()
constructs a new empty tablecontainer |
|
TableContainer(List headers,
TableModel t)
constructs a new tablecontainer |
|
TableContainer(String id)
Constructs a new empty table-container. |
|
TableContainer(String className,
String width,
boolean colored)
|
|
TableContainer(String id,
TableModel t)
constructs a new tablecontainer |
|
TableContainer(TableModel t)
constructs a new tablecontainer |
|
| Method Summary | |
|---|---|
void |
addColspanRow(List rowData,
boolean add,
int from,
int length)
adds a new row with colspan |
void |
addHeader(List rowData)
|
void |
addRow(List rowData)
adds a new row at the end of the table with the content of the vector |
void |
addRow(List rowData,
boolean isHeader)
|
void |
addRow(List rowData,
List dataprops)
adds a new row with the specified dataproperties |
void |
addRow(List rowData,
List rowprops,
List dataprops)
adds a new row with the properties in the vector if the row is a systemstep row, the row is always red!! |
void |
addRow(List rowData,
String id,
List rowprops,
List dataprops)
Adds a new Row with a row id. |
void |
addRow(List rowData,
String id,
List rowprops,
List dataprops,
boolean isHeader)
Add a row to the table. |
void |
addRow(Object[] row)
|
void |
addRow(Object[] row,
String id,
List rowprops,
List dataprops,
boolean isHeader)
|
protected void |
addRow(TableModel src,
int first,
int last)
adds a new row with the content of tablemodel |
protected void |
build()
builds the table with the elements of the TableModel. |
protected void |
dataChanged(TableModel src)
builds the tree in a new order (moveRow) |
List |
getCellAttributes(int rowIndex,
int colIndex)
returns a vector of attributes of the chosen cell |
List |
getColumnAttributes(int colIndex)
|
int |
getColumnWidth(int colIndex)
returns the width of a specified column |
Component |
getComponentAt(int rowIndex,
int colIndex)
returns the component at the specified position |
Object |
getContent()
Returns null. |
List |
getHeaderContent()
returns the content of the column header (first row) |
List |
getHeaderNames()
returns the names of the columns |
TableModel |
getModel()
|
List |
getRows(boolean isHeader)
|
List |
getTableAttributes()
returns a vector of pairs (names, attributes) of the table element |
String |
getValueAt(int rowIndex,
int colIndex)
returns a string representation of the component at the specified position |
protected Object |
removeRow(int index)
removes the rows at the specified position INDEX from the table |
void |
setCellAttribute(int rowIndex,
int colIndex,
String name,
String value)
sets the attribute in the specified cell |
protected void |
setCellValue(org.jdom.Element cell,
Object data,
List cellprops,
int colindex)
|
void |
setColouredRows(boolean coloured)
sets whether every second row is coloured or not sets the counter for counting the number of rows 0 |
void |
setColumnAlign(int colIndex,
String align)
sets the attribute, which controls whether the text is aligned to the left to the right or in the center |
void |
setColumnAttribute(int colIndex,
String name,
String value)
sets the specified attribute in the whole column |
void |
setColumnHeight(int colIndex,
int height)
sets the height of a specified column |
void |
setColumnValign(int colIndex,
String valign)
sets the attribute, which controls whether the text is vertical aligned to the to the top, middle bottom or in the baseline |
void |
setColumnWidth(int colIndex,
int width)
sets the width of a specified column |
void |
setComponent(int colIndex,
Class cl)
sets a specified component in the chosen column sets the component for all elements except the first one (row 0 - header column!!!) |
void |
setContent(Object o)
Initialize the table with the given tabel model. |
void |
setHeaderAttribute(String name,
String value)
sets an attribute of the column header (first row) |
void |
setHeaderName(int index,
String name)
sets the columnname of a specified column |
void |
setModel(TableModel t)
|
void |
setRowAttribute(int rowIndex,
String name,
String value)
sets the specified attribute in the whole row |
void |
setUseTableBody(boolean use)
|
void |
setValueAt(Object o,
int rowIndex,
int colIndex)
sets a new value (a new component) to the specified position in the table |
String |
showRows()
|
void |
tableChanged(TableModelEvent event)
method which handles the incoming events |
| Methods inherited from class com.groiss.gui.AbstractContainer |
|---|
add, get, getAll, getAll, getAllDeep, getByName, getComponents, getWithParent, init, remove, setBrowserMode, substitute |
| Methods inherited from class com.groiss.gui.AbstractComponent |
|---|
clone, create, getActionListener, getAttribute, getBrowserMode, getId, getLabel, getName, getParent, getParentElement, getRoot, getRootName, getStyle, getViewMode, init, init, removeAttribute, setActionListener, setAttribute, setEncoding, setExpandEmptyElements, setId, setIndenting, setLabel, setName, setNewLines, setParent, setParentElement, setRootName, setStyle, setViewMode, show, show, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.groiss.gui.Component |
|---|
clone, getActionListener, getAttribute, getBrowserMode, getId, getLabel, getName, getParent, getParentElement, getRoot, getStyle, getViewMode, init, removeAttribute, setActionListener, setAttribute, setId, setLabel, setName, setParent, setParentElement, setStyle, setViewMode, show, show, toString |
| Field Detail |
|---|
protected TableModel tm
protected List headerNames
protected boolean colouredRows
protected int counter
| Constructor Detail |
|---|
public TableContainer()
public TableContainer(String id)
id - id of the table element
public TableContainer(String className,
String width,
boolean colored)
public TableContainer(String id,
TableModel t)
id - - the idt - - the tablemodelpublic TableContainer(TableModel t)
t - - the tablemodel
public TableContainer(List headers,
TableModel t)
t - - the tablemodel| Method Detail |
|---|
public void setUseTableBody(boolean use)
public void tableChanged(TableModelEvent event)
tableChanged in interface TableModelListenerevent - - the event (-1, 0, 1)public void setModel(TableModel t)
protected void dataChanged(TableModel src)
src - - the new sorted TableModel
public void setValueAt(Object o,
int rowIndex,
int colIndex)
o - - the new componentrowIndex - - the row index of the new componentcolIndex - - the column index of the new componentpublic void addRow(List rowData)
rowData -
public void addRow(List rowData,
boolean isHeader)
public void addRow(List rowData,
List dataprops)
rowData - the data of the new rowdataprops - the properties of each data in the row
public void addRow(List rowData,
List rowprops,
List dataprops)
rowData - the data of the new rowrowprops - the properties of the row (Pairs)dataprops - the properties of each cell in the row (Pairs)
public void addRow(List rowData,
String id,
List rowprops,
List dataprops)
rowData - the data of the new rowid - id of rowrowprops - the properties of the row (Pairs)dataprops - the properties of each cell in the row (Pairs)public void addHeader(List rowData)
public List getRows(boolean isHeader)
public void addRow(Object[] row)
public void addRow(Object[] row,
String id,
List rowprops,
List dataprops,
boolean isHeader)
public void addRow(List rowData,
String id,
List rowprops,
List dataprops,
boolean isHeader)
rowData - a list of row dataid - id of the rowrowprops - list of row propertiesdataprops - list of properties for each table cellisHeader - true if the row is a header row (TH elements)
protected void setCellValue(org.jdom.Element cell,
Object data,
List cellprops,
int colindex)
protected void addRow(TableModel src,
int first,
int last)
src - - the tablemodelfirst - - the rowindex of the first changed rowlast - - the rowindex of the last changed rowprotected Object removeRow(int index)
index - - the index of the first row
public List getTableAttributes()
public List getHeaderContent()
public void setHeaderName(int index,
String name)
index - - the specified columnname - - the new name of the columnpublic List getHeaderNames()
public void setHeaderAttribute(String name,
String value)
name - - the attribute namevalue - - the attribute value
public void setCellAttribute(int rowIndex,
int colIndex,
String name,
String value)
rowIndex - - the row index of the specified cellcolIndex - - the column index of the specified cellname - - the name of the attributevalue - - the value of the attribute
public List getCellAttributes(int rowIndex,
int colIndex)
rowIndex - - the row index of the specified cellcolIndex - - the column index of the specified cell
public void setColumnWidth(int colIndex,
int width)
colIndex - - the column indexwidth - - the width
public void setColumnHeight(int colIndex,
int height)
colIndex - - the column indexheight - - the height
public void setColumnAlign(int colIndex,
String align)
colIndex - - the specified columnalign - - center, left or right
public void setColumnValign(int colIndex,
String valign)
colIndex - - the specified columnvalign - - top, middle, bottom or baseline
public int getColumnWidth(int colIndex)
throws org.jdom.DataConversionException
colIndex - - the column index
org.jdom.DataConversionException
public void setColumnAttribute(int colIndex,
String name,
String value)
colIndex - - the columnname - - the attribute namevalue - - the attribute value
public void setRowAttribute(int rowIndex,
String name,
String value)
rowIndex - - the rowname - - the attribute namevalue - - the attribute valuepublic List getColumnAttributes(int colIndex)
public void setComponent(int colIndex,
Class cl)
colIndex - - the columncl - - the specified component as class
public Component getComponentAt(int rowIndex,
int colIndex)
rowIndex - - the row indexcolIndex - - the column index
public String getValueAt(int rowIndex,
int colIndex)
rowIndex - - the row indexcolIndex - - the column index
protected void build()
public TableModel getModel()
public void setContent(Object o)
setContent in interface ComponentsetContent in class AbstractComponento - a table modelpublic Object getContent()
getContent in interface ComponentgetContent in class AbstractComponentpublic String showRows()
public void setColouredRows(boolean coloured)
coloured -
public void addColspanRow(List rowData,
boolean add,
int from,
int length)
rowData - the data of the rowadd - specifies whether the row is an comment (true) or notfrom - the number of the cell, where the colspan startslength - the size of the colspan
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||