Class 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
    • 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: MessageBox
        This method can be used to set the text AFTER the dialog was shown. However, the dialog will not be resized.
        Overrides:
        setText in class MessageBox
      • onUnpop

        protected void onUnpop()
        Description copied from class: Window
        Placeholder called imediatly before the unpop began. The default implementation does nothing.
        Overrides:
        onUnpop in class Window