public class TableConfigurationManager extends Object
Table
when these ones are defined in an external file (complete path to this file
must be established with variable
Table.rendererEditorConfigurationFile). Structure of this file should
be similar to:
<?xml version="1.0" encoding="UTF-8"?>
<TableConfiguration>
 <TableRenderers>
   <com.ontimize.gui.table.BooleanCellRenderer rendererid="boolean" />
   <com.ontimize.gui.table.BundleCellRenderer rendererid="bundle" />
   <com.ontimize.gui.table.CurrencyCellRenderer rendererid="currency" />
   <com.ontimize.gui.table.DateCellRenderer rendererid="date" />
   <com.ontimize.gui.table.MemoCellRenderer rendererid="memo" />
   <com.ontimize.gui.table.PercentCellRenderer rendererid="percent" />
   <com.ontimize.gui.table.RealCellRenderer rendererid="real" />
 </TableRenderers>
 <TableEditors>
   <com.ontimize.gui.table.BooleanCellEditor editorid="boolean" />
 </TableEditors>
</TableConfiguration>
| Modifier and Type | Class and Description |
|---|---|
static class |
TableConfigurationManager.TableElementConfig
Internal class for creating objects that manage identifier, class name
and parameters for each element.
|
| Modifier and Type | Field and Description |
|---|---|
protected Hashtable |
editorsConfig |
protected Hashtable |
renderersConfig |
protected static TableConfigurationManager |
tableConfigurationManager |
| Constructor and Description |
|---|
TableConfigurationManager() |
TableConfigurationManager(InputStream inputStream) |
TableConfigurationManager(String filePath) |
| Modifier and Type | Method and Description |
|---|---|
void |
addElements(String xmlDefinition) |
protected void |
configure(InputStream inputStream)
Parses TableRenderers and TableEditors.
|
protected void |
configureEditors(NodeList nodeList)
Method called internally by
configure(InputStream) in order to
parse editors. |
protected void |
configureRenderers(NodeList nodeList)
Method called internally by
configure(InputStream) in order to
parse renderers. |
TableCellEditor |
getCellEditor(String id,
String columnName) |
TableCellRenderer |
getCellRenderer(Object id) |
protected TableConfigurationManager.TableElementConfig |
getElement(Object id,
Node item) |
static TableConfigurationManager |
getTableConfigurationManager(String filePath,
boolean create)
This method is called from
Table with file path parameter. |
static void |
setTableConfigurationManager(TableConfigurationManager manager) |
protected Hashtable renderersConfig
protected Hashtable editorsConfig
protected static TableConfigurationManager tableConfigurationManager
public TableConfigurationManager(InputStream inputStream) throws Exception
Exceptionpublic TableConfigurationManager()
public static TableConfigurationManager getTableConfigurationManager(String filePath, boolean create)
Table with file path parameter.
It is a singleton and all Table objects share the same
instance.filePath - Complete path to file.create - Condition to create or not the object when not exists.public static void setTableConfigurationManager(TableConfigurationManager manager)
protected void configure(InputStream inputStream) throws Exception
inputStream - Input streamException - When occurs an exception parsingprotected void configureRenderers(NodeList nodeList)
configure(InputStream) in order to
parse renderers.inputStream - Input streamException - When occurs an exception parsingprotected void configureEditors(NodeList nodeList)
configure(InputStream) in order to
parse editors.inputStream - Input streamException - When occurs an exception parsingprotected TableConfigurationManager.TableElementConfig getElement(Object id, Node item)
public TableCellRenderer getCellRenderer(Object id)
public TableCellEditor getCellEditor(String id, String columnName)
Copyright © 2016 Imatia Innovation S.L.. All rights reserved.