Class Drawer
- java.lang.Object
-
- org.zkoss.zk.ui.AbstractComponent
-
- org.zkoss.zk.ui.HtmlBasedComponent
-
- org.zkoss.zul.impl.XulElement
-
- org.zkoss.zkmax.zul.Drawer
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,Component
,Scope
,ComponentCtrl
public class Drawer extends XulElement
A drawer.Available in ZK EE.
Only support browsers that support Flex and CSS Transitions. (IE10+, Edge, Chrome, Firefox, Safari)
- Since:
- 9.0.0
- Author:
- rudyhuang
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent
HtmlBasedComponent.ExtraCtrl
-
Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent
AbstractComponent.Children, AbstractComponent.ForwardInfo, AbstractComponent.TargetInfo
-
-
Field Summary
-
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
_zclass
-
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
-
Fields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl
AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, AFTER_PARENT_CHANGED, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE
-
-
Constructor Summary
Constructors Constructor Description Drawer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes the drawer.java.lang.String
getPosition()
Returns the position of this drawer.java.lang.String
getTitle()
Returns the title of this drawer.java.lang.String
getZclass()
Returns the ZK Cascading Style class for this component.boolean
isAutodrop()
Returns whether it is opened automatically when the mouse cursor is near the page edge.boolean
isClosable()
Returns whether it is closeable by user (a button).boolean
isMask()
Returns whether it is masked when opened.void
open()
Opens the drawer.protected void
renderProperties(ContentRenderer renderer)
Renders the content of this component, excluding the enclosing tags and children.void
service(AuRequest request, boolean everError)
Processes an AU request.void
setAutodrop(boolean autodrop)
Sets whether it is opened automatically when the mouse cursor is near the page edge.void
setClosable(boolean closable)
Sets whether it is closeable by user (a button).void
setHflex(java.lang.String flex)
Sets horizontal flex hint of this component.void
setMask(boolean mask)
Sets whether it is masked when opened.void
setPosition(java.lang.String position)
Sets the position of this drawer.void
setTitle(java.lang.String title)
Sets the title of this drawer.void
setVflex(java.lang.String flex)
Sets vertical flexibility hint of this component.-
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
addSclass, evalCSSFlex, focus, getAction, getClientAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZindex, getZIndex, removeSclass, removeSclass, setAction, setClass, setClientAction, setDraggable, setDroppable, setFocus, setHeight, setHeight0, setHeightDirectly, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly
-
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, destroyIndexCacheMap, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, disableHostChanged, enableBindingAnnotation, enableHostChanged, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, 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, getForwards, getId, getIndexCacheMap, getLastChild, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, initIndexCacheMap, insertBefore, invalidate, isChildable, isDisabledHostChanged, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onParentChanged, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, renderPropertiesOnly, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
-
-
-
-
Method Detail
-
getTitle
public java.lang.String getTitle()
Returns the title of this drawer.null
means no title.Default: null.
-
setTitle
public void setTitle(java.lang.String title)
Sets the title of this drawer.null
means no title.- Parameters:
title
- the title.
-
getPosition
public java.lang.String getPosition()
Returns the position of this drawer. Valid values are "left", "right", "top" and "bottom".Default: right.
-
setPosition
public void setPosition(java.lang.String position) throws WrongValueException
Sets the position of this drawer. Valid values are "left", "right", "top" and "bottom".- Parameters:
position
- the position of this drawer.- Throws:
WrongValueException
- if value is not valid.
-
isMask
public boolean isMask()
Returns whether it is masked when opened.Default: true.
-
setMask
public void setMask(boolean mask)
Sets whether it is masked when opened.- Parameters:
mask
- mask enabled?
-
isClosable
public boolean isClosable()
Returns whether it is closeable by user (a button).Default: false.
-
setClosable
public void setClosable(boolean closable)
Sets whether it is closeable by user (a button).- Parameters:
closable
- closable enabled?
-
isAutodrop
public boolean isAutodrop()
Returns whether it is opened automatically when the mouse cursor is near the page edge.Default: false.
-
setAutodrop
public void setAutodrop(boolean autodrop)
Sets whether it is opened automatically when the mouse cursor is near the page edge.- Parameters:
autodrop
- autodrop enabled?
-
renderProperties
protected void renderProperties(ContentRenderer renderer) throws java.io.IOException
Description copied from class:HtmlBasedComponent
Renders the content of this component, excluding the enclosing tags and children.- Overrides:
renderProperties
in classXulElement
- Throws:
java.io.IOException
-
service
public void service(AuRequest request, boolean everError)
Description copied from class:HtmlBasedComponent
Processes an AU request.Default: it handles onClick, onDoubleClick, onRightClick onMove, onSize, onZIndex.
- Specified by:
service
in interfaceComponentCtrl
- Overrides:
service
in classHtmlBasedComponent
everError
- whether any error ever occurred before processing this request.- See Also:
AbstractComponent.setAuService(org.zkoss.zk.au.AuService)
-
getZclass
public java.lang.String getZclass()
Description copied from class:HtmlBasedComponent
Returns the ZK Cascading Style class for this component. It usually depends on the implementation of the mold (AbstractComponent.getMold()
).Default: null (the default value depends on element).
HtmlBasedComponent.setZclass(java.lang.String)
) will completely replace the default style of a component. In other words, the default style of a component is associated with the default value ofHtmlBasedComponent.getZclass()
. Once it is changed, the default style won't be applied at all. If you want to perform small adjustments, useHtmlBasedComponent.setSclass(java.lang.String)
instead.- Overrides:
getZclass
in classHtmlBasedComponent
- See Also:
HtmlBasedComponent.getSclass()
-
setHflex
public void setHflex(java.lang.String flex)
Description copied from class:HtmlBasedComponent
Sets horizontal flex hint of this component.Number flex indicates how this component's container distributes remaining empty space among its children horizontally. Flexible component grow and shrink to fit their given space. Flexible components with larger flex values will be made larger than components with lower flex values, at the ratio determined by all flexible components. The actual flex value is not relevant unless there are other flexible components within the same container. Once the default sizes of components in a container are calculated, the remaining space in the container is divided among the flexible components, according to their flex ratios.
Specify a flex value of negative value, 0, or "false" has the same effect as leaving the flex attribute out entirely. Specify a flex value of "true" has the same effect as a flex value of 1.
Special flex hint, "min", indicates that the minimum space shall be given to this flexible component to enclose all of its children components. That is, the flexible component grow and shrink to fit its children components.
- Overrides:
setHflex
in classHtmlBasedComponent
- Parameters:
flex
- horizontal flex hint of this component.- See Also:
HtmlBasedComponent.setVflex(java.lang.String)
,HtmlBasedComponent.getHflex()
-
setVflex
public void setVflex(java.lang.String flex)
Description copied from class:HtmlBasedComponent
Sets vertical flexibility hint of this component.Number flex indicates how this component's container distributes remaining empty space among its children vertically. Flexible component grow and shrink to fit their given space. Flexible components with larger flex values will be made larger than components with lower flex values, at the ratio determined by all flexible components. The actual flex value is not relevant unless there are other flexible components within the same container. Once the default sizes of components in a container are calculated, the remaining space in the container is divided among the flexible components, according to their flex ratios.
Specify a flex value of negative value, 0, or "false" has the same effect as leaving the flex attribute out entirely. Specify a flex value of "true" has the same effect as a flex value of 1.
Special flex hint, "min", indicates that the minimum space shall be given to this flexible component to enclose all of its children components. That is, the flexible component grow and shrink to fit its children components.
- Overrides:
setVflex
in classHtmlBasedComponent
- Parameters:
flex
- the vertical flex hint.- See Also:
HtmlBasedComponent.setHflex(java.lang.String)
,HtmlBasedComponent.getVflex()
-
open
public void open()
Opens the drawer.
-
close
public void close()
Closes the drawer.
-
-