public class Box extends Widget
Default Widget.getZclass()
: z-vbox.
$weave, auDelay, autag, bindLevel, className, desktop, effects_, firstChild, id, insertingBefore_, inServer, lastChild, nChildren, nextSibling, parent, previousSibling, uuid, widgetName
Modifier and Type | Method and Description |
---|---|
protected String |
encloseChildHTML_(Widget child,
boolean prefixSpace,
Array out)
Enclose child with HTML tag such as TR or TD,
and return a HTML code or add HTML fragments in out array.
|
String |
getAlign()
Returns the alignment of cells of a box in the 'opposite' direction
(null, start, center, end).
|
String |
getOrient()
Returns the orient.
|
String |
getPack()
Returns the pack alignment of cells of this box
(start, center, end) plus an indication stretch option.
|
String |
getSpacing()
Returns the spacing between adjacent children, or null if the default
spacing is used.
|
boolean |
isSizedByContent()
Returns whether sizing the cell's size by its content.
|
boolean |
isVertical()
Returns whether it is a vertical box.
|
void |
setAlign(String align)
Sets the alignment of cells of this box in the 'opposite' direction
(start, center, end, stretch).
|
void |
setPack(String pack)
Sets the alignment of cells of this box
(start, center, end) plus an stretch option.
|
void |
setSizedByContent(boolean byContent)
Sets whether sizing the cell's size by its content.
|
void |
setSpacing(String spacing)
Sets the spacing between adjacent children.
|
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 String getAlign()
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 aligned horizontally. The pack attribute
(getPack()
) is
related to the alignment but is used to specify the position in the
opposite direction.
Default: start
public void setAlign(String align)
align
- the alignment in the 'opposite' direction.
Allowed values: start, center, end, stretch.
If empty or null, the browser's default is used
(IE center and FF left, if vertical).public String getPack()
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.
Splitter
child inside this Box,
then this Box behaves as if the pack attribute has been set the "stretch"
option; no matter you really specify "stretch" in pack attribute or not.
If given null or simply "stretch" to this pack attribute then it is the
same as "stretch,start"Default: start.
public void setPack(String pack)
pack
- the alignment. Allowed values: (start, center, end) plus an
stretch option. If empty or null, it defaults to "stretch,start".getPack()
public String getSpacing()
The default spacing depends on the definition of the style class called "xxx-sp", where xxx is
Widget.getSclass()
if it is not null.Widget.getSclass()
is null and it is a horizontal box.Widget.getSclass()
is null and it is a vertical box.Default: null (means to use the default spacing).
public void setSpacing(String spacing)
spacing
- the spacing (such as "0", "5px", "3pt" or "1em"),
or null to use the default spacinggetSpacing()
public boolean isSizedByContent()
Default: true.
public void setSizedByContent(boolean byContent)
Default: true. It means the cell's size is depended on its content.
With Splitter
, you can specify the sizedByContent to be false
for resizing smoothly
byContent
- public boolean isVertical()
public String getOrient()
protected String encloseChildHTML_(Widget child, boolean prefixSpace, Array out)
child
- the child which will be enclosedprefixSpace
- if true the previousSibling of the child
will put in front of child.out
- an array of HTML fragments.Copyright © 2005-2023 Potix Corporation. All Rights Reserved.