com.davisor.graphics.chart
Class ChartStringAttributes

java.lang.Object
  extended bycom.davisor.graphics.chart.ChartStringAttributes
All Implemented Interfaces:
ChartAttributes, com.davisor.core.Dupable, java.io.Serializable
Direct Known Subclasses:
ChartMultiAttributes

public class ChartStringAttributes
extends java.lang.Object
implements ChartAttributes

ChartStringAttributes implements a chart attribute set where the attribute values are stored in a fixed XML string. For more information about the attributes themselves, please see ChartAttributes interface documentation.

This string storage method is usefull when fixed sets of attributes are moved over to some storage media, or during serialization. To access and manipulate individual attributes, use ChartXMLAttributes to parse the XML data back into individual attribute objects.

Thanks to the attribute storage strategy, individual attribute values are inaccessible, and immutable. None of the ChartAttributes interface methods will work either. The only usefull method is toString(), that returns the attribute set XML representation.

Since:
JDK1.3
See Also:
Chart, ChartData, ChartMultiAttributes, ChartObjectAttributes, ChartXMLAttributes, Serialized Form

Field Summary
protected  java.lang.String M_xml
          Map for ChannelAttributes.
 
Constructor Summary
ChartStringAttributes()
          Default constructor.
ChartStringAttributes(ChartAttributes ca)
          Copy constructor.
ChartStringAttributes(java.lang.String xml)
          Creates a new chart attributes set.
 
Method Summary
 void addChannelAttributes(ChartData data)
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 void addChannelAttributes(java.lang.String id, ChannelAttributes atts)
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 java.lang.Object clone()
          Makes a shallow copy of this object.
 com.davisor.core.Dupable dup()
          Makes a deep copy of this object.
 boolean equals(java.lang.Object object)
          Test if these attributes equal to given attributes.
 java.lang.String getAltFormat()
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 int getAntialiasMode()
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 java.util.List getAxes()
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 BackRenderAttributes getBack()
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 java.util.Map getChannelAttributes()
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 java.lang.String getChartType()
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 java.lang.String getContentType()
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 com.davisor.graphics.codec.MimeInfo getEncoderInfo()
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 java.lang.Number getHeight()
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 java.lang.String getID()
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 java.lang.String getImageParams()
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 LegendAttributes getLegend()
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 java.util.Locale getLocale()
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 java.lang.Boolean getMultiSeriesMode()
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 java.lang.String getName(java.lang.String id)
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 java.lang.String getNamespace()
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 PlotRenderAttributes getPlot()
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 java.lang.Number getResolution()
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 java.net.URL getURLContext()
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 java.lang.String getURLFormat()
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 java.lang.String getValueFormat()
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 java.lang.Number getWidth()
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 boolean hasChannelAttributes(java.lang.String id)
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 boolean isArea(java.lang.String id, PlotRenderAttributes plot)
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 boolean isSeries(java.lang.String id)
          Deprecated. Use ChartFactory#isMultiSeriesMode instead
 void setAltFormat(java.lang.String altFormat)
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 void setAntialiasMode(int antialiasMode)
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 void setContentType(java.lang.String contentType)
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 void setHeight(java.lang.Number height, boolean inherit)
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 void setImageParams(java.lang.String imageParams)
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 void setResolution(java.lang.Number resolution)
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 void setURLContext(java.net.URL urlContext)
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 void setURLFormat(java.lang.String urlFormat)
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 void setValueFormat(java.lang.String valueFormat)
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 void setWidth(java.lang.Number width, boolean inherit)
          Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.
 java.lang.String toString()
          Gets chart attributes XML representation.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

M_xml

protected java.lang.String M_xml
Map for ChannelAttributes.

Constructor Detail

ChartStringAttributes

public ChartStringAttributes()
Default constructor.


ChartStringAttributes

public ChartStringAttributes(ChartAttributes ca)
Copy constructor. This copy constructor copies given attributes object string representation, and is therefore more general than ordinary copy constructors.

Parameters:
ca - attributes to be copied
See Also:
clone(), dup(), toString(), ChartObjectAttributes.toString()

ChartStringAttributes

public ChartStringAttributes(java.lang.String xml)
Creates a new chart attributes set.

Parameters:
xml - attributes XML representation
See Also:
toString()
Method Detail

addChannelAttributes

public void addChannelAttributes(ChartData data)
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.

Specified by:
addChannelAttributes in interface ChartAttributes
Parameters:
data - the ChannelAttributes.
See Also:
ChannelAttributes.getID(), ChannelAttributes.setDefaults(com.davisor.graphics.chart.ChannelAttributes)

addChannelAttributes

public void addChannelAttributes(java.lang.String id,
                                 ChannelAttributes atts)
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.


getAltFormat

public java.lang.String getAltFormat()
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.


getAntialiasMode

public int getAntialiasMode()
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.

Specified by:
getAntialiasMode in interface ChartAttributes
Returns:
RenderAttributes antialias code
See Also:
ChartAttributes.setAntialiasMode(int), ImageChart.setAntialiasMode(int)

getAxes

public java.util.List getAxes()
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.

Specified by:
getAxes in interface ChartAttributes
Returns:
chart axes

getBack

public BackRenderAttributes getBack()
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.

Specified by:
getBack in interface ChartAttributes
Returns:
chart bacground render attributes

getChannelAttributes

public java.util.Map getChannelAttributes()
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.


getChartType

public java.lang.String getChartType()
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.

Specified by:
getChartType in interface ChartAttributes
Returns:
chart factory type, or null if unset
See Also:
ChartFactory.getFactory(String)

getEncoderInfo

public com.davisor.graphics.codec.MimeInfo getEncoderInfo()
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.

Specified by:
getEncoderInfo in interface ChartAttributes
Returns:
chart content encoder information, which defaults to image/png encoder information if encoder has not been explicitly set

getContentType

public java.lang.String getContentType()
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.

Specified by:
getContentType in interface ChartAttributes
Returns:
chart content encoder MIME type (may be null)
See Also:
Chart.getContentType()

getHeight

public java.lang.Number getHeight()
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.

Specified by:
getHeight in interface ChartAttributes
Returns:
chart height (may be null)
See Also:
ChartAttributes.getWidth(), ChartAttributes.getResolution(), Chart.getHeight()

getID

public java.lang.String getID()
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.

Specified by:
getID in interface ChartAttributes

getImageParams

public java.lang.String getImageParams()
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.

Specified by:
getImageParams in interface ChartAttributes
Returns:
chart image encoder parameters, or null if unset
See Also:
ChartAttributes.setImageParams(java.lang.String), CodecFactory.getImageEncoder(java.lang.String)

getLegend

public LegendAttributes getLegend()
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.

Specified by:
getLegend in interface ChartAttributes
Returns:
legend attributes (may be null)

getLocale

public java.util.Locale getLocale()
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.

Specified by:
getLocale in interface ChartAttributes
Returns:
chart locale, or null if unset

getMultiSeriesMode

public java.lang.Boolean getMultiSeriesMode()
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.

Specified by:
getMultiSeriesMode in interface ChartAttributes
Returns:
multi series mode, or null if unset

getName

public java.lang.String getName(java.lang.String id)
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.

Specified by:
getName in interface ChartAttributes
Returns:
channel name, or null if channel is unknown, or channel name is unset
See Also:
ChannelAttributes.getName()

getNamespace

public java.lang.String getNamespace()
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.

Specified by:
getNamespace in interface ChartAttributes
Returns:
namespace, or null if namespace is unset

getPlot

public PlotRenderAttributes getPlot()
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.

Specified by:
getPlot in interface ChartAttributes
Returns:
channel plot area rendering parameters

getResolution

public java.lang.Number getResolution()
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.

Specified by:
getResolution in interface ChartAttributes
Returns:
pixels-per-millimeter resolution (may be null)
See Also:
ChartAttributes.setResolution(java.lang.Number), Chart.getResolution()

getURLContext

public java.net.URL getURLContext()
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.

Specified by:
getURLContext in interface ChartAttributes
Returns:
chart URL context for completing partial URL addresses, or null if unset
See Also:
ChartAttributes.setURLContext(java.net.URL)

getURLFormat

public java.lang.String getURLFormat()
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.


getValueFormat

public java.lang.String getValueFormat()
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.


getWidth

public java.lang.Number getWidth()
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.

Specified by:
getWidth in interface ChartAttributes
Returns:
chart width (may be null)
See Also:
ChartAttributes.getHeight(), ChartAttributes.getResolution(), Chart.getWidth()

hasChannelAttributes

public boolean hasChannelAttributes(java.lang.String id)
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.


isArea

public boolean isArea(java.lang.String id,
                      PlotRenderAttributes plot)
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.

Specified by:
isArea in interface ChartAttributes
Parameters:
id - channel identity
plot - plot attributes to use in the test
Returns:
channel fill status
See Also:
ChartAttributes.getPlot()

isSeries

public boolean isSeries(java.lang.String id)
Deprecated. Use ChartFactory#isMultiSeriesMode instead

Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.

Specified by:
isSeries in interface ChartAttributes
See Also:
ChannelAttributes.isSeries()

setAltFormat

public void setAltFormat(java.lang.String altFormat)
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.


setAntialiasMode

public void setAntialiasMode(int antialiasMode)
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.

Specified by:
setAntialiasMode in interface ChartAttributes
Parameters:
antialiasMode - RenderAttributes antialias code
See Also:
ChartAttributes.getAntialiasMode(), ImageChart.setAntialiasMode(int)

setContentType

public void setContentType(java.lang.String contentType)
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.

Specified by:
setContentType in interface ChartAttributes

setHeight

public void setHeight(java.lang.Number height,
                      boolean inherit)
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.

Specified by:
setHeight in interface ChartAttributes
Parameters:
height - new chart height (may be null)
inherit - should null value inherit or override old value
See Also:
ChartAttributes.getHeight()

setImageParams

public void setImageParams(java.lang.String imageParams)
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.

Specified by:
setImageParams in interface ChartAttributes
See Also:
ImageFactory, CodecFactory

setResolution

public void setResolution(java.lang.Number resolution)
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.

Specified by:
setResolution in interface ChartAttributes
See Also:
ChartAttributes.getResolution()

setURLContext

public void setURLContext(java.net.URL urlContext)
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.

Specified by:
setURLContext in interface ChartAttributes
See Also:
ChartAttributes.getURLContext()

setURLFormat

public void setURLFormat(java.lang.String urlFormat)
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.


setValueFormat

public void setValueFormat(java.lang.String valueFormat)
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.


setWidth

public void setWidth(java.lang.Number width,
                     boolean inherit)
Fullfills a ChartAttributes interface method will a dummy implementation which does nothing.

Specified by:
setWidth in interface ChartAttributes
Parameters:
width - new chart width (may be null)
inherit - should null value inherit or override old value
See Also:
ChartAttributes.getWidth()

dup

public com.davisor.core.Dupable dup()
Makes a deep copy of this object.

Specified by:
dup in interface com.davisor.core.Dupable
See Also:
clone(), ChartStringAttributes(ChartAttributes)

clone

public java.lang.Object clone()
Makes a shallow copy of this object.

See Also:
dup(), ChartStringAttributes(ChartAttributes)

equals

public boolean equals(java.lang.Object object)
Test if these attributes equal to given attributes.


toString

public java.lang.String toString()
Gets chart attributes XML representation.

See Also:
BackRenderAttributes.toString(), PlotRenderAttributes.toString(), ChartAxes.toString()


Copyright © 2001-2004 Davisor Oy. All Rights Reserved.