Venice 0.751beta

nz.org.venice.ui
Class SecondaryProgressDialog

java.lang.Object
  extended bynz.org.venice.ui.SecondaryProgressDialog
All Implemented Interfaces:
ProgressDialog

public class SecondaryProgressDialog
extends java.lang.Object
implements ProgressDialog

This class is a proxy to the PrimaryProgressDialog class.

See ProgressDialogManager for details about using progress dialogs in venice.


Constructor Summary
SecondaryProgressDialog(PrimaryProgressDialog primaryProgressDialog)
          Create a new Secondary Progress Dialog.
 
Method Summary
 void decrement()
          Decrement current progress by one unit.
 int getMaximum()
          Get the maximum progress value.
 int getMinimum()
          Get the minimum progress value.
 java.lang.String getNote()
          Get the note or rather the action we are curently waiting for.
 int getProgress()
          Get current progress value.
 void hide()
          Close the dialog window.
 void increment()
          Increment current progress by one unit.
 boolean isIndeterminate()
          Return whether the dialog is indeterminate.
 boolean isMaster()
          Query if the dialog is a master dialog.
 void setIndeterminate(boolean indeterminate)
          Set whether the dialog is indeterminate.
 void setMaster(boolean master)
          Set whether dialog is a master dialog.
 void setMaximum(int maximum)
          Get the maximum progress value.
 void setMinimum(int minimum)
          Set the minimum progress value.
 void setNote(java.lang.String note)
          Set the note or rather the action we are curently waiting for.
 void setProgress(int progress)
          Set current progress value.
 void show(java.lang.String title)
          Show the dialog window.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecondaryProgressDialog

public SecondaryProgressDialog(PrimaryProgressDialog primaryProgressDialog)
Create a new Secondary Progress Dialog. This will actually create a proxy to the PrimaryProgressDialog. The purpose of this proxy is that it contains the logic to test whether or not it has the authority to change the real progress dialog. The Secondary Progress Dialog is returned when the programme calls ProgressDialogManager.getProgressDialog() and there is already a progress dialog up.

If this is the case, it might not be able to have full control over the progress dialog.

Parameters:
primaryProgressDialog - the progress dialog we are proxying
Method Detail

hide

public void hide()
Close the dialog window.

Specified by:
hide in interface ProgressDialog

show

public void show(java.lang.String title)
Show the dialog window.

Specified by:
show in interface ProgressDialog
Parameters:
title - the title should be set to the task that we are performing, which is not necessarily the action we are waiting for. e.g. the task might be "Graph CBA", but the action we are waiting for would be "Load CBA Quotes".

getNote

public java.lang.String getNote()
Get the note or rather the action we are curently waiting for. E.g. the task might be "Graph CBA", but the action we are waiting for would be "Load CBA Quotes".

Specified by:
getNote in interface ProgressDialog
Returns:
the action we are waiting for

setNote

public void setNote(java.lang.String note)
Set the note or rather the action we are curently waiting for. E.g. the task might be "Graph CBA", but the action we are waiting for would be "Load CBA Quotes".

Specified by:
setNote in interface ProgressDialog
Parameters:
note - the action we are waiting for

getMinimum

public int getMinimum()
Get the minimum progress value.

Specified by:
getMinimum in interface ProgressDialog
Returns:
the minimum progress value

setMinimum

public void setMinimum(int minimum)
Set the minimum progress value.

Specified by:
setMinimum in interface ProgressDialog
Parameters:
minimum - the minimum progress value

getMaximum

public int getMaximum()
Get the maximum progress value.

Specified by:
getMaximum in interface ProgressDialog
Returns:
the maximum progress value

setMaximum

public void setMaximum(int maximum)
Get the maximum progress value.

Specified by:
setMaximum in interface ProgressDialog
Parameters:
maximum - the maximum progress value

getProgress

public int getProgress()
Get current progress value.

Specified by:
getProgress in interface ProgressDialog
Returns:
Value of property progress

setProgress

public void setProgress(int progress)
Set current progress value.

Specified by:
setProgress in interface ProgressDialog
Parameters:
progress - New value of property progress

increment

public void increment()
Increment current progress by one unit.

Specified by:
increment in interface ProgressDialog

decrement

public void decrement()
Decrement current progress by one unit.

Specified by:
decrement in interface ProgressDialog

isIndeterminate

public boolean isIndeterminate()
Return whether the dialog is indeterminate. An indeterminate progress does not given the user any indication of when the task might be completed.

Specified by:
isIndeterminate in interface ProgressDialog
Returns:
true if no progress is displayed

setIndeterminate

public void setIndeterminate(boolean indeterminate)
Set whether the dialog is indeterminate. An indeterminate progress does not given the user any indication of when the task might be completed.

Specified by:
setIndeterminate in interface ProgressDialog
Parameters:
indeterminate - true if no progress can be displayed

setMaster

public void setMaster(boolean master)
Set whether dialog is a master dialog.

Specified by:
setMaster in interface ProgressDialog
Parameters:
master - whether the dialog is a master dialog
See Also:
ProgressDialogManager

isMaster

public boolean isMaster()
Query if the dialog is a master dialog.

Specified by:
isMaster in interface ProgressDialog
Returns:
whether the dialog is a master dialog
See Also:
ProgressDialogManager

Venice 0.751beta