Package org.eclipse.birt.chart.event
Class WrappedInstruction
- java.lang.Object
-
- org.eclipse.birt.chart.event.WrappedInstruction
-
- All Implemented Interfaces:
java.lang.Comparable,IRenderInstruction
public final class WrappedInstruction extends java.lang.Object implements IRenderInstruction
This class wraps different types of rendering events. It could stand for one or a list of events.
-
-
Constructor Summary
Constructors Constructor Description WrappedInstruction(DeferredCache dc, java.util.ArrayList alEvents, int iInstruction)WrappedInstruction(DeferredCache dc, java.util.ArrayList alEvents, int iInstruction, long zorder)The constructor.WrappedInstruction(DeferredCache dc, PrimitiveRenderEvent pre, int iInstruction)WrappedInstruction(DeferredCache dc, PrimitiveRenderEvent pre, int iInstruction, long zorder)The constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(java.lang.Object o)BoundsgetBounds()BoundsgetCompareBounds()Returns compare bounds.static java.util.Comparator<?>getDefaultComarator()PrimitiveRenderEventgetEvent()Returns the associated event.intgetInstruction()Returns the associated instruction.java.util.ListgetModel()DeferredCachegetSubDeferredCache()Returns instance of sub-deferred cache.longgetZOrder()booleanisModel()voidsetCompareBounds(Bounds bounds)This method set a bounds to be used for polygon comparison to reset polygon rendering order.voidsetSubDeferredCache(DeferredCache dc)Set sub-deferred cache instance.voidsetZOrder(int zorder)java.lang.StringtoString()
-
-
-
Constructor Detail
-
WrappedInstruction
public WrappedInstruction(DeferredCache dc, java.util.ArrayList alEvents, int iInstruction, long zorder)
The constructor.
-
WrappedInstruction
public WrappedInstruction(DeferredCache dc, java.util.ArrayList alEvents, int iInstruction)
-
WrappedInstruction
public WrappedInstruction(DeferredCache dc, PrimitiveRenderEvent pre, int iInstruction, long zorder)
The constructor.
-
WrappedInstruction
public WrappedInstruction(DeferredCache dc, PrimitiveRenderEvent pre, int iInstruction)
-
-
Method Detail
-
compareTo
public int compareTo(java.lang.Object o)
- Specified by:
compareToin interfacejava.lang.Comparable
-
getEvent
public PrimitiveRenderEvent getEvent()
Returns the associated event.- Specified by:
getEventin interfaceIRenderInstruction- Returns:
-
getInstruction
public int getInstruction()
Description copied from interface:IRenderInstructionReturns the associated instruction.- Specified by:
getInstructionin interfaceIRenderInstruction- Returns:
- Returns the associated instruction. The value could be one of these:
- PrimitiveRenderEvent.DRAW
- PrimitiveRenderEvent.FILL
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
setCompareBounds
public void setCompareBounds(Bounds bounds)
This method set a bounds to be used for polygon comparison to reset polygon rendering order. Under some cases, like core, triangle charts, we don't use actual plan to do order comparison, it is difficult. We just sets a compare bounds instead of actual bound for comparison.- Parameters:
bounds-
-
getCompareBounds
public Bounds getCompareBounds()
Returns compare bounds.- Returns:
-
getBounds
public Bounds getBounds()
- Specified by:
getBoundsin interfaceIRenderInstruction- Returns:
- Returns the mimimum bounds required to contain the rendering area of associated rendering event.
-
isModel
public boolean isModel()
- Specified by:
isModelin interfaceIRenderInstruction- Returns:
- Returns if wraps multiple events currently.
-
getModel
public java.util.List getModel()
- Specified by:
getModelin interfaceIRenderInstruction- Returns:
- Returns list of events currently wraps.
-
getZOrder
public long getZOrder()
-
setZOrder
public void setZOrder(int zorder)
-
getDefaultComarator
public static java.util.Comparator<?> getDefaultComarator()
-
setSubDeferredCache
public void setSubDeferredCache(DeferredCache dc)
Set sub-deferred cache instance.- Parameters:
dc-
-
getSubDeferredCache
public DeferredCache getSubDeferredCache()
Returns instance of sub-deferred cache.- Returns:
-
-