FaultInOurPong  1
view.Mode Class Reference
Inheritance diagram for view.Mode:

Public Member Functions

 Mode ()
 Constructor for the player. More...
 
void addButton (JButton x)
 adds buttons to a panel More...
 
void addListener (ActionListener buttonListener)
 adds action listener to the buttons More...
 
JButton getSingle ()
 gets the button for single mode More...
 

Private Attributes

JButton single = new JButton("Single Player Mode")
 
JButton sObstacle = new JButton("Advanced Single Player Mode")
 
JPanel buttonPanel
 

Constructor & Destructor Documentation

§ Mode()

view.Mode.Mode ( )

Constructor for the player.

sets the size and header for the window, and adds buttons to the window

Setups for the frame

Setups for the buttons on the panel

Add the panel to the frame/window for display

Member Function Documentation

§ addButton()

void view.Mode.addButton ( JButton  x)

adds buttons to a panel

makes buttons align in the panel

§ addListener()

void view.Mode.addListener ( ActionListener  buttonListener)

adds action listener to the buttons

Parameters
buttonListeneris the action listener

§ getSingle()

JButton view.Mode.getSingle ( )

gets the button for single mode

Returns
single

Member Data Documentation

§ buttonPanel

JPanel view.Mode.buttonPanel
private

§ single

JButton view.Mode.single = new JButton("Single Player Mode")
private

Variable declarations for the buttons

  • easy single mode
  • single mode with obstacles
  • a panel that contains the buttons

§ sObstacle

JButton view.Mode.sObstacle = new JButton("Advanced Single Player Mode")
private

The documentation for this class was generated from the following file: