Class GoldenPanel
- All Implemented Interfaces:
Serializable,Cloneable,Component,Scope,ComponentCtrl
GoldenLayout.- Since:
- 8.6.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent
HtmlBasedComponent.ExtraCtrlNested 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
_zclassFields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPEFields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl
AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_CLONED, 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 -
Method Summary
Modifier and TypeMethodDescriptionvoidbeforeParentChanged(Component parent) Default: If parent is null, execute the @Destroy method if any.protected voiddroppedTo(GoldenPanel dropTarget, String region) protected voiddroppedToRoot(String region) booleanGet whether css flex is enabled or notgetArea()Returns the location x0, x1, y0, y1 in the GoldenLayout areas layout matrix of this GoldenPanel.getPropertyAccess(String prop) Returns the corresponding property access object from the given property name, if any.getTitle()Returns the title on the tab of the GoldenPanel.booleanReturns whether this panel is closable.booleanReturns whether the GoldenPanel should be draggable.booleanReturns whether the stack of this GoldenPanel is droppable by other GoldenPanel.voidonClose()voidprotected voidrenderProperties(ContentRenderer renderer) Renders the content of this component, excluding the enclosing tags and children.voidProcesses an AU request.voidSets the area of this GoldenPanel, use to represent the area of this panel on initial rendering.voidsetClosable(boolean closable) Sets whether this panel is closable.voidsetDraggable(boolean draggable) Sets whether the GoldenPanel should be draggable or not.voidsetDroppable(boolean droppable) Sets whether the whole stack of this GoldenPanel is droppable by other GoldenPanel.voidNot supported, use vflex instead.voidSets horizontal flex hint of this component.protected voidsetHflexDirectly(String flex) Sets the hflex directly without sending back the result (smart update) to the clientvoidSets the title to the tab of the GoldenPanel.voidSets vertical flexibility hint of this component.protected voidsetVflexDirectly(String flex) Sets the vflex directly without sending back the result (smart update) to the clientvoidNot supported, use hflex instead.Methods inherited from class org.zkoss.zul.impl.XulElement
clone, getContext, getCtrlKeys, getPopup, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributesMethods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
addSclass, focus, getAction, getClientAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getSkeleton, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZindex, getZIndex, removeSclass, removeSclass, setAction, setClass, setClientAction, setDraggable, setDroppable, setFocus, setHeight0, setHeightDirectly, setHflex0, setLeft, setLeftDirectly, setRenderdefer, setSclass, setSkeleton, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex0, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectlyMethods 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, 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, getStubonlyDescendants, 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, setStubonlyDescendants, 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
-
Constructor Details
-
GoldenPanel
public GoldenPanel() -
GoldenPanel
-
-
Method Details
-
onInitMatrix
public void onInitMatrix() -
getArea
- Returns:
- the area of this GoldenPanel.
-
setArea
Sets the area of this GoldenPanel, use to represent the area of this panel on initial rendering. Note that the area is not changeable after specified. And it doesn't remain the same due to user's action.- Parameters:
area- of this GoldenPanel
-
setWidth
Not supported, use hflex instead.- Overrides:
setWidthin classHtmlBasedComponent- See Also:
-
setHeight
Not supported, use vflex instead.- Overrides:
setHeightin classHtmlBasedComponent
-
setVflexDirectly
Description copied from class:HtmlBasedComponentSets the vflex directly without sending back the result (smart update) to the client- Overrides:
setVflexDirectlyin classHtmlBasedComponent
-
setVflex
Description copied from class:HtmlBasedComponentSets 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:
setVflexin classHtmlBasedComponent- Parameters:
flex- the vertical flex hint.- See Also:
-
setHflexDirectly
Description copied from class:HtmlBasedComponentSets the hflex directly without sending back the result (smart update) to the client- Overrides:
setHflexDirectlyin classHtmlBasedComponent
-
setHflex
Description copied from class:HtmlBasedComponentSets 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:
setHflexin classHtmlBasedComponent- Parameters:
flex- horizontal flex hint of this component.- See Also:
-
getTitle
Returns the title on the tab of the GoldenPanel.- Returns:
- the title
-
setTitle
Sets the title to the tab of the GoldenPanel.- Parameters:
title-
-
isDraggable
public boolean isDraggable()Returns whether the GoldenPanel should be draggable.Note that this method overwrites the normal action of zk isDraggable. Draggable true doesn't performs the normal zk draggable action, but only the GoldenPanel tabs are draggable.
- Returns:
- draggable or not
-
setDraggable
public void setDraggable(boolean draggable) Sets whether the GoldenPanel should be draggable or not.Note that this method overwrites the normal action of zk setDraggable. Setting true doesn't performs the normal zk draggable action, but only the GoldenPanel tabs are draggable.
- Parameters:
draggable-
-
isDroppable
public boolean isDroppable()Returns whether the stack of this GoldenPanel is droppable by other GoldenPanel.- Returns:
- droppable or not
-
setDroppable
public void setDroppable(boolean droppable) Sets whether the whole stack of this GoldenPanel is droppable by other GoldenPanel.- Parameters:
droppable-
-
isClosable
public boolean isClosable()Returns whether this panel is closable.- Returns:
- closable or not
-
setClosable
public void setClosable(boolean closable) Sets whether this panel is closable.- Parameters:
closable-
-
onClose
public void onClose() -
beforeParentChanged
Description copied from class:AbstractComponentDefault: If parent is null, execute the @Destroy method if any.- Specified by:
beforeParentChangedin interfaceComponentCtrl- Overrides:
beforeParentChangedin classAbstractComponent- Parameters:
parent- the new parent. If null, it means detachment.- See Also:
-
droppedToRoot
-
droppedTo
-
getLocation
Returns the location x0, x1, y0, y1 in the GoldenLayout areas layout matrix of this GoldenPanel.- Returns:
- the location x0, x1, y0, y1
-
renderProperties
Description copied from class:HtmlBasedComponentRenders the content of this component, excluding the enclosing tags and children.- Overrides:
renderPropertiesin classXulElement- Throws:
IOException
-
service
Description copied from class:HtmlBasedComponentProcesses an AU request.Default: it handles onClick, onDoubleClick, onRightClick onMove, onSize, onZIndex.
- Specified by:
servicein interfaceComponentCtrl- Overrides:
servicein classHtmlBasedComponenteverError- whether any error ever occurred before processing this request.- See Also:
-
getPropertyAccess
Description copied from interface:ComponentCtrlReturns the corresponding property access object from the given property name, if any.- Specified by:
getPropertyAccessin interfaceComponentCtrl- Overrides:
getPropertyAccessin classXulElement- Parameters:
prop- the name of the property- Returns:
- null it means not to support for the property name.
-
evalCSSFlex
public boolean evalCSSFlex()Description copied from class:HtmlBasedComponentGet whether css flex is enabled or not- Overrides:
evalCSSFlexin classHtmlBasedComponent- Returns:
- css flex is enabled
-