|
deegree 2.4 (2010/11/11 10:47 build-27-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree.graphics.charts.ChartConfig
public class ChartConfig
This class reads the configurations file for the charts and acts as a data class for the configurations It parses the configurations file according to a given schema and throws an exception if the parsing failed It also assigns default values to variables that are not mandatory and don't exist in the configs file
Constructor Summary | |
---|---|
ChartConfig(URL configsPath)
Takes in the path to the configurations file, parses it and holds its values |
Method Summary | |
---|---|
Color |
getGenBackgroundColor()
|
String |
getGenFontFamily()
|
double |
getGenFontSize()
|
String |
getGenFontType()
|
String |
getGenRectangleInsets()
|
Color |
getPieBaseSectionColor()
|
double |
getPieInteriorGap()
|
double |
getPieLabelGap()
|
Color |
getPieShadowColor()
|
Color |
getPlotBackgroundColor()
|
double |
getPlotBackgroundOpacity()
|
double |
getPlotForegroundOpacity()
|
protected Color |
hexToColor(String hexDecimal,
float alpha)
It converts a hexdecimal to a awt.color instance |
boolean |
isGenAntiAliasing()
|
boolean |
isGenBorderVisible()
|
boolean |
isGenTextAntiAlias()
|
boolean |
isLineRenderLines()
|
boolean |
isLineRenderShapes()
|
boolean |
isPieCircular()
|
boolean |
isPlotOutlineVisible()
|
protected void |
parseConfigurations(Element root)
This is the main parsing method. |
protected void |
parseGeneralChartSettings(Element chartElem)
Parses the general settings of the configurations file. |
protected void |
parseLinePlotSettings(Element lineplotElem)
Parses the Line plot settings of the configurations file. |
protected void |
parsePiePlotSettings(Element pieplotElem)
Parses the Pie plot settings of the configurations file. |
protected void |
parsePlotSettings(Element plotElem)
Parses the plot settings of the configurations file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ChartConfig(URL configsPath) throws SAXException, IOException, XMLParsingException
configsPath
- XML file that contains the charts configurations
SAXException
IOException
XMLParsingException
Method Detail |
---|
protected void parseConfigurations(Element root) throws XMLParsingException
root
-
XMLParsingException
protected void parseGeneralChartSettings(Element chartElem) throws XMLParsingException
chartElem
-
XMLParsingException
protected void parsePlotSettings(Element plotElem) throws XMLParsingException
plotElem
-
XMLParsingException
protected void parsePiePlotSettings(Element pieplotElem) throws XMLParsingException
pieplotElem
-
XMLParsingException
protected void parseLinePlotSettings(Element lineplotElem) throws XMLParsingException
lineplotElem
-
XMLParsingException
protected Color hexToColor(String hexDecimal, float alpha) throws NumberFormatException
hexDecimal
- it can start with # or notalpha
- between 0..1
NumberFormatException
- if the given hex decimal could not be parsed.public boolean isGenAntiAliasing()
public Color getGenBackgroundColor()
public boolean isGenBorderVisible()
public String getGenFontFamily()
public double getGenFontSize()
public String getGenFontType()
public boolean isPlotOutlineVisible()
public String getGenRectangleInsets()
public boolean isGenTextAntiAlias()
public boolean isLineRenderLines()
public boolean isLineRenderShapes()
public Color getPieBaseSectionColor()
public boolean isPieCircular()
public double getPieInteriorGap()
public double getPieLabelGap()
public Color getPlotBackgroundColor()
public double getPlotBackgroundOpacity()
public double getPlotForegroundOpacity()
public Color getPieShadowColor()
|
deegree 2.4 (2010/11/11 10:47 build-27-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org