|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.icdif.audio.graph.Plot
public class Plot
A class that allows to plot values (float[] or ArrayList[Float]) to a swing window.
Constructor Summary | |
---|---|
Plot(java.lang.String title,
int width,
int height)
Instantiates a new Plot with the given title and dimensions. |
Method Summary | |
---|---|
void |
clear()
It clears the plot, i.e., paints the original rectangle with the background color and sets the attribute cleared to true |
void |
plot(java.util.ArrayList<java.lang.Float> samples,
float samplesPerPixel,
java.awt.Color color)
This method plots the arraylist of samples, with the Window defined as parameter |
void |
plot(java.util.ArrayList<java.lang.Float> samples,
float samplesPerPixel,
float verticalOffset,
boolean useLastScale,
java.awt.Color color)
This plots the samples, with the Window defined as parameter. |
void |
plot(float[] samples,
float samplesPerPixel,
java.awt.Color color)
This plots the values passed, with the Window defined as parameter. |
void |
plot(float[] samples,
float samplesPerPixel,
float verticalOffset,
boolean useLastScale,
java.awt.Color color)
This plots the samples, with the Window defined as parameter. |
void |
setMarker(int x,
java.awt.Color color)
Sets a marker (vertical line) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Plot(java.lang.String title, int width, int height)
title
- The title.width
- The width of the plot in pixels.height
- The height of the plot in pixels.Method Detail |
---|
public void clear()
public void plot(float[] samples, float samplesPerPixel, java.awt.Color color)
samples
- the samples to plotsamplesPerPixel
- The number of samples in each pixelcolor
- The color of the linepublic void plot(java.util.ArrayList<java.lang.Float> samples, float samplesPerPixel, java.awt.Color color)
samples
- the samples to plotsamplesPerPixel
- The number of samples in each pixelcolor
- The color of the linepublic void plot(float[] samples, float samplesPerPixel, float verticalOffset, boolean useLastScale, java.awt.Color color)
samples
- the samples to plotsamplesPerPixel
- The number of samples in each pixelverticalOffset
- The vertical offSet (in order to plot several frequencies in
the same image)useLastScale
- boolean that tells to user or not the last scalecolor
- The color of the linepublic void plot(java.util.ArrayList<java.lang.Float> samples, float samplesPerPixel, float verticalOffset, boolean useLastScale, java.awt.Color color)
samples
- the samples to plotsamplesPerPixel
- The number of samples in each pixelverticalOffset
- The vertical offSet (in order to plot several frequencies in
the same image)useLastScale
- boolean that tells to user or not the last scalecolor
- The color of the linepublic void setMarker(int x, java.awt.Color color)
x
- the position to set the markercolor
- the colour of the marker
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |