OBEROn SDK

com.oberon.ooql.sdk
Class GraphStyler

java.lang.Object
  extended by com.oberon.ooql.sdk.GraphStyler

public class GraphStyler
extends java.lang.Object

Manages the chart parameters

Version:
5.0

Nested Class Summary
 class GraphStyler.Color
          Generic chart color
 class GraphStyler.Font
          Generic text font
 class GraphStyler.Label
          Generic chart label
 class GraphStyler.Legend
          Chart Legend
 class GraphStyler.Pie
          Chart pie
 class GraphStyler.Point
          Chart canvas point
 class GraphStyler.Series
          Chart data series
 class GraphStyler.TextLine
          Chart Line with a Label
 class GraphStyler.VPoint
          Chart ValuePoint
 
Field Summary
static int ALIGN_BOTTOM
          text alignment: Vertical Bottom
static int ALIGN_CENTER
          text alignment: Horizontal/Vertical Center
static int ALIGN_LEFT
          text alignment: Horizontal Left
static int ALIGN_RIGHT
          text alignment: Horizontal Right
static int ALIGN_TOP
          text alignment: Vertical Top
static int FONT_ARIAL
          font family: Arial
static int FONT_COURIER
          font family: Courier
static int FONT_DIALOG
          font family: Dialog
static int FONT_HELVETICA
          font family: Helvetica
static int FONT_Length
           
static int FONT_MONSPACED
          font family: Monotype Spaced
static int FONT_SANSSERIF
          font family: Sans Serif
static int FONT_SCRIPT
          font family: Script
static int FONT_SERIF
          font family: Serif
static int FONT_STYLE_BOLD
          font style: Bold
static int FONT_STYLE_BOLDITALIC
          font style: Bold and Italic
static int FONT_STYLE_ITALIC
          font style: Italic
static int FONT_STYLE_Length
           
static int FONT_STYLE_NORMAL
          font style: Normal
static int FONT_TIMESROMAN
          font family: Times New Roman
static int GRADIENT_HORIZONTAL
          gradient fill style: Horizontal
static int GRADIENT_Length
           
static int GRADIENT_NONE
          gradient fill style: None
static int GRADIENT_VERTICAL
          gradient fill style: Vertical
static int LINESTYLE_DASH
          line style: Dashed
static int LINESTYLE_DASHDOT
          line style: alternate Dash and Dot
static int LINESTYLE_DASHDOTDOT
          line style: alternate Dash and 2 Dots
static int LINESTYLE_DOT
          line style: Dotted
static int LINESTYLE_Length
           
static int LINESTYLE_SOLID
          line style: Solid
static int POINT_STYLE_CIRCLE
          point style: Circle
static int POINT_STYLE_CROSS
          point style: Cross
static int POINT_STYLE_DIAMOND
          point style: Diamond
static int POINT_STYLE_HEXAGON
          point style: Hexagon
static int POINT_STYLE_Length
           
static int POINT_STYLE_NONE
          point style: None
static int POINT_STYLE_PLUS
          point style: Plus
static int POINT_STYLE_SQUARE
          point style: Square
static int POINT_STYLE_TRIANGLE
          point style: Triangle
static int TYPE_AREA
          graph type: Summarized Areas
static int TYPE_HBAR
          graph type: Horizontal bars
static int TYPE_length
           
static int TYPE_LINE
          graph type: Lines
static int TYPE_PIE
          graph type: Pies
static int TYPE_SHBAR
          graph type: Summarized Horizontal bars
static int TYPE_SVBAR
          graph type: Summarized Vertical bars
static int TYPE_VBAR
          graph type: Vertical bars
 
Constructor Summary
GraphStyler()
           
GraphStyler(org.jdom.Element style)
           
GraphStyler(java.lang.String style)
           
 
Method Summary
 void addFreeText(GraphStyler.Label freeText)
          Add a free text to the chart canvas
 void addLine(GraphStyler.TextLine line)
          Add a trend or target line to the chart canvas
 void addPie(GraphStyler.Pie pie)
          Add a pie
 void addSerie(GraphStyler.Series series)
          Add a data series
 void fromXML(org.jdom.Element rootElement)
          Load the chart parameters from XML element tree
 void fromXMLStyle(java.lang.String style)
          Load the chart parameters from XML string
static int getAlignmentFromString(java.lang.String alignment)
          Get the TEXT ALIGNMENT from the equivalent String
static java.lang.String getAlignmentToString(int alignment)
          Convert the TEXT ALIGNMENT to String
 GraphStyler.Color getBarAreaBorderColor()
          Get the bar / area border color for bar or area charts
 int getBarLineWidth()
          Get the bar width for bar type charts
 int getBarSpace()
          Get the bar space for bar type charts
 GraphStyler.Color getBgColor()
          Get the chart canvas background color
static int getCharFontFromString(java.lang.String font)
          Get the FONT FAMILY from the equivalent String
static java.lang.String getCharStringFont(int font)
          Convert the FONT FAMILY to String
static java.lang.String getCharStringStyle(int style)
          Convert the FONT STYLE to String
static int getCharStyleFromString(java.lang.String style)
          Get the FONT STYLE from the equivalent String
 int getDecimalDigits()
          Get the number of decimal digits
 GraphStyler.Label getFreeText(int index)
          Get a free text from the chart canvas
 java.util.Vector<GraphStyler.Label> getFreeTexts()
          Get the list of free texts placed on the chart canvas
static int getGradientFromString(java.lang.String gradient)
          Get the GRADIENT FAMILY from the equivalent String
 int getGradientStyle()
          Get the fill gradient style
static java.lang.String getGradientToString(int gradient)
          Convert the GRADIENT STYLE to String
 int getGraph3DDepth()
          Get the chart 3D depth
 int getGraphHeight()
          Get the chart canvas height
 GraphStyler.Label getGraphTitle()
          Get the chart main title
 int getGraphType()
          Get the chart type
 int getGraphWidth()
          Get the chart canvas width
 GraphStyler.Color getGrid3DAxisColor()
          Get the grid 3D axis color
 GraphStyler.Color getGridAxisColor()
          Get the grid axis color
 GraphStyler.Color getGridBgColor()
          Get the grid background color
 GraphStyler.Color getGridColor()
          Get the grid line color
 int getGridHorizontalSpace()
          Get the grid horizontal space between grid lines
 float getGridOriginValue()
          Get the lower value for the value axis.
 GraphStyler.Point getGridPosition()
          Get the grid position inside the chart canvas
 int getGridSpaceNumbers()
          Get the number of grid spaces for the value axis
 float getGridSpaceValue()
          Get the delta value associated to a single grid space.
 int getGridStyle()
          Get the grid line style
 int getGridVerticalSpace()
          Get the grid vertical space between grid lines
 GraphStyler.Font getHLabelsFont()
          Get the horizontal axis label or value font
 GraphStyler.Label getHorizontalTitle()
          Get the horizontal axis title
 float getLabelAngle()
          Get the vertical or horizontal axis label rotation angle
 int getLabelFixedPosition()
          Get the vertical or horizontal axis label fixed position
 int getLabelOffset()
          Get the vertical or horizontal axis label position offset
 GraphStyler.Legend getLegend()
          Get the chart legend
 GraphStyler.TextLine getLine(int index)
          Get a trend or target line from the chart canvas
 java.util.Vector<GraphStyler.TextLine> getLines()
          Get the list of trend and target lines placed on the chart canvas
static int getLineStyleFromString(java.lang.String style)
          Get the LINESTYLE from the equivalent String
static java.lang.String getLineStyleToString(int style)
          Convert the LINESTYLE to String
 GraphStyler.Pie getPie(int index)
          Get a pie
 float getPie3DAngle()
          Get the pie 3D depth angle for pie charts
 java.util.Vector<GraphStyler.Pie> getPies()
          Get the list of pies
static int getPointStyleFromString(java.lang.String style)
          Get the POINT STYLE from the equivalent String
static java.lang.String getPointStyleToString(int style)
          Convert the POINTSTYLE to String
 GraphStyler.Series getSerie(int index)
          Get a data series
 java.util.Vector<GraphStyler.Series> getSeries()
          Get the list of data series
static int[] getSize(java.lang.String style)
          Extract the graph size from XML style
static java.lang.String getTypeAsString(int type)
          Get the chart type as String
static int getTypeFromString(java.lang.String graphType)
          Get the chart type from the equivalent String
 java.lang.String getValuePrefix()
          Get the prefix text for the vertical or horizontal axis values
 java.lang.String getValueSuffix()
          Get the suffix text for the vertical or horizontal axis values
 GraphStyler.Label getVerticalTitle()
          Get the vertical axis title
 GraphStyler.Font getVLabelsFont()
          Get the vertical axis label or value font
 java.lang.String getXMLStyle()
          Return the parameters as XML string
 boolean hasBarAreaBorders()
          Check if the bar/area borders are visible for bar or area charts
 boolean hasGraphAxis()
          Check if the chart axis are visible
 boolean hasGraphGrid()
          Check if the chart grid is visible
 boolean hasGraphLabels()
          Check if the chart labels are visible
 boolean hasGraphLegend()
          Check if the chart legend is visible
 boolean isAutoscale()
          Get the autoscale option
 boolean isGraph3D()
          Get the 3D style
 boolean isShowPiePerc()
          Check if the pie slice percentages are visible for pie charts
 void removeFreeText(int index)
          Remove a free text from the chart canvas
 void removeLine(int index)
          Remove a trend or target line from the chart canvas
 void removePie(int index)
          Remove a pie
 void removeSerie(int index)
          Remove a data series
 void setAutoscale(boolean autoScale)
          Set the autoscale option.
 void setBarAreaBorderColor(GraphStyler.Color color)
          Set the bar / area border color for bar or area charts
 void setBarAreaBorders(boolean borders)
          Show/Hide the bar / area borders for bar or area charts
 void setBarLineWidth(int width)
          Set the bar width for bar type charts
 void setBarSpace(int space)
          Set the bar space for bar type charts
 void setBgColor(GraphStyler.Color color)
          Set the chart canvas background color
 void setDecimalDigits(int digits)
          Set the number of decimal digits (default=1)
 void setGradientStyle(int gradient)
          Set the fill gradient style
 void setGraph3D(boolean is3D)
          Set the 3D style
 void setGraph3DDepth(int depth)
          Set the chart 3D depth
 void setGraphAxis(boolean axis)
          Show/Hide the chart axis
 void setGraphGrid(boolean grid)
          Show/Hide the chart grid
 void setGraphHeight(int height)
          Set the chart canvas height
 void setGraphLabels(boolean labels)
          Show/Hide the chart labels
 void setGraphLegend(boolean legend)
          Show/Hide the chart legend
 void setGraphTitle(GraphStyler.Label title)
          Set the chart main title
 void setGraphType(int type)
          Set the chart type
 void setGraphWidth(int width)
          Set the chart canvas width
 void setGrid3DAxisColor(GraphStyler.Color color)
          Set the grid 3D axis color
 void setGridAxisColor(GraphStyler.Color color)
          Set the grid axis color
 void setGridBgColor(GraphStyler.Color color)
          Set the grid background color
 void setGridColor(GraphStyler.Color color)
          Set the grid line color
 void setGridHorizontalSpace(int space)
          Set the grid horizontal space between grid lines
 void setGridOriginValue(float originValue)
          Set the lower value for the value axis.
 void setGridPosition(GraphStyler.Point position)
          Set the grid position inside the chart canvas
 void setGridSpaceNumbers(int spaceNumber)
          Set the number of grid spaces for the value axis.
 void setGridSpaceValue(float spaceValue)
          Set the delta value associated to a single grid space.
 void setGridStyle(int lineStyle)
          Set the grid line style
 void setGridVerticalSpace(int space)
          Set the grid vertical space between grid lines
 void setHLabelsFont(GraphStyler.Font font)
          Set the horizontal axis label or value font
 void setHorizontalTitle(GraphStyler.Label title)
          Set the horizontal axis title
 void setLabelAngle(float angle)
          Set the vertical or horizontal axis label rotation angle
 void setLabelFixedPosition(int position)
          Set the vertical or horizontal axis label fixed position
 void setLabelOffset(int offset)
          Set the vertical or horizontal axis label position offset
 void setPie(GraphStyler.Pie pie)
          Set the pies
 void setPie3DAngle(float angle)
          Set the pie 3D depth angle for pie charts
 void setSerie(GraphStyler.Series series)
          Set the data series
 void setShowPiePerc(boolean percentages)
          Show/Hide the pie slice percentages for pie charts
 void setValuePrefix(java.lang.String prefix)
          Set a prefix text for the vertical or horizontal axis values
 void setValueSuffix(java.lang.String suffix)
          Set a suffix text for the vertical or horizontal axis values
 void setVerticalTitle(GraphStyler.Label title)
          Set the vertical axis title
 void setVLabelsFont(GraphStyler.Font font)
          Set the vertical axis label or value font
 org.jdom.Element toXML()
          Return the parameters as XML element tree
static java.lang.String translateFont(java.lang.String font)
          Get the equivalent FONT FAMILY for the current operative system
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_LINE

public static final int TYPE_LINE
graph type: Lines

See Also:
Constant Field Values

TYPE_HBAR

public static final int TYPE_HBAR
graph type: Horizontal bars

See Also:
Constant Field Values

TYPE_VBAR

public static final int TYPE_VBAR
graph type: Vertical bars

See Also:
Constant Field Values

TYPE_SHBAR

public static final int TYPE_SHBAR
graph type: Summarized Horizontal bars

See Also:
Constant Field Values

TYPE_SVBAR

public static final int TYPE_SVBAR
graph type: Summarized Vertical bars

See Also:
Constant Field Values

TYPE_AREA

public static final int TYPE_AREA
graph type: Summarized Areas

See Also:
Constant Field Values

TYPE_PIE

public static final int TYPE_PIE
graph type: Pies

See Also:
Constant Field Values

TYPE_length

public static final int TYPE_length
See Also:
Constant Field Values

LINESTYLE_SOLID

public static final int LINESTYLE_SOLID
line style: Solid

See Also:
Constant Field Values

LINESTYLE_DOT

public static final int LINESTYLE_DOT
line style: Dotted

See Also:
Constant Field Values

LINESTYLE_DASH

public static final int LINESTYLE_DASH
line style: Dashed

See Also:
Constant Field Values

LINESTYLE_DASHDOT

public static final int LINESTYLE_DASHDOT
line style: alternate Dash and Dot

See Also:
Constant Field Values

LINESTYLE_DASHDOTDOT

public static final int LINESTYLE_DASHDOTDOT
line style: alternate Dash and 2 Dots

See Also:
Constant Field Values

LINESTYLE_Length

public static final int LINESTYLE_Length
See Also:
Constant Field Values

FONT_ARIAL

public static final int FONT_ARIAL
font family: Arial

See Also:
Constant Field Values

FONT_COURIER

public static final int FONT_COURIER
font family: Courier

See Also:
Constant Field Values

FONT_DIALOG

public static final int FONT_DIALOG
font family: Dialog

See Also:
Constant Field Values

FONT_HELVETICA

public static final int FONT_HELVETICA
font family: Helvetica

See Also:
Constant Field Values

FONT_MONSPACED

public static final int FONT_MONSPACED
font family: Monotype Spaced

See Also:
Constant Field Values

FONT_SANSSERIF

public static final int FONT_SANSSERIF
font family: Sans Serif

See Also:
Constant Field Values

FONT_SERIF

public static final int FONT_SERIF
font family: Serif

See Also:
Constant Field Values

FONT_TIMESROMAN

public static final int FONT_TIMESROMAN
font family: Times New Roman

See Also:
Constant Field Values

FONT_SCRIPT

public static final int FONT_SCRIPT
font family: Script

See Also:
Constant Field Values

FONT_Length

public static final int FONT_Length
See Also:
Constant Field Values

FONT_STYLE_NORMAL

public static final int FONT_STYLE_NORMAL
font style: Normal

See Also:
Constant Field Values

FONT_STYLE_BOLD

public static final int FONT_STYLE_BOLD
font style: Bold

See Also:
Constant Field Values

FONT_STYLE_ITALIC

public static final int FONT_STYLE_ITALIC
font style: Italic

See Also:
Constant Field Values

FONT_STYLE_BOLDITALIC

public static final int FONT_STYLE_BOLDITALIC
font style: Bold and Italic

See Also:
Constant Field Values

FONT_STYLE_Length

public static final int FONT_STYLE_Length
See Also:
Constant Field Values

POINT_STYLE_NONE

public static final int POINT_STYLE_NONE
point style: None

See Also:
Constant Field Values

POINT_STYLE_PLUS

public static final int POINT_STYLE_PLUS
point style: Plus

See Also:
Constant Field Values

POINT_STYLE_CROSS

public static final int POINT_STYLE_CROSS
point style: Cross

See Also:
Constant Field Values

POINT_STYLE_SQUARE

public static final int POINT_STYLE_SQUARE
point style: Square

See Also:
Constant Field Values

POINT_STYLE_TRIANGLE

public static final int POINT_STYLE_TRIANGLE
point style: Triangle

See Also:
Constant Field Values

POINT_STYLE_DIAMOND

public static final int POINT_STYLE_DIAMOND
point style: Diamond

See Also:
Constant Field Values

POINT_STYLE_CIRCLE

public static final int POINT_STYLE_CIRCLE
point style: Circle

See Also:
Constant Field Values

POINT_STYLE_HEXAGON

public static final int POINT_STYLE_HEXAGON
point style: Hexagon

See Also:
Constant Field Values

POINT_STYLE_Length

public static final int POINT_STYLE_Length
See Also:
Constant Field Values

ALIGN_LEFT

public static final int ALIGN_LEFT
text alignment: Horizontal Left

See Also:
Constant Field Values

ALIGN_CENTER

public static final int ALIGN_CENTER
text alignment: Horizontal/Vertical Center

See Also:
Constant Field Values

ALIGN_RIGHT

public static final int ALIGN_RIGHT
text alignment: Horizontal Right

See Also:
Constant Field Values

ALIGN_TOP

public static final int ALIGN_TOP
text alignment: Vertical Top

See Also:
Constant Field Values

ALIGN_BOTTOM

public static final int ALIGN_BOTTOM
text alignment: Vertical Bottom

See Also:
Constant Field Values

GRADIENT_NONE

public static final int GRADIENT_NONE
gradient fill style: None

See Also:
Constant Field Values

GRADIENT_VERTICAL

public static final int GRADIENT_VERTICAL
gradient fill style: Vertical

See Also:
Constant Field Values

GRADIENT_HORIZONTAL

public static final int GRADIENT_HORIZONTAL
gradient fill style: Horizontal

See Also:
Constant Field Values

GRADIENT_Length

public static final int GRADIENT_Length
See Also:
Constant Field Values
Constructor Detail

GraphStyler

public GraphStyler()

GraphStyler

public GraphStyler(java.lang.String style)
Parameters:
style - a String containing the chart parameters in XML format

GraphStyler

public GraphStyler(org.jdom.Element style)
Parameters:
style - a XML element tree representing the chart parameters
Method Detail

setGraphType

public void setGraphType(int type)
Set the chart type

Parameters:
type - the chart type; see the TYPE constants

getGraphType

public int getGraphType()
Get the chart type


getTypeAsString

public static java.lang.String getTypeAsString(int type)
Get the chart type as String


getTypeFromString

public static int getTypeFromString(java.lang.String graphType)
Get the chart type from the equivalent String

Returns:
one of the TYPE constant or -1 if the type is not recognized

setGraphTitle

public void setGraphTitle(GraphStyler.Label title)
Set the chart main title


getGraphTitle

public GraphStyler.Label getGraphTitle()
Get the chart main title


setGraphWidth

public void setGraphWidth(int width)
Set the chart canvas width


getGraphWidth

public int getGraphWidth()
Get the chart canvas width


setGraphHeight

public void setGraphHeight(int height)
Set the chart canvas height


getGraphHeight

public int getGraphHeight()
Get the chart canvas height


setBgColor

public void setBgColor(GraphStyler.Color color)
Set the chart canvas background color


getBgColor

public GraphStyler.Color getBgColor()
Get the chart canvas background color


setGraph3DDepth

public void setGraph3DDepth(int depth)
Set the chart 3D depth


getGraph3DDepth

public int getGraph3DDepth()
Get the chart 3D depth


setGraph3D

public void setGraph3D(boolean is3D)
Set the 3D style

Parameters:
is3D - true to generates 3D charts; false to generates 2D charts

isGraph3D

public boolean isGraph3D()
Get the 3D style

Returns:
true for 3D charts and false for 2D charts

setGraphGrid

public void setGraphGrid(boolean grid)
Show/Hide the chart grid

Parameters:
grid - true to show the grid

hasGraphGrid

public boolean hasGraphGrid()
Check if the chart grid is visible


setGraphLegend

public void setGraphLegend(boolean legend)
Show/Hide the chart legend

Parameters:
legend - true to show the legend

hasGraphLegend

public boolean hasGraphLegend()
Check if the chart legend is visible


getLegend

public GraphStyler.Legend getLegend()
Get the chart legend


setGraphAxis

public void setGraphAxis(boolean axis)
Show/Hide the chart axis

Parameters:
axis - true to show the axis

hasGraphAxis

public boolean hasGraphAxis()
Check if the chart axis are visible


setGraphLabels

public void setGraphLabels(boolean labels)
Show/Hide the chart labels

Parameters:
labels - true to show the labels

hasGraphLabels

public boolean hasGraphLabels()
Check if the chart labels are visible


setDecimalDigits

public void setDecimalDigits(int digits)
Set the number of decimal digits (default=1)

Parameters:
digits - number of digits

getDecimalDigits

public int getDecimalDigits()
Get the number of decimal digits


setGradientStyle

public void setGradientStyle(int gradient)
Set the fill gradient style

Parameters:
gradient - the gradient style; see the GRADIENT constants

getGradientStyle

public int getGradientStyle()
Get the fill gradient style


setBarLineWidth

public void setBarLineWidth(int width)
Set the bar width for bar type charts


getBarLineWidth

public int getBarLineWidth()
Get the bar width for bar type charts


setBarSpace

public void setBarSpace(int space)
Set the bar space for bar type charts


getBarSpace

public int getBarSpace()
Get the bar space for bar type charts


setBarAreaBorders

public void setBarAreaBorders(boolean borders)
Show/Hide the bar / area borders for bar or area charts

Parameters:
borders - true to show the bar borders

hasBarAreaBorders

public boolean hasBarAreaBorders()
Check if the bar/area borders are visible for bar or area charts


setBarAreaBorderColor

public void setBarAreaBorderColor(GraphStyler.Color color)
Set the bar / area border color for bar or area charts


getBarAreaBorderColor

public GraphStyler.Color getBarAreaBorderColor()
Get the bar / area border color for bar or area charts


setAutoscale

public void setAutoscale(boolean autoScale)
Set the autoscale option.

Parameters:
autoScale - if true the chart grid is scaled to fit the plot area

isAutoscale

public boolean isAutoscale()
Get the autoscale option


setShowPiePerc

public void setShowPiePerc(boolean percentages)
Show/Hide the pie slice percentages for pie charts

Parameters:
percentages - true to show the percentages

isShowPiePerc

public boolean isShowPiePerc()
Check if the pie slice percentages are visible for pie charts


setPie3DAngle

public void setPie3DAngle(float angle)
Set the pie 3D depth angle for pie charts


getPie3DAngle

public float getPie3DAngle()
Get the pie 3D depth angle for pie charts


setHorizontalTitle

public void setHorizontalTitle(GraphStyler.Label title)
Set the horizontal axis title


getHorizontalTitle

public GraphStyler.Label getHorizontalTitle()
Get the horizontal axis title


setVerticalTitle

public void setVerticalTitle(GraphStyler.Label title)
Set the vertical axis title


getVerticalTitle

public GraphStyler.Label getVerticalTitle()
Get the vertical axis title


setHLabelsFont

public void setHLabelsFont(GraphStyler.Font font)
Set the horizontal axis label or value font


getHLabelsFont

public GraphStyler.Font getHLabelsFont()
Get the horizontal axis label or value font


setVLabelsFont

public void setVLabelsFont(GraphStyler.Font font)
Set the vertical axis label or value font


getVLabelsFont

public GraphStyler.Font getVLabelsFont()
Get the vertical axis label or value font


setLabelAngle

public void setLabelAngle(float angle)
Set the vertical or horizontal axis label rotation angle


getLabelAngle

public float getLabelAngle()
Get the vertical or horizontal axis label rotation angle


setLabelFixedPosition

public void setLabelFixedPosition(int position)
Set the vertical or horizontal axis label fixed position


getLabelFixedPosition

public int getLabelFixedPosition()
Get the vertical or horizontal axis label fixed position


setLabelOffset

public void setLabelOffset(int offset)
Set the vertical or horizontal axis label position offset

Parameters:
offset - if <> 0 the label position is alternated between the (fixed position) and the (fixed position + offset)

getLabelOffset

public int getLabelOffset()
Get the vertical or horizontal axis label position offset


setValuePrefix

public void setValuePrefix(java.lang.String prefix)
Set a prefix text for the vertical or horizontal axis values


getValuePrefix

public java.lang.String getValuePrefix()
Get the prefix text for the vertical or horizontal axis values


setValueSuffix

public void setValueSuffix(java.lang.String suffix)
Set a suffix text for the vertical or horizontal axis values


getValueSuffix

public java.lang.String getValueSuffix()
Get the suffix text for the vertical or horizontal axis values


setGridPosition

public void setGridPosition(GraphStyler.Point position)
Set the grid position inside the chart canvas


getGridPosition

public GraphStyler.Point getGridPosition()
Get the grid position inside the chart canvas


setGridVerticalSpace

public void setGridVerticalSpace(int space)
Set the grid vertical space between grid lines


getGridVerticalSpace

public int getGridVerticalSpace()
Get the grid vertical space between grid lines


setGridHorizontalSpace

public void setGridHorizontalSpace(int space)
Set the grid horizontal space between grid lines


getGridHorizontalSpace

public int getGridHorizontalSpace()
Get the grid horizontal space between grid lines


setGridColor

public void setGridColor(GraphStyler.Color color)
Set the grid line color


getGridColor

public GraphStyler.Color getGridColor()
Get the grid line color


setGridBgColor

public void setGridBgColor(GraphStyler.Color color)
Set the grid background color


getGridBgColor

public GraphStyler.Color getGridBgColor()
Get the grid background color


setGridAxisColor

public void setGridAxisColor(GraphStyler.Color color)
Set the grid axis color


getGridAxisColor

public GraphStyler.Color getGridAxisColor()
Get the grid axis color


setGrid3DAxisColor

public void setGrid3DAxisColor(GraphStyler.Color color)
Set the grid 3D axis color


getGrid3DAxisColor

public GraphStyler.Color getGrid3DAxisColor()
Get the grid 3D axis color


setGridStyle

public void setGridStyle(int lineStyle)
Set the grid line style

Parameters:
lineStyle - the line style; see the LINESTYLE constants

getGridStyle

public int getGridStyle()
Get the grid line style


setGridSpaceNumbers

public void setGridSpaceNumbers(int spaceNumber)
Set the number of grid spaces for the value axis.


getGridSpaceNumbers

public int getGridSpaceNumbers()
Get the number of grid spaces for the value axis


setGridOriginValue

public void setGridOriginValue(float originValue)
Set the lower value for the value axis.


getGridOriginValue

public float getGridOriginValue()
Get the lower value for the value axis.


setGridSpaceValue

public void setGridSpaceValue(float spaceValue)
Set the delta value associated to a single grid space. If the autoscale flag is active this value is ignored


getGridSpaceValue

public float getGridSpaceValue()
Get the delta value associated to a single grid space.


addFreeText

public void addFreeText(GraphStyler.Label freeText)
Add a free text to the chart canvas


removeFreeText

