|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Box
A box.
Default HtmlBasedComponent.getZclass()
: z-box.(since 3.5.0)
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 | |
---|---|
java.lang.String |
getAlign()
Returns the alignment of cells of a box in the 'opposite' direction (null, start, center, end). |
java.lang.String |
getHeights()
Deprecated. As of release 5.0.0, use Cell instead. |
java.lang.String |
getOrient()
Returns the orient (the same as Component.getMold() ). |
java.lang.String |
getPack()
Returns the alignment of cells of this box (null, start, center, end). |
java.lang.String |
getSpacing()
Returns the spacing between adjacent children, or null if the default spacing is used. |
java.lang.String |
getWidths()
Deprecated. As of release 5.0.0, use Cell instead. |
boolean |
isHorizontal()
Returns whether it is a horizontal box. |
boolean |
isVertical()
Returns whether it is a vertical box. |
void |
setAlign(java.lang.String align)
Sets the alignment of cells of this box in the 'opposite' direction (null, start, center, end). |
void |
setHeights(java.lang.String heights)
Deprecated. As of release 5.0.0, use Cell instead. |
void |
setOrient(java.lang.String orient)
Sets the orient. |
void |
setPack(java.lang.String pack)
Sets the alignment of cells of this box (null, start, center, end). |
void |
setSpacing(java.lang.String spacing)
Sets the spacing between adjacent children. |
void |
setWidths(java.lang.String widths)
Deprecated. As of release 5.0.0, use Cell instead. |
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 isHorizontal()
boolean isVertical()
java.lang.String getOrient()
Component.getMold()
).
Default: "vertical".
void setOrient(java.lang.String orient) throws WrongValueException
orient
- either "horizontal" or "vertical".
WrongValueException
java.lang.String getSpacing()
The default spacing depends on the definition of the style class called "xxx-sp", where xxx is
HtmlBasedComponent.getSclass()
if it is not null.HtmlBasedComponent.getSclass()
is null and it is a horizontal box.HtmlBasedComponent.getSclass()
is null and it is a vertical box.Default: null (means to use the default spacing).
void setSpacing(java.lang.String spacing)
spacing
- the spacing (such as "0", "5px", "3pt" or "1em"), or null to
use the default spacinggetSpacing()
java.lang.String getAlign()
Default: start
The align attribute specifies how child elements of the box are aligned,
when the size of the box is larger than the total size of the children.
For boxes that have horizontal orientation, it specifies how its children
will be aligned vertically. For boxes that have vertical orientation, it
is used to specify how its children are algined horizontally. The pack
attribute (getPack()
) is related to the alignment but is used to
specify the position in the opposite direction.
void setAlign(java.lang.String align)
align
- the alignment in the 'opposite' direction. Allowed values:
start, center, end. If empty or null, the browser's default is
used (IE center and FF left, if vertical).java.lang.String getPack()
Default: null.
The pack attribute specifies where child elements of the box are placed
when the box is larger that the size of the children. For boxes with
horizontal orientation, it is used to indicate the position of children
horizontally. For boxes with vertical orientation, it is used to indicate
the position of children vertically. The align attribute (
getAlign()
)is used to specify the position in the opposite
direction.
void setPack(java.lang.String pack)
pack
- the alignment. Allowed values: start, center, end. If empty or
null, the browser's default is used.java.lang.String getWidths()
Cell
instead.
Hbox
(i.e.,
getOrient()
is horizontal), it is a list of widths. If
Vbox
(i.e., getOrient()
is vertical), it is a list of
heights.
It is the same as getHeights()
.
Default: empty.
java.lang.String getHeights()
Cell
instead.
Hbox
(i.e.,
getOrient()
is horizontal), it is a list of widths. If
Vbox
(i.e., getOrient()
is vertical), it is a list of
heights.
It is the same as getWidths()
.
Default: empty.
void setWidths(java.lang.String widths) throws WrongValueException
Cell
instead.
It is the same as setHeights(java.lang.String)
.
For example, "10%,20%,30%" means the second cell shall occupy 10% width, the second cell 20%, the third cell 30%, and the following cells don't specify any width.
Note: the splitters are ignored, i.e., they are not cells.
Another example, ",,30%" means the third cell shall occupy 30% width, and the rest of cells don't specify any width. Of course, the real widths depend on the interpretation of the browser.
WrongValueException
void setHeights(java.lang.String heights) throws WrongValueException
Cell
instead.
It is the same as setWidths(java.lang.String)
.
WrongValueException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |