|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object zk.Object zk.Widget zul.Widget zul.wnd.Panel
public class 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 jqzk.makeVParent()
function. 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, so the ID of each child can be used throughout the panel.
Events:
onMove, onOpen, onZIndex, onMaximize, onMinimize, and onClose.
Default Widget.getZclass()
: z-panel.
Field Summary |
---|
Fields inherited from class zk.Widget |
---|
$weave, auDelay, autag, bindLevel, className, desktop, effects_, firstChild, id, insertingBefore_, inServer, lastChild, nChildren, nextSibling, parent, previousSibling, uuid, widgetName |
Fields inherited from class zk.Object |
---|
$class, $oid |
Method Summary | |
---|---|
boolean |
addToolbar(String name,
Toolbar toolbar)
Adds the toolbar of the panel by these names, "tbar", "bbar", and "fbar". |
String |
getBorder()
Returns the border. |
int |
getMinheight()
Returns the minimum height. |
int |
getMinwidth()
Returns the minimum width. |
String |
getTitle()
Returns the title. |
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 |
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(String border)
Sets the border. |
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 |
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(String title)
Sets the title. |
Methods inherited from class zul.Widget |
---|
afterKeyDown_, beforeCtrlKeys_, getContext, getCtrlKeys, getOpenTooltip, getPopup, getTooltip, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip |
Methods inherited from class zk.Object |
---|
$init, $instanceof, $super, $super, $supers, $supers, afterInit, isAssignableFrom, isInstance, proxy |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public int getMinheight()
Default: 100.
public void setMinheight(int minheight)
Default: 100.
Note: Only applies when isSizable()
= true.
minheight
- public int getMinwidth()
Default: 200.
public void setMinwidth(int minwidth)
Default: 200.
Note: Only applies when isSizable()
= true.
minwidth
- public boolean isSizable()
public void setSizable(boolean sizable)
Default: false.
sizable
- public boolean isMovable()
Default: false.
public void setMovable(boolean movable)
Default: false;
Note that this method only applied when isFloatable()
is true.
movable
- public boolean isFloatable()
Default: false.
public 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 Widget.setTop(String)
and Widget.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.
floatable
- public boolean isMaximizable()
Default: false.
public void setMaximizable(boolean maximizable)
Default: false.
Note: the maximize button won't be displayed if no title or caption at all.
maximizable
- public boolean isMinimizable()
Default: false.
public void setMinimizable(boolean minimizable)
Default: false.
Note: the maximize button won't be displayed if no title or caption at all.
minimizable
- public boolean isCollapsible()
Default: false.
public void setCollapsible(boolean collapsible)
Default: false.
Note: the toggle button won't be displayed if no title or caption at all.
collapsible
- public boolean isClosable()
public void setClosable(boolean closable)
Default: false.
Note: the close button won't be displayed if no title or caption at all.
closable
- public String getBorder()
Default: "none".
public void setBorder(String border)
none
(default), normal
,
rounded
and rounded+
.
For more information, please refer to
ZK Component Reference: Panel.
border
- the border. If null or "0", "none" is assumed.public String getTitle()
Caption
to define
a more sophisticated caption (aka., title).
If a panel has a caption whose label (LabelImageWidget.getLabel()
)
is not empty, then this attribute is ignored.
Default: empty.
public void setTitle(String title)
title
- public boolean isOpen()
Default: true.
public void setOpen(boolean open)
open
- public boolean isMaximized()
public 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.
maximized
- public boolean isMinimized()
Default: false.
public void setMinimized(boolean minimized)
Default: false.
minimized
- public boolean addToolbar(String name, Toolbar toolbar)
name
- "tbar", "bbar", and "fbar".toolbar
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |