|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Panel
Panel is a container that has specific functionality and structural
components that make it the perfect building block for application-oriented
user interfaces. The Panel contains bottom, top, and foot toolbars, along
with separate header, footer and body sections. It also provides built-in
collapsible, closable, maximizable, and minimizable behavior, along with a
variety of pre-built tool buttons that can be wired up to provide other
customized behavior. Panels can be easily embedded into any kind of ZUL
component that is allowed to have children or layout component. Panels also
provide specific features like float and move. Unlike Window
, Panels
can only be floated and moved inside its parent node, which is not using
zk.setVParent() function at client side. In other words, if Panel's parent
node is an relative position, the floated panel is only inside its parent,
not the whole page. The second difference of Window
is that Panel is
not an independent ID space (by implementing IdSpace
), so the ID of
each child can be used throughout the panel.
Events:
onMove, onOpen, onZIndex, onMaximize, onMinimize, and onClose.
Default HtmlBasedComponent.getZclass()
: z-panel.
Field Summary |
---|
Fields inherited from interface org.zkoss.zk.ui.Component |
---|
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE |
Method Summary | |
---|---|
boolean |
addToolbarApi(java.lang.String name,
Toolbar toolbar)
Adds the toolbar of the panel by these names, "tbar", "bbar", and "fbar". |
java.lang.String |
getBorder()
Returns the border. |
Toolbar |
getBottomToolbarApi()
Returns the bottom toolbar of this panel. |
Caption |
getCaptionApi()
Returns the caption of this panel. |
Toolbar |
getFootToolbarApi()
Returns the foot toolbar of this panel. |
int |
getMinheight()
Returns the minimum height. |
int |
getMinwidth()
Returns the minimum width. |
Panelchildren |
getPanelchildrenApi()
Returns the panelchildren of this panel. |
java.lang.String |
getTitle()
Returns the title. |
Toolbar |
getTopToolbarApi()
Returns the top toolbar of this panel. |
boolean |
isClosable()
Returns whether to show a close button on the title bar. |
boolean |
isCollapsible()
Returns whether to show a toggle button on the title bar. |
boolean |
isFloatable()
Returns whether to float the panel to display it inline where it is rendered. |
boolean |
isFramable()
Returns whether to render the panel with custom rounded borders. |
boolean |
isMaximizable()
Returns whether to display the maximizing button and allow the user to maximize the panel. |
boolean |
isMaximized()
Returns whether the panel is maximized. |
boolean |
isMinimizable()
Returns whether to display the minimizing button and allow the user to minimize the panel. |
boolean |
isMinimized()
Returns whether the panel is minimized. |
boolean |
isMovable()
Returns whether to move the panel to display it inline where it is rendered. |
boolean |
isOpen()
Returns whether this Panel is open. |
boolean |
isSizable()
Returns whether the panel is sizable. |
void |
setBorder(java.lang.String border)
Sets the border (either none or normal). |
void |
setClosable(boolean closable)
Sets whether to show a close button on the title bar. |
void |
setCollapsible(boolean collapsible)
Sets whether to show a toggle button on the title bar. |
void |
setFloatable(boolean floatable)
Sets whether to float the panel to display it inline where it is rendered. |
void |
setFramable(boolean framable)
Sets whether to render the panel with custom rounded borders. |
void |
setMaximizable(boolean maximizable)
Sets whether to display the maximizing button and allow the user to maximize the panel, when a panel is maximized, the button will automatically change to a restore button with the appropriate behavior already built-in that will restore the panel to its previous size. |
void |
setMaximized(boolean maximized)
Sets whether the panel is maximized, and then the size of the panel will depend on it to show a appropriate size. |
void |
setMinheight(int minheight)
Sets the minimum height in pixels allowed for this panel. |
void |
setMinimizable(boolean minimizable)
Sets whether to display the minimizing button and allow the user to minimize the panel. |
void |
setMinimized(boolean minimized)
Sets whether the panel is minimized. |
void |
setMinwidth(int minwidth)
Sets the minimum width in pixels allowed for this panel. |
void |
setMovable(boolean movable)
Sets whether to move the panel to display it inline where it is rendered. |
void |
setOpen(boolean open)
Opens or closes this Panel. |
void |
setSizable(boolean sizable)
Sets whether the panel is sizable. |
void |
setTitle(java.lang.String title)
Sets the title. |
Methods inherited from interface org.zkoss.zul.impl.api.XulElement |
---|
getAction, getContext, getCtrlKeys, getPopup, getTooltip, setAction, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip |
Methods inherited from interface org.zkoss.zk.ui.api.HtmlBasedComponent |
---|
focus, getHeight, getLeft, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZclass, getZindex, getZIndex, setDraggable, setDroppable, setFocus, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZclass, setZindex, setZIndex |
Methods inherited from interface org.zkoss.zk.ui.ext.Scope |
---|
addScopeListener, getAttribute, hasAttribute, removeAttribute, removeScopeListener, setAttribute |
Method Detail |
---|
boolean isOpen()
Default: true.
void setOpen(boolean open)
boolean isFramable()
Default: false.
void setFramable(boolean framable)
Default: false.
void setMovable(boolean movable)
Default: false;
Note that this method only applied when isFloatable()
is true.
boolean isMovable()
Default: false.
boolean isFloatable()
Default: false.
void setFloatable(boolean floatable)
Note that by default, setting floatable to true will cause the panel to
display at default offsets, which depend on the offsets of the embedded
panel from its element to document.body -- because the panel is
absolute positioned, the position must be set explicitly by
HtmlBasedComponent.setTop(String)
and HtmlBasedComponent.setLeft(String)
. Also, when
floatable a panel you should always assign a fixed width, otherwise it
will be auto width and will expand to fill to the right edge of the
viewport.
boolean isMaximized()
void setMaximized(boolean maximized)
isFloatable()
) or its parent node.
Otherwise, its size will be original size. Note that the maximized effect
will run at client's sizing phase not initial phase.
Default: false.
UiException
- if isMaximizable()
is false.boolean isMaximizable()
Default: false.
void setMaximizable(boolean maximizable)
Default: false.
Note: the maximize button won't be displayed if no title or caption at all.
boolean isMinimized()
Default: false.
void setMinimized(boolean minimized)
Default: false.
UiException
- if isMinimizable()
is false.boolean isMinimizable()
Default: false.
void setMinimizable(boolean minimizable)
Default: false.
Note: the maximize button won't be displayed if no title or caption at all.
MinimizeEvent
boolean isCollapsible()
Default: false.
void setCollapsible(boolean collapsible)
Default: false.
Note: the toggle button won't be displayed if no title or caption at all.
boolean isClosable()
void setClosable(boolean closable)
Default: false.
You can intercept the default behavior by either overriding
Panel.onClose()
, or listening the onClose event.
Note: the close button won't be displayed if no title or caption at all.
Caption getCaptionApi()
java.lang.String getBorder()
Default: "none".
void setBorder(java.lang.String border)
border
- the border. If null or "0", "none" is assumed.java.lang.String getTitle()
Caption
to define a more sophiscated caption (aka., title).
If a panel has a caption whose label (LabelElement.getLabel()
) is not
empty, then this attribute is ignored.
Default: empty.
void setTitle(java.lang.String title)
void setMinheight(int minheight)
Default: 100.
Note: Only applies when isSizable()
= true.
int getMinheight()
Default: 100.
void setMinwidth(int minwidth)
Default: 200.
Note: Only applies when isSizable()
= true.
int getMinwidth()
Default: 200.
boolean isSizable()
void setSizable(boolean sizable)
Default: false.
boolean addToolbarApi(java.lang.String name, Toolbar toolbar)
name
- "tbar", "bbar", and "fbar".Toolbar getTopToolbarApi()
Toolbar getBottomToolbarApi()
Toolbar getFootToolbarApi()
Panelchildren getPanelchildrenApi()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |