Package totalcross.ui.dialog
Class ProgressBox
- java.lang.Object
-
- totalcross.ui.gfx.GfxSurface
-
- totalcross.ui.Control
-
- totalcross.ui.Container
-
- totalcross.ui.Window
-
- totalcross.ui.dialog.MessageBox
-
- totalcross.ui.dialog.ProgressBox
-
public class ProgressBox extends MessageBox
This class implements a MessageBox that shows a Spinner at left of the text. You can set the spinner color and type before constructing the ProgressBox (usually you do this in your application's constructor, and not for each ProgressBar created). Here's a sample:ProgressBox pb = new ProgressBox("Message","Loading, please wait...",null); pb.popupNonBlocking(); ... lengthy task pb.unpop();- Since:
- TotalCross 1.3
- See Also:
Spinner.spinnerType
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class totalcross.ui.dialog.MessageBox
MessageBox.Builder
-
Nested classes/interfaces inherited from class totalcross.ui.Control
Control.TranslucentShape
-
-
Field Summary
Fields Modifier and Type Field Description FontcontentFont-
Fields inherited from class totalcross.ui.dialog.MessageBox
baseContainer, btns, buttonForeColor, buttonKeys, buttonMargin, buttonsFont, contButtonGap, ha, lgap, messageFont, messageForeColor, msg, paddingBottom, paddingLeft, paddingRight, paddingTop, showExceptionTitle, title, titleContGap, titleFont, usingOwnCont, wa, xa, ya, yPosition
-
Fields inherited from class totalcross.ui.Window
_controlEvent, _dragEvent, _focus, _keyEvent, _mouseEvent, _multiEvent, _penEvent, androidBorderThickness, beepIfOut, blocking, borderStyle, cancelPenUp, canDrag, dragThreshold, fadeOtherWindows, fadeValue, firstFocus, flickEnabled, focusOnPenUp, footerColor, footerH, gradientTitleEndColor, gradientTitleStartColor, headerColor, highlighted, highResPrepared, HORIZONTAL_GRADIENT, ignoreEventOfType, keyHook, lastShiftY, lastSwappedContainer, mainSwapContainer, menubar, multiTouching, needsPaint, NO_BORDER, ORIENTATION_INVERTED, ORIENTATION_LANDSCAPE, ORIENTATION_PORTRAIT, popped, RECT_BORDER, repaintOnSwap, robot, ROUND_BORDER, rTitle, sameBackgroundColor, shiftH, shiftY, SIP_BOTTOM, SIP_HIDE, SIP_SHOW, SIP_TOP, TAB_BORDER, TAB_ONLY_BORDER, tempTitle, titleAlign, titleColor, titleGap, topMost, VERTICAL_GRADIENT, zStack
-
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, children, controlFound, finishedStart, ignoreOnAddAgain, ignoreOnRemove, insets, lastH, lastScreenWidth, lastW, npback, numChildren, started, tabOrder, tail, TRANSITION_CLOSE, TRANSITION_FADE, TRANSITION_NONE, TRANSITION_OPEN, TRANSITION_TIME, transitionEffect
-
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
-
-
Constructor Summary
Constructors Constructor Description ProgressBox(java.lang.String title, java.lang.String text)Constructs a progress box with the text and one "Ok" button.ProgressBox(java.lang.String title, java.lang.String text, java.lang.String[] buttonCaptions)Constructs a progress box with the text and the specified button captions.ProgressBox(java.lang.String title, java.lang.String text, java.lang.String[] buttonCaptions, boolean allSameWidth)Constructs a progress box with the text and the specified button captions.ProgressBox(java.lang.String title, java.lang.String text, java.lang.String[] buttonCaptions, boolean allSameWidth, int gap, int insideGap)Constructs a progress box with the text and the specified button captions.ProgressBox(java.lang.String title, java.lang.String text, java.lang.String[] buttonCaptions, int gap, int insideGap)Constructs a progress box with the text and the specified button captions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfig(java.lang.String message)protected voidonUnpop()Placeholder called imediatly before the unpop began.voidsetText(java.lang.String text)This method can be used to set the text AFTER the dialog was shown.-
Methods inherited from class totalcross.ui.dialog.MessageBox
getButton, getImage, getPressedButtonIndex, onEvent, onFontChanged, onPaint, onPopup, postPopup, postUnpop, reposition, setDelayToShowButton, setIcon, setImage, setTextAlignment, setUnpopDelay, showException
-
Methods inherited from class totalcross.ui.Window
_doPaint, _postEvent, destroyZStack, drawHighlight, getBorderStyle, getClientRect, getClientRect, getDefaultDragThreshold, getFocus, getHighlighted, getPopupCount, getPreferredHeight, getPreferredWidth, getSafeAreaInsets, getTitleFont, getTopMost, handleFocusChangeKeys, isScreenShifted, isSipShown, isSipShown4D, isTopMost, isVisible, loadBehind, makeUnmovable, onClickedOutside, onRobotKey, paintTitle, paintWindowBackground, popup, popupMenuBar, popupNonBlocking, postPressedEvent, pumpEvents, removeFocus, repaintActiveWindows, resize, resizeHeight, resizeWidth, screenResized, setBorderStyle, setDeviceTitle, setFocus, setGrabPenEvents, setHighlighted, setMenuBar, setOrientation, setSIP, setTitle, setTitleFont, shiftScreen, swap, swapFocus, unpop, validate
-
Methods inherited from class totalcross.ui.Container
add, add, add, add, add, applyTransitionEffect, broadcastEvent, clear, fillBackground, fillBackground, findChild, findNearestChild, findNextFocusControl, getChildren, getChildrenCount, getFirstChild, getFocusableControls, getInsets, incLastX, incLastY, initUI, isPressed, moveFocusToNextControl, moveFocusToNextEditable, onAddAgain, onColorsChanged, onRemove, onSwapFinished, paintChildren, remove, removeAll, setEnabled, setFocusTraversable, setHighlighting, setInsets, setNextTransitionEffect, 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, isVisibleAndInside, onBoundsChanged, onWindowPaintFinished, post, postEvent, 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, setRect, setSet, setTextShadowColor, setTranslucent, setVisible, showTip, takeInitialScreenShot, takeScreenShot, translateFromOrigin, uiStyleChanged, updateScreen, updateTemporary, willOpenKeyboard
-
-
-
-
Field Detail
-
contentFont
public Font contentFont
-
-
Constructor Detail
-
ProgressBox
public ProgressBox(java.lang.String title, java.lang.String text)Constructs a progress box with the text and one "Ok" button. The text may be separated by '\n' as the line delimiters; otherwise, it is automatically splitted if its too big to fit on screen.
-
ProgressBox
public ProgressBox(java.lang.String title, java.lang.String text, java.lang.String[] buttonCaptions)Constructs a progress box with the text and the specified button captions. The text may be separated by '\n' as the line delimiters; otherwise, it is automatically splitted if its too big to fit on screen. if buttonCaptions is null, no buttons are displayed and you must dismiss the dialog by calling unpop or by setting the delay using setUnpopDelay method
-
ProgressBox
public ProgressBox(java.lang.String title, java.lang.String text, java.lang.String[] buttonCaptions, boolean allSameWidth)Constructs a progress box with the text and the specified button captions. The text may be separated by '\n' as the line delimiters; otherwise, it is automatically splitted if its too big to fit on screen. If buttonCaptions is null, no buttons are displayed and you must dismiss the dialog by calling unpop or by setting the delay using setUnpopDelay method. The parameters allSameWidth is the same as in the constructor for PushButtonGroup.
-
ProgressBox
public ProgressBox(java.lang.String title, java.lang.String text, java.lang.String[] buttonCaptions, int gap, int insideGap)Constructs a progress box with the text and the specified button captions. The text may be separated by '\n' as the line delimiters; otherwise, it is automatically splitted if its too big to fit on screen. If buttonCaptions is null, no buttons are displayed and you must dismiss the dialog by calling unpop or by setting the delay using setUnpopDelay method. The new parameters gap and insideGap are the same as in the constructor for PushButtonGroup.
-
ProgressBox
public ProgressBox(java.lang.String title, java.lang.String text, java.lang.String[] buttonCaptions, boolean allSameWidth, int gap, int insideGap)Constructs a progress box with the text and the specified button captions. The text may be separated by '\n' as the line delimiters; otherwise, it is automatically splitted if its too big to fit on screen. If buttonCaptions is null, no buttons are displayed and you must dismiss the dialog by calling unpop or by setting the delay using setUnpopDelay method. The parameters allSameWidth, gap and insideGap are the same as in the constructor for PushButtonGroup.
-
-
Method Detail
-
config
public void config(java.lang.String message)
-
setText
public void setText(java.lang.String text)
Description copied from class:MessageBoxThis method can be used to set the text AFTER the dialog was shown. However, the dialog will not be resized.- Overrides:
setTextin classMessageBox
-
-