|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.gatech.cs2335.lemmings.gui.LComponent
edu.gatech.cs2335.lemmings.gui.LLeafComponent
edu.gatech.cs2335.lemmings.gui.LAbstractButton
edu.gatech.cs2335.lemmings.gui.JobButton
Class JobButton: This button will display the animation for the job specified, and the number of that type of job available.
Revision History:
v1.0 (Apr. 07, 2004) - Created the JobButton class
| Field Summary | |
static java.awt.Color |
SELECTED_COLOR
The color to use for selected buttons. |
static java.awt.Color |
UNSELECTED_COLOR
The color to use for unselected buttons. |
| Constructor Summary | |
JobButton(Level l,
java.lang.String id)
Creates a new JobButton instance. |
|
| Method Summary | |
protected void |
copy(LComponent component)
Deep-copies self into the component passed in. |
LemmingJob |
getLemmingJob()
Returns the job associated with this button. |
Level |
getLevel()
Returns the level associated with this button. |
boolean |
isSelected()
Returns whether or not the button is currently selected. |
protected boolean |
paint(java.awt.Graphics g)
Performs all of the necessary drawing for this control only. |
void |
setLemmingJob(java.lang.String id)
Sets up a new job for this button. |
void |
setLevel(Level l)
Sets up a new level for this button. |
void |
setSelected(boolean v)
Describe setSelected method here. |
void |
toggleSelected()
Toggles the selection on the button. |
java.lang.String |
toString()
Describe toString method here. |
protected void |
updateButton()
Updates the button. |
protected void |
updateDimensions()
Updates the bounds of the button. |
| Methods inherited from class edu.gatech.cs2335.lemmings.gui.LAbstractButton |
addActionListener, fireActionPerformed, getActionCommand, getActionListeners, registerMouseClick, removeActionListener, setActionCommand, setActionListeners |
| Methods inherited from class edu.gatech.cs2335.lemmings.gui.LLeafComponent |
makeDirty, move, 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, wait, wait, wait |
| Field Detail |
public static final java.awt.Color UNSELECTED_COLOR
public static final java.awt.Color SELECTED_COLOR
| Constructor Detail |
public JobButton(Level l,
java.lang.String id)
JobButton instance.
l - a Level valueid - a String value| Method Detail |
public Level getLevel()
Level valuepublic void setLevel(Level l)
l - a Level valuepublic LemmingJob getLemmingJob()
LemmingJob valuepublic void setLemmingJob(java.lang.String id)
id - a String valuepublic boolean isSelected()
boolean valuepublic void setSelected(boolean v)
setSelected method here.
v - a boolean valuepublic void toggleSelected()
protected void updateButton()
protected void updateDimensions()
updateDimensions in class LComponentprotected void copy(LComponent component)
copy in class LComponentcomponent - a LComponent valueprotected boolean paint(java.awt.Graphics g)
paint in class LComponentg - a Graphics value
boolean valuepublic java.lang.String toString()
toString method here.
String value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||