Package org.eclipse.birt.chart.event

# Class WrappedInstruction

java.lang.Object
org.eclipse.birt.chart.event.WrappedInstruction

All Implemented Interfaces:
  `Comparable`, `IRenderInstruction`

public final class WrappedInstruction extends 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, ArrayList alEvents, int iInstruction)`
`WrappedInstruction(DeferredCache dc, 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

Modifier and Type
Method
Description
`int`
`compareTo(Object o)`
`Bounds`
`getBounds()`
`Bounds`
`getCompareBounds()`
Returns compare bounds.
`static Comparator<?>`
`getDefaultComarator()`
`PrimitiveRenderEvent`
`getEvent()`
Returns the associated event.
`int`
`getInstruction()`
Returns the associated instruction.
`List`
`getModel()`
`DeferredCache`
`getSubDeferredCache()`
Returns instance of sub-deferred cache.
`long`
`getZOrder()`
`boolean`
`isModel()`
`void`
`setCompareBounds(Bounds bounds)`
This method set a bounds to be used for polygon comparison to reset polygon rendering order.
`void`
`setSubDeferredCache(DeferredCache dc)`
Set sub-deferred cache instance.
`void`
`setZOrder(int zorder)`
`String`
`toString()`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### WrappedInstruction

public WrappedInstruction(DeferredCache dc, ArrayList alEvents, int iInstruction, long zorder)
The constructor.

### WrappedInstruction

public WrappedInstruction(DeferredCache dc, 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 Details

### compareTo

public int compareTo(Object o)

Specified by:
  `compareTo` in interface `Comparable`

### getEvent

public PrimitiveRenderEvent getEvent()
Returns the associated event.

Specified by:
  `getEvent` in interface `IRenderInstruction`
Returns:

### getInstruction

public int getInstruction()
Description copied from interface: `IRenderInstruction`
Returns the associated instruction.

Specified by:
  `getInstruction` in interface `IRenderInstruction`
Returns:
  Returns the associated instruction. The value could be one of these:
  - PrimitiveRenderEvent.DRAW
  - PrimitiveRenderEvent.FILL

### toString

public String toString()

Overrides:
  `toString` in class `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:
  `getBounds` in interface `IRenderInstruction`
Returns:
  Returns the mimimum bounds required to contain the rendering area of associated rendering event.

### isModel

public boolean isModel()

Specified by:
  `isModel` in interface `IRenderInstruction`
Returns:
  Returns if wraps multiple events currently.

### getModel

public List getModel()

Specified by:
  `getModel` in interface `IRenderInstruction`
Returns:
  Returns list of events currently wraps.

### getZOrder

public long getZOrder()

### setZOrder

public void setZOrder(int zorder)

### getDefaultComarator

public static 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: