com.davisor.graphics.chart
Class ChartXMLAttributes

java.lang.Object
  extended bycom.davisor.graphics.chart.ChartObjectAttributes
      extended bycom.davisor.graphics.chart.ChartXMLAttributes
All Implemented Interfaces:
ChartAttributes, org.xml.sax.ContentHandler, org.xml.sax.DocumentHandler, com.davisor.core.Dupable, java.io.Serializable

public class ChartXMLAttributes
extends ChartObjectAttributes
implements org.xml.sax.ContentHandler, org.xml.sax.DocumentHandler

ChartXMLAttributes implements a SAX document handler that can read chart attributes from a XML document. The handler can control all aspects of chart attributes, and accepts a number of XML tags as described in a separate Chart XML reference document. The attributes themselves are further described in a separate attribute reference document.

Since:
JDK1.2
See Also:
startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes), Chart, ChartAttributes, ChartFactory, ChartXMLDocumentHandler, MimeInfo, Serialized Form

Field Summary
static int ALIGNMENT
           
static int ANGLE
           
static int ANNOTATION
           
static int ANTIALIASMODE
           
static int AREA
           
static int ATTR
           
static int ATTRIBUTES
           
static int AXES
           
static int AXIS
           
static int AXISALIGNMENT
           
static int AXISCOLOR
           
static int AXISFONT
           
static int AXISSHAPE
           
static int AXISSTROKE
           
static int BACKCOLOR
           
static int BACKFONT
           
static int BACKPAINT
           
static int BACKSHAPE
           
static int BACKSTROKE
           
static java.lang.String BOTTOM
           
static int CHARTTYPE
           
static int COLOR
           
static int COLORPOINT
           
static int COLORSCALE
           
static int CONTENTTYPE
           
static int CUMULATIVE
           
static int DATAFORMAT
           
static int DATAGROUP
           
static boolean DEBUG
           
static int DIRECTIONAL
           
static int ENCLOSE
           
static int FONT
           
static int GAP
           
static int GRIDCOLOR
           
static int GRIDLINES
           
static int GRIDSTROKE
           
static int GROUP
           
static int HEIGHT
           
static int HIDDEN
           
static int HREF
           
static int ID
           
static int IMAGE
           
static int IMAGEPARAMS
           
static int INTERPOLATIONMODE
           
static int LABELALIGNMENT
           
static int LABELCOLOR
           
static int LABELFONT
           
static int LABELFORMAT
           
static int LABELOFFSET
           
static int LABELPAINT
           
static int LABELROTATION
           
static int LABELSTROKE
           
static int LABELTEXT
           
static java.lang.String LEFT
           
static int LEGEND
           
static int LEGENDALIGNMENT
           
static int LEGENDFORMAT
           
static int LEGENDTYPE
           
static int LIGHTCOLOR
           
static int LIGHTING
           
static int LINEALIGNMENT
           
static int LINECOLOR
           
static int LINEPAINT
           
static int LINESMOOTHNESS
           
static int LINESTROKE
           
static int LOCALE
           
static int MARGIN
           
static int MARKER
           
static int MARKEROFFSET
           
static int MAX
           
static int MAXCOLOR
           
static int MAXPAINT
           
static int MAXSIZE
           
static int MIN
           
static int MINCOLOR
           
static int MINPAINT
           
static int MINSHAPE
           
static int MINSIZE
           
static int MULTISERIESMODE
           
static int NAME
           
static int NAMESPACE
           
static int OFFSET
           
static int OPPOSITE
           
static int ORIENTATION
           
static int PAINT
           
static int PAINTPOINT
           
static int PAINTSCALE
           
static int PLOT
           
static int POINTCOLOR
           
static int POINTPAINT
           
static int POINTSHAPE
           
static int POINTSTROKE
           
static int POSITION
           
static int POSITIONTYPE
           
static int RENDERING
           
static int RESOLUTION
           
static int REVERSED
           
static java.lang.String RIGHT
           
static int SERIES
           
static int SHAPE
           
static int SHAPEPOINT
           
static int SHAPESCALE
           
static int SILENT
           
static int STEP
           
static int STROKE
           
static int SUBCHARTTYPE
           
protected static java.lang.String[] TAGS
           
static int TEXT
           
static int TICCOLOR
           
static int TICSTROKE
           
static int TITLEALIGNMENT
           
static int TITLECOLOR
           
static int TITLEFONT
           
static int TITLEOFFSET
           
static int TITLEPAINT
           
static int TITLEROTATION
           
static int TITLETEXT
           
static java.lang.String TOP
           
static int URLCONTEXT
           
static int VALUE
           
static int VALUEALIGNMENT
           
static int VALUECOLOR
           
static int VALUEFONT
           
static int VALUEFORMAT
           
static int VALUEPAINT
           
static int VALUESTROKE
           
static int WIDTH
           
static int VIEWPORT
           
 
Fields inherited from class com.davisor.graphics.chart.ChartObjectAttributes
M_antialiasMode, M_axes, M_back, M_chartType, M_contentType, M_encoderInfo, M_height, M_id, M_imageParams, M_legendAttributes, M_locale, M_multiSeriesMode, M_namespace, M_plot, M_resolution, M_urlContext, M_width
 
Constructor Summary
protected ChartXMLAttributes()
          Protected constructor for ChartObjectAttributes3D
protected ChartXMLAttributes(ChartXMLAttributes ca, boolean deep)
          Protected copy constructor used by clone and dup methods.
  ChartXMLAttributes(java.io.Reader reader, java.net.URL context)
          Constructs a new ChartXMLAttributes object from a XML document available through the character input stream.
 
Method Summary
 void addChannelAttributes(ChartData data)
          Adding channels from the data This method delegates adding channel attributes to the plot render attributes.
protected  void appendXMLStartTag(java.lang.StringBuffer xml, boolean useXMLChartType)
          Appends a XML tag that starts objects XML representation, but optionally with original XML chart type.
 void characters(char[] ch, int start, int length)
          Handles a bundle of characters into current text accumulation buffer.
 java.lang.Object clone()
          Returns a shallow copy of this object
 com.davisor.core.Dupable dup()
          Returns a deep copy of this object
protected  void endAttributes()
          Updates final internal references between different attribute components.
protected  void endAxes()
          Extracts axes attributes from an attribute list.
protected  void endAxis()
          Closes the current axis.
protected  void endColorScale()
          Closes the current color scale.
 void endDocument()
          Handles the end of a XML document.
 void endElement(java.lang.String name)
          Handles the end of a XML element.
 void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qualifiedName)
          Handles the end of a XML element in SAX2 compliant way.
protected  void endPaintScale()
          Closes the current paint scale.
protected  void endPlot()
          Closes the current plot rendering attributes and annotation attributes for plot rendering attributes.
protected  void endPlotText()
          Closes the current plot text element.
 void endPrefixMapping(java.lang.String prefix)
          End the scope of a prefix-URI mapping in SAX2 compliant way.
protected  void endRendering()
          Closes the current rendering attributes and annotation attributes for rendering attributes.
protected  void endSeries()
          Closes the current rendering attributes and annotation attributes for rendering attributes.
protected  void endShapeScale()
          Closes the current shape scale.
protected  void endText()
          Closes the current text element.
protected  BackRenderAttributes getBackRenderAttributes(org.xml.sax.AttributeList attributeList)
          Constructs a new BackRenderAttributes instance from an attribute list.
protected  BoxModelAttributes getBoxModelAttributes(java.lang.String area, java.lang.String property, Type dataType, org.xml.sax.AttributeList attributeList)
          Create and return CSS2 Box Model attributes.
protected static int getDim(java.lang.String dimValue)
          Interpretes given dimension string value.
protected  LegendAttributes getLegendAttributes(org.xml.sax.AttributeList attributeList)
          Constructs a new LegendAttributes instance with [@link LegendRenderAttributes} from an attribute list.
protected  PlotRenderAttributes getPlotRenderAttributes(org.xml.sax.AttributeList attributeList)
          Constructs a new PlotRenderAttributes instance from an attribute list.
 java.lang.String getXMLChartType()
          Gets the chart type that was originally specified in a <chart> XML tag.
 void ignorableWhitespace(char[] ch, int start, int length)
          Handles ignorable white space (which is ignored).
protected  java.lang.Object parseData(java.lang.String value, Type type)
          Uses the given type to parse the given string value.
protected  java.lang.Number parseNumber(java.lang.String value)
          Attemps to parse given string value as an integer or double number value.
static void printChannelAttributes(ChartXMLAttributes atts)
          This method can be used to print channel attributes (for debugging)
 void processingInstruction(java.lang.String target, java.lang.String data)
          Handles processing instructions (which are ignored).
 void setDocumentLocator(org.xml.sax.Locator locator)
          Sets the custom document locator (ignored).
 void skippedEntity(java.lang.String name)
          Receive notification of a skipped entity in SAX2 compliant way.
protected  void startAnnotation(org.xml.sax.AttributeList attributeList)
          Prepares property set, if necessary, for annotation attributes.
protected  void startArea(org.xml.sax.AttributeList attributeList)
          Extracts background area attributes from an attribute list.
protected  void startAttr(org.xml.sax.AttributeList attributeList)
          Extracts attributes of one annotation attribute.
protected  void startAttributes(org.xml.sax.AttributeList attributeList)
           
protected  void startAxes(org.xml.sax.AttributeList attributeList)
          Extracts axes attributes from an attribute list.
protected  void startAxis(org.xml.sax.AttributeList attributeList)
          Extracts axis attributes from an attribute list.
protected  void startColorPoint(org.xml.sax.AttributeList attributeList)
          Extracts colorPoint tag attributes and adds new point to current color scale.
protected  void startColorScale(org.xml.sax.AttributeList attributeList)
          Extracts colorScale tag attributes and creates a new PaintScale instance.
protected  void startDirectional(org.xml.sax.AttributeList attributeList)
          Empty handler for directional tag.
 void startDocument()
          Handles the start of a XML document.
 void startElement(java.lang.String name, org.xml.sax.AttributeList attributeList)
          Handles the start of a XML element.
 void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qualifiedName, org.xml.sax.Attributes atts)
          Handles the end of a XML element in SAX2 compliant way.
protected  void startImage(org.xml.sax.AttributeList attributeList)
          Extracts image attributes from an attribute list.
protected  void startLegend(org.xml.sax.AttributeList attributeList)
          Extracts legend attributes from an attribute list.
protected  void startLighting(org.xml.sax.AttributeList attributeList)
          Empty handler from lighting tag.
protected  void startMarker(org.xml.sax.AttributeList attributeList)
          Parses Marker-element attributes.
protected  void startPaintPoint(org.xml.sax.AttributeList attributeList)
          Extracts paintPoint tag attributes and adds new point to current paint scale.
protected  void startPaintScale(org.xml.sax.AttributeList attributeList)
          Extract paintScale tag attributes and creates a new PaintScale isntance.
protected  void startPlot(org.xml.sax.AttributeList attributeList)
          Extracts plot area rendering attributes from an attribute list.
protected  void startPlotAnnotation(org.xml.sax.AttributeList attributeList)
          Prepares plot property set, if necessary, for annotation attributes.
protected  void startPlotAttr(org.xml.sax.AttributeList attributeList)
          Extracts attributes of one annotation attribute.
protected  void startPlotText(org.xml.sax.AttributeList attributeList)
          Handles the start of a text element.
 void startPrefixMapping(java.lang.String prefix, java.lang.String uri)
          Begin the scope of a prefix-URI Namespace mapping in SAX2 compliant way.
protected  void startRendering(org.xml.sax.AttributeList attributeList)
          Extracts basic attributes from an attribute list.
protected  void startSeries(org.xml.sax.AttributeList attributeList)
          Extracts channel series attributes from an attribute list.
protected  void startShapePoint(org.xml.sax.AttributeList attributeList)
          Extracts shapePoint tag attributes and adds new point to current shape scale.
protected  void startShapeScale(org.xml.sax.AttributeList attributeList)
          Extract shapeScale tag attributes and creates a new ShapeScale isntance.
protected  void startText(org.xml.sax.AttributeList attributeList)
          Handles the start of a text element.
static void subPrintCA(java.util.Map channelAttributes, java.lang.String padding)
          This method will print channel attribute in question
 java.lang.String toString(boolean useXMLChartType)
          Gets chart attributes XML representation, but optionally with original XML chart type.
 
Methods inherited from class com.davisor.graphics.chart.ChartObjectAttributes
appendXMLBodyTags, appendXMLEndTag, appendXMLStartTag, equals, getAntialiasMode, getAxes, getBack, getChartType, getContentType, getEncoderInfo, getHeight, getID, getImageParams, getLegend, getLocale, getMultiSeriesMode, getName, getNamespace, getPlot, getResolution, getURLContext, getWidth, isArea, isSeries, setAntialiasMode, setAntialiasMode, setBack, setChartType, setContentType, setHeight, setImageParams, setLegend, setLocale, setLocale, setMultiSeriesMode, setNamespace, setPlot, setResolution, setURLContext, setWidth, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ATTRIBUTES

public static final int ATTRIBUTES
See Also:
Constant Field Values

IMAGE

public static final int IMAGE
See Also:
Constant Field Values

AREA

public static final int AREA
See Also:
Constant Field Values

PLOT

public static final int PLOT
See Also:
Constant Field Values

RENDERING

public static final int RENDERING
See Also:
Constant Field Values

AXES

public static final int AXES
See Also:
Constant Field Values

AXIS

public static final int AXIS
See Also:
Constant Field Values

MARKER

public static final int MARKER
See Also:
Constant Field Values

LEGEND

public static final int LEGEND
See Also:
Constant Field Values

WIDTH

public static final int WIDTH
See Also:
Constant Field Values

HEIGHT

public static final int HEIGHT
See Also:
Constant Field Values

RESOLUTION

public static final int RESOLUTION
See Also:
Constant Field Values

CONTENTTYPE

public static final int CONTENTTYPE
See Also:
Constant Field Values

IMAGEPARAMS

public static final int IMAGEPARAMS
See Also:
Constant Field Values

ANTIALIASMODE

public static final int ANTIALIASMODE
See Also:
Constant Field Values

ALIGNMENT

public static final int ALIGNMENT
See Also:
Constant Field Values

COLOR

public static final int COLOR
See Also:
Constant Field Values

FONT

public static final int FONT
See Also:
Constant Field Values

PAINT

public static final int PAINT
See Also:
Constant Field Values

SHAPE

public static final int SHAPE
See Also:
Constant Field Values

STROKE

public static final int STROKE
See Also:
Constant Field Values

POINTCOLOR

public static final int POINTCOLOR
See Also:
Constant Field Values

POINTPAINT

public static final int POINTPAINT
See Also:
Constant Field Values

POINTSHAPE

public static final int POINTSHAPE
See Also:
Constant Field Values

POINTSTROKE

public static final int POINTSTROKE
See Also:
Constant Field Values

LINECOLOR

public static final int LINECOLOR
See Also:
Constant Field Values

LINEPAINT

public static final int LINEPAINT
See Also:
Constant Field Values

LINESTROKE

public static final int LINESTROKE
See Also:
Constant Field Values

OPPOSITE

public static final int OPPOSITE
See Also:
Constant Field Values

REVERSED

public static final int REVERSED
See Also:
Constant Field Values

SILENT

public static final int SILENT
See Also:
Constant Field Values

POSITION

public static final int POSITION
See Also:
Constant Field Values

GRIDCOLOR

public static final int GRIDCOLOR
See Also:
Constant Field Values

GRIDLINES

public static final int GRIDLINES
See Also:
Constant Field Values

GRIDSTROKE

public static final int GRIDSTROKE
See Also:
Constant Field Values

GAP

public static final int GAP
See Also:
Constant Field Values

OFFSET

public static final int OFFSET
See Also:
Constant Field Values

AXISALIGNMENT

public static final int AXISALIGNMENT
See Also:
Constant Field Values

AXISCOLOR

public static final int AXISCOLOR
See Also:
Constant Field Values

AXISFONT

public static final int AXISFONT
See Also:
Constant Field Values

AXISSHAPE

public static final int AXISSHAPE
See Also:
Constant Field Values

AXISSTROKE

public static final int AXISSTROKE
See Also:
Constant Field Values

TITLEALIGNMENT

public static final int TITLEALIGNMENT
See Also:
Constant Field Values

TITLECOLOR

public static final int TITLECOLOR
See Also:
Constant Field Values

TITLEFONT

public static final int TITLEFONT
See Also:
Constant Field Values

TITLEOFFSET

public static final int TITLEOFFSET
See Also:
Constant Field Values

TITLEPAINT

public static final int TITLEPAINT
See Also:
Constant Field Values

TITLEROTATION

public static final int TITLEROTATION
See Also:
Constant Field Values

TITLETEXT

public static final int TITLETEXT
See Also:
Constant Field Values

LABELALIGNMENT

public static final int LABELALIGNMENT
See Also:
Constant Field Values

LABELCOLOR

public static final int LABELCOLOR
See Also:
Constant Field Values

LABELFONT

public static final int LABELFONT
See Also:
Constant Field Values

LABELFORMAT

public static final int LABELFORMAT
See Also:
Constant Field Values

LABELOFFSET

public static final int LABELOFFSET
See Also:
Constant Field Values

LABELPAINT

public static final int LABELPAINT
See Also:
Constant Field Values

LABELROTATION

public static final int LABELROTATION
See Also:
Constant Field Values

LABELSTROKE

public static final int LABELSTROKE
See Also:
Constant Field Values

LABELTEXT

public static final int LABELTEXT
See Also:
Constant Field Values

TICCOLOR

public static final int TICCOLOR
See Also:
Constant Field Values

TICSTROKE

public static final int TICSTROKE
See Also:
Constant Field Values

BACKCOLOR

public static final int BACKCOLOR
See Also:
Constant Field Values

BACKFONT

public static final int BACKFONT
See Also:
Constant Field Values

BACKPAINT

public static final int BACKPAINT
See Also:
Constant Field Values

BACKSHAPE

public static final int BACKSHAPE
See Also:
Constant Field Values

BACKSTROKE

public static final int BACKSTROKE
See Also:
Constant Field Values

ID

public static final int ID
See Also:
Constant Field Values

GROUP

public static final int GROUP
See Also:
Constant Field Values

DATAGROUP

public static final int DATAGROUP
See Also:
Constant Field Values

ANGLE

public static final int ANGLE
See Also:
Constant Field Values

MIN

public static final int MIN
See Also:
Constant Field Values

MAX

public static final int MAX
See Also:
Constant Field Values

STEP

public static final int STEP
See Also:
Constant Field Values

CHARTTYPE

public static final int CHARTTYPE
See Also:
Constant Field Values

LOCALE

public static final int LOCALE
See Also:
Constant Field Values

URLCONTEXT

public static final int URLCONTEXT
See Also:
Constant Field Values

DATAFORMAT

public static final int DATAFORMAT
See Also:
Constant Field Values

VALUEFORMAT

public static final int VALUEFORMAT
See Also:
Constant Field Values

CUMULATIVE

public static final int CUMULATIVE
See Also:
Constant Field Values

HIDDEN

public static final int HIDDEN
See Also:
Constant Field Values

MINSIZE

public static final int MINSIZE
See Also:
Constant Field Values

MAXSIZE

public static final int MAXSIZE
See Also:
Constant Field Values

MINCOLOR

public static final int MINCOLOR
See Also:
Constant Field Values

MAXCOLOR

public static final int MAXCOLOR
See Also:
Constant Field Values

MINPAINT

public static final int MINPAINT
See Also:
Constant Field Values

MAXPAINT

public static final int MAXPAINT
See Also:
Constant Field Values

ENCLOSE

public static final int ENCLOSE
See Also:
Constant Field Values

VALUECOLOR

public static final int VALUECOLOR
See Also:
Constant Field Values

VALUEFONT

public static final int VALUEFONT
See Also:
Constant Field Values

VALUEPAINT

public static final int VALUEPAINT
See Also:
Constant Field Values

VALUEALIGNMENT

public static final int VALUEALIGNMENT
See Also:
Constant Field Values

VALUESTROKE

public static final int VALUESTROKE
See Also:
Constant Field Values

MARKEROFFSET

public static final int MARKEROFFSET
See Also:
Constant Field Values

MARGIN

public static final int MARGIN
See Also:
Constant Field Values

LIGHTING

public static final int LIGHTING
See Also:
Constant Field Values

DIRECTIONAL

public static final int DIRECTIONAL
See Also:
Constant Field Values

LINESMOOTHNESS

public static final int LINESMOOTHNESS
See Also:
Constant Field Values

ANNOTATION

public static final int ANNOTATION
See Also:
Constant Field Values

ATTR

public static final int ATTR
See Also:
Constant Field Values

NAME

public static final int NAME
See Also:
Constant Field Values

VALUE

public static final int VALUE
See Also:
Constant Field Values

TEXT

public static final int TEXT
See Also:
Constant Field Values

HREF

public static final int HREF
See Also:
Constant Field Values

MULTISERIESMODE

public static final int MULTISERIESMODE
See Also:
Constant Field Values

NAMESPACE

public static final int NAMESPACE
See Also:
Constant Field Values

VIEWPORT

public static final int VIEWPORT
See Also:
Constant Field Values

SERIES

public static final int SERIES
See Also:
Constant Field Values

SUBCHARTTYPE

public static final int SUBCHARTTYPE
See Also:
Constant Field Values

LIGHTCOLOR

public static final int LIGHTCOLOR
See Also:
Constant Field Values

LEGENDALIGNMENT

public static final int LEGENDALIGNMENT
See Also:
Constant Field Values

LEGENDTYPE

public static final int LEGENDTYPE
See Also:
Constant Field Values

PAINTSCALE

public static final int PAINTSCALE
See Also:
Constant Field Values

PAINTPOINT

public static final int PAINTPOINT
See Also:
Constant Field Values

INTERPOLATIONMODE

public static final int INTERPOLATIONMODE
See Also:
Constant Field Values

COLORSCALE

public static final int COLORSCALE
See Also:
Constant Field Values

COLORPOINT

public static final int COLORPOINT
See Also:
Constant Field Values

SHAPESCALE

public static final int SHAPESCALE
See Also:
Constant Field Values

SHAPEPOINT

public static final int SHAPEPOINT
See Also:
Constant Field Values

MINSHAPE

public static final int MINSHAPE
See Also:
Constant Field Values

LEGENDFORMAT

public static final int LEGENDFORMAT
See Also:
Constant Field Values

LINEALIGNMENT

public static final int LINEALIGNMENT
See Also:
Constant Field Values

ORIENTATION

public static final int ORIENTATION
See Also:
Constant Field Values

POSITIONTYPE

public static final int POSITIONTYPE
See Also:
Constant Field Values

TAGS

protected static final java.lang.String[] TAGS

TOP

public static final java.lang.String TOP
See Also:
Constant Field Values

RIGHT

public static