Documentation of 'jvx.gui.PuProgressBar' Java class
PuProgressBar ("JavaView Reference Manual")
"JavaView? v5.03.003"
jvx.gui

Class PuProgressBar

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Runnable, PsUpdateIf


    public class PuProgressBar
    extends PsObject
    implements java.lang.Runnable
    Component showing the status of a running process. The current progress is drawn in the progress bar and the actual percentage is written on it.

    The process, whose progress should be shown by this progress bar, should run in a separate thread, since otherwise, the progress bar receives no repaint messages until the process has finished.

    If bShowRemainingTime is enabled, the remaining time till 100% is written below the progress bar. The timer will be started, when the first progress is set and stopped if 100% is reached (or the progress bar is being reset). Note, that in this mode, an own thread is generated, which updates the progress bar every second.

    See Also:
    Serialized Form
    Author:
    Matthias Nieser
    Version:
    26.01.07, 1.60 revised (mn) Added PROGRESS_ constants.
    20.01.07, 1.50 revised (kp) Conforming to 1.1 and API revised.
    12.01.07, 1.10 revised (mn) Split into PuProgressBar and PuProgressBar_IP, Removed field m_size, Added remaining time.
    07.04.06, 1.00 created (mn)
    • Field Detail

      • PROGRESS_FINISHED

        public static double PROGRESS_FINISHED
        Progress status, finished.
      • PROGRESS_NO_PROCESS

        public static double PROGRESS_NO_PROCESS
        Progress status, no working process.
      • PROGRESS_ABORTED

        public static double PROGRESS_ABORTED
        Progress status, process aborted.
    • Constructor Detail

      • PuProgressBar

        public PuProgressBar()
        Construct a new PuProgressBar without showing the remaining time.
      • PuProgressBar

        public PuProgressBar(boolean bShowRemainingTime)
        Construct a new PuProgressBar.
        Parameters:
        bShowRemainingTime - Whether the remaining time should be displayed.
    • Method Detail

      • init

        public void init()
        If instance has missing name then assign default name 'Object_NUMBER' where number is the total number of already created instances.
        Overrides:
        init in class PsObject
      • start

        public void start()
        Starts a new progress. If another progress is still active, then the new progress will be a subprogress of the existing one. The interval of the subprogress can be set using setSubInterval().
      • stop

        public void stop()
        Ends a running progress. If the active progress is a subprogress, then the parent will be made active.
      • setSubInterval

        public void setSubInterval(double start,
                                   double end)
        Set the interval for the next subprocess. The next time, start() is called, the progress bar gets initialized in this interval.
      • getElapsedTime

        public long getElapsedTime()
        Get elapsed time in milliseconds, which is total running time minus pauses.
      • getProgress

        public double getProgress()
        Get the progress in [0, 1]. A value of -1 means, that there is no working process.
      • setProgress

        public void setProgress(double progress)
        Set actual progress status and updates the status bar. A value of -1 means, that there is no working process.
      • getText

        public java.lang.String getText()
        Get displayed text.
      • setText

        public void setText(java.lang.String text)
        Set displayed text.
      • isShowingRemainingTime

        public boolean isShowingRemainingTime()
        Whether remaining time should be displayed.
      • enableProgressStatus

        public void enableProgressStatus(boolean show)
        Whether the progress status is displayed.
      • isShowingProgressStatus

        public boolean isShowingProgressStatus()
        Whether the progress status is displayed.
      • reset

        public void reset()
        Reset the progress bar.
      • suspendTimer

        public void suspendTimer()
        Suspend timer.
      • resumeTimer

        public void resumeTimer()
        Resume timer after suspending.
      • abortTimer

        public void abortTimer()
        Abort timer.
      • run

        public void run()
        When an object implementing interface Runnable is used to create a thread, starting the thread causes the object's run method to be called in that separately executing thread.

        The general contract of the method run is that it may take any action whatsoever.

        Specified by:
        run in interface java.lang.Runnable
        See Also:
        Thread.run()
"JavaView? v5.03.003"

"

The software JavaView? is copyright protected. All Rights Reserved.
"

Ads help maintain this website.