|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgraphics.BarGraphics
public class BarGraphics
Represent a graphical bar used in the Measure Up Mode. After setting the start drawing point in the openGL context and instantiating a bar. The bar can be drawn.
Field Summary | |
---|---|
private float |
b
|
private boolean |
barStopped
|
private boolean |
blinkOn
|
private float |
currentHeigth
|
private String |
feedback
|
private float |
feedBackAlpha
|
private float |
flyHeigth
|
private float |
g
|
private float |
maxHeight
|
private int |
pourcentageScore
|
private AudioSample |
powerDownSound
|
private AudioSample |
powerupSound
|
private float |
r
|
private boolean |
revealAnswer
|
private float |
stopHeight
|
private float |
width
|
Constructor Summary | |
---|---|
BarGraphics(float r,
float g,
float b,
double stopHeight)
Initiates a new bar. |
Method Summary | |
---|---|
float |
getCurrentHeigth()
|
int |
getDrawnScore()
|
String |
getFeedback()
|
float |
getFeedBackAlpha()
|
float |
getFlyHeigth()
|
float |
getMaxHeigth()
|
float |
getStopHeight()
|
float |
getWidth()
|
boolean |
isBarStopped()
|
boolean |
isRevealAnswer()
|
void |
playSound()
Play an appropriate sound relating to the score. |
void |
renderBar(javax.media.opengl.GLAutoDrawable glDrawable)
Performs the acutal drawing of the bar on the OpenGL canvas. |
void |
reset()
resets the local counters of the bar. |
void |
setBarStopped(boolean barStopped)
|
void |
setCurrentHeigth(float currentHeigth)
Used to increase the hight of the bar in real time as the bar grows. |
void |
setFeedback(String feedback)
|
void |
setFeedBackAlpha(float feedBackAlpha)
|
void |
setMaxHeigth(float maxHeight)
|
void |
setRevealAnswer(boolean revealAnswer)
|
void |
setStopHeight(int pourcentageScore)
|
void |
setWidth(float width)
|
void |
updateState()
Called to for each frame to perform the actual grwoing of the bar as well as the blinking. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private float maxHeight
private float currentHeigth
private float width
private float stopHeight
private boolean barStopped
private float flyHeigth
private String feedback
private float feedBackAlpha
private float r
private float g
private float b
private boolean revealAnswer
private boolean blinkOn
private AudioSample powerupSound
private AudioSample powerDownSound
private int pourcentageScore
Constructor Detail |
---|
public BarGraphics(float r, float g, float b, double stopHeight)
r
- Amount of red.g
- Amount of g.b
- AMount of bluestopHeight
- heigth of the bar when it is to stop growing.Method Detail |
---|
public boolean isRevealAnswer()
public void renderBar(javax.media.opengl.GLAutoDrawable glDrawable)
glDrawable
- public void updateState()
public void reset()
public float getCurrentHeigth()
public void setCurrentHeigth(float currentHeigth)
currentHeigth
- the wanted heigth of the bar.public float getMaxHeigth()
public void setMaxHeigth(float maxHeight)
public float getWidth()
public String getFeedback()
public void setFeedback(String feedback)
public void setWidth(float width)
public float getStopHeight()
public void setStopHeight(int pourcentageScore)
public int getDrawnScore()
public boolean isBarStopped()
public void setBarStopped(boolean barStopped)
public float getFlyHeigth()
public float getFeedBackAlpha()
public void setFeedBackAlpha(float feedBackAlpha)
public void setRevealAnswer(boolean revealAnswer)
public void playSound()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |