Class ProgressMonitor

  • All Implemented Interfaces:
    org.hortonmachine.gears.libs.monitor.IHMProgressMonitor

    public class ProgressMonitor
    extends Object
    implements org.hortonmachine.gears.libs.monitor.IHMProgressMonitor
    MySwing: Advanced Swing Utilites Copyright (C) 2005 Santhosh Kumar T

    This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

    • Constructor Detail

      • ProgressMonitor

        public ProgressMonitor​(int total,
                               boolean indeterminate,
                               int milliSecondsToWait)
      • ProgressMonitor

        public ProgressMonitor​(int total,
                               boolean indeterminate)
    • Method Detail

      • getTotal

        public int getTotal()
      • start

        public void start​(String status)
      • beginTask

        public void beginTask​(String name,
                              int totalWork)
        Specified by:
        beginTask in interface org.hortonmachine.gears.libs.monitor.IHMProgressMonitor
      • getMilliSecondsToWait

        public int getMilliSecondsToWait()
      • getCurrent

        public int getCurrent()
      • getStatus

        public String getStatus()
      • isIndeterminate

        public boolean isIndeterminate()
      • setCurrent

        public void setCurrent​(String status,
                               int current)
      • addChangeListener

        public void addChangeListener​(ChangeListener listener)
      • removeChangeListener

        public void removeChangeListener​(ChangeListener listener)
      • message

        public void message​(String message)
        Specified by:
        message in interface org.hortonmachine.gears.libs.monitor.IHMProgressMonitor
      • errorMessage

        public void errorMessage​(String message)
        Specified by:
        errorMessage in interface org.hortonmachine.gears.libs.monitor.IHMProgressMonitor
      • exceptionThrown

        public void exceptionThrown​(String message)
        Specified by:
        exceptionThrown in interface org.hortonmachine.gears.libs.monitor.IHMProgressMonitor
      • done

        public void done()
        Specified by:
        done in interface org.hortonmachine.gears.libs.monitor.IHMProgressMonitor
      • internalWorked

        public void internalWorked​(double work)
        Specified by:
        internalWorked in interface org.hortonmachine.gears.libs.monitor.IHMProgressMonitor
      • isCanceled

        public boolean isCanceled()
        Specified by:
        isCanceled in interface org.hortonmachine.gears.libs.monitor.IHMProgressMonitor
      • setCanceled

        public void setCanceled​(boolean value)
        Specified by:
        setCanceled in interface org.hortonmachine.gears.libs.monitor.IHMProgressMonitor
      • setTaskName

        public void setTaskName​(String name)
        Specified by:
        setTaskName in interface org.hortonmachine.gears.libs.monitor.IHMProgressMonitor
      • subTask

        public void subTask​(String name)
        Specified by:
        subTask in interface org.hortonmachine.gears.libs.monitor.IHMProgressMonitor
      • worked

        public void worked​(int work)
        Specified by:
        worked in interface org.hortonmachine.gears.libs.monitor.IHMProgressMonitor
      • adapt

        public <T> T adapt​(Class<T> adaptee)
        Specified by:
        adapt in interface org.hortonmachine.gears.libs.monitor.IHMProgressMonitor
      • onModuleExit

        public void onModuleExit()
        Specified by:
        onModuleExit in interface org.hortonmachine.gears.libs.monitor.IHMProgressMonitor