|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgrafica.GHistogram
public class GHistogram
Histogram class.
Field Summary |
---|
Constructor Summary | |
---|---|
GHistogram(PApplet parent,
int type,
float[] dim,
GPointsArray plotPoints)
Constructor |
Method Summary | |
---|---|
void |
addPlotPoint(GPoint newPlotPoint)
Adds a new plot point to the histogram |
void |
addPlotPoint(int index,
GPoint newPlotPoint)
Adds a new plot point to the histogram |
void |
addPlotPoints(GPointsArray newPlotPoints)
Adds a new plot points to the histogram |
void |
draw(GPoint plotBasePoint)
Draws the histogram |
void |
removePlotPoint(int index)
Removes one of the points from the histogram |
void |
setBgColors(int[] newBgColors)
Sets the background colors of the histogram elements |
void |
setDim(float[] newDim)
Sets the plot box dimensions information |
void |
setDim(float xDim,
float yDim)
Sets the plot box dimensions information |
void |
setDrawLabels(boolean newDrawLabels)
Sets if the histogram labels should be drawn or not |
void |
setFontColor(int newFontColor)
Sets the font color |
void |
setFontName(String newFontName)
Sets the font name |
void |
setFontProperties(String newFontName,
int newFontColor,
int newFontSize)
Sets all the font properties at once |
void |
setFontSize(int newFontSize)
Sets the font size |
void |
setLabelsOffset(float newLabelsOffset)
Sets the histogram labels offset |
void |
setLineColors(int[] newLineColors)
Sets the line colors of the histogram elements |
void |
setLineWidths(float[] newLineWidths)
Sets the line widths of the histogram elements |
void |
setPlotPoint(int index,
GPoint newPlotPoint)
Sets one of the histogram plot points |
void |
setPlotPoints(GPointsArray newPlotPoints)
Sets the histogram plot points |
void |
setRotateLabels(boolean newRotateLabels)
Sets if the histogram labels should be rotated or not |
void |
setSeparations(float[] newSeparations)
Sets the separations between the histogram elements |
void |
setType(int newType)
Sets the type of histogram to display |
void |
setVisible(boolean newVisible)
Sets if the histogram should be visible or not |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GHistogram(PApplet parent, int type, float[] dim, GPointsArray plotPoints)
parent
- the parent Processing applettype
- the histogram type. It can be GPlot.VERTICAL or
GPlot.HORIZONTALdim
- the plot box dimensions in pixelsplotPoints
- the points positions in the plot reference systemMethod Detail |
---|
public void draw(GPoint plotBasePoint)
plotBasePoint
- the histogram base point in the plot reference systempublic void setType(int newType)
newType
- the new type of histogram to displaypublic void setDim(float xDim, float yDim)
xDim
- the new plot box x dimensionyDim
- the new plot box y dimensionpublic void setDim(float[] newDim)
newDim
- the new plot box dimensions informationpublic void setPlotPoints(GPointsArray newPlotPoints)
newPlotPoints
- the new point positions in the plot reference systempublic void setPlotPoint(int index, GPoint newPlotPoint)
index
- the point positionnewPlotPoint
- the new point positions in the plot reference systempublic void addPlotPoint(GPoint newPlotPoint)
newPlotPoint
- the new point position in the plot reference systempublic void addPlotPoint(int index, GPoint newPlotPoint)
index
- the position to add the pointnewPlotPoint
- the new point position in the plot reference systempublic void addPlotPoints(GPointsArray newPlotPoints)
newPlotPoints
- the new points positions in the plot reference systempublic void removePlotPoint(int index)
index
- the point positionpublic void setSeparations(float[] newSeparations)
newSeparations
- the new separations between the histogram elementspublic void setBgColors(int[] newBgColors)
newBgColors
- the new background colors of the histogram elementspublic void setLineColors(int[] newLineColors)
newLineColors
- the new line colors of the histogram elementspublic void setLineWidths(float[] newLineWidths)
newLineWidths
- the new line widths of the histogram elementspublic void setVisible(boolean newVisible)
newVisible
- true if the histogram should be visiblepublic void setLabelsOffset(float newLabelsOffset)
newLabelsOffset
- the new histogram labels offsetpublic void setDrawLabels(boolean newDrawLabels)
newDrawLabels
- true if the histogram labels should be drawnpublic void setRotateLabels(boolean newRotateLabels)
newRotateLabels
- true if the histogram labels should be rotatedpublic void setFontName(String newFontName)
newFontName
- the name of the new fontpublic void setFontColor(int newFontColor)
newFontColor
- the new font colorpublic void setFontSize(int newFontSize)
newFontSize
- the new font sizepublic void setFontProperties(String newFontName, int newFontColor, int newFontSize)
newFontName
- the name of the new fontnewFontColor
- the new font colornewFontSize
- the new font size
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |