|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgrafica.GAxis
public class GAxis
Axis class.
Field Summary |
---|
Constructor Summary | |
---|---|
GAxis(PApplet parent,
int type,
float[] dim,
float[] lim,
boolean log)
GAxis constructor |
Method Summary | |
---|---|
void |
draw()
Draws the axis |
GAxisLabel |
getAxisLabel()
Returns the axis label |
float[] |
getPlotTicks()
Returns a copy of the axis ticks positions in the plot reference system |
ArrayList<Float> |
getPlotTicksRef()
Returns the axis ticks positions in the plot reference system |
float[] |
getTicks()
Returns a copy of the axis ticks |
ArrayList<Float> |
getTicksRef()
Returns the axis ticks |
void |
moveLim(float[] newLim)
Moves the axis limits |
void |
setAllFontProperties(String newFontName,
int newFontColor,
int newFontSize)
Sets the font properties in the axis and the axis label |
void |
setAxisLabelText(String text)
Sets the axis label text |
void |
setDim(float[] newDim)
Sets the plot box dimensions information |
void |
setDim(float xDim,
float yDim)
Sets the plot box dimensions information |
void |
setDrawAxisLabel(boolean newDrawAxisLabel)
Sets if the axis label should be drawn or not |
void |
setDrawTickLabels(boolean newDrawTicksLabels)
Sets if the ticks labels should be drawn or not |
void |
setExpTickLabels(boolean newExpTickLabels)
Sets if the ticks labels should be displayed in exponential form or not |
void |
setFixedTicks(boolean newFixedTicks)
Sets if the axis ticks are fixed 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 |
setLim(float[] newLim)
Sets the axis limits |
void |
setLimAndLog(float[] newLim,
boolean newLog)
Sets the axis limits and the axis scale |
void |
setLineColor(int newLineColor)
Sets the line color |
void |
setLineWidth(float newLineWidth)
Sets the line width |
void |
setLog(boolean newLog)
Sets the axis scale |
void |
setNTicks(int newNTicks)
Sets the approximate number of ticks in the axis. |
void |
setOffset(float newOffset)
Sets the axis offset with respect to the plot box |
void |
setRotateTickLabels(boolean newRotateTickLabels)
Sets if the ticks labels should be displayed rotated or not |
void |
setSmallTickLength(float newSmallTickLength)
Sets the small tick length |
void |
setTickLabelOffset(float newTickLabelOffset)
Sets the tick label offset |
void |
setTickLabels(String[] newTickLabels)
Sets the axis ticks labels |
void |
setTickLength(float newTickLength)
Sets the tick length |
void |
setTicks(float[] newTicks)
Sets the axis ticks |
void |
setTicksSeparation(float newTicksSeparation)
Sets the separation between the ticks in the axis |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GAxis(PApplet parent, int type, float[] dim, float[] lim, boolean log)
parent
- the parent Processing applettype
- the axis type. It can be X, Y, TOP or RIGHTdim
- the plot box dimensions in pixelslim
- the limitslog
- the axis scale. True if it's logarithmicMethod Detail |
---|
public void moveLim(float[] newLim)
newLim
- the new axis limitspublic void draw()
public 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 setLim(float[] newLim)
newLim
- the new axis limitspublic void setLimAndLog(float[] newLim, boolean newLog)
newLim
- the new axis limitsnewLog
- the new axis scalepublic void setLog(boolean newLog)
newLog
- the new axis scalepublic void setOffset(float newOffset)
newOffset
- the new axis offsetpublic void setLineColor(int newLineColor)
newLineColor
- the new line colorpublic void setLineWidth(float newLineWidth)
newLineWidth
- the new line widthpublic void setNTicks(int newNTicks)
newNTicks
- the new approximate number of ticks in the axispublic void setTicksSeparation(float newTicksSeparation)
newTicksSeparation
- the new ticks separationpublic void setTicks(float[] newTicks)
newTicks
- the new axis tickspublic void setTickLabels(String[] newTickLabels)
newTickLabels
- the new axis ticks labelspublic void setFixedTicks(boolean newFixedTicks)
newFixedTicks
- true if the axis ticks should be fixedpublic void setTickLength(float newTickLength)
newTickLength
- the new tick lengthpublic void setSmallTickLength(float newSmallTickLength)
newSmallTickLength
- the new small tick lengthpublic void setExpTickLabels(boolean newExpTickLabels)
newExpTickLabels
- true if the ticks labels should be in exponential formpublic void setRotateTickLabels(boolean newRotateTickLabels)
newRotateTickLabels
- true is the ticks labels should be rotatedpublic void setDrawTickLabels(boolean newDrawTicksLabels)
newDrawTicksLabels
- true it the ticks labels should be drawnpublic void setTickLabelOffset(float newTickLabelOffset)
newTickLabelOffset
- the new tick label offsetpublic void setDrawAxisLabel(boolean newDrawAxisLabel)
newDrawAxisLabel
- true if the axis label should be drawnpublic void setAxisLabelText(String text)
text
- the new axis label textpublic 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 sizepublic void setAllFontProperties(String newFontName, int newFontColor, int newFontSize)
newFontName
- the new font namenewFontColor
- the new font colornewFontSize
- the new font sizepublic float[] getTicks()
public ArrayList<Float> getTicksRef()
public float[] getPlotTicks()
public ArrayList<Float> getPlotTicksRef()
public GAxisLabel getAxisLabel()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |