Class DefaultWidgetCaptionWrapper
- java.lang.Object
-
- com.hybris.cockpitng.renderers.header.DefaultWidgetCaptionWrapper
-
- All Implemented Interfaces:
WidgetCaptionWrapper
public class DefaultWidgetCaptionWrapper extends java.lang.Object implements WidgetCaptionWrapper
Default implementation ofWidgetCaptionWrapper.
-
-
Field Summary
-
Fields inherited from interface com.hybris.cockpitng.renderers.header.WidgetCaptionWrapper
CONTROL_CLOSE, CONTROL_COLLAPSE, CONTROL_MAXIMIZE, CONTROL_MINIMIZE, ON_CONTROL_STATE_CHANGE, ON_WIDGET_CLOSE, ON_WIDGET_COLLAPSE, ON_WIDGET_FOCUS, ON_WIDGET_MAXIMIZE, ON_WIDGET_MINIMIZE, ON_WIDGET_SIZE
-
-
Constructor Summary
Constructors Constructor Description DefaultWidgetCaptionWrapper(WidgetCaptionEventListener containerListener, boolean focused, boolean minimized, boolean maximized, boolean collapsed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(java.lang.String eventName, WidgetCaptionEventListener eventListener)voidclose()Closes the container (this usually means that the related widget instance is removed).intgetHiddenContainerControls()voidhideContainerControls(int controls)Call this in your renderer method to hide standard controls from the container, e.g.booleanisClosable()Returns true if the current state of the container allows closing.booleanisCollapsed()Returns true if the caption indicates that the container is collapsed.booleanisCollapsible()Returns true if the current state of the container allows collapsing.booleanisFocused()Returns true if the caption indicates that the container is focused/selected.booleanisMaximizable()Returns true if the current state of the container allows maximizing.booleanisMaximized()Returns true if the caption indicates that the container is maximized.booleanisMinimizable()Returns true if the current state of the container allows minimizing.booleanisMinimized()Returns true if the caption indicates that the container is minimized.protected voidnotifyContainerListener(java.lang.String eventName)voidsendEvent(java.lang.String eventName, boolean state)voidsetClosable(boolean closable)voidsetCollapsed(boolean collapsed)Expands or collapses the container according to the argument.voidsetCollapsible(boolean collapsible)voidsetFocused(boolean focused)Sets the focus to (or selects) the current widget within it's widgetchildren container.voidsetMaximizable(boolean maximizable)voidsetMaximized(boolean maximized)Maximizes/unmaximizes the container according to the argument.voidsetMinimizable(boolean minimizable)voidsetMinimized(boolean minimized)Minimizes/unminimizes the container according to the argument.
-
-
-
Constructor Detail
-
DefaultWidgetCaptionWrapper
public DefaultWidgetCaptionWrapper(WidgetCaptionEventListener containerListener, boolean focused, boolean minimized, boolean maximized, boolean collapsed)
-
-
Method Detail
-
hideContainerControls
public void hideContainerControls(int controls)
Description copied from interface:WidgetCaptionWrapperCall this in your renderer method to hide standard controls from the container, e.g. if you want to render buttons to control minimizing and maximizing of the widget and thus don't need the minimize/maximize buttons of a window/panel/... you could usehideContainerControls(WidgetCaptionWrapper.CONTROL_MINIMIZE | WidgetCaptionWrapper.CONTROL_MAXIMIZE)
- Specified by:
hideContainerControlsin interfaceWidgetCaptionWrapper
-
getHiddenContainerControls
public int getHiddenContainerControls()
-
sendEvent
public void sendEvent(java.lang.String eventName, boolean state)
-
addListener
public void addListener(java.lang.String eventName, WidgetCaptionEventListener eventListener)- Specified by:
addListenerin interfaceWidgetCaptionWrappereventListener- a listener to be notified when an operation happens
-
isMinimized
public boolean isMinimized()
Description copied from interface:WidgetCaptionWrapperReturns true if the caption indicates that the container is minimized.- Specified by:
isMinimizedin interfaceWidgetCaptionWrapper
-
isMaximized
public boolean isMaximized()
Description copied from interface:WidgetCaptionWrapperReturns true if the caption indicates that the container is maximized.- Specified by:
isMaximizedin interfaceWidgetCaptionWrapper
-
isFocused
public boolean isFocused()
Description copied from interface:WidgetCaptionWrapperReturns true if the caption indicates that the container is focused/selected.- Specified by:
isFocusedin interfaceWidgetCaptionWrapper
-
isCollapsed
public boolean isCollapsed()
Description copied from interface:WidgetCaptionWrapperReturns true if the caption indicates that the container is collapsed.- Specified by:
isCollapsedin interfaceWidgetCaptionWrapper
-
notifyContainerListener
protected void notifyContainerListener(java.lang.String eventName)
-
setMinimized
public void setMinimized(boolean minimized)
Description copied from interface:WidgetCaptionWrapperMinimizes/unminimizes the container according to the argument.- Specified by:
setMinimizedin interfaceWidgetCaptionWrapper
-
setMaximized
public void setMaximized(boolean maximized)
Description copied from interface:WidgetCaptionWrapperMaximizes/unmaximizes the container according to the argument.- Specified by:
setMaximizedin interfaceWidgetCaptionWrapper
-
setFocused
public void setFocused(boolean focused)
Description copied from interface:WidgetCaptionWrapperSets the focus to (or selects) the current widget within it's widgetchildren container.- Specified by:
setFocusedin interfaceWidgetCaptionWrapper
-
setCollapsed
public void setCollapsed(boolean collapsed)
Description copied from interface:WidgetCaptionWrapperExpands or collapses the container according to the argument.- Specified by:
setCollapsedin interfaceWidgetCaptionWrapper
-
close
public void close()
Description copied from interface:WidgetCaptionWrapperCloses the container (this usually means that the related widget instance is removed).- Specified by:
closein interfaceWidgetCaptionWrapper
-
isMaximizable
public boolean isMaximizable()
Description copied from interface:WidgetCaptionWrapperReturns true if the current state of the container allows maximizing.- Specified by:
isMaximizablein interfaceWidgetCaptionWrapper
-
isMinimizable
public boolean isMinimizable()
Description copied from interface:WidgetCaptionWrapperReturns true if the current state of the container allows minimizing.- Specified by:
isMinimizablein interfaceWidgetCaptionWrapper
-
isClosable
public boolean isClosable()
Description copied from interface:WidgetCaptionWrapperReturns true if the current state of the container allows closing.- Specified by:
isClosablein interfaceWidgetCaptionWrapper
-
isCollapsible
public boolean isCollapsible()
Description copied from interface:WidgetCaptionWrapperReturns true if the current state of the container allows collapsing.- Specified by:
isCollapsiblein interfaceWidgetCaptionWrapper
-
setMaximizable
public void setMaximizable(boolean maximizable)
-
setMinimizable
public void setMinimizable(boolean minimizable)
-
setClosable
public void setClosable(boolean closable)
-
setCollapsible
public void setCollapsible(boolean collapsible)
-
-