Class AbstractContentBrowser
- java.lang.Object
-
- org.zkoss.zk.ui.AbstractComponent
-
- org.zkoss.zk.ui.HtmlBasedComponent
-
- org.zkoss.zul.impl.XulElement
-
- org.zkoss.zul.Div
-
- de.hybris.platform.cockpit.components.contentbrowser.AbstractContentBrowser
-
- All Implemented Interfaces:
DesktopRemovalAwareComponent,java.io.Serializable,java.lang.Cloneable,org.zkoss.zk.ui.Component,org.zkoss.zk.ui.ext.Scope,org.zkoss.zk.ui.sys.ComponentCtrl
- Direct Known Subclasses:
AbstractContentContextBrowser,AbstractSimpleContentBrowser
public abstract class AbstractContentBrowser extends org.zkoss.zul.Div implements DesktopRemovalAwareComponent
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classAbstractContentBrowser.BrowserFocusDiv
-
Field Summary
Fields Modifier and Type Field Description protected AbstractBrowserComponentcaptionComponentstatic java.lang.StringCONTENT_BROWSER_CHANGEprotected AbstractBrowserComponentcontextAreaComponentstatic java.lang.StringDEFAULT_OVERLAY_SCLASSstatic java.lang.StringDEFAULT_SCLASSstatic java.lang.StringFOCUSED_OVERLAY_SCLASSstatic java.lang.StringFOCUSED_SCLASSprotected booleaninitializedIndicates whether this content browser has been initialized or not.protected AbstractBrowserComponentmainAreaComponentprotected org.zkoss.zul.DivstatusBarprotected AbstractBrowserComponenttoolbarComponent
-
Constructor Summary
Constructors Constructor Description AbstractContentBrowser()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidcleanup()voiddesktopRemoved(org.zkoss.zk.ui.Desktop desktop)voiddetach()ActionColumnConfigurationgetActionConfiguration()AbstractBrowserComponentgetCaptionComponent()protected org.zkoss.zk.ui.HtmlBasedComponentgetContentBrowserComponent()AbstractBrowserComponentgetContextAreaComponent()protected DragAndDropWrappergetDDWrapper()protected org.zkoss.zk.ui.HtmlBasedComponentgetFocusComponent()AbstractBrowserComponentgetMainAreaComponent()BrowserModelgetModel()AbstractBrowserComponentgetToolbarComponent()protected abstract booleaninitialize()Initializes this content browser i.e.booleanisActiveWhenUnfocused()booleanisInitialized()abstract voidresize()voidsetActiveWhenUnfocused(boolean activeWhenUnfocused)voidsetContentBrowserComponent(org.zkoss.zk.ui.HtmlBasedComponent contentBrowserComponent)voidsetFocus(boolean focus)voidsetFocusComponent(org.zkoss.zk.ui.HtmlBasedComponent focusComponent)voidsetModel(BrowserModel model)voidsetParent(org.zkoss.zk.ui.Component parent)voidsetRealSclass(java.lang.String sclass)voidsetSclass(java.lang.String sclass)abstract booleanupdate()Updates this content browser i.e.abstract voidupdateActivation()This method makes it possible to force the view to get the currently active item(s) from its model, thus synchronizing itself.abstract voidupdateActiveItems()This method makes it possible to force the view to re-render the items which are considered "active".abstract voidupdateCaption()abstract voidupdateContextArea()voidupdateItem(TypedObject item, java.util.Set<PropertyDescriptor> modifiedProperties)abstract voidupdateItem(TypedObject item, java.util.Set<PropertyDescriptor> modifiedProperties, java.lang.Object reason)This method makes it possible to force the view to re-render a list of items.abstract voidupdateMainArea()abstract voidupdateSelectedItems()This method makes it possible to force the view to re-render the items which are considered "selected".voidupdateStatusBar()abstract voidupdateToolbar()abstract voidupdateViewMode()-
Methods inherited from class org.zkoss.zul.impl.XulElement
clone, getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributes
-
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
focus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZindex, getZIndex, service, setAction, setClass, setDraggable, setDroppable, setHeight, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly
-
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, insertBefore, invalidate, isChildable, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
-
-
-
-
Field Detail
-
CONTENT_BROWSER_CHANGE
public static final java.lang.String CONTENT_BROWSER_CHANGE
- See Also:
- Constant Field Values
-
DEFAULT_SCLASS
public static final java.lang.String DEFAULT_SCLASS
- See Also:
- Constant Field Values
-
FOCUSED_SCLASS
public static final java.lang.String FOCUSED_SCLASS
- See Also:
- Constant Field Values
-
DEFAULT_OVERLAY_SCLASS
public static final java.lang.String DEFAULT_OVERLAY_SCLASS
- See Also:
- Constant Field Values
-
FOCUSED_OVERLAY_SCLASS
public static final java.lang.String FOCUSED_OVERLAY_SCLASS
- See Also:
- Constant Field Values
-
captionComponent
protected transient AbstractBrowserComponent captionComponent
-
toolbarComponent
protected transient AbstractBrowserComponent toolbarComponent
-
mainAreaComponent
protected transient AbstractBrowserComponent mainAreaComponent
-
contextAreaComponent
protected transient AbstractBrowserComponent contextAreaComponent
-
statusBar
protected transient org.zkoss.zul.Div statusBar
-
initialized
protected boolean initialized
Indicates whether this content browser has been initialized or not.
-
-
Method Detail
-
setFocus
public void setFocus(boolean focus)
- Overrides:
setFocusin classorg.zkoss.zk.ui.HtmlBasedComponent
-
getDDWrapper
protected DragAndDropWrapper getDDWrapper()
-
setSclass
public void setSclass(java.lang.String sclass)
- Overrides:
setSclassin classorg.zkoss.zk.ui.HtmlBasedComponent
-
setRealSclass
public void setRealSclass(java.lang.String sclass)
-
setFocusComponent
public void setFocusComponent(org.zkoss.zk.ui.HtmlBasedComponent focusComponent)
-
getFocusComponent
protected org.zkoss.zk.ui.HtmlBasedComponent getFocusComponent()
-
setContentBrowserComponent
public void setContentBrowserComponent(org.zkoss.zk.ui.HtmlBasedComponent contentBrowserComponent)
-
getContentBrowserComponent
protected org.zkoss.zk.ui.HtmlBasedComponent getContentBrowserComponent()
-
getModel
public BrowserModel getModel()
-
setModel
public void setModel(BrowserModel model)
-
updateActiveItems
public abstract void updateActiveItems()
This method makes it possible to force the view to re-render the items which are considered "active". Note: This will not affect which items are considered active or not.- See Also:
updateActivation()
-
updateSelectedItems
public abstract void updateSelectedItems()
This method makes it possible to force the view to re-render the items which are considered "selected".
-
updateItem
public abstract void updateItem(TypedObject item, java.util.Set<PropertyDescriptor> modifiedProperties, java.lang.Object reason)
This method makes it possible to force the view to re-render a list of items.- Parameters:
item- the item which should be re-renderedmodifiedProperties- set of modified propertiesreason- the object that causes the update, can be null
-
updateItem
public void updateItem(TypedObject item, java.util.Set<PropertyDescriptor> modifiedProperties)
-
updateActivation
public abstract void updateActivation()
This method makes it possible to force the view to get the currently active item(s) from its model, thus synchronizing itself.- See Also:
updateActiveItems()
-
updateMainArea
public abstract void updateMainArea()
-
updateViewMode
public abstract void updateViewMode()
-
updateContextArea
public abstract void updateContextArea()
-
updateCaption
public abstract void updateCaption()
-
updateToolbar
public abstract void updateToolbar()
-
update
public abstract boolean update()
Updates this content browser i.e. synchronizes its view width the underlying model.- Returns:
trueif this browser was successfully updated,falseotherwise
-
initialize
protected abstract boolean initialize()
Initializes this content browser i.e. creates all required components, adds event listeners etc. Note: This method is automatically called when amodelis set. Implementation note: Do not forget to set theinitializedflag before returning.- Returns:
trueif initialization was successful,falseotherwise- See Also:
setModel(BrowserModel)
-
resize
public abstract void resize()
-
updateStatusBar
public void updateStatusBar()
-
setActiveWhenUnfocused
public void setActiveWhenUnfocused(boolean activeWhenUnfocused)
- Parameters:
activeWhenUnfocused- the activeWhenUnfocused to set
-
isActiveWhenUnfocused
public boolean isActiveWhenUnfocused()
- Returns:
- the activeWhenUnfocused
-
isInitialized
public boolean isInitialized()
-
getCaptionComponent
public AbstractBrowserComponent getCaptionComponent()
-
getToolbarComponent
public AbstractBrowserComponent getToolbarComponent()
-
getMainAreaComponent
public AbstractBrowserComponent getMainAreaComponent()
-
getContextAreaComponent
public AbstractBrowserComponent getContextAreaComponent()
-
getActionConfiguration
public ActionColumnConfiguration getActionConfiguration()
-
setParent
public void setParent(org.zkoss.zk.ui.Component parent)
- Specified by:
setParentin interfaceorg.zkoss.zk.ui.Component- Overrides:
setParentin classorg.zkoss.zk.ui.AbstractComponent
-
detach
public void detach()
- Specified by:
detachin interfaceorg.zkoss.zk.ui.Component- Overrides:
detachin classorg.zkoss.zk.ui.AbstractComponent
-
desktopRemoved
public void desktopRemoved(org.zkoss.zk.ui.Desktop desktop)
- Specified by:
desktopRemovedin interfaceDesktopRemovalAwareComponent
-
cleanup
protected void cleanup()
-
-