|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmhframework.gui.MHGUIComponent
mhframework.gui.MHGUIButtonMenu
public class MHGUIButtonMenu
Class for making a menu of buttons.
Field Summary |
---|
Fields inherited from class mhframework.gui.MHGUIComponent |
---|
focusable, height, state, width |
Constructor Summary | |
---|---|
MHGUIButtonMenu()
Constructor. |
Method Summary | |
---|---|
void |
add(int index,
MHGUIComponent component)
Adds a button or other component to the menu. |
void |
add(MHGUIComponent component)
Adds a button or other component to the menu. |
void |
advance()
Tells an object to update its data. |
MHGUIComponentList |
getButtons()
Returns the buttons. |
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 |
render(java.awt.Graphics2D g)
Tells an object to draw itself onto the sent Graphics object. |
void |
setBackgroundColor(java.awt.Color bgColor)
Sets the color for the menu's background. |
void |
setBorderSpacing(int b)
Sets the distance in pixels between the edge of the menu and the buttons on the menu. |
void |
setButtonSize(int width,
int height)
Sets the width and height of every button on the menu. |
void |
setText(java.lang.String text)
Sets the caption text for the menu. |
void |
setTextColor(java.awt.Color c)
Sets the text color for the menu's caption. |
void |
setVerticalSpacing(int v)
Sets the distance in pixels between each button on the menu. |
Methods inherited from class mhframework.gui.MHGUIComponent |
---|
actionPerformed, getBounds, getHeight, getWidth, getX, getY, hasFocus, isEnabled, isVisible, mouseDragged, mouseEntered, mouseExited, paint, setEnabled, setFocus, setFocusable, setHeight, setPosition, setSize, setVisible, setWidth, setX, setY, updateBounds |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MHGUIButtonMenu()
Method Detail |
---|
public void setBackgroundColor(java.awt.Color bgColor)
bgColor
- The color to use as the menu's background
color.public void setButtonSize(int width, int height)
width
- The width of the buttons.height
- The height of the buttons.public void setVerticalSpacing(int v)
v
- The vertical distance in pixels between the
buttons.public void setBorderSpacing(int b)
b
- The distance in pixels between the menu's edge and
the buttons.public void setText(java.lang.String text)
text
- The string to use as the menu caption.public void setTextColor(java.awt.Color c)
c
- The color to use for the menu caption.public void add(MHGUIComponent component)
component
- The button or component being added to the
menu.public void add(int index, MHGUIComponent component)
component
- The button or component being added to the
menu.public void advance()
MHRenderable
public void render(java.awt.Graphics2D g)
MHRenderable
g
- The Graphics object on which this object is to draw itself.public void keyTyped(java.awt.event.KeyEvent e)
keyTyped
in class MHGUIComponent
public void keyReleased(java.awt.event.KeyEvent e)
keyReleased
in class MHGUIComponent
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in class MHGUIComponent
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in class MHGUIComponent
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
mousePressed
in class MHGUIComponent
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
mouseReleased
in class MHGUIComponent
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
mouseClicked
in class MHGUIComponent
public MHGUIComponentList getButtons()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |