Class RunGame

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JInternalFrame
                          |
                          +--RunGame

public class RunGame
extends javax.swing.JInternalFrame
implements java.awt.event.ActionListener

Used for data collection from children.

Author:
Karen Stevens.
See Also:
Serialized Form

Inner classes inherited from class javax.swing.JInternalFrame
javax.swing.JInternalFrame.AccessibleJInternalFrame, javax.swing.JInternalFrame.JDesktopIcon
 
Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent, javax.swing.JComponent.IntVector, javax.swing.JComponent.KeyboardBinding, javax.swing.JComponent.KeyboardState
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AWTTreeLock
 
Field Summary
protected  javax.swing.JLabel[] Atr1
          Attribute information for board 1, screen 3.
protected  javax.swing.JLabel[] Atr1b
          Ranking attributes for board 1, on screen 5.
protected  javax.swing.JLabel[] Atr2
          Attribute information for board 2, screen 4.
protected  javax.swing.JLabel[] Atr2b
          Attribute ranking buttons for board 1, on screen 6.
protected  javax.swing.JButton Done1
          Button for finishing board 1, screen 3.
protected  javax.swing.JButton Done2
          Button for finishing board 2, screen 4.
protected  ButtonObject[] Game1But
          Buttons for view button boxes; board 1, screen 3.
protected  PanelObject[] Game1Pan
          Border for view button boxes; board 1, screen 3.
protected  TextObject[] Game1Text
          Text areas for view button boxes; board 1, screen 3.
protected  ButtonObject[] Game2But
          Buttons for view button boxes; board 2, screen 4.
protected  PanelObject[] Game2Pan
          Border for view button boxes; board 2, screen 4.
protected  TextObject[] Game2Text
          Text areas for view button boxes; board 2, screen 4.
protected  javax.swing.ButtonGroup Group1
          Used to organize board 1 radio buttons on screen 3.
protected  javax.swing.JLabel Group1Name
          Group name of board 1, screen 3.
protected  javax.swing.ButtonGroup Group2
          Used to organize board 2 radio buttons on screen 4.
protected  javax.swing.JLabel Group2Name
          Group name of board 2, screen 4.
protected  javax.swing.JRadioButton Invis1
          Used for hidden button -- appearance of all buttons unclicked.
protected  javax.swing.JRadioButton Invis2
          Used for hidden button -- appearance of all buttons unclicked.
protected  javax.swing.JButton LoadGameSetupFileButton
          Load game setup file button, located on screen 1.
protected  java.awt.Color MyColor
          Set background color.
protected  java.util.Date MyDate
          Used for gathering time information.
protected  RunGameObject MyRunData
          Variable used to save run game information.
protected  long mytime
          Used for gathering time information.
protected  javax.swing.JButton Next1
          Next button, located on screen 1.
protected  javax.swing.JButton Next2
          Screen 2 next button.
protected  javax.swing.JButton Next5
          Screen 5 next button.
protected  int Next5ok
          Enabling device for Next5.
protected  javax.swing.JButton Next6
          Next button on screen 6.
protected  int Next6ok
          Determines if screen 6 next button should be enabled.
protected  javax.swing.JButton Next7
          Screen 7 next button.
protected  int Next7ok
          Determines if next button on screen 7 is enabled.
protected  javax.swing.JButton Next8
          Next button for screen 8.
protected  long prev1
          Used to fing run time on board 1.
protected  long prev2
          Used to fing run time on board 2.
protected  javax.swing.JPanel[] QuestionBars
          Question ranking panels on screen 7.
protected  javax.swing.JButton[] QuestionButtons
          Question ranking button on screen 7.
protected  javax.swing.JTextArea[] QuestionData
          Question ranking data areas on screen 7.
protected  javax.swing.JSlider[] QuestionSliders
          Question ranking sliders on screen 7.
protected  javax.swing.JRadioButton[] Radio1
          Item picked on board 1, screen 3.
protected  javax.swing.JRadioButton[] Radio2
          Item picked on board 2, screen 4.
protected  javax.swing.JPanel[] Rank1Bars
          Ranking attribute information for board 1, on screen 5.
protected  javax.swing.JButton[] Rank1Buttons
          Ranking attribute buttons for board 1, on screen 5.
protected  javax.swing.JSlider[] Rank1Sliders
          Ranking attribute sliderss for board 1, on screen 5.
protected  javax.swing.JPanel[] Rank2Bars
          Attribute ranking panels for board 1, on screen 6.
protected  javax.swing.JButton[] Rank2Buttons
          Attribute ranking buttons for board 1, on screen 6.
protected  javax.swing.JSlider[] Rank2Sliders
          Attribute ranking sliders for board 1, on screen 6.
protected  javax.swing.JButton ResetGameButton
          Resets all game information for fresh run.
protected  javax.swing.JButton SaveGameButton
          Triggers save game action.
protected  javax.swing.JPanel Screen1
          Display for loading game setup files.
protected  javax.swing.JPanel Screen2
          Display for entering child data.
protected  javax.swing.JLabel Screen2Label
          Label child information, located on screen 2.
protected  javax.swing.JTextArea Screen2TextArea
          Child information text area, located on screen 2.
protected  javax.swing.JPanel Screen3
          Display for running first game board.
protected  javax.swing.JPanel Screen4
          Display for running second game board.
protected  javax.swing.JPanel Screen5
          Display for querying children on board1 1 attribute ranking.
protected  javax.swing.JPanel Screen6
          Display for querying children on board 2 attribute ranking.
protected  javax.swing.JPanel Screen7
          Display for querying children on questions information.
protected  javax.swing.JPanel Screen8
          Display for I'm Done screen.
protected  javax.swing.JPanel Screen9
          Display for saving run game data.
 
Fields inherited from class javax.swing.JInternalFrame
closable, CONTENT_PANE_PROPERTY, defaultCloseOperation, desktopIcon, FRAME_ICON_PROPERTY, frameIcon, GLASS_PANE_PROPERTY, iconable, IS_CLOSED_PROPERTY, IS_ICON_PROPERTY, IS_MAXIMUM_PROPERTY, IS_SELECTED_PROPERTY, isClosed, isIcon, isMaximum, isSelected, LAYERED_PANE_PROPERTY, maximizable, MENU_BAR_PROPERTY, opened, resizable, ROOT_PANE_PROPERTY, rootPane, rootPaneCheckingEnabled, title, TITLE_PROPERTY, uiClassID
 
Fields inherited from class javax.swing.JComponent
_bounds, accessibleContext, alignmentX, alignmentY, ANCESTOR_USING_BUFFER, ancestorNotifier, autoscroller, border, changeSupport, clientProperties, flags, HAS_FOCUS, IS_DOUBLE_BUFFERED, IS_OPAQUE, IS_PAINTING_TILE, KEYBOARD_BINDINGS_KEY, listenerList, maximumSize, minimumSize, NEXT_FOCUS, paintImmediatelyClip, preferredSize, readObjectCallbacks, REQUEST_FOCUS_DISABLED, tmpRect, TOOL_TIP_TEXT_KEY, ui, uiClassID, UNDEFINED_CONDITION, vetoableChangeSupport, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Container
component, containerListener, containerSerializedDataVersion, dispatcher, layoutMgr, maxSize, ncomponents, serialVersionUID
 
Fields inherited from class java.awt.Component
actionListenerK, adjustmentListenerK, appContext, assert, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, hasFocus, height, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, RIGHT_ALIGNMENT, serialVersionUID, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowListenerK, x, y
 
Constructor Summary
RunGame()
          Setup the graphical interface to run a game.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent evt)
          Triggered by button events.
 void LoadGameFileFunction(java.io.File filename)
          Loads game setup information.
 void LoadGameSetupFileInterface()
          Graphical interface to load game setup file.
 void RedoScreen3()
          Refresh screen 3 display with new data.
 void RedoScreen4()
          Reset information on screen 4 with new data.
 void RedoScreen5()
          Refresh screen 5 information.
 void RedoScreen6()
          Refresh screen 6 interface.
 void RedoScreen7()
          Refresh information on Screen 7.
 void ResetGameFunction()
          Reset game interface to its original state.
 void SaveGameFunction(java.io.File filename)
          Saves a game to a file.
 void SaveGameInterface()
          Gather file info for saving a game.
 void Screen1Setup()
          Setup interface for screen 1.
 void Screen2Setup()
          Setup interface for screen 2.
 void Screen3Setup()
          Setup interface for screen 3.
 void Screen4Setup()
          Setup interface for screen 4.
 void Screen5Setup()
          Setup interface on screen 5.
 void Screen6Setup()
          Setup screen 6 interface.
 void Screen7Setup()
          Setup screen 7 interface.
 void Screen8Setup()
          Setup screen 8.
 void Screen9Setup()
          Setup data for screen 9.
 void SetupGameData()
          Initializes game variables.
 void SetupGameObjects()
          Initialize game data types.
 void SetupScreens()
          Set visibility and viewability of screens.
 
Methods inherited from class javax.swing.JInternalFrame
addImpl, addInternalFrameListener, createRootPane, createRootPaneException, dispose, doDefaultCloseAction, fireInternalFrameEvent, getAccessibleContext, getBackground, getContentPane, getDefaultCloseOperation, getDesktopIcon, getDesktopPane, getForeground, getFrameIcon, getGlassPane, getJMenuBar, getLayer, getLayeredPane, getMenuBar, getRootPane, getTitle, getUI, getUIClassID, getWarningString, isClosable, isClosed, isIcon, isIconifiable, isMaximizable, isMaximum, isResizable, isRootPaneCheckingEnabled, isSelected, moveToBack, moveToFront, pack, paramString, removeInternalFrameListener, reshape, setBackground, setClosable, setClosed, setContentPane, setDefaultCloseOperation, setDesktopIcon, setForeground, setFrameIcon, setGlassPane, setIcon, setIconifiable, setJMenuBar, setLayer, setLayeredPane, setLayout, setMaximizable, setMaximum, setMenuBar, setResizable, setRootPane, setRootPaneCheckingEnabled, setSelected, setTitle, setUI, setVisible, show, startModal, stopModal, toBack, toFront, updateUI, updateUIWhenHidden, writeObject
 
Methods inherited from class javax.swing.JComponent
_paintImmediately, , addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, adjustPaintFlags, alwaysOnTop, bindingForKeyStroke, computeVisibleRect, computeVisibleRect, contains, createToolTip, enableSerialization, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperties, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getFlag, getGraphics, getHeight, getInsets, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, keyboardBindings, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paintWithBuffer, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyBindings, processKeyBindingsForAllComponents, processKeyEvent, processMouseMotionEvent, putClientProperty, readObject, rectangleIsObscured, registerKeyboardAction, registerKeyboardAction, registerWithKeyboardManager, removeAncestorListener, removeNotify, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFlag, setFont, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, shouldDebugGraphics, superProcessMouseMotionEvent, unregisterKeyboardAction, unregisterWithKeyboardManager, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyOrientation, countComponents, deliverEvent, dispatchEventImpl, dispatchEventToSelf, doLayout, eventEnabled, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getLayout, getMouseEventTarget, getWindow, initIDs, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPrint, list, list, locate, minimumSize, nextFocus, paintComponents, postProcessKeyEvent, postsOldMouseEvents, preferredSize, preProcessKeyEvent, print, printComponents, printOneComponent, processContainerEvent, processEvent, proxyEnableEvents, proxyRequestFocus, remove, remove, removeAll, removeContainerListener, setFocusOwner, transferFocus, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, coalesceEvents, constructComponentName, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getToolkit, getToolkitImpl, getTreeLock, getWindowForObject, gotFocus, handleEvent, hide, imageUpdate, inside, isDisplayable, isEnabled, isEnabledImpl, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

MyColor

protected java.awt.Color MyColor
Set background color.

mytime

protected long mytime
Used for gathering time information.

MyDate

protected java.util.Date MyDate
Used for gathering time information.

prev1

protected long prev1
Used to fing run time on board 1.

prev2

protected long prev2
Used to fing run time on board 2.

Screen1

protected javax.swing.JPanel Screen1
Display for loading game setup files.

Screen2

protected javax.swing.JPanel Screen2
Display for entering child data.

Screen3

protected javax.swing.JPanel Screen3
Display for running first game board.

Screen4

protected javax.swing.JPanel Screen4
Display for running second game board.

Screen5

protected javax.swing.JPanel Screen5
Display for querying children on board1 1 attribute ranking.

Screen6

protected javax.swing.JPanel Screen6
Display for querying children on board 2 attribute ranking.

Screen7

protected javax.swing.JPanel Screen7
Display for querying children on questions information.

Screen9

protected javax.swing.JPanel Screen9
Display for saving run game data.

Screen8

protected javax.swing.JPanel Screen8
Display for I'm Done screen.

MyRunData

protected RunGameObject MyRunData
Variable used to save run game information.

LoadGameSetupFileButton

protected javax.swing.JButton LoadGameSetupFileButton
Load game setup file button, located on screen 1.

Next1

protected javax.swing.JButton Next1
Next button, located on screen 1.

Screen2Label

protected javax.swing.JLabel Screen2Label
Label child information, located on screen 2.

Screen2TextArea

protected javax.swing.JTextArea Screen2TextArea
Child information text area, located on screen 2.

Next2

protected javax.swing.JButton Next2
Screen 2 next button.

Game1Pan

protected PanelObject[] Game1Pan
Border for view button boxes; board 1, screen 3.

Game1But

protected ButtonObject[] Game1But
Buttons for view button boxes; board 1, screen 3.

Game1Text

protected TextObject[] Game1Text
Text areas for view button boxes; board 1, screen 3.

Done1

protected javax.swing.JButton Done1
Button for finishing board 1, screen 3.

Atr1

protected javax.swing.JLabel[] Atr1
Attribute information for board 1, screen 3.

Group1Name

protected javax.swing.JLabel Group1Name
Group name of board 1, screen 3.

Radio1

protected javax.swing.JRadioButton[] Radio1
Item picked on board 1, screen 3.

Invis1

protected javax.swing.JRadioButton Invis1
Used for hidden button -- appearance of all buttons unclicked. Screen 3.

Group1

protected javax.swing.ButtonGroup Group1
Used to organize board 1 radio buttons on screen 3.

Game2Pan

protected PanelObject[] Game2Pan
Border for view button boxes; board 2, screen 4.

Game2But

protected ButtonObject[] Game2But
Buttons for view button boxes; board 2, screen 4.

Game2Text

protected TextObject[] Game2Text
Text areas for view button boxes; board 2, screen 4.

Done2

protected javax.swing.JButton Done2
Button for finishing board 2, screen 4.

Atr2

protected javax.swing.JLabel[] Atr2
Attribute information for board 2, screen 4.

Group2Name

protected javax.swing.JLabel Group2Name
Group name of board 2, screen 4.

Radio2

protected javax.swing.JRadioButton[] Radio2
Item picked on board 2, screen 4.

Invis2

protected javax.swing.JRadioButton Invis2
Used for hidden button -- appearance of all buttons unclicked. Screen 4.

Group2

protected javax.swing.ButtonGroup Group2
Used to organize board 2 radio buttons on screen 4.

Atr1b

protected javax.swing.JLabel[] Atr1b
Ranking attributes for board 1, on screen 5.

Rank1Sliders

protected javax.swing.JSlider[] Rank1Sliders
Ranking attribute sliderss for board 1, on screen 5.

Rank1Buttons

protected javax.swing.JButton[] Rank1Buttons
Ranking attribute buttons for board 1, on screen 5.

Next5

protected javax.swing.JButton Next5
Screen 5 next button.

Rank1Bars

protected javax.swing.JPanel[] Rank1Bars
Ranking attribute information for board 1, on screen 5.

Next5ok

protected int Next5ok
Enabling device for Next5.

Atr2b

protected javax.swing.JLabel[] Atr2b
Attribute ranking buttons for board 1, on screen 6.

Rank2Sliders

protected javax.swing.JSlider[] Rank2Sliders
Attribute ranking sliders for board 1, on screen 6.

Rank2Buttons

protected javax.swing.JButton[] Rank2Buttons
Attribute ranking buttons for board 1, on screen 6.

Rank2Bars

protected javax.swing.JPanel[] Rank2Bars
Attribute ranking panels for board 1, on screen 6.

Next6

protected javax.swing.JButton Next6
Next button on screen 6.

Next6ok

protected int Next6ok
Determines if screen 6 next button should be enabled.

QuestionBars

protected javax.swing.JPanel[] QuestionBars
Question ranking panels on screen 7.

QuestionSliders

protected javax.swing.JSlider[] QuestionSliders
Question ranking sliders on screen 7.

QuestionButtons

protected javax.swing.JButton[] QuestionButtons
Question ranking button on screen 7.

QuestionData

protected javax.swing.JTextArea[] QuestionData
Question ranking data areas on screen 7.

Next7

protected javax.swing.JButton Next7
Screen 7 next button.

Next7ok

protected int Next7ok
Determines if next button on screen 7 is enabled.

SaveGameButton

protected javax.swing.JButton SaveGameButton
Triggers save game action.

ResetGameButton

protected javax.swing.JButton ResetGameButton
Resets all game information for fresh run.

Next8

protected javax.swing.JButton Next8
Next button for screen 8.
Constructor Detail

RunGame

public RunGame()
Setup the graphical interface to run a game.
Method Detail

SetupGameData

public void SetupGameData()
Initializes game variables.

Screen1Setup

public void Screen1Setup()
Setup interface for screen 1.

Screen2Setup

public void Screen2Setup()
Setup interface for screen 2.

Screen3Setup

public void Screen3Setup()
Setup interface for screen 3.

RedoScreen3

public void RedoScreen3()
Refresh screen 3 display with new data.

Screen4Setup

public void Screen4Setup()
Setup interface for screen 4.

RedoScreen4

public void RedoScreen4()
Reset information on screen 4 with new data.

Screen5Setup

public void Screen5Setup()
Setup interface on screen 5.

RedoScreen5

public void RedoScreen5()
Refresh screen 5 information.

Screen6Setup

public void Screen6Setup()
Setup screen 6 interface.

RedoScreen6

public void RedoScreen6()
Refresh screen 6 interface.

Screen7Setup

public void Screen7Setup()
Setup screen 7 interface.

RedoScreen7

public void RedoScreen7()
Refresh information on Screen 7.

Screen9Setup

public void Screen9Setup()
Setup data for screen 9.

Screen8Setup

public void Screen8Setup()
Setup screen 8.

SetupScreens

public void SetupScreens()
Set visibility and viewability of screens.

SetupGameObjects

public void SetupGameObjects()
Initialize game data types.

LoadGameSetupFileInterface

public void LoadGameSetupFileInterface()
Graphical interface to load game setup file.

LoadGameFileFunction

public void LoadGameFileFunction(java.io.File filename)
Loads game setup information.
Parameters:
filename - File name of data to load.

ResetGameFunction

public void ResetGameFunction()
Reset game interface to its original state.

SaveGameInterface

public void SaveGameInterface()
Gather file info for saving a game.

SaveGameFunction

public void SaveGameFunction(java.io.File filename)
Saves a game to a file.
Parameters:
filename - File to save data to.

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent evt)
Triggered by button events.
Specified by:
actionPerformed in interface java.awt.event.ActionListener