public void removeFreeText(int index)
Remove a free text from the chart canvas

Parameters:
index - the text list index

getFreeText

public GraphStyler.Label getFreeText(int index)
Get a free text from the chart canvas

Parameters:
index - the text list index

getFreeTexts

public java.util.Vector<GraphStyler.Label> getFreeTexts()
Get the list of free texts placed on the chart canvas

Returns:
a vector of GraphStyler.Labels

addLine

public void addLine(GraphStyler.TextLine line)
Add a trend or target line to the chart canvas


removeLine

public void removeLine(int index)
Remove a trend or target line from the chart canvas

Parameters:
index - the line list index

getLine

public GraphStyler.TextLine getLine(int index)
Get a trend or target line from the chart canvas

Parameters:
index - the line list index

getLines

public java.util.Vector<GraphStyler.TextLine> getLines()
Get the list of trend and target lines placed on the chart canvas

Returns:
a vector of GraphStyler.TextLines

setSerie

public void setSerie(GraphStyler.Series series)
Set the data series


addSerie

public void addSerie(GraphStyler.Series series)
Add a data series


removeSerie

public void removeSerie(int index)
Remove a data series

Parameters:
index - the series index

getSerie

public GraphStyler.Series getSerie(int index)
Get a data series

Parameters:
index - the series index

getSeries

public java.util.Vector<GraphStyler.Series> getSeries()
Get the list of data series

Returns:
a vector of GraphStyler.Series

setPie

public void setPie(GraphStyler.Pie pie)
Set the pies


addPie

public void addPie(GraphStyler.Pie pie)
Add a pie


removePie

public void removePie(int index)
Remove a pie

Parameters:
index - the pie index

getPie

public GraphStyler.Pie getPie(int index)
Get a pie

Parameters:
index - the pie index

getPies

public java.util.Vector<GraphStyler.Pie> getPies()
Get the list of pies

Returns:
a vector of GraphStyler.Pies

getLineStyleToString

public static java.lang.String getLineStyleToString(int style)
Convert the LINESTYLE to String


getPointStyleToString

public static java.lang.String getPointStyleToString(int style)
Convert the POINTSTYLE to String


getCharStringFont

public static java.lang.String getCharStringFont(int font)
Convert the FONT FAMILY to String


translateFont

public static java.lang.String translateFont(java.lang.String font)
Get the equivalent FONT FAMILY for the current operative system


getCharStringStyle

public static java.lang.String getCharStringStyle(int style)
Convert the FONT STYLE to String


getGradientToString

public static java.lang.String getGradientToString(int gradient)
Convert the GRADIENT STYLE to String


getAlignmentToString

public static java.lang.String getAlignmentToString(int alignment)
Convert the TEXT ALIGNMENT to String


getLineStyleFromString

public static int getLineStyleFromString(java.lang.String style)
Get the LINESTYLE from the equivalent String


getPointStyleFromString

public static int getPointStyleFromString(java.lang.String style)
Get the POINT STYLE from the equivalent String


getCharFontFromString

public static int getCharFontFromString(java.lang.String font)
Get the FONT FAMILY from the equivalent String


getCharStyleFromString

public static int getCharStyleFromString(java.lang.String style)
Get the FONT STYLE from the equivalent String


getGradientFromString

public static int getGradientFromString(java.lang.String gradient)
Get the GRADIENT FAMILY from the equivalent String


getAlignmentFromString

public static int getAlignmentFromString(java.lang.String alignment)
Get the TEXT ALIGNMENT from the equivalent String


getXMLStyle

public java.lang.String getXMLStyle()
Return the parameters as XML string


toXML

public org.jdom.Element toXML()
Return the parameters as XML element tree


fromXMLStyle

public void fromXMLStyle(java.lang.String style)
Load the chart parameters from XML string


fromXML

public void fromXML(org.jdom.Element rootElement)
Load the chart parameters from XML element tree


getSize

public static int[] getSize(java.lang.String style)
Extract the graph size from XML style

Returns:
int array where the first is the graph width and the second the graph height

OBEROn SDK

Copyright © 2008-2014 Mirko Solazzi. All Rights Reserved.