org.eclipse.birt.chart.render
Class BaseRenderer

java.lang.Object
  extended byorg.eclipse.birt.chart.render.BaseRenderer
All Implemented Interfaces:
ISeriesRenderer
Direct Known Subclasses:
AxesRenderer, EmptyWithoutAxes

public abstract class BaseRenderer
extends java.lang.Object
implements ISeriesRenderer

Provides a generic framework that initiates the rendering sequence of the various chart components. Series type extensions could subclass this class if they plan on rendering everything for themselves in the plot area.


Field Summary
static ColorDefinition SHADOW
          Internally used to simulate a translucent shadow
 
Constructor Summary
BaseRenderer()
          The internal constructor that must be defined as public
 
Method Summary
 Axis getAxis()
           
 java.lang.Object getComputations()
           
 DeferredCache getDeferredCache()
           
 IDeviceRenderer getDevice()
           
 Chart getModel()
           
 BaseRenderer getRenderer(int iIndex)
          Provides access to any other renderer in the group that participates in chart rendering
 RunTimeContext getRunTimeContext()
           
 Series getSeries()
           
 int getSeriesCount()
           
 SeriesDefinition getSeriesDefinition()
           
 int getSeriesIndex()
           
 ISeriesRenderingHints getSeriesRenderingHints()
           
static double getX(Location[] loa, int iProperty)
           
 IDisplayServer getXServer()
           
static double getY(Location[] loa, int iProperty)
           
static BaseRenderer[] instances(Chart cm, RunTimeContext rtc, java.lang.Object oComputations)
          This method returns appropriate renders for the given chart model.
 boolean isInteractivityEnabled()
          Returns if interactivity is enabled on the model.
 void processTrigger(Trigger tg, StructureSource source)
          post-process the triggers.
 void render(java.util.Map htRenderers, Bounds bo)
          Renders all blocks using the appropriate block z-order and the containment hierarchy.
 void renderLabel(IPrimitiveRenderer ipr, Block b, java.lang.Object oSource)
           
 void renderLabel(java.lang.Object oSource, int iTextRenderType, Label laDataPoint, Position lp, Location lo, Bounds bo)
          This convenience method renders the data point label along with the shadow If there's a need to render the data point label and the shadow separately, each call should be made separately by calling into the primitive rendering interface directly.
 void renderLegend(IPrimitiveRenderer ipr, Legend lg, java.util.Map htRenderers)
          Renders the legend block based on the legend rendering rules.
 void renderPlot(IPrimitiveRenderer ipr, Plot p)
           
 void renderTitle(IPrimitiveRenderer ipr, TitleBlock b)
           
 void set(BaseRenderer[] _brna)
           
 void set(Chart _cm, java.lang.Object _o, Series _se, Axis _ax, SeriesDefinition _sd)
           
 void set(DeferredCache _dc)
           
 void set(IDeviceRenderer _ir)
           
 void set(IDisplayServer _xs)
           
 void set(ISeriesRenderingHints _srh)
           
 void set(RunTimeContext _rtc)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.birt.chart.render.ISeriesRenderer
compute, renderLegendGraphic, renderSeries
 

Field Detail

SHADOW

public static final ColorDefinition SHADOW
Internally used to simulate a translucent shadow

Constructor Detail

BaseRenderer

public BaseRenderer()
The internal constructor that must be defined as public

Method Detail

set

public void set(Chart _cm,
                java.lang.Object _o,
                Series _se,
                Axis _ax,
                SeriesDefinition _sd)
Parameters:
_cm -
_o -
_se -
_ax -
_sd -

set

public final void set(DeferredCache _dc)
Parameters:
_dc -

set

public final void set(IDeviceRenderer _ir)
Parameters:
_ir -

set

public final void set(IDisplayServer _xs)
Parameters:
_xs -

set

public final void set(ISeriesRenderingHints _srh)
Parameters:
_srh -

set

public final void set(BaseRenderer[] _brna)
Parameters:
_brna -

set

public final void set(RunTimeContext _rtc)
Parameters:
_rtc -

getSeriesRenderingHints

public final ISeriesRenderingHints getSeriesRenderingHints()
Returns:

getXServer

public final IDisplayServer getXServer()
Returns:

getSeriesDefinition

public final SeriesDefinition getSeriesDefinition()
Returns:

getAxis

public Axis getAxis()
Returns:

getSeriesIndex

public final int getSeriesIndex()
Returns:

getSeriesCount

public final int getSeriesCount()
Returns:

getDeferredCache

public final DeferredCache getDeferredCache()
Returns:

getRenderer

public final BaseRenderer getRenderer(int iIndex)
Provides access to any other renderer in the group that participates in chart rendering

Parameters:
iIndex -
Returns:

getRunTimeContext

public final RunTimeContext getRunTimeContext()
Returns:

render

public void render(java.util.Map htRenderers,
                   Bounds bo)
            throws ChartException
Renders all blocks using the appropriate block z-order and the containment hierarchy.

Parameters:
bo -
Throws:
ChartException

renderLegend

public void renderLegend(IPrimitiveRenderer ipr,
                         Legend lg,
                         java.util.Map htRenderers)
                  throws ChartException
Renders the legend block based on the legend rendering rules.

Parameters:
ipr -
lg -
htRenderers -
Throws:
RenderingException
ChartException

renderPlot

public void renderPlot(IPrimitiveRenderer ipr,
                       Plot p)
                throws ChartException
Parameters:
ipr -
p -
Throws:
RenderingException
ChartException

renderLabel

public void renderLabel(IPrimitiveRenderer ipr,
                        Block b,
                        java.lang.Object oSource)
                 throws ChartException
Parameters:
ipr -
b -
Throws:
RenderingException
ChartException

renderTitle

public void renderTitle(IPrimitiveRenderer ipr,
                        TitleBlock b)
                 throws ChartException
Parameters:
ipr -
b -
Throws:
RenderingException
ChartException

instances

public static final BaseRenderer[] instances(Chart cm,
                                             RunTimeContext rtc,
                                             java.lang.Object oComputations)
                                      throws ChartException
This method returns appropriate renders for the given chart model. It uses extension points to identify a renderer corresponding to a custom series.

Parameters:
cm -
rtc -
oComputations -
Returns:
Throws:
PluginException
ChartException

getSeries

public final Series getSeries()

getModel

public final Chart getModel()

getComputations

public final java.lang.Object getComputations()

getDevice

public final IDeviceRenderer getDevice()

getY

public static final double getY(Location[] loa,
                                int iProperty)
Parameters:
loa -
iProperty -
Returns:

getX

public static final double getX(Location[] loa,
                                int iProperty)
Parameters:
loa -
iProperty -
Returns:

processTrigger

public void processTrigger(Trigger tg,
                           StructureSource source)
post-process the triggers.

Parameters:
tg -

renderLabel

public final void renderLabel(java.lang.Object oSource,
                              int iTextRenderType,
                              Label laDataPoint,
                              Position lp,
                              Location lo,
                              Bounds bo)
                       throws ChartException
This convenience method renders the data point label along with the shadow If there's a need to render the data point label and the shadow separately, each call should be made separately by calling into the primitive rendering interface directly.

Throws:
ChartException

isInteractivityEnabled

public boolean isInteractivityEnabled()
Returns if interactivity is enabled on the model.

Returns:


Copyright © 2005 Actuate Corp. All rights reserved.