org.eclipse.birt.chart.event
Class ArcRenderEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.eclipse.birt.chart.event.ChartEvent
          extended by org.eclipse.birt.chart.event.PrimitiveRenderEvent
              extended by org.eclipse.birt.chart.event.ArcRenderEvent
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable
Direct Known Subclasses:
Arc3DRenderEvent

public class ArcRenderEvent
extends PrimitiveRenderEvent

A rendering event type for rendering Arc object.

See Also:
Serialized Form

Field Summary
static int CLOSED
          The closure type for an arc closed by drawing a straight line segment from the start of the arc segment to the end of the arc segment.
static int OPEN
          The closure type for an open arc with no path segments connecting the two ends of the arc segment.
static int SECTOR
          The closure type for an arc closed by drawing straight line segments from the start of the arc segment to the center of the full ellipse and from that point to the end of the arc segment.
 
Fields inherited from class org.eclipse.birt.chart.event.PrimitiveRenderEvent
DRAW, FILL, iObjIndex
 
Constructor Summary
ArcRenderEvent(java.lang.Object oSource)
          The constructor.
 
Method Summary
 PrimitiveRenderEvent copy()
           
 void draw(IDeviceRenderer idr)
          Causes this instruction to 'draw' itself on the device renderer
 void fill(IDeviceRenderer idr)
          Causes this instruction to 'fill' itself on the device renderer
 double getAngleExtent()
           
 Fill getBackground()
           
 Bounds getBounds()
          Returns the mimimum bounds required to contain the rendering area for current event.
 Bounds getEllipseBounds()
          Returns the full containing bounds of the complete ellipse.
 double getHeight()
           
 double getInnerRadius()
           
 LineAttributes getLineAttributes()
           
 double getOuterRadius()
           
 LineAttributes getOutline()
           
 double getStartAngle()
           
 int getStyle()
           
 Location getTopLeft()
           
 double getWidth()
           
 void reset()
          Resets the inner state of current event.
 void setAngleExtent(double angleExtent)
          Sets the angle extent for this arc.
 void setBackground(Fill ifBackground)
          Sets the backgound for this arc.
 void setBounds(Bounds bo)
          Sets the containing bounds of this arc.
 void setEndAngle(double endAngle)
          Deprecated. Use #setAngleExtent() instead.
 void setHeight(double height)
          Sets the height for the containing bounds.
 void setInnerRadius(double innerRadius)
          Sets the inner radius for this arc.
 void setOuterRadius(double outerRadius)
          Sets the outer radius for this arc.
 void setOutline(LineAttributes outline)
          Sets the outline for this arc.
 void setStartAngle(double startAngle)
          Sets the start angle for this arc.
 void setStyle(int style)
           
 void setTopLeft(Location loTopLeft)
          Sets the top-left location of the containing bounds.
 void setWidth(double width)
          Sets the width for the containing bounds.
 
Methods inherited from class org.eclipse.birt.chart.event.PrimitiveRenderEvent
compareRegular, compareTo, compareTransposed, getDepth, getLabel, setDepth
 
Methods inherited from class org.eclipse.birt.chart.event.ChartEvent
setSourceObject
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OPEN

public static final int OPEN
The closure type for an open arc with no path segments connecting the two ends of the arc segment.

See Also:
Constant Field Values

CLOSED

public static final int CLOSED
The closure type for an arc closed by drawing a straight line segment from the start of the arc segment to the end of the arc segment.

See Also:
Constant Field Values

SECTOR

public static final int SECTOR
The closure type for an arc closed by drawing straight line segments from the start of the arc segment to the center of the full ellipse and from that point to the end of the arc segment.

See Also:
Constant Field Values
Constructor Detail

ArcRenderEvent

public ArcRenderEvent(java.lang.Object oSource)
The constructor.

Method Detail

reset

public void reset()
Description copied from class: ChartEvent
Resets the inner state of current event. This must be implemented if the object is cached and reused.

Specified by:
reset in class ChartEvent

getStyle

public final int getStyle()
Returns:
Returns the arc style. The value must be one of these defined in this class:

setStyle

public final void setStyle(int style)
Parameters:
style - The arc style to set. The value must be one of these defined in this class:

getTopLeft

public final Location getTopLeft()
Returns:
Returns the top left co-ordinates of the bounding elliptical box for the arc

setTopLeft

public final void setTopLeft(Location loTopLeft)
Sets the top-left location of the containing bounds.

Parameters:
loTopLeft - The top left co-ordinates of the bounding elliptical box for the arc

getAngleExtent

public final double getAngleExtent()
Returns:
Returns the angle extent of this arc.

setAngleExtent

public final void setAngleExtent(double angleExtent)
Sets the angle extent for this arc.

Parameters:
angleExtent - The angle extent
Since:
2.1

setEndAngle

public final void setEndAngle(double endAngle)
Deprecated. Use #setAngleExtent() instead.

Sets the angle extent for this arc.

Parameters:
endAngle - The angle extent

getBackground

public final Fill getBackground()
Overrides:
getBackground in class PrimitiveRenderEvent
Returns:
Returns the background.

setBackground

public final void setBackground(Fill ifBackground)
Sets the backgound for this arc.

Parameters:
ifBackground - The background to set.

getWidth

public double getWidth()
Returns:
Returns the width of the containing bounds.

setWidth

public void setWidth(double width)
Sets the width for the containing bounds.

Parameters:
radius - The width to set.

getHeight

public double getHeight()
Returns:
Returns the height of the containing bounds.

setHeight

public void setHeight(double height)
Sets the height for the containing bounds.

Parameters:
radius - The height to set.

getStartAngle

public final double getStartAngle()
Returns:
Returns the startAngle.

setStartAngle

public final void setStartAngle(double startAngle)
Sets the start angle for this arc.

Parameters:
startAngle - The startAngle to set.

setBounds

public final void setBounds(Bounds bo)
Sets the containing bounds of this arc.

Parameters:
bo -

getEllipseBounds

public Bounds getEllipseBounds()
Returns the full containing bounds of the complete ellipse.

Returns:

getBounds

public Bounds getBounds()
Description copied from class: PrimitiveRenderEvent
Returns the mimimum bounds required to contain the rendering area for current event.

Overrides:
getBounds in class PrimitiveRenderEvent
Returns:

getOutline

public final LineAttributes getOutline()
Returns:
Returns the outline.

setOutline

public final void setOutline(LineAttributes outline)
Sets the outline for this arc.

Parameters:
outline - The outline to set.

getInnerRadius

public double getInnerRadius()
Returns:
Returns the inner radius for this arc.

setInnerRadius

public void setInnerRadius(double innerRadius)
Sets the inner radius for this arc.

Parameters:
innerRadius -

getOuterRadius

public double getOuterRadius()
Returns:
Returns the outer radius for this arc.

setOuterRadius

public void setOuterRadius(double outerRadius)
Sets the outer radius for this arc.

Parameters:
outerRadius -

copy

public PrimitiveRenderEvent copy()
                          throws ChartException
Overrides:
copy in class PrimitiveRenderEvent
Returns:
A copy of this primitive rendering instruction implemented by subclasses
Throws:
ChartException

draw

public void draw(IDeviceRenderer idr)
          throws ChartException
Description copied from class: PrimitiveRenderEvent
Causes this instruction to 'draw' itself on the device renderer

Overrides:
draw in class PrimitiveRenderEvent
Throws:
ChartException

fill

public void fill(IDeviceRenderer idr)
          throws ChartException
Description copied from class: PrimitiveRenderEvent
Causes this instruction to 'fill' itself on the device renderer

Overrides:
fill in class PrimitiveRenderEvent
Throws:
ChartException

getLineAttributes

public LineAttributes getLineAttributes()
Overrides:
getLineAttributes in class PrimitiveRenderEvent
Returns:
A reference to the LineAttributes


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