public class Panel extends Widget
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.
$weave, auDelay, autag, bindLevel, className, desktop, effects_, firstChild, id, insertingBefore_, inServer, lastChild, nChildren, nextSibling, parent, previousSibling, uuid, widgetName
Modifier and Type | Method and Description |
---|---|
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.
|
afterKeyDown_, beforeCtrlKeys_, getContext, getCtrlKeys, getOpenTooltip, getPopup, getTooltip, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip
$, $f, $f, $f, $init, $n, $n, $o, $s, $service, afterAnima_, afterParentChanged_, appendChild, appendChild, beforeParentChanged_, beforeSendAU_, bind_, bind, bindChildren_, bindDoubleTap_, bindMissingAncestors, bindSwipe_, bindTapHold_, canActivate, cleanDrag_, clear, clearCache, cloneDrag_, deferRedraw_, deferRedrawHTML_, detach, doBlur_, doClick_, doDoubleClick_, doFocus_, doKeyDown_, doKeyPress_, doKeyUp_, domAttrs_, domClass_, domListen_, doMouseDown_, doMouseMove_, doMouseOut_, doMouseOver_, doMouseUp_, domStyle_, domTextStyleAttr_, domTooltiptext_, domUnlisten_, doPaste_, doResizeScroll_, doRightClick_, doSelect_, doSwipe_, doTooltipOut_, doTooltipOver_, dropEffect_, extraBind_, fire, fireX, focus_, focus, forcerender, fromPageCoord, get, getAction, getCaveNode, getChildAt, getChildIndex, getClass, getCssflex, getDraggable, getDragMessage_, getDragNode, getDragOptions_, getDrop_, getDroppable, getElementsById, getElementsByName, getFirstNode_, getFloatZIndex_, getHeight, getHflex, getId, getLeft, getMold, getOldWidget_, getPage, getRenderdefer, getSclass, getScrollLeft, getScrollTop, getStyle, getTabindex, getTextNode, getTooltiptext, getTop, getTopWidget, getVflex, getWidth, getZclass, getZIndex, hide, ignoreDescendantFloatUp_, ignoreDrag_, initDrag_, insertBefore, insertChildHTML_, isAutoId, isBinding, isFloating_, isListen, isRealElement, isRealVisible, isRealVisible, isVisible, isVisible, isWatchable_, listen, listenOnFitSize_, mimicMouseDown_, newInstance, nextUuid, onAfterSize, onChildAdded_, onChildRemoved_, onChildRenderDefer_, onChildReplaced_, onChildVisible_, onDrop_, redraw, redrawHTML_, register, removeChild, removeChild, removeChildHTML_, removeHTML_, replaceCavedChildren_, replaceChildHTML_, replaceHTML, replaceWidget, rerender, rerender, rerenderLater_, rerenderNow_, scrollIntoView, sendAU_, set, set, setAction, setChildren, setCssflex, setDomVisible_, setDraggable, setDroppable, setFloating_, setFloatZIndex_, setHeight, setHflex, setId, setLeft, setListener, setListener, setListeners, setMold, setRenderdefer, setSclass, setScrollLeft, setScrollTop, setStyle, setTabindex, setTooltiptext, setTop, setTopmost, setVflex, setVisible, setWidth, setZclass, setZIndex, shallChildROD_, shallFireSizedLaterWhenAddChd_, shallIgnoreClick_, show, smartUpdate, unbind_, unbind, unbindChildren_, unbindDoubleTap_, unbindSwipe_, unbindTapHold_, uncloneDrag_, unlisten, unlistenOnFitSize_, updateDomClass_, updateDomStyle_, uuid, zsync
$init, $instanceof, $super, $super, $supers, $supers, afterInit, isAssignableFrom, isInstance, proxy
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
- Copyright © 2005-2023 Potix Corporation. All Rights Reserved.