Class TimeZoneGUI

java.lang.Object
  extended by TimeZoneGUI
All Implemented Interfaces:
ActionListener, EventListener

public class TimeZoneGUI
extends Object
implements ActionListener

An instance is a GUI to display and manipulate Times in a time zone.


Constructor Summary
TimeZoneGUI()
          Constructor: a GUI that contains: (0) a color panel, with text to describe the color.
 
Method Summary
 void actionPerformed(ActionEvent e)
          Process a click of one of the buttons.
 Box boxTimes()
          = box of times constructed from times and timeButtons.
 Box buttonsFields()
          = a Box with all the buttons and fields for input
 void fixBoxForTimes()
          Fix the box for times, to go in the east.
 void fixBoxTimes()
          Remove the box for times from the JFrame, make it up again, and add it
 Box instructionBox()
          = A Box with the instructions for the north panel
 void processCompareButton()
          Process click of compareButton()
 void processLegalityButton()
          Process a click of testLegalityButton
 void processTimeInZoneButton()
          Process click of getTimeInZoneButton
 int selectedButton(int k)
          = the index of first selected button in timeButtons[k..] (length of timeButtons if none)
static int toInt(String s)
          = s as an integer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeZoneGUI

public TimeZoneGUI()
Constructor: a GUI that contains: (0) a color panel, with text to describe the color. (1) the complementary color panel, with text to describe it. (2) Sliders for RGB, HSV, and CMYK. Initially, the color is red.

Method Detail

boxTimes

public Box boxTimes()
= box of times constructed from times and timeButtons.


instructionBox

public Box instructionBox()
= A Box with the instructions for the north panel


buttonsFields

public Box buttonsFields()
= a Box with all the buttons and fields for input


fixBoxForTimes

public void fixBoxForTimes()
Fix the box for times, to go in the east.


actionPerformed

public void actionPerformed(ActionEvent e)
Process a click of one of the buttons. They are: newTimeButton, testLegalityButton, compareButton, getTimeInZoneButton

Specified by:
actionPerformed in interface ActionListener

processCompareButton

public void processCompareButton()
Process click of compareButton()


processTimeInZoneButton

public void processTimeInZoneButton()
Process click of getTimeInZoneButton


processLegalityButton

public void processLegalityButton()
Process a click of testLegalityButton


selectedButton

public int selectedButton(int k)
= the index of first selected button in timeButtons[k..] (length of timeButtons if none)


fixBoxTimes

public void fixBoxTimes()
Remove the box for times from the JFrame, make it up again, and add it


toInt

public static int toInt(String s)
= s as an integer. If s is not an integer (possibly preceded by -), use 0.