|
||||||||||
| 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.LContainer
edu.gatech.cs2335.lemmings.gui.JobContainer
Class JobContainer: The container for lemming job buttons. It will display them and align them nicely and stuff.
Revision History:
v1.0 (Apr. 10, 2004) - Created the JobContainer class
| Field Summary | |
static int |
SPACING
The number of pixels to put between the buttons. |
static int |
X_AXIS
Tells the container that the buttons should be arranged on the x-axis. |
static int |
Y_AXIS
Tells the container that the buttons should be arranged on the y-axis. |
| Constructor Summary | |
JobContainer(Level l)
Creates a new JobContainer instance. |
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
Describe actionPerformed method here. |
void |
addJobButton(java.lang.String jobId)
Adds a job button for the job with the specified ID. |
void |
addJobSelectionListener(JobSelectionListener l)
Adds an JobSelectionListener to the button. |
protected void |
copy(LComponent component)
Deep-copies self into the component passed in. |
protected void |
fireJobSelected(JobSelectionEvent e)
Notifies all listeners that have registered interest for notification on this event type. |
int |
getArrangement()
Describe getArrangement method here. |
protected java.util.List |
getJobSelectionListeners()
Returns the listeners for this button. |
Level |
getLevel()
Describe getLevel method here. |
protected boolean |
paint(java.awt.Graphics g)
Performs all of the necessary drawing for this control only. |
protected void |
rearrangeButtons()
Rearranges all buttons. |
void |
removeJobSelectionListener(JobSelectionListener l)
Removes an JobSelectionListener from the button. |
void |
setArrangement(int a)
Describe setArrangment method here. |
protected void |
setJobSelectionListeners(java.util.List ll)
Sets up the list of action listeners. |
void |
setLevel(Level l)
Describe setLevel method here. |
void |
setSelectedButton(java.lang.String id)
Selects the button with the spercified id. |
void |
updateButtons()
Updates the buttons. |
| 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, updateDimensions |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int X_AXIS
public static final int Y_AXIS
public static final int SPACING
| Constructor Detail |
public JobContainer(Level l)
JobContainer instance.
l - a Level value| Method Detail |
public void addJobSelectionListener(JobSelectionListener l)
l - the JobSelectionListener to be added.public void removeJobSelectionListener(JobSelectionListener l)
l - the listener to be removed.protected java.util.List getJobSelectionListeners()
List valueprotected void setJobSelectionListeners(java.util.List ll)
ll - a List valueprotected void fireJobSelected(JobSelectionEvent e)
e - the JobSelectionEvent object.public Level getLevel()
getLevel method here.
Level valuepublic void setLevel(Level l)
setLevel method here.
l - a Level valuepublic int getArrangement()
getArrangement method here.
int valuepublic void setArrangement(int a)
setArrangment method here.
a - an int valuepublic void addJobButton(java.lang.String jobId)
jobId - a String valueprotected void rearrangeButtons()
public void updateButtons()
public void setSelectedButton(java.lang.String id)
id - a String valuepublic void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed method here.
actionPerformed in interface java.awt.event.ActionListenere - an ActionEvent valueprotected 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 value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||