com.davisor.graphics.chart
Class ChartMultiAttributes

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

public class ChartMultiAttributes
extends ChartStringAttributes

ChartMultiAttributes implements a chart attribute set where the attribute values are stored alternatively in a fixed XML string and/or objects. For more information about the attributes themselves, please see ChartAttributes interface documentation.

This storage method is usefull when fixed sets of attributes are serialized or moved in some other way over to some storage media, and the accessed again.

Thanks to the attribute storage strategy, individual attribute values are converted to and from strings and objects as neccesary, All conversions take place transparently, and as late as possible.

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

Field Summary
protected  ChartObjectAttributes M_coa
          Reference to underlying real attributes.
 
Fields inherited from class com.davisor.graphics.chart.ChartStringAttributes
M_xml
 
Constructor Summary
ChartMultiAttributes(ChartAttributes ca)
          Copy constructor.
 
Method Summary
 void addChannelAttributes(ChartData data)
          Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.
 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.
 int getAntialiasMode()
          Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.
 java.util.List getAxes()
          Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.
 BackRenderAttributes getBack()
          Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.
 java.util.Map getChannelAttributes()
          Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.
 java.lang.String getChartType()
          Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.
 java.lang.String getContentType()
          Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.
 com.davisor.graphics.codec.MimeInfo getEncoderInfo()
          Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.
 java.lang.Number getHeight()
          Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.
 java.lang.String getImageParams()
          Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.
 java.util.Locale getLocale()
          Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.
 java.lang.Boolean getMultiSeriesMode()
          Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.
 java.lang.String getName(java.lang.String id)
          Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.
 java.lang.String getNamespace()
          Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.
 ChartObjectAttributes getObjectAttributes()
          Gets underlying object attributes.
 PlotRenderAttributes getPlot()
          Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.
 java.lang.Number getResolution()
          Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.
 java.net.URL getURLContext()
          Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.
 java.lang.Number getWidth()
          Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.
 boolean isArea(java.lang.String id, PlotRenderAttributes plot)
          Tests channel fill status.
 boolean isSeries(java.lang.String id)
          Deprecated. Use ChartFactory#isMultiSeriesMode instead
 void setAntialiasMode(int antialiasMode)
          Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.
 void setContentType(java.lang.String contentType)
          Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.
 void setHeight(java.lang.Number height, boolean inherit)
          Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.
 void setImageParams(java.lang.String imageParams)
          Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.
 void setObjectAttributes(ChartObjectAttributes coa)
          Sets underlying object attributes.
 void setResolution(java.lang.Number resolution)
          Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.
 void setURLContext(java.net.URL urlContext)
          Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.
 void setWidth(java.lang.Number width, boolean inherit)
          Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.
 java.lang.String toString()
          Gets chart attributes XML representation.
 
Methods inherited from class com.davisor.graphics.chart.ChartStringAttributes
addChannelAttributes, getAltFormat, getID, getLegend, getURLFormat, getValueFormat, hasChannelAttributes, setAltFormat, setURLFormat, setValueFormat
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

M_coa

protected ChartObjectAttributes M_coa
Reference to underlying real attributes.

Constructor Detail

ChartMultiAttributes

public ChartMultiAttributes(ChartAttributes ca)
Copy constructor.

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

addChannelAttributes

public void addChannelAttributes(ChartData data)
Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.

Specified by:
addChannelAttributes in interface ChartAttributes
Overrides:
addChannelAttributes in class ChartStringAttributes
See Also:
getObjectAttributes(), ChartAttributes.addChannelAttributes(com.davisor.graphics.chart.ChartData)

getAntialiasMode

public int getAntialiasMode()
Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.

Specified by:
getAntialiasMode in interface ChartAttributes
Overrides:
getAntialiasMode in class ChartStringAttributes
See Also:
getObjectAttributes(), ChartAttributes.getAntialiasMode()

getAxes

public java.util.List getAxes()
Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.

Specified by:
getAxes in interface ChartAttributes
Overrides:
getAxes in class ChartStringAttributes
See Also:
getObjectAttributes(), ChartAttributes.getAxes()

getBack

public BackRenderAttributes getBack()
Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.

Specified by:
getBack in interface ChartAttributes
Overrides:
getBack in class ChartStringAttributes
See Also:
getObjectAttributes(), ChartAttributes.getBack()

getChannelAttributes

public java.util.Map getChannelAttributes()
Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.

Overrides:
getChannelAttributes in class ChartStringAttributes
See Also:
getObjectAttributes()

getChartType

public java.lang.String getChartType()
Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.

Specified by:
getChartType in interface ChartAttributes
Overrides:
getChartType in class ChartStringAttributes
See Also:
getObjectAttributes(), ChartAttributes.getChartType()

getEncoderInfo

public com.davisor.graphics.codec.MimeInfo getEncoderInfo()
Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.

Specified by:
getEncoderInfo in interface ChartAttributes
Overrides:
getEncoderInfo in class ChartStringAttributes
See Also:
getObjectAttributes(), ChartAttributes.getEncoderInfo()

getContentType

public java.lang.String getContentType()
Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.

Specified by:
getContentType in interface ChartAttributes
Overrides:
getContentType in class ChartStringAttributes
See Also:
getObjectAttributes(), ChartAttributes.getContentType()

getHeight

public java.lang.Number getHeight()
Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.

Specified by:
getHeight in interface ChartAttributes
Overrides:
getHeight in class ChartStringAttributes
See Also:
getObjectAttributes(), ChartAttributes.getHeight()

getImageParams

public java.lang.String getImageParams()
Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.

Specified by:
getImageParams in interface ChartAttributes
Overrides:
getImageParams in class ChartStringAttributes
See Also:
getObjectAttributes(), ChartAttributes.getImageParams()

getLocale

public java.util.Locale getLocale()
Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.

Specified by:
getLocale in interface ChartAttributes
Overrides:
getLocale in class ChartStringAttributes
See Also:
getObjectAttributes(), ChartAttributes.getLocale()

getMultiSeriesMode

public java.lang.Boolean getMultiSeriesMode()
Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.

Specified by:
getMultiSeriesMode in interface ChartAttributes
Overrides:
getMultiSeriesMode in class ChartStringAttributes
Returns:
multi series mode, or null if unset
See Also:
getObjectAttributes(), ChartAttributes.getMultiSeriesMode()

getName

public java.lang.String getName(java.lang.String id)
Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.

Specified by:
getName in interface ChartAttributes
Overrides:
getName in class ChartStringAttributes
See Also:
getObjectAttributes(), ChartAttributes.getName(java.lang.String)

getNamespace

public java.lang.String getNamespace()
Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.

Specified by:
getNamespace in interface ChartAttributes
Overrides:
getNamespace in class ChartStringAttributes
See Also:
getObjectAttributes(), ChartAttributes.getName(java.lang.String)

getPlot

public PlotRenderAttributes getPlot()
Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.

Specified by:
getPlot in interface ChartAttributes
Overrides:
getPlot in class ChartStringAttributes
See Also:
getObjectAttributes(), ChartAttributes.getPlot()

getResolution

public java.lang.Number getResolution()
Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.

Specified by:
getResolution in interface ChartAttributes
Overrides:
getResolution in class ChartStringAttributes
See Also:
getObjectAttributes(), ChartAttributes.getResolution()

getURLContext

public java.net.URL getURLContext()
Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.

Specified by:
getURLContext in interface ChartAttributes
Overrides:
getURLContext in class ChartStringAttributes
See Also:
getObjectAttributes(), ChartAttributes.getURLContext()

getWidth

public java.lang.Number getWidth()
Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.

Specified by:
getWidth in interface ChartAttributes
Overrides:
getWidth in class ChartStringAttributes
See Also:
getObjectAttributes(), ChartAttributes.getWidth()

isArea

public boolean isArea(java.lang.String id,
                      PlotRenderAttributes plot)
Tests channel fill status. If plot area or channel line paint attributes is defined, the channel is an area channel, otherwise it is not.

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

isSeries

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

Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.

Specified by:
isSeries in interface ChartAttributes
Overrides:
isSeries in class ChartStringAttributes
See Also:
getObjectAttributes(), ChartAttributes.isSeries(java.lang.String)

setAntialiasMode

public void setAntialiasMode(int antialiasMode)
Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.

Specified by:
setAntialiasMode in interface ChartAttributes
Overrides:
setAntialiasMode in class ChartStringAttributes
See Also:
getObjectAttributes(), ChartAttributes.setAntialiasMode(int)

setContentType

public void setContentType(java.lang.String contentType)
Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.

Specified by:
setContentType in interface ChartAttributes
Overrides:
setContentType in class ChartStringAttributes
See Also:
getObjectAttributes(), ChartAttributes.setContentType(java.lang.String)

setHeight

public void setHeight(java.lang.Number height,
                      boolean inherit)
Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.

Specified by:
setHeight in interface ChartAttributes
Overrides:
setHeight in class ChartStringAttributes
See Also:
getObjectAttributes(), ChartAttributes.setHeight(java.lang.Number, boolean)

setImageParams

public void setImageParams(java.lang.String imageParams)
Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.

Specified by:
setImageParams in interface ChartAttributes
Overrides:
setImageParams in class ChartStringAttributes
See Also:
getObjectAttributes(), ChartAttributes.setImageParams(java.lang.String)

setResolution

public void setResolution(java.lang.Number resolution)
Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.

Specified by:
setResolution in interface ChartAttributes
Overrides:
setResolution in class ChartStringAttributes
See Also:
getObjectAttributes(), ChartAttributes.setResolution(java.lang.Number)

setURLContext

public void setURLContext(java.net.URL urlContext)
Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.

Specified by:
setURLContext in interface ChartAttributes
Overrides:
setURLContext in class ChartStringAttributes
See Also:
getObjectAttributes(), ChartAttributes.setURLContext(java.net.URL)

setWidth

public void setWidth(java.lang.Number width,
                     boolean inherit)
Implements a ChartAttributes interface method with a smart implementation that resolves a target object attribute set, and then delegates the method call to it.

Specified by:
setWidth in interface ChartAttributes
Overrides:
setWidth in class ChartStringAttributes
See Also:
getObjectAttributes(), ChartAttributes.setWidth(java.lang.Number, boolean)

dup

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

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

clone

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

Overrides:
clone in class ChartStringAttributes
See Also:
dup(), ChartMultiAttributes(ChartAttributes)

equals

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

Overrides:
equals in class ChartStringAttributes

toString

public java.lang.String toString()
Gets chart attributes XML representation. If no string attributes have yet been instantiated, they will be created now from current object attributes.

Overrides:
toString in class ChartStringAttributes
See Also:
getObjectAttributes(), ChartObjectAttributes.toString()

getObjectAttributes

public ChartObjectAttributes getObjectAttributes()
Gets underlying object attributes. If no object attributes have yet been instantiated, they will be created now from current string attributes. If this fails, a default object attribute set is created.

See Also:
setObjectAttributes(com.davisor.graphics.chart.ChartObjectAttributes), toString(), ChartObjectAttributes, ChartXMLAttributes

setObjectAttributes

public void setObjectAttributes(ChartObjectAttributes coa)
Sets underlying object attributes. Current string attributes, if any, are discarded.

Parameters:
coa - new attributes
See Also:
getObjectAttributes()


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