|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.grid.CellRendererManager
public class CellRendererManager
A global object that can register cell renderer with a type and a EditorContext.
Nested Class Summary | |
---|---|
static interface |
CellRendererManager.CellRendererCustomizer
A cell editor customizer interface. |
Constructor Summary | |
---|---|
CellRendererManager()
|
Method Summary | |
---|---|
static void |
addCellRendererCustomizer(CellRendererManager.CellRendererCustomizer CellRendererCustomizer)
Adds a cell editor customizer. |
static void |
addRegistrationListener(RegistrationListener l)
Adds a listener to the list that's notified each time a change to the manager occurs. |
static void |
clear()
|
static CellRendererManager.CellRendererCustomizer[] |
getCellRendererCustomizers()
Gets all the cell editor customizers in an array. |
static EditorContext[] |
getEditorContexts(Class<?> clazz)
Gets the available EditorContexts registered with the class. |
static RegistrationListener[] |
getRegistrationListeners()
Returns an array of all the registration listeners registered on this manager. |
static TableCellRenderer |
getRenderer(Class<?> clazz)
Gets the registered renderer using default context. |
static TableCellRenderer |
getRenderer(Class<?> clazz,
EditorContext context)
Gets the registered renderer. |
static void |
initDefaultRenderer()
Initials the default renderers. |
static boolean |
isAutoInit()
Checks the value of autoInit. |
static void |
registerRenderer(Class<?> clazz,
TableCellRenderer renderer)
Registers a renderer with a class and default context. |
static void |
registerRenderer(Class<?> clazz,
TableCellRenderer renderer,
EditorContext context)
Registers a renderer with a class and a context. |
static void |
removeCellRendererCustomizer(CellRendererManager.CellRendererCustomizer CellRendererCustomizer)
Removes a cell editor Customizer that was added before. |
static void |
removeRegistrationListener(RegistrationListener l)
Removes a listener from the list that's notified each time a change to the manager occurs. |
static void |
resetInit()
If initDefaultRenderer() is called once, calling it again will have no effect because an internal flag
is set. |
static void |
setAutoInit(boolean autoInit)
Sets autoInit to true or false. |
static void |
unregisterAllRenderers()
Unregisters all the renderers which registered before. |
static void |
unregisterAllRenderers(Class<?> clazz)
Unregisters all renderers which register with the class. |
static void |
unregisterRenderer(Class<?> clazz)
Unregisters the renderer which registers with the class and the default context. |
static void |
unregisterRenderer(Class<?> clazz,
EditorContext context)
Unregisters the renderer which registers with the class and the context. |
static void |
updateUI()
Updates the UI of the registered cell editors when LookAndFeel changed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CellRendererManager()
Method Detail |
---|
public static void registerRenderer(Class<?> clazz, TableCellRenderer renderer)
clazz
- the typerenderer
- the rendererpublic static void registerRenderer(Class<?> clazz, TableCellRenderer renderer, EditorContext context)
clazz
- the typerenderer
- the renderercontext
- the editor contextpublic static void unregisterRenderer(Class<?> clazz, EditorContext context)
clazz
- the type of which the cell renderer will be registered.context
- the editor context.public static void unregisterRenderer(Class<?> clazz)
clazz
- the type of which the cell renderer will be unregistered.public static void unregisterAllRenderers(Class<?> clazz)
clazz
- the type of which the cell renderers will be unregistered.public static void unregisterAllRenderers()
public static TableCellRenderer getRenderer(Class<?> clazz, EditorContext context)
clazz
- the typecontext
- the editor context.
public static TableCellRenderer getRenderer(Class<?> clazz)
clazz
- the type
public static void updateUI()
public static boolean isAutoInit()
setAutoInit(boolean)
public static void setAutoInit(boolean autoInit)
initDefaultRenderer()
will be called if it has never be called. By default, autoInit is
true.
This might affect the behavior if users provide their own renderers and want to overwrite default renderers. In
this case, instead of depending on autoInit to initialize default renderers, you should call initDefaultRenderer()
first, then call registerRenderer to add your own renderers.
autoInit
- true or false.public static void addRegistrationListener(RegistrationListener l)
l
- the RegistrationListenerpublic static void removeRegistrationListener(RegistrationListener l)
l
- the RegistrationListenerpublic static RegistrationListener[] getRegistrationListeners()
RegistrationListener
s or an empty array if no registration
listeners are currently registeredaddRegistrationListener(com.jidesoft.utils.RegistrationListener)
,
removeRegistrationListener(com.jidesoft.utils.RegistrationListener)
public static CellRendererManager.CellRendererCustomizer[] getCellRendererCustomizers()
public static void addCellRendererCustomizer(CellRendererManager.CellRendererCustomizer CellRendererCustomizer)
CellRendererManager.addCellRendererCustomizer(new CellRendererManager.CellRendererCustomizer(){
public void customize(TableCellRenderer cellRenderer) {
if(cellRenderer instanceof AbstractComboBox) {
((AbstractComboBox) cellRenderer).setButtonVisible(true);
}
}
});
CellRendererCustomizer
- the cell editor customer to be added.public static void removeCellRendererCustomizer(CellRendererManager.CellRendererCustomizer CellRendererCustomizer)
CellRendererCustomizer
- the cell editor customer to be removed.public static EditorContext[] getEditorContexts(Class<?> clazz)
clazz
- the class.
public static void initDefaultRenderer()
public static void resetInit()
initDefaultRenderer()
is called once, calling it again will have no effect because an internal flag
is set. This method will reset the internal flag so that you can call initDefaultRenderer()
in case you
unregister all renderers using unregisterAllRenderers()
.
public static void clear()
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |