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

Public Member Functions

 Welcome ()
 Constructor for welcome page. More...
 
JButton getStart ()
 gets the start button More...
 
JButton load ()
 gets the load button More...
 
JButton highScores ()
 gets the button to display high score More...
 
JButton tutorial ()
 gets the button to display instructions More...
 
JButton exit ()
 gets the button to exit the program More...
 
void addButton (JButton x)
 adds buttons to a panel More...
 
void addListener (ActionListener buttonListener)
 adds action listener to the buttons More...
 

Private Attributes

JButton start = new JButton("Start New Game")
 
JButton load = new JButton("Load Game")
 
JButton highScores = new JButton("High Scores")
 
JButton tutorial = new JButton("Tutorial")
 
JButton exit = new JButton("Exit")
 
JPanel buttonPanel
 

Constructor & Destructor Documentation

§ Welcome()

view.Welcome.Welcome ( )

Constructor for welcome page.

sets the header and size of window, and add buttons to it.

  • Set the header of the window
  • Set the size of the window

Add buttons on the window

Member Function Documentation

§ addButton()

void view.Welcome.addButton ( JButton  x)

adds buttons to a panel

makes buttons align in the panel

§ addListener()

void view.Welcome.addListener ( ActionListener  buttonListener)

adds action listener to the buttons

Parameters
buttonListeneris the action listener

§ exit()

JButton view.Welcome.exit ( )

gets the button to exit the program

Returns
exit

§ getStart()

JButton view.Welcome.getStart ( )

gets the start button

Returns
start indicates to start a new game

§ highScores()

JButton view.Welcome.highScores ( )

gets the button to display high score

Returns
highScores

§ load()

JButton view.Welcome.load ( )

gets the load button

Returns
load indicates to load a new game

§ tutorial()

JButton view.Welcome.tutorial ( )

gets the button to display instructions

Returns
tutorial

Member Data Documentation

§ buttonPanel

JPanel view.Welcome.buttonPanel
private

Define a panel for the arrangement of buttons

§ exit

JButton view.Welcome.exit = new JButton("Exit")
private

§ highScores

JButton view.Welcome.highScores = new JButton("High Scores")
private

§ load

JButton view.Welcome.load = new JButton("Load Game")
private

§ start

JButton view.Welcome.start = new JButton("Start New Game")
private

Variable declarations for the page

  • start a new game
  • load the previous game
  • display high score
  • tutorial
  • exit the game

§ tutorial

JButton view.Welcome.tutorial = new JButton("Tutorial")
private

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