Package com.hybris.cockpitng.actions
Class LogoAction
- java.lang.Object
-
- com.hybris.cockpitng.actions.impl.DefaultActionRenderer<java.lang.Object,java.lang.Object>
-
- com.hybris.cockpitng.actions.LogoAction
-
- All Implemented Interfaces:
CockpitAction<java.lang.Object,java.lang.Object>,CockpitActionRenderer<java.lang.Object,java.lang.Object>
public class LogoAction extends DefaultActionRenderer<java.lang.Object,java.lang.Object> implements CockpitAction<java.lang.Object,java.lang.Object>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.hybris.cockpitng.actions.impl.DefaultActionRenderer
DefaultActionRenderer.DefaultActionRendererEventListener<T extends org.zkoss.zk.ui.event.Event>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_HOVER_IMAGE_URLstatic java.lang.StringDEFAULT_HYPERLINKstatic java.lang.StringDEFAULT_HYPERLINK_HYBRIS_COMDeprecated, for removal: This API element is subject to removal in a future version.since 1905static java.lang.StringDEFAULT_IMAGE_URLstatic java.lang.StringDEFAULT_LOGO_BUTTON_S_CLASSstatic java.lang.StringDEFAULT_TARGET_BLANKstatic java.lang.StringPARAM_BUTTON_SCLASSstatic java.lang.StringPARAM_HOVER_IMAGE_URLstatic java.lang.StringPARAM_HYPERLINKstatic java.lang.StringPARAM_IMAGE_URLstatic java.lang.StringPARAM_TARGET-
Fields inherited from class com.hybris.cockpitng.actions.impl.DefaultActionRenderer
LABEL_CONTAINER_SCLASS, tooltipText
-
-
Constructor Summary
Constructors Constructor Description LogoAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanPerform(ActionContext<java.lang.Object> ctx)Returns true if the action can be performed for the given context, false otherwise.java.lang.StringgetConfirmationMessage(ActionContext<java.lang.Object> ctx)Returns the confirmation message to be shown to the user in the confirmation dialog if confirmation is needed (seeCockpitAction.needsConfirmation(ActionContext)).booleanneedsConfirmation(ActionContext<java.lang.Object> ctx)Returns true if the action should be confirmed by user before being performed, false otherwise.ActionResult<java.lang.Object>perform(ActionContext<java.lang.Object> ctx)Performs the action.voidrender(org.zkoss.zk.ui.Component parent, CockpitAction<java.lang.Object,java.lang.Object> action, ActionContext<java.lang.Object> context, boolean updateMode, ActionListener<java.lang.Object> listener)Render the logo button.-
Methods inherited from class com.hybris.cockpitng.actions.impl.DefaultActionRenderer
addEventListener, addKeyboardSupport, adjustUri, checkDataCompatibleWithDefinedInput, createEventListener, createYTestId, extractIconDisabledUri, extractIconHoverUri, extractIconUri, extractKeyEvent, findActionComponent, findGroupComponent, findParentComponent, getActionBodySclass, getIconHoverUri, getIconUri, getKeyboardSupportService, getLocalizedName, getOrCreateContainer, getOrCreateIcon, getOrCreateIcon, getOrCreateLabel, getOrCreateLabel, getTooltipText, getToolTipWithCtrlKeysText, loadFromParentModel, perform, performWithConfirmationCheck, registerHoverEventsOnContainer, removeEventListeners, removeEventListeners, removeIcon, removeLabel, setTooltipText, storeInParentModel, triggerFromKeyEvent
-
-
-
-
Field Detail
-
DEFAULT_HYPERLINK
public static final java.lang.String DEFAULT_HYPERLINK
- See Also:
- Constant Field Values
-
DEFAULT_HYPERLINK_HYBRIS_COM
@Deprecated(since="1905", forRemoval=true) public static final java.lang.String DEFAULT_HYPERLINK_HYBRIS_COMDeprecated, for removal: This API element is subject to removal in a future version.since 1905- See Also:
DEFAULT_HYPERLINK, Constant Field Values
-
DEFAULT_TARGET_BLANK
public static final java.lang.String DEFAULT_TARGET_BLANK
- See Also:
- Constant Field Values
-
DEFAULT_LOGO_BUTTON_S_CLASS
public static final java.lang.String DEFAULT_LOGO_BUTTON_S_CLASS
- See Also:
- Constant Field Values
-
DEFAULT_IMAGE_URL
public static final java.lang.String DEFAULT_IMAGE_URL
- See Also:
- Constant Field Values
-
DEFAULT_HOVER_IMAGE_URL
public static final java.lang.String DEFAULT_HOVER_IMAGE_URL
- See Also:
- Constant Field Values
-
PARAM_IMAGE_URL
public static final java.lang.String PARAM_IMAGE_URL
- See Also:
- Constant Field Values
-
PARAM_HOVER_IMAGE_URL
public static final java.lang.String PARAM_HOVER_IMAGE_URL
- See Also:
- Constant Field Values
-
PARAM_HYPERLINK
public static final java.lang.String PARAM_HYPERLINK
- See Also:
- Constant Field Values
-
PARAM_TARGET
public static final java.lang.String PARAM_TARGET
- See Also:
- Constant Field Values
-
PARAM_BUTTON_SCLASS
public static final java.lang.String PARAM_BUTTON_SCLASS
- See Also:
- Constant Field Values
-
-
Method Detail
-
render
public void render(org.zkoss.zk.ui.Component parent, CockpitAction<java.lang.Object,java.lang.Object> action, ActionContext<java.lang.Object> context, boolean updateMode, ActionListener<java.lang.Object> listener)Render the logo button. There's a possibility to specify an imageUrl, hyperlink, target, and a buttonsclass. If you don't specify any of these parameters in the cockpit-config.xml some default-values will be set.- Specified by:
renderin interfaceCockpitActionRenderer<java.lang.Object,java.lang.Object>- Overrides:
renderin classDefaultActionRenderer<java.lang.Object,java.lang.Object>
-
perform
public ActionResult<java.lang.Object> perform(ActionContext<java.lang.Object> ctx)
Description copied from interface:CockpitActionPerforms the action.- Specified by:
performin interfaceCockpitAction<java.lang.Object,java.lang.Object>- Parameters:
ctx- context containing the data and other information- Returns:
- the action result
-
canPerform
public boolean canPerform(ActionContext<java.lang.Object> ctx)
Description copied from interface:CockpitActionReturns true if the action can be performed for the given context, false otherwise.- Specified by:
canPerformin interfaceCockpitAction<java.lang.Object,java.lang.Object>- Parameters:
ctx- context containing the data and other information- Returns:
- true if the action can be performed for the given context, false otherwise
-
needsConfirmation
public boolean needsConfirmation(ActionContext<java.lang.Object> ctx)
Description copied from interface:CockpitActionReturns true if the action should be confirmed by user before being performed, false otherwise. This is evaluated by the action renderer.- Specified by:
needsConfirmationin interfaceCockpitAction<java.lang.Object,java.lang.Object>- Parameters:
ctx- context containing the data and other information- Returns:
- true if the action should be confirmed by user before being performed, false otherwise
-
getConfirmationMessage
public java.lang.String getConfirmationMessage(ActionContext<java.lang.Object> ctx)
Description copied from interface:CockpitActionReturns the confirmation message to be shown to the user in the confirmation dialog if confirmation is needed (seeCockpitAction.needsConfirmation(ActionContext)).- Specified by:
getConfirmationMessagein interfaceCockpitAction<java.lang.Object,java.lang.Object>- Parameters:
ctx- context containing the data and other information- Returns:
- the confirmation message to be shown to the user in the confirmation dialog
- See Also:
CockpitAction.needsConfirmation(ActionContext)
-
-