|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmhframework.gui.MHGUIComponentList
public class MHGUIComponentList
Container class for maintaining a list of my custom GUI components. It is responsible for rendering each component and passing events to them.
The MHScreen class contains an MHGUIComponentList object as a data member, giving every game screen the inherent ability to use GUI components.
Constructor Summary | |
---|---|
MHGUIComponentList()
|
Method Summary | |
---|---|
void |
add(int index,
MHGUIComponent component)
Method add. |
void |
add(MHGUIComponent c)
|
void |
advance()
Tells an object to update its data. |
MHGUIComponent |
get(int index)
|
MHGUIComponent |
getFocusedComponent()
|
int |
getSize()
|
void |
keyPressed(java.awt.event.KeyEvent e)
|
void |
keyReleased(java.awt.event.KeyEvent e)
|
void |
keyTyped(java.awt.event.KeyEvent e)
|
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
nextFocusableComponent()
|
void |
prevFocusableComponent()
|
void |
remove(MHGUIComponent c)
|
void |
render(java.awt.Graphics2D g)
Tells an object to draw itself onto the sent Graphics object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MHGUIComponentList()
Method Detail |
---|
public void add(MHGUIComponent c)
public void remove(MHGUIComponent c)
public void render(java.awt.Graphics2D g)
MHRenderable
render
in interface MHRenderable
g
- The Graphics object on which this object is to draw itself.public void advance()
MHRenderable
advance
in interface MHRenderable
public MHGUIComponent getFocusedComponent()
public void nextFocusableComponent()
public void prevFocusableComponent()
public void mouseClicked(java.awt.event.MouseEvent e)
public void mousePressed(java.awt.event.MouseEvent e)
public void mouseReleased(java.awt.event.MouseEvent e)
public void mouseMoved(java.awt.event.MouseEvent e)
public void keyPressed(java.awt.event.KeyEvent e)
public void keyReleased(java.awt.event.KeyEvent e)
public void keyTyped(java.awt.event.KeyEvent e)
public MHGUIComponent get(int index)
public int getSize()
public void add(int index, MHGUIComponent component)
component
- index
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |