Package totalcross.ui.layout
Class VBox
- java.lang.Object
-
- totalcross.ui.gfx.GfxSurface
-
- totalcross.ui.Control
-
- totalcross.ui.Container
-
- totalcross.ui.layout.LinearBox
-
- totalcross.ui.layout.VBox
-
public class VBox extends LinearBox
A vertical flow layout component. Use this layout to place components sequentially in the vertical axis. For custom placements, use the specialized constructor or the 'setLayout' method. Using this component, you can easily stack, distribute or fill a area with components.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class totalcross.ui.Control
Control.TranslucentShape
-
-
Field Summary
Fields Modifier and Type Field Description static intLAYOUT_STACK_BOTTOMOrganizes each element from right to leftstatic intLAYOUT_STACK_TOPOrganizes each element from left to right-
Fields inherited from class totalcross.ui.layout.LinearBox
alignment, ALIGNMENT_CENTER, ALIGNMENT_LEFT, ALIGNMENT_RIGHT, ALIGNMENT_STRETCH, LAYOUT_DISTRIBUTE, LAYOUT_FILL, LAYOUT_STACK_CENTER, mode, spacing, suspendLayout
-
Fields inherited from class totalcross.ui.Container
alwaysEraseBackground, BACKGROUND_CYLINDRIC_SHADED, BACKGROUND_SHADED, BACKGROUND_SHADED_INV, BACKGROUND_SOLID, backgroundStyle, BORDER_LOWERED, BORDER_NONE, BORDER_RAISED, BORDER_ROUNDED, BORDER_SIMPLE, BORDER_TOP, borderColor, borderRadius, children, controlFound, finishedStart, ignoreOnAddAgain, ignoreOnRemove, insets, lastH, lastScreenWidth, lastW, lastX, lastY, npback, numChildren, started, tabOrder, tail, TRANSITION_TIME
-
Fields inherited from class totalcross.ui.Control
AFTER, alphaValue, appId, appObj, asContainer, asWindow, backColor, BEFORE, BOTTOM, BOTTOM_OF, BRIGHTER_BACKGROUND, callListenersOnAllTargets, CENTER, CENTER_OF, clearValueInt, clearValueStr, DARKER_BACKGROUND, DP, effect, enableUpdateScreen, esce, eventsEnabled, FILL, fillColor, FIT, floating, fm, fmH, focusHandler, focusLess, focusOnPenDown, focusTraversable, font, FONTSIZE, foreColor, height, ignoreInsets, isHighlighting, isTablet, KEEP, keepDisabled, keepEnabled, LEFT, next, nextTabControl, npParts, offscreen, offscreen0, onEventFirst, parent, PARENTSIZE, PARENTSIZEMAX, PARENTSIZEMIN, PREFERRED, prev, RANGE, repositionAllowed, RIGHT, RIGHT_OF, SAME, SCREENSIZE, SCREENSIZEMAX, SCREENSIZEMIN, setFont, setH, setRel, setW, setX, SETX_NOT_SET, setY, tempW, textShadowColor, TOP, translucentShape, transparentBackground, uiAdjustmentsBasedOnFontHeightIsSupported, uiAndroid, UICONST, uiFlat, uiHolo, uiMaterial, uiVista, visible, width, WILL_RESIZE, x, y
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetPreferredHeight()Returns the minimal height that encloses all components sequentiallyintgetPreferredWidth()Returns the width of the biggest child componentvoidreposition()Reposition this control, calling again setRect with the original parameters.protected voidresizeElements(int layout, int alignment)Recalculates every element's width and height, and also the paddings and spacings every time one of these values are changed.-
Methods inherited from class totalcross.ui.layout.LinearBox
add, add, add, add, add, doLayout, getSpacing, internalAdd, resumeLayout, setInsets, setLayout, setRect, setSpacing, suspendLayout
-
Methods inherited from class totalcross.ui.Container
add, broadcastEvent, clear, fillBackground, fillBackground, findChild, findNearestChild, findNextFocusControl, getBorderRadius, getBorderStyle, getChildren, getChildrenCount, getClientRect, getClientRect, getFirstChild, getFocusableControls, getInsets, incLastX, incLastY, initUI, isPressed, moveFocusToNextControl, moveFocusToNextEditable, onAddAgain, onColorsChanged, onPaint, onRemove, onSwapFinished, paintChildren, remove, removeAll, resize, resizeHeight, resizeWidth, setBorderRadius, setBorderStyle, setEnabled, setFocusTraversable, setHighlighting, setPressColor, setPressed, swapToTopmostWindow
-
Methods inherited from class totalcross.ui.Control
_onEvent, addEnabledStateListener, addFocusListener, addFontChangeHandler, addGridListener, addHandler, addHighlightListener, addKeyListener, addListContainerListener, addMouseListener, addMultiTouchListener, addPenListener, addPressListener, addPushNotificationListener, addSizeChangeHandler, addTimer, addTimer, addTimerListener, addValueChangeHandler, addWindowListener, bringToFront, changeHighlighted, contains, drawTranslucentBackground, getAbsoluteRect, getBackColor, getDoEffect, getEffectH, getEffectW, getEffectX, getEffectY, getEventListeners, getFont, getForeColor, getGap, getGraphics, getHeight, getNext, getParent, getParentWindow, getPos, getPressedEvent, getPrev, getRect, getSize, getTextShadowColor, getWidth, getX, getX2, getY, getY2, hadParentScrolled, handleGeographicalFocusChangeKeys, hasFocus, internalSetEnabled, intXYWH, isActionEvent, isChildOf, isDisplayed, isEnabled, isFloating, isInsideOrNear, isObscured, isTopMost, isVisible, isVisibleAndInside, onBoundsChanged, onEvent, onFontChanged, onWindowPaintFinished, post, postEvent, postPressedEvent, releaseScreenShot, removeEnabledStateListener, removeFocusListener, removeGridListener, removeHandler, removeHighlightListener, removeKeyListener, removeListContainerListener, removeMouseListener, removeMultiTouchListener, removePenListener, removePressListener, removePushNotificationListener, removeTimer, removeTimerListener, removeWindowListener, repaint, repaintNow, reposition, repositionChildren, requestFocus, resetSetPositions, resetStyle, safeRepaintNow, safeUpdateScreen, sendToBack, setBackColor, setBackForeColors, setDoEffect, setFloating, setFocusLess, setFont, setForeColor, setNinePatch, setNinePatch, setRect, setRect, setRect, setSet, setTextShadowColor, setTranslucent, setVisible, showTip, takeInitialScreenShot, takeScreenShot, translateFromOrigin, uiStyleChanged, updateScreen, updateTemporary, willOpenKeyboard
-
-
-
-
Field Detail
-
LAYOUT_STACK_TOP
public static final int LAYOUT_STACK_TOP
Organizes each element from left to right- See Also:
- Constant Field Values
-
LAYOUT_STACK_BOTTOM
public static final int LAYOUT_STACK_BOTTOM
Organizes each element from right to left- See Also:
- Constant Field Values
-
-
Method Detail
-
resizeElements
protected void resizeElements(int layout, int alignment)Description copied from class:LinearBoxRecalculates every element's width and height, and also the paddings and spacings every time one of these values are changed.- Specified by:
resizeElementsin classLinearBox
-
reposition
public void reposition()
Reposition this control, calling again setRect with the original parameters.- Overrides:
repositionin classControl
-
getPreferredWidth
public int getPreferredWidth()
Returns the width of the biggest child component- Overrides:
getPreferredWidthin classControl
-
getPreferredHeight
public int getPreferredHeight()
Returns the minimal height that encloses all components sequentially- Overrides:
getPreferredHeightin classControl
-
-