edu.gatech.cs2335.lemmings.gui
Class LevelContainer

java.lang.Object
  extended byedu.gatech.cs2335.lemmings.gui.LComponent
      extended byedu.gatech.cs2335.lemmings.gui.LContainer
          extended byedu.gatech.cs2335.lemmings.gui.LevelContainer
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, IMouseWheelable

public final class LevelContainer
extends LContainer
implements java.awt.event.ActionListener, IMouseWheelable

Class LevelContainer: Basically a panel that contains level buttons.

 Revision History:
     v1.0 (Apr. 11, 2004) - Created the LevelContainer class
 

Version:
Version 1.0, Apr. 11, 2004
Author:
Vladimir Urazov

Field Summary
static int SPACING
          The number of pixels to put between the buttons.
static boolean VERBOSE
          Show debug output?
 
Constructor Summary
LevelContainer()
          Creates a new LevelContainer instance.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Describe actionPerformed method here.
 void addLevelButton(java.lang.String levelId)
          Creates a level button for the specified level id.
protected  void copy(LComponent component)
          Deep-copies self into the component passed in.
 java.lang.String getSelectedLevel()
          Describe getSelectedLevel method here.
protected  boolean paint(java.awt.Graphics g)
          Performs all of the necessary drawing for this control only.
 void processMouseWheel(int numClicks)
          Processes the mouse wheel rotation.
protected  void setSelectedButton(java.lang.String id)
          Sets up the selected button.
protected  void updateDimensions()
          Updates the bounds of the button.
 
Methods inherited from class edu.gatech.cs2335.lemmings.gui.LContainer
addChild, clear, findActiveChild, findChildAtCoordinates, getChildren, makeDirty, move, removeChild, renderAll
 
Methods inherited from class edu.gatech.cs2335.lemmings.gui.LComponent
bringToTop, cleanUp, getBounds, getParent, initialize, isActive, isComponentDirty, isShown, setBounds, setDirty, setParent, setPosition, setShown, setSize, setSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERBOSE

public static final boolean VERBOSE
Show debug output?

See Also:
Constant Field Values

SPACING

public static final int SPACING
The number of pixels to put between the buttons.

See Also:
Constant Field Values
Constructor Detail

LevelContainer

public LevelContainer()
Creates a new LevelContainer instance.

Method Detail

updateDimensions

protected void updateDimensions()
Updates the bounds of the button.

Overrides:
updateDimensions in class LComponent

addLevelButton

public void addLevelButton(java.lang.String levelId)
Creates a level button for the specified level id.

Parameters:
levelId - a String value

setSelectedButton

protected void setSelectedButton(java.lang.String id)
Sets up the selected button.

Parameters:
id - a String value

getSelectedLevel

public java.lang.String getSelectedLevel()
Describe getSelectedLevel method here.

Returns:
a String value

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Describe actionPerformed method here.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - an ActionEvent value

processMouseWheel

public void processMouseWheel(int numClicks)
Processes the mouse wheel rotation.

Specified by:
processMouseWheel in interface IMouseWheelable
Parameters:
numClicks - The number of clicks the wheel was rotated. A negative value means the wheel was rotated away from the user, and positive means it was rotated towards the user.

copy

protected void copy(LComponent component)
Deep-copies self into the component passed in.

Specified by:
copy in class LComponent
Parameters:
component - a LComponent value

paint

protected boolean paint(java.awt.Graphics g)
Performs all of the necessary drawing for this control only. The children will be taken care of separately. This method need not concern itself with them.

Specified by:
paint in class LComponent
Parameters:
g - a Graphics value
Returns:
a boolean value