grafica
Class GLayer

java.lang.Object
  extended by grafica.GLayer
All Implemented Interfaces:
PConstants

public class GLayer
extends Object
implements PConstants

Layer class. A GLayer usually contains an array of points and a histogram

Author:
Javier Gracia Carpio http://www.openprocessing.org/user/16300

Field Summary
 
Fields inherited from interface processing.core.PConstants
ADD, ALPHA, ALT, AMBIENT, ARC, ARGB, ARROW, BACKSPACE, BASELINE, BEVEL, BEZIER_VERTEX, BLEND, BLUR, BOTTOM, BOX, BREAK, BURN, CENTER, CHATTER, CHORD, CLAMP, CLOSE, CODED, COMPLAINT, CONTROL, CORNER, CORNERS, CROSS, CURVE_VERTEX, CUSTOM, DARKEST, DEG_TO_RAD, DELETE, DIAMETER, DIFFERENCE, DILATE, DIRECTIONAL, DISABLE_DEPTH_MASK, DISABLE_DEPTH_SORT, DISABLE_DEPTH_TEST, DISABLE_NATIVE_FONTS, DISABLE_OPENGL_ERRORS, DISABLE_OPTIMIZED_STROKE, DISABLE_RETINA_PIXELS, DISABLE_STROKE_PERSPECTIVE, DISABLE_STROKE_PURE, DISABLE_TEXTURE_MIPMAPS, DODGE, DOWN, DXF, ELLIPSE, ENABLE_DEPTH_MASK, ENABLE_DEPTH_SORT, ENABLE_DEPTH_TEST, ENABLE_NATIVE_FONTS, ENABLE_OPENGL_ERRORS, ENABLE_OPTIMIZED_STROKE, ENABLE_RETINA_PIXELS, ENABLE_STROKE_PERSPECTIVE, ENABLE_STROKE_PURE, ENABLE_TEXTURE_MIPMAPS, ENTER, EPSILON, ERODE, ERROR_BACKGROUND_IMAGE_FORMAT, ERROR_BACKGROUND_IMAGE_SIZE, ERROR_PUSHMATRIX_OVERFLOW, ERROR_PUSHMATRIX_UNDERFLOW, ERROR_TEXTFONT_NULL_PFONT, ESC, EXCLUSION, GIF, GRAY, GROUP, HALF_PI, HAND, HARD_LIGHT, HINT_COUNT, HSB, IMAGE, INVERT, JAVA2D, JPEG, LANDSCAPE, LEFT, LIGHTEST, LINE, LINE_LOOP, LINE_STRIP, LINES, LINUX, MACOSX, MAX_FLOAT, MAX_INT, MIN_FLOAT, MIN_INT, MITER, MODEL, MODELVIEW, MOVE, MULTIPLY, NORMAL, OPAQUE, OPEN, OPENGL, ORTHOGRAPHIC, OTHER, OVERLAY, P2D, P3D, PATH, PDF, PERSPECTIVE, PI, PIE, platformNames, POINT, POINTS, POLYGON, PORTRAIT, POSTERIZE, PROBLEM, PROJECT, PROJECTION, QUAD, QUAD_BEZIER_VERTEX, QUAD_STRIP, QUADRATIC_VERTEX, QUADS, QUARTER_PI, RAD_TO_DEG, RADIUS, RECT, REPEAT, REPLACE, RETURN, RGB, RIGHT, ROUND, SCREEN, SHAPE, SHIFT, SOFT_LIGHT, SPHERE, SPOT, SQUARE, SUBTRACT, TAB, TARGA, TAU, TEXT, THIRD_PI, THRESHOLD, TIFF, TOP, TRIANGLE, TRIANGLE_FAN, TRIANGLE_STRIP, TRIANGLES, TWO_PI, UP, VERTEX, WAIT, WHITESPACE, WINDOWS, X, Y, Z
 
Constructor Summary
GLayer(PApplet parent, String id, float[] dim, float[] xLim, float[] yLim, boolean xLog, boolean yLog)
          GLayer constructor
 
Method Summary
 void addPoint(float x, float y)
          Adds a new point to the layer points
 void addPoint(float x, float y, String label)
          Adds a new point to the layer points
 void addPoint(GPoint newPoint)
          Adds a new point to the layer points
 void addPoint(int index, float x, float y)
          Adds a new point to the layer points
 void addPoint(int index, float x, float y, String label)
          Adds a new point to the layer points
 void addPoint(int index, GPoint newPoint)
          Adds a new point to the layer points
 void addPoints(GPointsArray newPoints)
          Adds new points to the layer points
 void drawAnnotation(String text, float x, float y, int horAlign, int verAlign)
          Draws an annotation at a given plot value
 void drawFilledContour(int contourType, float referenceValue)
          Draws a filled contour connecting consecutive points in the layer and a reference value
 void drawHistogram()
          Draws the histogram
 void drawHorizontalLine(float value)
          Draws an horizontal line
 void drawHorizontalLine(float value, int lc, float lw)
          Draws an horizontal line
 void drawLabel(GPoint point)
          Draws the label of a given point
 void drawLabelAtPlotPos(float xPlot, float yPlot)
          Draws the label of the closest point in the layer to a given plot position
 void drawLine(float slope, float yCut)
          Draws a line defined by the slope and the cut in the y axis
 void drawLine(float slope, float yCut, int lc, float lw)
          Draws a line defined by the slope and the cut in the y axis
 void drawLine(GPoint point1, GPoint point2)
          Draws a line between two points
 void drawLine(GPoint point1, GPoint point2, int lc, float lw)
          Draws a line between two points
 void drawLines()
          Draws lines connecting consecutive points in the layer
 void drawPoint(GPoint point)
          Draws a point
 void drawPoint(GPoint point, int pointColor, float pointSize)
          Draws a point
 void drawPoint(GPoint point, PImage pointImg)
          Draws a point
 void drawPoint(GPoint point, PShape pointShape)
          Draws a point
 void drawPoint(GPoint point, PShape pointShape, int pointColor)
          Draws a point
 void drawPoints()
          Draws the points inside the layer limits
 void drawPoints(PImage pointImg)
          Draws the points inside the layer limits
 void drawPoints(PShape pointShape)
          Draws the points inside the layer limits
 void drawPolygon(GPointsArray polygonPoints, int polygonColor)
          Draws a polygon defined by a set of points
 void drawVerticalLine(float value)
          Draws a vertical line
 void drawVerticalLine(float value, int lc, float lw)
          Draws a vertical line
 float[] getDim()
          Returns the layer dimensions
 GHistogram getHistogram()
          Returns the layer histogram
 String getId()
          Returns the layer id
 int getLineColor()
          Returns the layer line color
 float getLineWidth()
          Returns the layer line width
 GPoint getPointAtPlotPos(float xPlot, float yPlot)
          Returns the closest point (if any) to a given position in the plot reference system
 int[] getPointColors()
          Returns the layer point colors array
 int getPointIndexAtPlotPos(float xPlot, float yPlot)
          Returns the position index of the closest point (if any) to a given position in the plot reference system
 GPointsArray getPoints()
          Returns a copy of the layer points
 float[] getPointSizes()
          Returns the layer point sizes array
 GPointsArray getPointsRef()
          Returns the layer points
 float[] getXLim()
          Returns the layer horizontal limits
 boolean getXLog()
          Returns the layer horizontal scale
 float[] getYLim()
          Returns the layer vertical limits
 boolean getYLog()
          Returns the layer vertical scale
 boolean isId(String someId)
          Checks if the layer's id is equal to a given id
 boolean isInside(float xPlot, float yPlot)
          Checks if a given (xPlot, yPlot) position in the plot reference system is inside the layer limits
 boolean isInside(GPoint plotPoint)
          Checks if a given point in the plot reference system is inside the layer limits
 boolean[] isInside(GPointsArray plotPts)
          Checks if a given set of points in the plot reference system is inside the layer limits
 float[] plotToValue(float xPlot, float yPlot)
          Returns the plot values at a given position in the plot reference system
 void removePoint(int index)
          Removes one of the layer points
 void setAllFontProperties(String newFontName, int newFontColor, int newFontSize)
          Sets the font properties in the layer and the histogram
 void setDim(float[] newDim)
          Sets the layer dimensions, which should be equal to the plot box dimensions
 void setDim(float xDim, float yDim)
          Sets the layer dimensions
 void setDrawHistLabels(boolean drawHistLabels)
          Sets if the histogram labels will 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 setHistBasePoint(GPoint newHistBasePoint)
          Sets the histogram base point
 void setHistType(int histType)
          Sets the histogram type
 void setHistVisible(boolean visible)
          Sets if the histogram is visible or not
 void setInside(boolean[] newInside)
          Sets which points are inside the box
 void setLabelBgColor(int newLabelBgColor)
          Sets the label background color
 void setLabelSeparation(float[] newLabelSeparation)
          Sets the label separation
 void setLimAndLog(float[] newXLim, float[] newYLim, boolean newXLog, boolean newYLog)
          Sets the horizontal and vertical limits and the horizontal and vertical scales
 void setLimAndLog(float xMin, float xMax, float yMin, float yMax, boolean newXLog, boolean newYLog)
          Sets the horizontal and vertical limits and the horizontal and vertical scales
 void setLineColor(int newLineColor)
          Sets the line color
 void setLineWidth(float newLineWidth)
          Sets the line width
 void setPoint(int index, float x, float y)
          Sets one of the layer points
 void setPoint(int index, float x, float y, String label)
          Sets one of the layer points
 void setPoint(int index, GPoint newPoint)
          Sets one of the layer points
 void setPointColor(int newPointColor)
          Sets the points color
 void setPointColors(int[] newPointColors)
          Sets the points colors
 void setPoints(GPointsArray newPoints)
          Sets the layer points
 void setPointSize(float newPointSize)
          Sets the points size
 void setPointSizes(float[] newPointSizes)
          Sets the points sizes
 void setXLim(float[] newXLim)
          Sets the horizontal limits
 void setXLim(float xMin, float xMax)
          Sets the horizontal limits
 void setXLog(boolean newXLog)
          Sets the horizontal scale
 void setXYLim(float[] newXLim, float[] newYLim)
          Sets the horizontal and vertical limits
 void setXYLim(float xMin, float xMax, float yMin, float yMax)
          Sets the horizontal and vertical limits
 void setYLim(float[] newYLim)
          Sets the vertical limits
 void setYLim(float yMin, float yMax)
          Sets the vertical limits
 void setYLog(boolean newYLog)
          Sets the vertical scale
 void startHistogram(int histType)
          Initializes the histogram
 float[] valueToPlot(float x, float y)
          Calculates the position of a given (x, y) point in the plot reference system
 GPoint valueToPlot(GPoint point)
          Calculates the position of a given point in the plot reference system
 GPointsArray valueToPlot(GPointsArray pts)
          Calculates the positions of a given set of points in the plot reference system
 float valueToXPlot(float x)
          Calculates the position of the x value in the plot reference system
 float valueToYPlot(float y)
          Calculates the position of the y value in the plot reference system
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GLayer

public GLayer(PApplet parent,
              String id,
              float[] dim,
              float[] xLim,
              float[] yLim,
              boolean xLog,
              boolean yLog)
GLayer constructor

Parameters:
parent - the parent Processing applet
id - the layer id
dim - the plot box dimensions in pixels
xLim - the horizontal limits
yLim - the vertical limits
xLog - the horizontal scale. True if it's logarithmic
yLog - the vertical scale. True if it's logarithmic
Method Detail

isId

public boolean isId(String someId)
Checks if the layer's id is equal to a given id

Parameters:
someId - the id to check
Returns:
true if the provided id is equal to the layer's id

valueToXPlot

public float valueToXPlot(float x)
Calculates the position of the x value in the plot reference system

Parameters:
x - the x value
Returns:
the x position in the plot reference system

valueToYPlot

public float valueToYPlot(float y)
Calculates the position of the y value in the plot reference system

Parameters:
y - the y value
Returns:
the y position in the plot reference system

valueToPlot

public float[] valueToPlot(float x,
                           float y)
Calculates the position of a given (x, y) point in the plot reference system

Parameters:
x - the x value
y - the y value
Returns:
the (x, y) position in the plot reference system

valueToPlot

public GPoint valueToPlot(GPoint point)
Calculates the position of a given point in the plot reference system

Parameters:
point - the point
Returns:
a copy of the point with its position transformed to the plot reference system

valueToPlot

public GPointsArray valueToPlot(GPointsArray pts)
Calculates the positions of a given set of points in the plot reference system

Parameters:
pts - the set of points
Returns:
a copy of the set of point with their positions transformed to the plot reference system

plotToValue

public float[] plotToValue(float xPlot,
                           float yPlot)
Returns the plot values at a given position in the plot reference system

Parameters:
xPlot - x position in the plot reference system
yPlot - y position in the plot reference system
Returns:
the (x, y) values at the (xPlot, yPlot) position

isInside

public boolean isInside(float xPlot,
                        float yPlot)
Checks if a given (xPlot, yPlot) position in the plot reference system is inside the layer limits

Parameters:
xPlot - x position in the plot reference system
yPlot - y position in the plot reference system
Returns:
true if the (xPlot, yPlot) position is inside the layer limits

isInside

public boolean isInside(GPoint plotPoint)
Checks if a given point in the plot reference system is inside the layer limits

Parameters:
plotPoint - the point in the plot reference system
Returns:
true if the point is inside the layer limits

isInside

public boolean[] isInside(GPointsArray plotPts)
Checks if a given set of points in the plot reference system is inside the layer limits

Parameters:
plotPts - the set of points to check
Returns:
a boolean array with the elements set to true if the point is inside the layer limits

getPointIndexAtPlotPos

public int getPointIndexAtPlotPos(float xPlot,
                                  float yPlot)
Returns the position index of the closest point (if any) to a given position in the plot reference system

Parameters:
xPlot - x position in the plot reference system
yPlot - y position in the plot reference system
Returns:
the position index of closest point to the specified position. Returns -1 if there is no close point.

getPointAtPlotPos

public GPoint getPointAtPlotPos(float xPlot,
                                float yPlot)
Returns the closest point (if any) to a given position in the plot reference system

Parameters:
xPlot - x position in the plot reference system
yPlot - y position in the plot reference system
Returns:
the closest point to the specified position. Returns null if there is no close point.

startHistogram

public void startHistogram(int histType)
Initializes the histogram

Parameters:
histType - the type of histogram to use. It can be GPlot.VERTICAL or GPlot.HORIZONTAL

drawPoints

public void drawPoints()
Draws the points inside the layer limits


drawPoints

public void drawPoints(PShape pointShape)
Draws the points inside the layer limits

Parameters:
pointShape - the shape that should be used to represent the points

drawPoints

public void drawPoints(PImage pointImg)
Draws the points inside the layer limits

Parameters:
pointImg - the image that should be used to represent the points

drawPoint

public void drawPoint(GPoint point,
                      int pointColor,
                      float pointSize)
Draws a point

Parameters:
point - the point to draw
pointColor - color to use
pointSize - point size in pixels

drawPoint

public void drawPoint(GPoint point)
Draws a point

Parameters:
point - the point to draw

drawPoint

public void drawPoint(GPoint point,
                      PShape pointShape)
Draws a point

Parameters:
point - the point to draw
pointShape - the shape that should be used to represent the point

drawPoint

public void drawPoint(GPoint point,
                      PShape pointShape,
                      int pointColor)
Draws a point

Parameters:
point - the point to draw
pointShape - the shape that should be used to represent the points
pointColor - color to use

drawPoint

public void drawPoint(GPoint point,
                      PImage pointImg)
Draws a point

Parameters:
point - the point to draw
pointImg - the image that should be used to represent the point

drawLines

public void drawLines()
Draws lines connecting consecutive points in the layer


drawLine

public void drawLine(GPoint point1,
                     GPoint point2,
                     int lc,
                     float lw)
Draws a line between two points

Parameters:
point1 - first point
point2 - second point
lc - line color
lw - line width

drawLine

public void drawLine(GPoint point1,
                     GPoint point2)
Draws a line between two points

Parameters:
point1 - first point
point2 -

drawLine

public void drawLine(float slope,
                     float yCut,
                     int lc,
                     float lw)
Draws a line defined by the slope and the cut in the y axis

Parameters:
slope - the line slope
yCut - the line y axis cut
lc - line color
lw - line width

drawLine

public void drawLine(float slope,
                     float yCut)
Draws a line defined by the slope and the cut in the y axis

Parameters:
slope - the line slope
yCut - the line y axis cut

drawHorizontalLine

public void drawHorizontalLine(float value,
                               int lc,
                               float lw)
Draws an horizontal line

Parameters:
value - line horizontal value
lc - line color
lw - line width

drawHorizontalLine

public void drawHorizontalLine(float value)
Draws an horizontal line

Parameters:
value - line horizontal value

drawVerticalLine

public void drawVerticalLine(float value,
                             int lc,
                             float lw)
Draws a vertical line

Parameters:
value - line vertical value
lc - line color
lw - line width

drawVerticalLine

public void drawVerticalLine(float value)
Draws a vertical line

Parameters:
value - line vertical value

drawFilledContour

public void drawFilledContour(int contourType,
                              float referenceValue)
Draws a filled contour connecting consecutive points in the layer and a reference value

Parameters:
contourType - the type of contours to use. It can be GPlot.VERTICAL or GPlot.HORIZONTAL
referenceValue - the reference value to use to close the contour

drawLabel

public void drawLabel(GPoint point)
Draws the label of a given point

Parameters:
point - the point

drawLabelAtPlotPos

public void drawLabelAtPlotPos(float xPlot,
                               float yPlot)
Draws the label of the closest point in the layer to a given plot position

Parameters:
xPlot - x position in the plot reference system
yPlot - y position in the plot reference system

drawHistogram

public void drawHistogram()
Draws the histogram


drawPolygon

public void drawPolygon(GPointsArray polygonPoints,
                        int polygonColor)
Draws a polygon defined by a set of points

Parameters:
polygonPoints - the points that define the polygon
polygonColor - the color to use to draw the polygon (contour and background)

drawAnnotation

public void drawAnnotation(String text,
                           float x,
                           float y,
                           int horAlign,
                           int verAlign)
Draws an annotation at a given plot value

Parameters:
text - the annotation text
x - x plot value
y - y plot value
horAlign - text horizontal alignment. It can be RIGHT, LEFT or CENTER
verAlign - text vertical alignment. It can be TOP, BOTTOM or CENTER

setDim

public void setDim(float xDim,
                   float yDim)
Sets the layer dimensions

Parameters:
xDim - the new layer x dimension
yDim - the new layer y dimension

setDim

public void setDim(float[] newDim)
Sets the layer dimensions, which should be equal to the plot box dimensions

Parameters:
newDim - the new layer dimensions

setXLim

public void setXLim(float xMin,
                    float xMax)
Sets the horizontal limits

Parameters:
xMin - the minimum limit value
xMax - the maximum limit value

setXLim

public void setXLim(float[] newXLim)
Sets the horizontal limits

Parameters:
newXLim - the new horizontal limits

setYLim

public void setYLim(float yMin,
                    float yMax)
Sets the vertical limits

Parameters:
yMin - the minimum limit value
yMax - the maximum limit value

setYLim

public void setYLim(float[] newYLim)
Sets the vertical limits

Parameters:
newYLim - the new vertical limits

setXYLim

public void setXYLim(float xMin,
                     float xMax,
                     float yMin,
                     float yMax)
Sets the horizontal and vertical limits

Parameters:
xMin - the minimum horizontal limit value
xMax - the maximum horizontal limit value
yMin - the minimum vertical limit value
yMax - the maximum vertical limit value

setXYLim

public void setXYLim(float[] newXLim,
                     float[] newYLim)
Sets the horizontal and vertical limits

Parameters:
newXLim - the new horizontal limits
newYLim - the new vertical limits

setLimAndLog

public void setLimAndLog(float xMin,
                         float xMax,
                         float yMin,
                         float yMax,
                         boolean newXLog,
                         boolean newYLog)
Sets the horizontal and vertical limits and the horizontal and vertical scales

Parameters:
xMin - the minimum horizontal limit value
xMax - the maximum horizontal limit value
yMin - the minimum vertical limit value
yMax - the maximum vertical limit value
newXLog - the new horizontal scale
newYLog - the new vertical scale

setLimAndLog

public void setLimAndLog(float[] newXLim,
                         float[] newYLim,
                         boolean newXLog,
                         boolean newYLog)
Sets the horizontal and vertical limits and the horizontal and vertical scales

Parameters:
newXLim - the new horizontal limits
newYLim - the new vertical limits
newXLog - the new horizontal scale
newYLog - the new vertical scale

setXLog

public void setXLog(boolean newXLog)
Sets the horizontal scale

Parameters:
newXLog - the new horizontal scale

setYLog

public void setYLog(boolean newYLog)
Sets the vertical scale

Parameters:
newYLog - the new vertical scale

setPoints

public void setPoints(GPointsArray newPoints)
Sets the layer points

Parameters:
newPoints - the new points

setPoint

public void setPoint(int index,
                     float x,
                     float y,
                     String label)
Sets one of the layer points

Parameters:
index - the point position
x - the point new x coordinate
y - the point new y coordinate
label - the point new label

setPoint

public void setPoint(int index,
                     float x,
                     float y)
Sets one of the layer points

Parameters:
index - the point position
x - the point new x coordinate
y - the point new y coordinate

setPoint

public void setPoint(int index,
                     GPoint newPoint)
Sets one of the layer points

Parameters:
index - the point position
newPoint - the new point

addPoint

public void addPoint(float x,
                     float y,
                     String label)
Adds a new point to the layer points

Parameters:
x - the new point x coordinate
y - the new point y coordinate
label - the new point label

addPoint

public void addPoint(float x,
                     float y)
Adds a new point to the layer points

Parameters:
x - the new point x coordinate
y - the new point y coordinate

addPoint

public void addPoint(GPoint newPoint)
Adds a new point to the layer points

Parameters:
newPoint - the point to add

addPoint

public void addPoint(int index,
                     float x,
                     float y,
                     String label)
Adds a new point to the layer points

Parameters:
index - the position to add the point
x - the new point x coordinate
y - the new point y coordinate
label - the new point label

addPoint

public void addPoint(int index,
                     float x,
                     float y)
Adds a new point to the layer points

Parameters:
index - the position to add the point
x - the new point x coordinate
y - the new point y coordinate

addPoint

public void addPoint(int index,
                     GPoint newPoint)
Adds a new point to the layer points

Parameters:
index - the position to add the point
newPoint - the point to add

addPoints

public void addPoints(GPointsArray newPoints)
Adds new points to the layer points

Parameters:
newPoints - the points to add

removePoint

public void removePoint(int index)
Removes one of the layer points

Parameters:
index - the point position

setInside

public void setInside(boolean[] newInside)
Sets which points are inside the box

Parameters:
newInside - a boolean array with the information whether a point is inside or not

setPointColors

public void setPointColors(int[] newPointColors)
Sets the points colors

Parameters:
newPointColors - the new point colors

setPointColor

public void setPointColor(int newPointColor)
Sets the points color

Parameters:
newPointColor - the new point color

setPointSizes

public void setPointSizes(float[] newPointSizes)
Sets the points sizes

Parameters:
newPointSizes - the new point sizes

setPointSize

public void setPointSize(float newPointSize)
Sets the points size

Parameters:
newPointSize - the new point size

setLineColor

public void setLineColor(int newLineColor)
Sets the line color

Parameters:
newLineColor - the new line color

setLineWidth

public void setLineWidth(float newLineWidth)
Sets the line width

Parameters:
newLineWidth - the new line width

setHistBasePoint

public void setHistBasePoint(GPoint newHistBasePoint)
Sets the histogram base point

Parameters:
newHistBasePoint - the new histogram base point

setHistType

public void setHistType(int histType)
Sets the histogram type

Parameters:
histType - the new histogram type. It can be GPlot.HORIZONTAL or GPlot.VERTICAL

setHistVisible

public void setHistVisible(boolean visible)
Sets if the histogram is visible or not

Parameters:
visible - if true, the histogram is visible

setDrawHistLabels

public void setDrawHistLabels(boolean drawHistLabels)
Sets if the histogram labels will be drawn or not

Parameters:
drawHistLabels - if true, the histogram labels will be drawn

setLabelBgColor

public void setLabelBgColor(int newLabelBgColor)
Sets the label background color

Parameters:
newLabelBgColor - the new label background color

setLabelSeparation

public void setLabelSeparation(float[] newLabelSeparation)
Sets the label separation

Parameters:
newLabelSeparation - the new label separation

setFontName

public void setFontName(String newFontName)
Sets the font name

Parameters:
newFontName - the name of the new font

setFontColor

public void setFontColor(int newFontColor)
Sets the font color

Parameters:
newFontColor - the new font color

setFontSize

public void setFontSize(int newFontSize)
Sets the font size

Parameters:
newFontSize - the new font size

setFontProperties

public void setFontProperties(String newFontName,
                              int newFontColor,
                              int newFontSize)
Sets all the font properties at once

Parameters:
newFontName - the name of the new font
newFontColor - the new font color
newFontSize - the new font size

setAllFontProperties

public void setAllFontProperties(String newFontName,
                                 int newFontColor,
                                 int newFontSize)
Sets the font properties in the layer and the histogram

Parameters:
newFontName - the new font name
newFontColor - the new font color
newFontSize - the new font size

getId

public String getId()
Returns the layer id

Returns:
the layer id

getDim

public float[] getDim()
Returns the layer dimensions

Returns:
the layer dimensions

getXLim

public float[] getXLim()
Returns the layer horizontal limits

Returns:
the layer horizontal limits

getYLim

public float[] getYLim()
Returns the layer vertical limits

Returns:
the layer vertical limits

getXLog

public boolean getXLog()
Returns the layer horizontal scale

Returns:
the layer horizontal scale

getYLog

public boolean getYLog()
Returns the layer vertical scale

Returns:
the layer vertical scale

getPoints

public GPointsArray getPoints()
Returns a copy of the layer points

Returns:
a copy of the layer points

getPointsRef

public GPointsArray getPointsRef()
Returns the layer points

Returns:
the layer points

getPointColors

public int[] getPointColors()
Returns the layer point colors array

Returns:
the layer point colors array

getPointSizes

public float[] getPointSizes()
Returns the layer point sizes array

Returns:
the layer point sizes array

getLineColor

public int getLineColor()
Returns the layer line color

Returns:
the layer line color

getLineWidth

public float getLineWidth()
Returns the layer line width

Returns:
the layer line width

getHistogram

public GHistogram getHistogram()
Returns the layer histogram

Returns:
the layer histogram


Processing library grafica by Javier Gracia Carpio. (c) 2013