|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.cell.EditorRendererRegistry
This is the central editor renderer registry for JClass containers like HiGrid and LiveTable. Both HiGrid and LiveTable use a single instance of the registry to get default editor and renderer types based on data types. The EditorRendererRegistry is somewhat under the covers in JClass. In single container instances or simple applications, you don't have to worry about it - use the container (ie LiveTable or HiGrid) API to control type-to-editor and type-to-renderer mappings. However, if you have multiple LiveTable and HiGrid instances, and you want to control default type mappings, or if you want to add your own default mappings, then use this class.
HiGrid
,
JCTable
Nested Class Summary | |
protected class |
EditorRendererRegistry.ClassCells
Inner class used to store Cell objects |
Field Summary | |
protected static com.klg.jclass.cell.EditorRendererRegistry |
centralRegistry
The central registry instance |
protected Hashtable |
classCellsTable
|
protected boolean |
isCentralRegistry
Flag indicating whether this is the central registry. |
protected com.klg.jclass.cell.EditorRendererRegistry |
parentRegistry
Pointer to parent registry. |
Constructor Summary | |
EditorRendererRegistry(com.klg.jclass.cell.EditorRendererRegistry parentRegistry)
Creates a new registry as a child of the provided registry. |
Method Summary | |
boolean |
addClass(Class cellClass,
String type,
Class editor,
Class renderer)
Adds a type-to-editor/renderer mapping to the registry. |
boolean |
addClass(Class cellClass,
String type,
com.klg.jclass.cell.JCCellEditor editor,
com.klg.jclass.cell.JCCellRenderer renderer)
Adds a type-to-editor/renderer mapping to the registry. |
boolean |
addClass(String cellClass,
String type,
String editor,
String renderer)
Adds a type-to-editor/renderer mapping to the registry. |
protected EditorRendererRegistry.ClassCells |
findClass(Class cellClass)
Look for the class in the table. |
com.klg.jclass.cell.JCCellEditor |
getCellEditorInstance(Class cellClass,
String type)
Given a data type and a modifier, retrieve an editor. |
com.klg.jclass.cell.JCCellEditor |
getCellEditorInstance(Class cellClass,
String type,
boolean useCache)
Given a data type and a modifier, retrieve an editor. |
com.klg.jclass.cell.JCCellEditor |
getCellEditorInstance(String classString,
String type)
Given a data type and a modifier, retrieve an editor. |
String |
getCellEditorString(Class cellClass,
String type)
Given a data type and a modifier, gets the name of the associated cell editor |
String |
getCellEditorString(String classString,
String type)
Given a data type and a modifier, gets the name of the associated cell editor. |
com.klg.jclass.cell.JCCellRenderer |
getCellRendererInstance(Class cellClass,
String type)
Given a data type and a modifier, retrieve a renderer. |
com.klg.jclass.cell.JCCellRenderer |
getCellRendererInstance(Class cellClass,
String type,
boolean useCache)
Given a data type and a modifier, retrieve a renderer. |
com.klg.jclass.cell.JCCellRenderer |
getCellRendererInstance(String classString,
String type)
Given a data type and a modifier, retrieve a renderer. |
String |
getCellRendererString(Class cellClass,
String type)
Given a data type and a modifier, gets the name of the associated cell renderer |
String |
getCellRendererString(String classString,
String type)
Given a data type and a modifier, gets the name of the associated cell renderer |
static com.klg.jclass.cell.EditorRendererRegistry |
getCentralRegistry()
Retrieves the central registry for use. |
protected void |
initDefaultTable()
Initializes the default mappings. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static com.klg.jclass.cell.EditorRendererRegistry centralRegistry
protected com.klg.jclass.cell.EditorRendererRegistry parentRegistry
protected boolean isCentralRegistry
protected Hashtable classCellsTable
Constructor Detail |
public EditorRendererRegistry(com.klg.jclass.cell.EditorRendererRegistry parentRegistry)
parentRegistry
- parent registry to use for additional
mappings. Can be null.Method Detail |
public static com.klg.jclass.cell.EditorRendererRegistry getCentralRegistry()
protected void initDefaultTable()
public boolean addClass(Class cellClass, String type, com.klg.jclass.cell.JCCellEditor editor, com.klg.jclass.cell.JCCellRenderer renderer)
cellClass
- Class instance representing the cell data type.type
- modifier for mapping.editor
- editor instance to use for editing specified cell data type.renderer
- renderer instance to use for rendering cells containing
specified data type.
public boolean addClass(Class cellClass, String type, Class editor, Class renderer)
cellClass
- Class instance representing the cell data type.type
- modifier for mapping.editor
- editor Class to use for editing specified cell data type.renderer
- renderer Class to use for rendering cells containing
specified data type.
public boolean addClass(String cellClass, String type, String editor, String renderer)
cellClass
- String representing the cell data type.type
- modifier for mapping.editor
- editor class string to use for editing specified cell
data type.renderer
- renderer class string to use for rendering cells containing
specified data type.
public com.klg.jclass.cell.JCCellEditor getCellEditorInstance(Class cellClass, String type)
cellClass
- Class instance representing the cell data type.type
- modifier for mapping.
public com.klg.jclass.cell.JCCellEditor getCellEditorInstance(Class cellClass, String type, boolean useCache)
cellClass
- Class instance representing the cell data type.type
- modifier for mapping.useCache
-
public com.klg.jclass.cell.JCCellEditor getCellEditorInstance(String classString, String type)
classString
- String representing the cell data type.type
- Modifier for mapping.
public com.klg.jclass.cell.JCCellRenderer getCellRendererInstance(Class cellClass, String type)
cellClass
- Class instance representing the cell data type.type
- Modifier for mapping.
public com.klg.jclass.cell.JCCellRenderer getCellRendererInstance(Class cellClass, String type, boolean useCache)
cellClass
- Class instance representing the cell data type.type
- Modifier for mapping.useCache
-
public com.klg.jclass.cell.JCCellRenderer getCellRendererInstance(String classString, String type)
classString
- String representing the cell data type.type
- Modifier for mapping.
public String getCellEditorString(Class cellClass, String type)
cellClass
- Class instance representing the cell data type.type
- Modifier for mapping.
public String getCellEditorString(String classString, String type)
classString
- String representing the cell data type.type
- Modifier for mapping.
public String getCellRendererString(Class cellClass, String type)
cellClass
- Class instance representing the cell data type.type
- Modifier for mapping.
public String getCellRendererString(String classString, String type)
classString
- String representing the cell data type.type
- modifier for mapping.
protected EditorRendererRegistry.ClassCells findClass(Class cellClass)
cellClass
-
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |