|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hermit.android.instruments.Gauge
org.hermit.android.instruments.SpectrumGauge
public class SpectrumGauge
A graphical display which displays the audio spectrum from an
AudioAnalyser
instrument. This class cannot be instantiated
directly; get an instance by calling
AudioAnalyser.getSpectrumGauge(SurfaceRunner)
.
Method Summary | |
---|---|
protected void |
drawBody(Canvas canvas,
Paint paint,
long now)
Do the subclass-specific parts of drawing for this element. |
float |
getLabelSize()
Get the size for the label text. |
void |
setGeometry(Rect bounds)
This is called during layout when the size of this element has changed. |
void |
setLabelSize(float size)
Set the size for the label text. |
void |
setSampleRate(int rate)
Set the sample rate for this instrument. |
Methods inherited from class org.hermit.android.instruments.Gauge |
---|
cacheBackground, draw, drawBackground, drawBackgroundBody, drawFinish, drawStart, error, getBackgroundColor, getBaseTextSize, getBounds, getGridColor, getHeadTextSize, getHeight, getInnerGap, getInterPadding, getMiniTextSize, getPaint, getPlotColor, getPreferredHeight, getPreferredWidth, getSidebarWidth, getSurface, getTextScaleX, getTextTypeface, getTinyTextSize, getWidth, haveBounds, initializePaint, optionSet, setBackgroundColor, setBaseTextSize, setDataColors, setGridColor, setHeadTextSize, setInnerGap, setInterPadding, setMiniTextSize, setPlotColor, setSidebarWidth, setTextScaleX, setTextTypeface, setTinyTextSize |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void setSampleRate(int rate)
rate
- The desired rate, in samples/sec.public void setLabelSize(float size)
size
- Label text size for the gauge.public float getLabelSize()
public void setGeometry(Rect bounds)
setGeometry
in class Gauge
bounds
- The bounding rect of this element within
its parent View.protected final void drawBody(Canvas canvas, Paint paint, long now)
Subclasses should override this to do their drawing.
drawBody
in class Gauge
canvas
- Canvas to draw into.paint
- The Paint which was set up in initializePaint().now
- Nominal system time in ms. of this update.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |