lt.monarch.chart
Class MultiSeriesChartBase<PaintTags extends AbstractPaintTags,GeneralProjector extends Projector>

java.lang.Object
  extended by lt.monarch.chart.AbstractView<PaintTags>
      extended by lt.monarch.chart.AbstractChart<PaintTags,GeneralProjector>
          extended by lt.monarch.chart.MultiSeriesChartBase<PaintTags,GeneralProjector>
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Chart<GeneralProjector>, ChartEntity, StyleEditorEntity, View
Direct Known Subclasses:
Chart2D, Chart3D

public abstract class MultiSeriesChartBase<PaintTags extends AbstractPaintTags,GeneralProjector extends Projector>
extends AbstractChart<PaintTags,GeneralProjector>

Default implementation of the chart, which manages several chart series.

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
 
Fields inherited from class lt.monarch.chart.AbstractChart
draftMode, locale, plugins
 
Fields inherited from class lt.monarch.chart.AbstractView
layoutInvalid, paintStyle, style
 
Constructor Summary
Constructor and Description
MultiSeriesChartBase()
           
 
Method Summary
Modifier and Type Method and Description
 void activate()
          Activates this chart.
 void addObject(ChartObject obj)
          Adds the specified chart object to the chart at run-time.
 LegendEntry[] createLegendEntries()
          Creates a list of legend entries for the chart.
 void deactivate()
          Deactivates this chart.
 void dispose()
          Cleans this chart object.
protected  void finalize()
          Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
 ChartObject findObject(java.lang.Class<?> type)
          Deprecated. 
 java.util.List<ChartObject> getContainingObjects()
          Returns all contianing chart objects
 ChartObject[] getObjects()
          Returns an array of chart objects to be painted in the chart.
protected  void layout(AbstractGraphics g)
          Layouts the chart.
protected  void layoutObjects(AbstractGraphics g)
          Layouts chart objects.
protected  void paintChart(AbstractGraphics g)
          Paints the chart.
 void removeObject(ChartObject obj)
          Removes the specified chart object from the chart at run-time.
 void replaceObject(ChartObject oldObject, ChartObject newObject)
          Replaces one chart object with another (keeping position).
 void reset()
          Removes all chart objects from the chart
 void setObjects(ChartObject[] objs)
          Sets an array of chart objects to be painted in the chart.
 void shiftObjects(ChartObject o1, ChartObject o2)
          Shifts order of given objects in chart.
 
Methods inherited from class lt.monarch.chart.AbstractChart
addPlugin, disableDrafMode, enableDraftMode, fillEntitySheet, getDescription, getLocale, getParentEntity, getPlugins, getShortDescription, invalidate, isDraftMode, paint, removePlugin, removePlugins, setDraftMode, setLocale
 
Methods inherited from class lt.monarch.chart.AbstractView
addViewListener, clone, container, getAlignmentX, getAlignmentY, getBounds, getChartObjectBounds, getContainer, getGraphicsType, getHeight, getMaximumSize, getMinimumSize, getPaintMode, getPaintStyle, getParent, getPreferredSize, getSize, getSize, getStyle, getStyle, getWidth, getX, getY, isLayoutValid, removeViewListener, render, repaint, repaint, setAlignmentX, setAlignmentY, setBounds, setBounds, setContainer, setLocation, setMaximumSize, setMinimumSize, setPaintMode, setPreferredSize, setSize, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface lt.monarch.chart.engine.Chart
projector
 
Methods inherited from interface lt.monarch.chart.engine.View
addViewListener, clone, container, getAlignmentX, getAlignmentY, getBounds, getGraphicsType, getHeight, getMaximumSize, getMinimumSize, getPreferredSize, getSize, getSize, getStyle, getWidth, getX, getY, removeViewListener, render, repaint, repaint, setAlignmentX, setAlignmentY, setBounds, setBounds, setContainer, setLocation, setMaximumSize, setMinimumSize, setPreferredSize, setSize, validate
 

Constructor Detail

MultiSeriesChartBase

public MultiSeriesChartBase()
Method Detail

createLegendEntries

public LegendEntry[] createLegendEntries()
Creates a list of legend entries for the chart.

Returns:
array of legend entries

setObjects

public void setObjects(ChartObject[] objs)
Sets an array of chart objects to be painted in the chart.

Parameters:
objs - an array of chart objects

addObject

public void addObject(ChartObject obj)
Adds the specified chart object to the chart at run-time.

Parameters:
obj - the chart object

removeObject

public void removeObject(ChartObject obj)
Removes the specified chart object from the chart at run-time.

Parameters:
obj - the chart object

replaceObject

public void replaceObject(ChartObject oldObject,
                          ChartObject newObject)
Replaces one chart object with another (keeping position).

Parameters:
oldObject - the chart object to remove
newObject - the chart object to add in place of removed one

shiftObjects

public void shiftObjects(ChartObject o1,
                         ChartObject o2)
Shifts order of given objects in chart.

Parameters:
o1 - first object
o2 - second object

getObjects

public ChartObject[] getObjects()
Returns an array of chart objects to be painted in the chart.

Returns:
an array of chart objects

reset

public void reset()
Removes all chart objects from the chart


deactivate

public void deactivate()
Deactivates this chart. deactivate method of super class is called and parent chart to all containing chart objects is set to null.

Overrides:
deactivate in class AbstractChart<PaintTags extends AbstractPaintTags,GeneralProjector extends Projector>
See Also:
AbstractView.deactivate(), HotSpotMap

activate

public void activate()
Activates this chart. activate method of super class is called and parent chart to all containing chart objects is set to this.

Overrides:
activate in class AbstractView<PaintTags extends AbstractPaintTags>

layout

protected void layout(AbstractGraphics g)
Layouts the chart. layout method of super class and all chart objects are called.

Overrides:
layout in class AbstractChart<PaintTags extends AbstractPaintTags,GeneralProjector extends Projector>
Parameters:
g - the Graphics context in which chart will be painted

layoutObjects

protected void layoutObjects(AbstractGraphics g)
Layouts chart objects. layout method for all chart objects is called.

Parameters:
g - the Graphics context in which chart will be painted

paintChart

protected void paintChart(AbstractGraphics g)
Paints the chart. Static layout methods for AbstractBarSeries are called. Layout method itself is not static, but bar and series spacing access methods are static. All chart objects are drawn.

Specified by:
paintChart in class AbstractChart<PaintTags extends AbstractPaintTags,GeneralProjector extends Projector>
Parameters:
g - the Graphics context in which chart will be painted
See Also:
AbstractBarSeries.layout(int, int)

dispose

public void dispose()
Cleans this chart object. After this chart object is unusable and can be garbage collected.

Specified by:
dispose in interface View
Overrides:
dispose in class AbstractChart<PaintTags extends AbstractPaintTags,GeneralProjector extends Projector>

finalize

protected void finalize()
                 throws java.lang.Throwable
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. Calls cleanup method if it isn't called yet.

Overrides:
finalize in class AbstractChart<PaintTags extends AbstractPaintTags,GeneralProjector extends Projector>
Throws:
java.lang.Throwable - the Exception raised by this method

findObject

@Deprecated
public ChartObject findObject(java.lang.Class<?> type)
Deprecated. 

internal


getContainingObjects

public java.util.List<ChartObject> getContainingObjects()
Returns all contianing chart objects

Returns:
graphicsType graphics type for view