public class DefaultActionRenderer<I,O> extends Object implements CockpitActionRenderer<I,O>
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
DefaultActionRenderer.DefaultActionRendererEventListener<T extends org.zkoss.zk.ui.event.Event>
Marker interface for events created by action renderer.
|
| Modifier and Type | Field and Description |
|---|---|
protected String |
tooltipText |
| Constructor and Description |
|---|
DefaultActionRenderer() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addEventListener(org.zkoss.zk.ui.Component container,
org.zkoss.zk.ui.event.EventListener<? extends org.zkoss.zk.ui.event.Event> eventListener) |
protected void |
addKeyboardSupport(org.zkoss.zk.ui.Component component,
CockpitAction<I,O> cockpitAction,
ActionContext<I> ctx,
org.zkoss.zk.ui.event.EventListener onClickEventListener) |
protected String |
adjustUri(ActionContext<I> context,
String uri) |
protected boolean |
checkDataCompatibleWithDefinedInput(CockpitAction<I,O> action,
ActionContext<I> context) |
protected org.zkoss.zk.ui.event.EventListener<? extends org.zkoss.zk.ui.event.Event> |
createEventListener(CockpitAction<I,O> action,
ActionContext<I> context,
ActionListener<O> listener) |
protected String |
createYTestId(ActionContext<I> context)
Creates a default ytestid
|
protected String |
extractIconDisabledUri(ActionContext<I> context) |
protected String |
extractIconHoverUri(ActionContext<I> context) |
protected String |
extractIconUri(ActionContext<I> context) |
protected org.zkoss.zk.ui.event.KeyEvent |
extractKeyEvent(org.zkoss.zk.ui.event.Event event)
Extracts KeyEvent from given event.
|
protected org.zkoss.zk.ui.HtmlBasedComponent |
findActionComponent(org.zkoss.zk.ui.Component component) |
protected org.zkoss.zk.ui.HtmlBasedComponent |
findGroupComponent(org.zkoss.zk.ui.Component component) |
protected <C extends org.zkoss.zk.ui.Component> |
findParentComponent(org.zkoss.zk.ui.Component component,
Class<C> clazz) |
protected String |
getActionBodySclass(ActionContext<I> context)
Creates a default sclass
|
protected String |
getIconHoverUri(ActionContext<I> context,
boolean canPerform) |
protected String |
getIconUri(ActionContext<I> context,
boolean canPerform) |
KeyboardSupportService |
getKeyboardSupportService() |
protected String |
getLocalizedName(ActionContext<?> context) |
protected org.zkoss.zk.ui.HtmlBasedComponent |
getOrCreateContainer(org.zkoss.zk.ui.Component parent) |
protected org.zkoss.zul.Image |
getOrCreateIcon(org.zkoss.zk.ui.Component container) |
protected org.zkoss.zul.Label |
getOrCreateLabel(org.zkoss.zk.ui.Component container) |
String |
getTooltipText() |
protected String |
getToolTipWithCtrlKeysText(String toolTipToDecorate,
ActionContext<I> ctx) |
protected <T> T |
loadFromParentModel(ActionContext<?> context,
String key,
Class<T> _clazz) |
protected void |
perform(CockpitAction<I,O> action,
ActionContext<I> context,
ActionListener<O> listener) |
protected void |
performWithConfirmationCheck(CockpitAction<I,O> action,
ActionContext<I> context,
ActionListener<O> listener) |
protected void |
registerHoverEventsOnContainer(org.zkoss.zk.ui.HtmlBasedComponent container,
org.zkoss.zul.Image icon,
boolean showIcon,
String iconUri,
String iconHoverUri) |
protected void |
removeEventListeners(org.zkoss.zk.ui.Component container,
String eventName)
Removes all even listeners of a given type from the container if they are assignable from
com.hybris.cockpitng.actions.impl.DefaultActionRenderer.DefaultActionRendererEventListener.
|
protected void |
removeEventListeners(org.zkoss.zk.ui.Component container,
String eventName,
Class type)
Removes all even listeners of a given type from the container if they are assignable from the given type.
|
protected void |
removeIcon(org.zkoss.zk.ui.Component container) |
protected void |
removeLabel(org.zkoss.zk.ui.Component container) |
void |
render(org.zkoss.zk.ui.Component parent,
CockpitAction<I,O> action,
ActionContext<I> context,
boolean updateMode,
ActionListener<O> listener) |
void |
setTooltipText(String tooltipText) |
protected void |
storeInParentModel(Object value,
ActionContext<?> context,
String key) |
protected void |
triggerFromKeyEvent(org.zkoss.zk.ui.event.KeyEvent keyEvent,
CockpitAction<I,O> cockpitAction,
ActionContext<I> ctx,
org.zkoss.zk.ui.Component container,
org.zkoss.zk.ui.event.EventListener onClickEventListener) |
protected String tooltipText
public void render(org.zkoss.zk.ui.Component parent,
CockpitAction<I,O> action,
ActionContext<I> context,
boolean updateMode,
ActionListener<O> listener)
render in interface CockpitActionRenderer<I,O>protected boolean checkDataCompatibleWithDefinedInput(CockpitAction<I,O> action, ActionContext<I> context)
public String getTooltipText()
public void setTooltipText(String tooltipText)
protected void registerHoverEventsOnContainer(org.zkoss.zk.ui.HtmlBasedComponent container,
org.zkoss.zul.Image icon,
boolean showIcon,
String iconUri,
String iconHoverUri)
protected void removeEventListeners(org.zkoss.zk.ui.Component container,
String eventName)
container - a component from which the listeners should be removedeventName - name of the event on which the listeners are registeredDefaultActionRenderer.DefaultActionRendererEventListenerprotected void removeEventListeners(org.zkoss.zk.ui.Component container,
String eventName,
Class type)
container - a component from which the listeners should be removedeventName - name of the event on which the listeners are registeredtype - type to which the target listeners should be assignableprotected String createYTestId(ActionContext<I> context)
protected String getActionBodySclass(ActionContext<I> context)
protected void perform(CockpitAction<I,O> action, ActionContext<I> context, ActionListener<O> listener)
protected void performWithConfirmationCheck(CockpitAction<I,O> action, ActionContext<I> context, ActionListener<O> listener)
protected org.zkoss.zk.ui.HtmlBasedComponent getOrCreateContainer(org.zkoss.zk.ui.Component parent)
protected org.zkoss.zul.Image getOrCreateIcon(org.zkoss.zk.ui.Component container)
protected void removeIcon(org.zkoss.zk.ui.Component container)
protected org.zkoss.zul.Label getOrCreateLabel(org.zkoss.zk.ui.Component container)
protected void removeLabel(org.zkoss.zk.ui.Component container)
protected void addKeyboardSupport(org.zkoss.zk.ui.Component component,
CockpitAction<I,O> cockpitAction,
ActionContext<I> ctx,
org.zkoss.zk.ui.event.EventListener onClickEventListener)
protected String getToolTipWithCtrlKeysText(String toolTipToDecorate, ActionContext<I> ctx)
protected org.zkoss.zk.ui.event.KeyEvent extractKeyEvent(org.zkoss.zk.ui.event.Event event)
event - event to cast.protected void triggerFromKeyEvent(org.zkoss.zk.ui.event.KeyEvent keyEvent,
CockpitAction<I,O> cockpitAction,
ActionContext<I> ctx,
org.zkoss.zk.ui.Component container,
org.zkoss.zk.ui.event.EventListener onClickEventListener)
protected org.zkoss.zk.ui.event.EventListener<? extends org.zkoss.zk.ui.event.Event> createEventListener(CockpitAction<I,O> action, ActionContext<I> context, ActionListener<O> listener)
protected void addEventListener(org.zkoss.zk.ui.Component container,
org.zkoss.zk.ui.event.EventListener<? extends org.zkoss.zk.ui.event.Event> eventListener)
protected String getIconHoverUri(ActionContext<I> context, boolean canPerform)
protected String getIconUri(ActionContext<I> context, boolean canPerform)
protected String extractIconUri(ActionContext<I> context)
protected String extractIconHoverUri(ActionContext<I> context)
protected String extractIconDisabledUri(ActionContext<I> context)
protected String adjustUri(ActionContext<I> context, String uri)
protected String getLocalizedName(ActionContext<?> context)
protected void storeInParentModel(Object value, ActionContext<?> context, String key)
protected <T> T loadFromParentModel(ActionContext<?> context, String key, Class<T> _clazz)
protected <C extends org.zkoss.zk.ui.Component> C findParentComponent(org.zkoss.zk.ui.Component component,
Class<C> clazz)
protected org.zkoss.zk.ui.HtmlBasedComponent findActionComponent(org.zkoss.zk.ui.Component component)
protected org.zkoss.zk.ui.HtmlBasedComponent findGroupComponent(org.zkoss.zk.ui.Component component)
public KeyboardSupportService getKeyboardSupportService()
Copyright © 2018. All rights reserved.