public abstract class AbstractCockpitEditorRenderer<T> extends Object implements CockpitEditorRenderer<T>
CockpitEditorRenderer interface. Implements the common mechanisms for the editors.| Modifier and Type | Field and Description |
|---|---|
static String |
HEADER_LABEL_TOOLTIP |
protected static String |
ON_ADD_EVENT |
protected static String |
ON_DELETE_EVENT |
INITIAL_EDIT_STRING| Constructor and Description |
|---|
AbstractCockpitEditorRenderer() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
extractEmbeddedEditor(String editor) |
protected String |
extractEmbeddedType(EditorContext<T> context)
Utility method providing a way for editors with editorType like Range(java.lang.Integer) to retrieve the embedded
type Integer.
|
protected Editor |
findAncestorEditor(org.zkoss.zk.ui.Component component)
Find first component in hierarchy which is an Editor
|
protected List<Editor> |
findEmbeddedEditors(org.zkoss.zk.ui.Component component)
Finds embedded editors for given component.
|
protected String |
getInitialEditString(EditorContext<T> context)
Retrieves the
CockpitEditorRenderer.INITIAL_EDIT_STRING field from the editor parameters. |
protected String |
getL10nDecorator(EditorContext<T> context,
String parameterKey,
String defaultFallbackL10nKey)
Retrieves the value for this Editor's label in the order: As L10n value, provided raw value, default L10n value if
nothing is specified.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrenderpublic static final String HEADER_LABEL_TOOLTIP
protected static final String ON_DELETE_EVENT
protected static final String ON_ADD_EVENT
protected String getInitialEditString(EditorContext<T> context)
CockpitEditorRenderer.INITIAL_EDIT_STRING field from the editor parameters.context - contains various parametersprotected String extractEmbeddedType(EditorContext<T> context)
context - to extract the editor type fromprotected String getL10nDecorator(EditorContext<T> context, String parameterKey, String defaultFallbackL10nKey)
context - Contains various parametersparameterKey - A parameter name to which an L10n key is assigned.defaultFallbackL10nKey - An L10n key's value to display when no key is provided as a custom attribute.protected Editor findAncestorEditor(org.zkoss.zk.ui.Component component)
component - to lookup first nested editorprotected List<Editor> findEmbeddedEditors(org.zkoss.zk.ui.Component component)
Editor then method will
seek embedded editors in ancestor editor findAncestorEditor(Component) of the component.component - to look up embedded editors.Copyright © 2018. All rights reserved.