org.openbandy.ui
Class Tests

java.lang.Object
  extended by javax.microedition.lcdui.Displayable
      extended by javax.microedition.lcdui.Screen
          extended by javax.microedition.lcdui.List
              extended by org.openbandy.ui.Tests
All Implemented Interfaces:
javax.microedition.lcdui.Choice, javax.microedition.lcdui.CommandListener, BandyDisplayable

public class Tests
extends javax.microedition.lcdui.List
implements javax.microedition.lcdui.CommandListener, BandyDisplayable

The Tests screen is the GUI to run unit tests.

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

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

Field Summary
 
Fields inherited from class javax.microedition.lcdui.List
SELECT_COMMAND
 
Fields inherited from interface javax.microedition.lcdui.Choice
EXCLUSIVE, IMPLICIT, MULTIPLE, POPUP, TEXT_WRAP_DEFAULT, TEXT_WRAP_OFF, TEXT_WRAP_ON
 
Constructor Summary
Tests()
          Create a new tests screen
 
Method Summary
 void addTest(Test test)
          Add a test to the screen
 void commandAction(javax.microedition.lcdui.Command c, javax.microedition.lcdui.Displayable d)
           
 void setTestFailed(Test test)
          Set the test to have failed execution, a red box image is shown.
 void setTestPassed(Test test)
          Set the test to have successfully executed, a checked box image is shown.
 void setTestReady(Test test)
          Set the test to be ready for execution, an empty checkbox image is shown.
 void setTestRunning(Test test)
          Set the test to be running, an small forward arrow image is shown.
 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.List
append, delete, deleteAll, getFitPolicy, getFont, getImage, getSelectedFlags, getSelectedIndex, getString, getTicker, insert, isSelected, removeCommand, set, setFitPolicy, setFont, setSelectCommand, setSelectedFlags, setSelectedIndex, setTicker, setTitle, size
 
Methods inherited from class javax.microedition.lcdui.Displayable
addCommand, getHeight, getTitle, getWidth, isShown, setCommandListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tests

public Tests()
Create a new tests screen

Method Detail

addTest

public void addTest(Test test)
Add a test to the screen

Parameters:
test - Test to be added to the gui list

setTestReady

public void setTestReady(Test test)
Set the test to be ready for execution, an empty checkbox image is shown.

Parameters:
test - Test to be set to be ready for execution

setTestRunning

public void setTestRunning(Test test)
Set the test to be running, an small forward arrow image is shown.

Parameters:
test - Test to be set as running

setTestPassed

public void setTestPassed(Test test)
Set the test to have successfully executed, a checked box image is shown.

Parameters:
test - Test to be set as passed (successfully)

setTestFailed

public void setTestFailed(Test test)
Set the test to have failed execution, a red box image is shown.

Parameters:
test - Test to be set to have failed execution

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

commandAction

public void commandAction(javax.microedition.lcdui.Command c,
                          javax.microedition.lcdui.Displayable d)
Specified by:
commandAction in interface javax.microedition.lcdui.CommandListener