org.eclipse.birt.chart.render
Class DeferredCache

java.lang.Object
  extended by org.eclipse.birt.chart.render.DeferredCache

public final class DeferredCache
extends java.lang.Object

This class implements deferred rendering capability for chart.


Field Summary
 java.util.List al3D
           
static int FLUSH_3D
           
static int FLUSH_ALL
           
static int FLUSH_LABLE
           
static int FLUSH_LINE
           
static int FLUSH_MARKER
           
static int FLUSH_PLANE
           
static int FLUSH_PLANE_SHADOW
           
 
Constructor Summary
DeferredCache(IDeviceRenderer idr, Chart c)
          The constructor.
 
Method Summary
 void addLabel(TextRenderEvent tre)
          Adds text rendering event to cache.
 void addLine(LineRenderEvent lre)
          Adds line rendering event to cache.
 void addMarker(PrimitiveRenderEvent pre, int iInstruction, double iMarkerSize)
          Adds marker rendering event to cache.
 void addModel(WrappedInstruction wi)
          Adds wrapped rendering event to cache.
 java.lang.Object addPlane(PrimitiveRenderEvent pre, int iInstruction)
          Adds rendering Plane event to cache.
 java.lang.Object addPlane(PrimitiveRenderEvent pre, int iInstruction, int zorder_hint)
           
 void addPlaneShadow(PrimitiveRenderEvent pre, int iInstruction)
          Adds rendering Plane event to cache.
 void addPlaneShadow(PrimitiveRenderEvent pre, int iInstruction, int zorder_hint)
           
 void flush()
          Flush the cache, perform all pending rendering tasks.
 void flushOptions(int options)
          Flush the cache of specified types.
 java.util.List getAllLabels()
          Returns all cached labels.
 java.util.List getAllMarkers()
          Returns all cached markers.
 boolean isTransposed()
           
 void process3DEvent(Engine3D engine, double xOffset, double yOffset)
          Pre-process all the 3D rendering events.
 void setPlanesComparator(java.util.Comparator<?> cp)
           
 void setPlaneShadowsComparator(java.util.Comparator<?> cp)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FLUSH_PLANE

public static final int FLUSH_PLANE
See Also:
Constant Field Values

FLUSH_LINE

public static final int FLUSH_LINE
See Also:
Constant Field Values

FLUSH_MARKER

public static final int FLUSH_MARKER
See Also:
Constant Field Values

FLUSH_LABLE

public static final int FLUSH_LABLE
See Also:
Constant Field Values

FLUSH_3D

public static final int FLUSH_3D
See Also:
Constant Field Values

FLUSH_PLANE_SHADOW

public static final int FLUSH_PLANE_SHADOW
See Also:
Constant Field Values

FLUSH_ALL

public static final int FLUSH_ALL
See Also:
Constant Field Values

al3D

public java.util.List al3D
Constructor Detail

DeferredCache

public DeferredCache(IDeviceRenderer idr,
                     Chart c)
The constructor.

Method Detail

addPlane

public final java.lang.Object addPlane(PrimitiveRenderEvent pre,
                                       int iInstruction)
Adds rendering Plane event to cache.

Parameters:
pre - As of now, supported types are RectanguleRenderEvent and PolygonRenderEvent

addPlane

public final java.lang.Object addPlane(PrimitiveRenderEvent pre,
                                       int iInstruction,
                                       int zorder_hint)

addPlaneShadow

public final void addPlaneShadow(PrimitiveRenderEvent pre,
                                 int iInstruction)
Adds rendering Plane event to cache. This Plane is usually a shadow or depth, and will be in the lower z-order

Parameters:
pre - As of now, supported types are RectanguleRenderEvent and PolygonRenderEvent

addPlaneShadow

public final void addPlaneShadow(PrimitiveRenderEvent pre,
                                 int iInstruction,
                                 int zorder_hint)

addModel

public final void addModel(WrappedInstruction wi)
Adds wrapped rendering event to cache. Never use this for 3D rendering event.


addLine

public final void addLine(LineRenderEvent lre)
Adds line rendering event to cache.


addLabel

public final void addLabel(TextRenderEvent tre)
Adds text rendering event to cache.


addMarker

public final void addMarker(PrimitiveRenderEvent pre,
                            int iInstruction,
                            double iMarkerSize)
Adds marker rendering event to cache.


flush

public final void flush()
                 throws ChartException
Flush the cache, perform all pending rendering tasks.

Throws:
ChartException

flushOptions

public final void flushOptions(int options)
                        throws ChartException
Flush the cache of specified types.

Parameters:
options - types
Throws:
ChartException
Since:
2.2
See Also:
FLUSH_3D, FLUSH_LABLE, FLUSH_LINE, FLUSH_MARKER, FLUSH_PLANE

process3DEvent

public void process3DEvent(Engine3D engine,
                           double xOffset,
                           double yOffset)
Pre-process all the 3D rendering events. This must be called before flush().


isTransposed

public boolean isTransposed()
Returns:
Returns if current rendering context is transposed.

getAllMarkers

public java.util.List getAllMarkers()
Returns all cached markers.

Returns:
all cached markers.

getAllLabels

public java.util.List getAllLabels()
Returns all cached labels.

Returns:
all cached labels.

setPlaneShadowsComparator

public void setPlaneShadowsComparator(java.util.Comparator<?> cp)

setPlanesComparator

public void setPlanesComparator(java.util.Comparator<?> cp)


Copyright © 2005-2008 Actuate Corp. All rights reserved.