|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmhframework.gui.MHGUIComponent
mhframework.gui.MHGUIStatusIndicator
public class MHGUIStatusIndicator
Provides a rectangular status indicator similar to a progress bar.
Field Summary |
---|
Fields inherited from class mhframework.gui.MHGUIComponent |
---|
focusable, height, state, width |
Constructor Summary | |
---|---|
MHGUIStatusIndicator()
Constructor. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
|
void |
advance()
Not currently used. |
float |
getMaxValue()
|
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)
Draws the status indicator onto the sent Graphics object. |
void |
setBarColor(java.awt.Color c)
Sets the color of the progress bar. |
void |
setBorderColor(java.awt.Color c)
Sets the color of the border around the component. |
void |
setFont(java.awt.Font font)
|
void |
setMaxValue(int max)
Sets the maximum value that this status indicator can represent. |
void |
setOrientation(boolean horiz)
Sets the orientation of the component to horizontal or vertical. |
void |
setPaint(java.awt.GradientPaint grad)
Sets an optional gradient paint with which to color the progress bar. |
void |
setText(java.lang.String text)
Sets the text for the component's caption. |
void |
setTextColor(java.awt.Color c)
Sets the color of the component's caption. |
void |
update(float newValue)
Updates the value represented by the progress bar. |
Methods inherited from class mhframework.gui.MHGUIComponent |
---|
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 MHGUIStatusIndicator()
Method Detail |
---|
public void setBarColor(java.awt.Color c)
c
- The color to use for the progress bar.public void setBorderColor(java.awt.Color c)
c
- The color to use for the border rectangle.public void setTextColor(java.awt.Color c)
c
- The color to use for the caption.public void setOrientation(boolean horiz)
horiz
- True if component is to be drawn horizontally,
false if it is to be drawn vertically.public void setPaint(java.awt.GradientPaint grad)
grad
- An existing GradientPaint object to be used for
coloring the progress bar.public void setMaxValue(int max)
max
- The maximum value of this indicator.public void setText(java.lang.String text)
text
- The text to appear over the indicator.public void update(float newValue)
newValue
- The new value represented by the bar.public void advance()
public void render(java.awt.Graphics2D g)
graphics
- The Graphics object on which to draw the
indicator.public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
actionPerformed
in class MHGUIComponent
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
mouseClicked
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 mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in class MHGUIComponent
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in class MHGUIComponent
public void keyReleased(java.awt.event.KeyEvent e)
keyReleased
in class MHGUIComponent
public void keyTyped(java.awt.event.KeyEvent e)
keyTyped
in class MHGUIComponent
public void setFont(java.awt.Font font)
public float getMaxValue()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |