|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.oberon.ooql.sdk.GraphStyler
public class GraphStyler
Manages the chart parameters
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 |
---|
public static final int TYPE_LINE
public static final int TYPE_HBAR
public static final int TYPE_VBAR
public static final int TYPE_SHBAR
public static final int TYPE_SVBAR
public static final int TYPE_AREA
public static final int TYPE_PIE
public static final int TYPE_length
public static final int LINESTYLE_SOLID
public static final int LINESTYLE_DOT
public static final int LINESTYLE_DASH
public static final int LINESTYLE_DASHDOT
public static final int LINESTYLE_DASHDOTDOT
public static final int LINESTYLE_Length
public static final int FONT_ARIAL
public static final int FONT_COURIER
public static final int FONT_DIALOG
public static final int FONT_HELVETICA
public static final int FONT_MONSPACED
public static final int FONT_SANSSERIF
public static final int FONT_SERIF
public static final int FONT_TIMESROMAN
public static final int FONT_SCRIPT
public static final int FONT_Length
public static final int FONT_STYLE_NORMAL
public static final int FONT_STYLE_BOLD
public static final int FONT_STYLE_ITALIC
public static final int FONT_STYLE_BOLDITALIC
public static final int FONT_STYLE_Length
public static final int POINT_STYLE_NONE
public static final int POINT_STYLE_PLUS
public static final int POINT_STYLE_CROSS
public static final int POINT_STYLE_SQUARE
public static final int POINT_STYLE_TRIANGLE
public static final int POINT_STYLE_DIAMOND
public static final int POINT_STYLE_CIRCLE
public static final int POINT_STYLE_HEXAGON
public static final int POINT_STYLE_Length
public static final int ALIGN_LEFT
public static final int ALIGN_CENTER
public static final int ALIGN_RIGHT
public static final int ALIGN_TOP
public static final int ALIGN_BOTTOM
public static final int GRADIENT_NONE
public static final int GRADIENT_VERTICAL
public static final int GRADIENT_HORIZONTAL
public static final int GRADIENT_Length
Constructor Detail |
---|
public GraphStyler()
public GraphStyler(java.lang.String style)
style
- a String containing the chart parameters in XML formatpublic GraphStyler(org.jdom.Element style)
style
- a XML element tree representing the chart parametersMethod Detail |
---|
public void setGraphType(int type)
type
- the chart type; see the TYPE constantspublic int getGraphType()
public static java.lang.String getTypeAsString(int type)
public static int getTypeFromString(java.lang.String graphType)
public void setGraphTitle(GraphStyler.Label title)
public GraphStyler.Label getGraphTitle()
public void setGraphWidth(int width)
public int getGraphWidth()
public void setGraphHeight(int height)
public int getGraphHeight()
public void setBgColor(GraphStyler.Color color)
public GraphStyler.Color getBgColor()
public void setGraph3DDepth(int depth)
public int getGraph3DDepth()
public void setGraph3D(boolean is3D)
is3D
- true to generates 3D charts; false to generates 2D chartspublic boolean isGraph3D()
public void setGraphGrid(boolean grid)
grid
- true to show the gridpublic boolean hasGraphGrid()
public void setGraphLegend(boolean legend)
legend
- true to show the legendpublic boolean hasGraphLegend()
public GraphStyler.Legend getLegend()
public void setGraphAxis(boolean axis)
axis
- true to show the axispublic boolean hasGraphAxis()
public void setGraphLabels(boolean labels)
labels
- true to show the labelspublic boolean hasGraphLabels()
public void setDecimalDigits(int digits)
digits
- number of digitspublic int getDecimalDigits()
public void setGradientStyle(int gradient)
gradient
- the gradient style; see the GRADIENT constantspublic int getGradientStyle()
public void setBarLineWidth(int width)
public int getBarLineWidth()
public void setBarSpace(int space)
public int getBarSpace()
public void setBarAreaBorders(boolean borders)
borders
- true to show the bar borderspublic boolean hasBarAreaBorders()
public void setBarAreaBorderColor(GraphStyler.Color color)
public GraphStyler.Color getBarAreaBorderColor()
public void setAutoscale(boolean autoScale)
autoScale
- if true the chart grid is scaled to fit the plot areapublic boolean isAutoscale()
public void setShowPiePerc(boolean percentages)
percentages
- true to show the percentagespublic boolean isShowPiePerc()
public void setPie3DAngle(float angle)
public float getPie3DAngle()
public void setHorizontalTitle(GraphStyler.Label title)
public GraphStyler.Label getHorizontalTitle()
public void setVerticalTitle(GraphStyler.Label title)
public GraphStyler.Label getVerticalTitle()
public void setHLabelsFont(GraphStyler.Font font)
public GraphStyler.Font getHLabelsFont()
public void setVLabelsFont(GraphStyler.Font font)
public GraphStyler.Font getVLabelsFont()
public void setLabelAngle(float angle)
public float getLabelAngle()
public void setLabelFixedPosition(int position)
public int getLabelFixedPosition()
public void setLabelOffset(int offset)
offset
- if <> 0 the label position is alternated between the (fixed position)
and the (fixed position + offset)public int getLabelOffset()
public void setValuePrefix(java.lang.String prefix)
public java.lang.String getValuePrefix()
public void setValueSuffix(java.lang.String suffix)
public java.lang.String getValueSuffix()
public void setGridPosition(GraphStyler.Point position)
public GraphStyler.Point getGridPosition()
public void setGridVerticalSpace(int space)
public int getGridVerticalSpace()
public void setGridHorizontalSpace(int space)
public int getGridHorizontalSpace()
public void setGridColor(GraphStyler.Color color)
public GraphStyler.Color getGridColor()
public void setGridBgColor(GraphStyler.Color color)
public GraphStyler.Color getGridBgColor()
public void setGridAxisColor(GraphStyler.Color color)
public GraphStyler.Color getGridAxisColor()
public void setGrid3DAxisColor(GraphStyler.Color color)
public GraphStyler.Color getGrid3DAxisColor()
public void setGridStyle(int lineStyle)
lineStyle
- the line style; see the LINESTYLE constantspublic int getGridStyle()
public void setGridSpaceNumbers(int spaceNumber)
public int getGridSpaceNumbers()
public void setGridOriginValue(float originValue)
public float getGridOriginValue()
public void setGridSpaceValue(float spaceValue)
public float getGridSpaceValue()
public void addFreeText(GraphStyler.Label freeText)
public void removeFreeText(int index)
index
- the text list indexpublic GraphStyler.Label getFreeText(int index)
index
- the text list indexpublic java.util.Vector<GraphStyler.Label> getFreeTexts()
GraphStyler.Label
spublic void addLine(GraphStyler.TextLine line)
public void removeLine(int index)
index
- the line list indexpublic GraphStyler.TextLine getLine(int index)
index
- the line list indexpublic java.util.Vector<GraphStyler.TextLine> getLines()
GraphStyler.TextLine
spublic void setSerie(GraphStyler.Series series)
public void addSerie(GraphStyler.Series series)
public void removeSerie(int index)
index
- the series indexpublic GraphStyler.Series getSerie(int index)
index
- the series indexpublic java.util.Vector<GraphStyler.Series> getSeries()
GraphStyler.Series
public void setPie(GraphStyler.Pie pie)
public void addPie(GraphStyler.Pie pie)
public void removePie(int index)
index
- the pie indexpublic GraphStyler.Pie getPie(int index)
index
- the pie indexpublic java.util.Vector<GraphStyler.Pie> getPies()
GraphStyler.Pie
spublic static java.lang.String getLineStyleToString(int style)
public static java.lang.String getPointStyleToString(int style)
public static java.lang.String getCharStringFont(int font)
public static java.lang.String translateFont(java.lang.String font)
public static java.lang.String getCharStringStyle(int style)
public static java.lang.String getGradientToString(int gradient)
public static java.lang.String getAlignmentToString(int alignment)
public static int getLineStyleFromString(java.lang.String style)
public static int getPointStyleFromString(java.lang.String style)
public static int getCharFontFromString(java.lang.String font)
public static int getCharStyleFromString(java.lang.String style)
public static int getGradientFromString(java.lang.String gradient)
public static int getAlignmentFromString(java.lang.String alignment)
public java.lang.String getXMLStyle()
public org.jdom.Element toXML()
public void fromXMLStyle(java.lang.String style)
public void fromXML(org.jdom.Element rootElement)
public static int[] getSize(java.lang.String style)
|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |