org.openbandy.ui
Class ProgressAlert

java.lang.Object
  extended by javax.microedition.lcdui.Displayable
      extended by javax.microedition.lcdui.Screen
          extended by javax.microedition.lcdui.Alert
              extended by org.openbandy.ui.ProgressAlert
All Implemented Interfaces:
BandyDisplayable

public class ProgressAlert
extends javax.microedition.lcdui.Alert
implements BandyDisplayable

The ProgressAlert class provides an alert that contains a gauge to indicate the progress of a task that might run for possibly long time.

(c) Copyright Philipp Bolliger 2007, ALL RIGHTS RESERVED.

Version:
1.0
Author:
Philipp Bolliger (philipp@bolliger.name)

Field Summary
 
Fields inherited from class javax.microedition.lcdui.Alert
DISMISS_COMMAND, FOREVER
 
Constructor Summary
ProgressAlert(java.lang.String text, javax.microedition.lcdui.AlertType type, int maxValue)
          Create a new ProgressAlert
 
Method Summary
 void advance()
          Advance the gauge indicator by one (until it has not already reached the maximum value).
 void dismiss()
          Release the alert and make the previous screen current again.
 void show()
          Make the progress alert the current screen, i.e., show it to the user.
 void show(javax.microedition.lcdui.Display display, javax.microedition.lcdui.Displayable previousDisplayable)
          Tells the BandyDisplayable to set itself as the current screen.
 
Methods inherited from class javax.microedition.lcdui.Alert
addCommand, getDefaultTimeout, getImage, getIndicator, getString, getTimeout, getType, removeCommand, setCommandListener, setImage, setIndicator, setString, setTimeout, setType
 
Methods inherited from class javax.microedition.lcdui.Displayable
getHeight, getTicker, getTitle, getWidth, isShown, setTicker, setTitle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProgressAlert

public ProgressAlert(java.lang.String text,
                     javax.microedition.lcdui.AlertType type,
                     int maxValue)
Create a new ProgressAlert

Parameters:
text - Indicate what task is taking this much time
type - The type of the alert (info, error etc)
maxValue - The maximum number of steps the current task will take to complete
Method Detail

show

public void show()
Make the progress alert the current screen, i.e., show it to the user.


advance

public void advance()
Advance the gauge indicator by one (until it has not already reached the maximum value). If the maximum value is reached, the progress alert will be dismissed.


dismiss

public void dismiss()
Release the alert and make the previous screen current again.


show

public void show(javax.microedition.lcdui.Display display,
                 javax.microedition.lcdui.Displayable previousDisplayable)
Description copied from interface: BandyDisplayable
Tells the BandyDisplayable to set itself as the current screen.

Specified by:
show in interface BandyDisplayable
Parameters:
display - The MIDlets display
previousDisplayable - The displayable that is shown before this one