| com.xoetrope.swing.XBaseTable
XBaseTable | public class XBaseTable extends XTable (Code) | | Title: XBaseTable
Description: JTable which uses the XTableModelAdapter object to store its
model information. The XTableHeaderRenderer is used to render the header and
uses styles defined in the XUI style file.
Copyright (c) Xoetrope Ltd., 2001-2006, This software is licensed under
the GNU Public License (GPL), please see license.txt for more details. If
you make commercial use of this software you must purchase a commercial
license from Xoetrope.
$Revision: 1.20 $
|
Method Summary | |
public void | addRenderer(int column, TableCellRenderer renderer) | public void | displayAsColorField(int column, Hashtable colors) | public void | displayAsNumericField(int column, Format format) | public XBaseModel | getBaseModel() Retrieve the TableModel. | public TableCellEditor | getCellEditor(int row, int column) | public XBaseModel | getCellModel(String rowName) | public TableCellRenderer | getCellRenderer(int row, int column) | public String | getCellValue(String rowName) | public double | getCellValueAsDouble(String rowName) | public XModelListener | getParentListener() | public XBaseModel | getRow(int i) | public boolean | getTranslate() | public void | setAltStyle(String style) | public void | setAltUnselectedColors(Color frgd, Color bkgd) | public int | setAttribute(String attribName, Object attribValue) Set one or more attributes of the component. | public void | setCellValue(XBaseModel templateModel, String col, String attrib, String value) | public void | setModel(XModel xModel) | public void | setTableModelAdapter(XTableModelAdapter model, XModelListener modelListener) Sets the tables TableModel object. | public void | setTranslate(boolean translate) | protected void | translateTable(XTableModelAdapter model) Uses the Translator Singleton instance to translate the contents of the
table. |
altUnselectedBackground | protected Color altUnselectedBackground(Code) | | |
altUnselectedForeground | protected Color altUnselectedForeground(Code) | | |
currentProject | protected XProject currentProject(Code) | | The owner project and the context in which this object operates.
|
doTranslation | protected boolean doTranslation(Code) | | |
XBaseTable | public XBaseTable()(Code) | | |
addRenderer | public void addRenderer(int column, TableCellRenderer renderer)(Code) | | Add a cell renderer for the specified column
Parameters: column - the column or field index |
displayAsColorField | public void displayAsColorField(int column, Hashtable colors)(Code) | | Display the field formatted with a background color from the hashtable such
that the field value acts as a key into the hashtable of colors
Parameters: column - the column or field index Parameters: colors - the color hashtable |
displayAsNumericField | public void displayAsNumericField(int column, Format format)(Code) | | Display the field as a numeric value
Parameters: column - the column or field index Parameters: format - format the number format to use in displaying the field |
getBaseModel | public XBaseModel getBaseModel()(Code) | | Retrieve the TableModel.
XTableModelAdapter if it is of this type otherwise null |
getCellEditor | public TableCellEditor getCellEditor(int row, int column)(Code) | | Retrieves the TableCellEditor for a cell
|
getCellModel | public XBaseModel getCellModel(String rowName)(Code) | | |
getCellValueAsDouble | public double getCellValueAsDouble(String rowName)(Code) | | |
getParentListener | public XModelListener getParentListener()(Code) | | |
getRow | public XBaseModel getRow(int i)(Code) | | Retrieve the row of the XTableModelAdapter which represents the passed
index
Parameters: i - the row required the row as an XBaseModel |
getTranslate | public boolean getTranslate()(Code) | | |
setAltStyle | public void setAltStyle(String style)(Code) | | Set the style of the alternate rows
Parameters: style - XStyle |
setAltUnselectedColors | public void setAltUnselectedColors(Color frgd, Color bkgd)(Code) | | Set the colors for alternate ( odd ) row colors
Parameters: frgd - the foreground color Parameters: bkgd - the background color |
setAttribute | public int setAttribute(String attribName, Object attribValue)(Code) | | Set one or more attributes of the component. Currently this handles the
attributes
- headingStyle, value=the table header style
- selectionStyle, value=the selected row style
- interactive, value=true|false
- updateModel, value=true|false update the underlying model selection (the selected row)
Parameters: attribName - the attribute name Parameters: attribValue - the attribute value 0 for success, non zero for failure or to require some further action |
setModel | public void setModel(XModel xModel)(Code) | | Set the XModel which we will be generating the table from
Parameters: xModel - The XModel of data |
setTableModelAdapter | public void setTableModelAdapter(XTableModelAdapter model, XModelListener modelListener)(Code) | | Sets the tables TableModel object. The XTableModelAdapter is based on the
XModel.
Parameters: model - The XTableModelAdapter being set as the model Parameters: modelListener - an XModelListener which be set to listed to the TableModel changes. |
setTranslate | public void setTranslate(boolean translate)(Code) | | Called when the table's contents need to be translated
Parameters: translate - Flag to indicate whether or not to translate the table. |
translateTable | protected void translateTable(XTableModelAdapter model)(Code) | | Uses the Translator Singleton instance to translate the contents of the
table.
Parameters: model - The table model |
|
|