mhframework.gui
Class MHGUICycleControl

java.lang.Object
  extended by mhframework.gui.MHGUIComponent
      extended by mhframework.gui.MHGUICycleControl
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.MouseListener, java.util.EventListener, MHRenderable
Direct Known Subclasses:
MHGUIColorCycleControl, MHGUINumericCycleControl

public class MHGUICycleControl
extends MHGUIComponent
implements java.awt.event.ActionListener


Field Summary
protected  MHGUIButton btnNext
           
protected  MHGUIButton btnPrevious
           
protected  MHGUILabel lblValue
           
 
Fields inherited from class mhframework.gui.MHGUIComponent
focusable, height, state, width
 
Constructor Summary
MHGUICycleControl()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 void advance()
          Tells an object to update its data.
protected  void decrement()
           
protected  MHGUIButton getNextButton()
           
protected  MHGUIButton getPreviousButton()
           
 int getSelectedIndex()
           
 java.lang.Object getSelectedValue()
           
protected  void increment()
           
 void keyPressed(java.awt.event.KeyEvent e)
           
 void keyReleased(java.awt.event.KeyEvent e)
           
 void keyTyped(java.awt.event.KeyEvent e)
           
static void main(java.lang.String[] args)
           
 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 setHeight(int h)
           
 void setLabelColor(java.awt.Color color)
           
 void setLabelFont(java.awt.Font font)
           
 void setLabelVisible(boolean show)
           
 void setSelectedIndex(int indexNumber)
           
 void setSize(int w, int h)
           
 void setValues(java.lang.Object[] values)
           
 
Methods inherited from class mhframework.gui.MHGUIComponent
getBounds, getHeight, getWidth, getX, getY, hasFocus, isEnabled, isVisible, mouseDragged, mouseEntered, mouseExited, paint, setEnabled, setFocus, setFocusable, setPosition, setVisible, setWidth, setX, setY, updateBounds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

btnPrevious

protected MHGUIButton btnPrevious

btnNext

protected MHGUIButton btnNext

lblValue

protected MHGUILabel lblValue
Constructor Detail

MHGUICycleControl

public MHGUICycleControl()
Method Detail

setValues

public void setValues(java.lang.Object[] values)

setLabelFont

public void setLabelFont(java.awt.Font font)

setLabelColor

public void setLabelColor(java.awt.Color color)

getPreviousButton

protected MHGUIButton getPreviousButton()

getNextButton

protected MHGUIButton getNextButton()

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Specified by:
keyPressed in class MHGUIComponent

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
Specified by:
keyReleased in class MHGUIComponent

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
Specified by:
keyTyped in class MHGUIComponent

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener
Specified by:
mouseClicked in class MHGUIComponent

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in class MHGUIComponent

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener
Specified by:
mousePressed in class MHGUIComponent

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener
Specified by:
mouseReleased in class MHGUIComponent

advance

public void advance()
Description copied from interface: MHRenderable
Tells an object to update its data.

Specified by:
advance in interface MHRenderable

setSize

public void setSize(int w,
                    int h)
Overrides:
setSize in class MHGUIComponent

setHeight

public void setHeight(int h)
Overrides:
setHeight in class MHGUIComponent

render

public void render(java.awt.Graphics2D g)
Description copied from interface: MHRenderable
Tells an object to draw itself onto the sent Graphics object.

Specified by:
render in interface MHRenderable
Parameters:
g - The Graphics object on which this object is to draw itself.

getSelectedIndex

public int getSelectedIndex()

setSelectedIndex

public void setSelectedIndex(int indexNumber)

getSelectedValue

public java.lang.Object getSelectedValue()

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class MHGUIComponent

decrement

protected void decrement()

increment

protected void increment()

main

public static void main(java.lang.String[] args)

setLabelVisible

public void setLabelVisible(boolean show)