Class AbstractProgressUpdater

java.lang.Object
mgui.interfaces.gui.AbstractProgressUpdater
All Implemented Interfaces:
ProgressUpdater

public abstract class AbstractProgressUpdater
extends java.lang.Object
implements ProgressUpdater
An abstract updater with default implementations for all methods
Since:
1.0
Version:
1.0
Author:
Andrew Reid
  • Nested Class Summary

    Nested classes/interfaces inherited from interface mgui.interfaces.ProgressUpdater

    ProgressUpdater.Mode
  • Field Summary

    Fields
    Modifier and Type Field Description
    protected boolean allow_changes  
    protected int current_value  
    protected boolean is_cancelled  
    protected boolean is_indeterminate  
    protected int maximum  
    protected java.lang.String message  
    protected int minimum  
  • Constructor Summary

    Constructors
    Constructor Description
    AbstractProgressUpdater()  
  • Method Summary

    Modifier and Type Method Description
    boolean allowChanges()
    Allow processes to change the settings of this progress bar? Implementing classes can choose whether or not to enforce this.
    void cancel()
    Cancels execution of the process monitored by this updater.
    void deregister()
    Deregisters this progress updater with the ModelGUI session
    int getMaximum()  
    int getMinimum()  
    boolean isCancelled()
    Indicates whether the monitored process has been cancelled
    void iterate()
    Increment progress by 1
    void register()
    Registers this progress updater with the ModelGUI session
    void reset()  
    void setIndeterminate​(boolean b)
    Sets whether this progress updater should be considered indeterminate; i.e., progress cannot be estimated.
    void setMaximum​(int max)  
    void setMessage​(java.lang.String message)
    Sets the message for this progress updater
    void setMinimum​(int min)  
    void setMode​(ProgressUpdater.Mode mode)  
    void update​(int t)
    Uodates the value of this progress indicator

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • current_value

      protected int current_value
    • minimum

      protected int minimum
    • maximum

      protected int maximum
    • is_cancelled

      protected boolean is_cancelled
    • message

      protected java.lang.String message
    • is_indeterminate

      protected boolean is_indeterminate
    • allow_changes

      protected boolean allow_changes
  • Constructor Details

    • AbstractProgressUpdater

      public AbstractProgressUpdater()
  • Method Details

    • iterate

      public void iterate()
      Description copied from interface: ProgressUpdater
      Increment progress by 1
      Specified by:
      iterate in interface ProgressUpdater
    • update

      public void update​(int t)
      Description copied from interface: ProgressUpdater
      Uodates the value of this progress indicator
      Specified by:
      update in interface ProgressUpdater
    • setMinimum

      public void setMinimum​(int min)
      Specified by:
      setMinimum in interface ProgressUpdater
    • setMaximum

      public void setMaximum​(int max)
      Specified by:
      setMaximum in interface ProgressUpdater
    • getMinimum

      public int getMinimum()
      Specified by:
      getMinimum in interface ProgressUpdater
    • getMaximum

      public int getMaximum()
      Specified by:
      getMaximum in interface ProgressUpdater
    • cancel

      public void cancel()
      Description copied from interface: ProgressUpdater
      Cancels execution of the process monitored by this updater. The process must respect the cancel notification for this call to have effect.
      Specified by:
      cancel in interface ProgressUpdater
    • isCancelled

      public boolean isCancelled()
      Description copied from interface: ProgressUpdater
      Indicates whether the monitored process has been cancelled
      Specified by:
      isCancelled in interface ProgressUpdater
      Returns:
    • setMode

      public void setMode​(ProgressUpdater.Mode mode)
      Specified by:
      setMode in interface ProgressUpdater
    • reset

      public void reset()
      Specified by:
      reset in interface ProgressUpdater
    • register

      public void register()
      Description copied from interface: ProgressUpdater
      Registers this progress updater with the ModelGUI session
      Specified by:
      register in interface ProgressUpdater
    • deregister

      public void deregister()
      Description copied from interface: ProgressUpdater
      Deregisters this progress updater with the ModelGUI session
      Specified by:
      deregister in interface ProgressUpdater
    • setMessage

      public void setMessage​(java.lang.String message)
      Description copied from interface: ProgressUpdater
      Sets the message for this progress updater
      Specified by:
      setMessage in interface ProgressUpdater
    • setIndeterminate

      public void setIndeterminate​(boolean b)
      Description copied from interface: ProgressUpdater
      Sets whether this progress updater should be considered indeterminate; i.e., progress cannot be estimated.
      Specified by:
      setIndeterminate in interface ProgressUpdater
    • allowChanges

      public boolean allowChanges()
      Description copied from interface: ProgressUpdater
      Allow processes to change the settings of this progress bar? Implementing classes can choose whether or not to enforce this.
      Specified by:
      allowChanges in interface ProgressUpdater
      Returns: