org.tbee.swing
Class ProgressMonitor

java.lang.Object
  extended by org.tbee.swing.ProgressMonitor

public class ProgressMonitor
extends java.lang.Object

Replacement for Swing's ProgressMonitor


Field Summary
static java.lang.String CANCELLABLE_PROPERTY_ID
           
static java.lang.String COMPONENT_PROPERTY_ID
           
static java.lang.String MAXIMUM_PROPERTY_ID
           
static java.lang.String MESSAGE_PROPERTY_ID
           
static java.lang.String MILLISTODECIDETOPOPUP_PROPERTY_ID
           
static java.lang.String MILLISTOPOPUP_PROPERTY_ID
           
static java.lang.String MINIMUM_PROPERTY_ID
           
static java.lang.String MODALITYTYPE_PROPERTY_ID
           
static java.lang.String NOTE_PROPERTY_ID
           
static java.lang.String PROGRESS_PROPERTY_ID
           
 nl.knowledgeplaza.util.ProgressListener progressListener
          This is a ProgressListener that redirects to the ProgressMonitor.
 
Constructor Summary
ProgressMonitor(java.awt.Component parentComponent, java.lang.String message)
           
ProgressMonitor(java.awt.Component parentComponent, java.lang.String message, java.lang.String note, int min, int max)
           
 
Method Summary
 void close()
          Indicate that the operation is complete.
 boolean getCancellable()
          Cancellable:
 java.awt.Component getComponent()
          Component:
 int getMaximum()
          Maximum: the higher end of the progress value
 java.lang.String getMessage()
          Message: the progress message
 int getMillisToDecideToPopup()
          MillisToDecideToPopup: NOT USED!! the amount of time this object waits before deciding whether or not to popup a progress monitor
 int getMillisToPopup()
          MillisToPopup: Specifies the amount of time it will take for the popup to appear.
 int getMinimum()
          Minimum:
 java.awt.Dialog.ModalityType getModalityType()
          ModalityType: beware, this may block!
 java.lang.String getNote()
          note: the additional note that is displayed along with the progress message
 int getProgress()
          Progress:
 boolean isCanceled()
          Returns true if the user hits the Cancel button in the progress dialog.
 void setCancellable(boolean value)
           
 void setComponent(java.awt.Component value)
           
 void setMaximum(int value)
           
 void setMessage(java.lang.String value)
           
 void setMillisToDecideToPopup(int value)
           
 void setMillisToPopup(int value)
           
 void setMinimum(int value)
           
 void setModalityType(java.awt.Dialog.ModalityType value)
           
 void setNote(java.lang.String value)
           
 void setProgress(int value)
           
 ProgressMonitor showImmediately()
           
 void startTimer()
           
 ProgressMonitor withCancellable(boolean value)
           
 ProgressMonitor withComponent(java.awt.Component value)
           
 ProgressMonitor withMaximum(int value)
           
 ProgressMonitor withMessage(java.lang.String value)
           
 ProgressMonitor withMillisToDecideToPopup(int value)
           
 ProgressMonitor withMillisToPopup(int value)
           
 ProgressMonitor withMinimum(int value)
           
 ProgressMonitor withModalityType(java.awt.Dialog.ModalityType value)
           
 ProgressMonitor withNote(java.lang.String value)
           
 ProgressMonitor withProgress(int value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPONENT_PROPERTY_ID

public static final java.lang.String COMPONENT_PROPERTY_ID
See Also:
Constant Field Values

MINIMUM_PROPERTY_ID

public static final java.lang.String MINIMUM_PROPERTY_ID
See Also:
Constant Field Values

MAXIMUM_PROPERTY_ID

public static final java.lang.String MAXIMUM_PROPERTY_ID
See Also:
Constant Field Values

PROGRESS_PROPERTY_ID

public static final java.lang.String PROGRESS_PROPERTY_ID
See Also:
Constant Field Values

MILLISTODECIDETOPOPUP_PROPERTY_ID

public static final java.lang.String MILLISTODECIDETOPOPUP_PROPERTY_ID
See Also:
Constant Field Values

MILLISTOPOPUP_PROPERTY_ID

public static final java.lang.String MILLISTOPOPUP_PROPERTY_ID
See Also:
Constant Field Values

MESSAGE_PROPERTY_ID

public static final java.lang.String MESSAGE_PROPERTY_ID
See Also:
Constant Field Values

NOTE_PROPERTY_ID

public static final java.lang.String NOTE_PROPERTY_ID
See Also:
Constant Field Values

MODALITYTYPE_PROPERTY_ID

public static final java.lang.String MODALITYTYPE_PROPERTY_ID
See Also:
Constant Field Values

CANCELLABLE_PROPERTY_ID

public static final java.lang.String CANCELLABLE_PROPERTY_ID
See Also:
Constant Field Values

progressListener

public final nl.knowledgeplaza.util.ProgressListener progressListener
This is a ProgressListener that redirects to the ProgressMonitor. Business models usually do not use Swing classes, but the basic utility classes.

Constructor Detail

ProgressMonitor

public ProgressMonitor(java.awt.Component parentComponent,
                       java.lang.String message)
Parameters:
parentComponent -
message -

ProgressMonitor

public ProgressMonitor(java.awt.Component parentComponent,
                       java.lang.String message,
                       java.lang.String note,
                       int min,
                       int max)
Parameters:
parentComponent -
message -
note -
min -
max -
Method Detail

getComponent

public java.awt.Component getComponent()
Component:


setComponent

public void setComponent(java.awt.Component value)

withComponent

public ProgressMonitor withComponent(java.awt.Component value)

getMinimum

public int getMinimum()
Minimum:


setMinimum

public void setMinimum(int value)

withMinimum

public ProgressMonitor withMinimum(int value)

getMaximum

public int getMaximum()
Maximum: the higher end of the progress value


setMaximum

public void setMaximum(int value)

withMaximum

public ProgressMonitor withMaximum(int value)

getProgress

public int getProgress()
Progress:


setProgress

public void setProgress(int value)

withProgress

public ProgressMonitor withProgress(int value)

getMillisToDecideToPopup

public int getMillisToDecideToPopup()
MillisToDecideToPopup: NOT USED!! the amount of time this object waits before deciding whether or not to popup a progress monitor


setMillisToDecideToPopup

public void setMillisToDecideToPopup(int value)

withMillisToDecideToPopup

public ProgressMonitor withMillisToDecideToPopup(int value)

getMillisToPopup

public int getMillisToPopup()
MillisToPopup: Specifies the amount of time it will take for the popup to appear. (If the predicted time remaining is less than this time, the popup won't be displayed.)


setMillisToPopup

public void setMillisToPopup(int value)

withMillisToPopup

public ProgressMonitor withMillisToPopup(int value)

getMessage

public java.lang.String getMessage()
Message: the progress message


setMessage

public void setMessage(java.lang.String value)

withMessage

public ProgressMonitor withMessage(java.lang.String value)

getNote

public java.lang.String getNote()
note: the additional note that is displayed along with the progress message


setNote

public void setNote(java.lang.String value)

withNote

public ProgressMonitor withNote(java.lang.String value)

getModalityType

public java.awt.Dialog.ModalityType getModalityType()
ModalityType: beware, this may block!


setModalityType

public void setModalityType(java.awt.Dialog.ModalityType value)

withModalityType

public ProgressMonitor withModalityType(java.awt.Dialog.ModalityType value)

startTimer

public void startTimer()

close

public void close()
Indicate that the operation is complete. This thread must always run inside the EDT


isCanceled

public boolean isCanceled()
Returns true if the user hits the Cancel button in the progress dialog.


getCancellable

public boolean getCancellable()
Cancellable:


setCancellable

public void setCancellable(boolean value)

withCancellable

public ProgressMonitor withCancellable(boolean value)

showImmediately

public ProgressMonitor showImmediately()


Copyright © 2010 KnowledgePlaza. All Rights Reserved.