Package org.eclipse.birt.chart.device
Class DeviceAdapter
java.lang.Object
org.eclipse.birt.chart.event.EventObjectCache
org.eclipse.birt.chart.device.DeviceAdapter
- All Implemented Interfaces:
EventListener,IDeviceRenderer,IPrimitiveRenderer,IStructureDefinitionListener
A no-op adapter implementation for the
IDeviceRendererinterface definition.-
Field Summary
Fields inherited from interface org.eclipse.birt.chart.device.IDeviceRenderer
AREA_ALT_ENABLED, CACHE_ON_DISK, CACHED_IMAGE, COMPRESSED_OUTPUT, DPI_RESOLUTION, EXPECTED_BOUNDS, FILE_IDENTIFIER, FORMAT_IDENTIFIER, GRAPHICS_CONTEXT, UPDATE_NOTIFIERFields inherited from interface org.eclipse.birt.chart.device.IStructureDefinitionListener
AFTER_DRAW_AXIS_LABEL, AFTER_DRAW_AXIS_TITLE, AFTER_DRAW_BLOCK, AFTER_DRAW_DATA_POINT, AFTER_DRAW_DATA_POINT_LABEL, AFTER_DRAW_ELEMENT, AFTER_DRAW_FITTING_CURVE, AFTER_DRAW_LEGEND_ENTRY, AFTER_DRAW_LEGEND_ITEM, AFTER_DRAW_MARKER, AFTER_DRAW_MARKER_LINE, AFTER_DRAW_MARKER_RANGE, AFTER_DRAW_SERIES, AFTER_DRAW_SERIES_TITLE, BEFORE_DRAW_AXIS_LABEL, BEFORE_DRAW_AXIS_TITLE, BEFORE_DRAW_BLOCK, BEFORE_DRAW_DATA_POINT, BEFORE_DRAW_DATA_POINT_LABEL, BEFORE_DRAW_ELEMENT, BEFORE_DRAW_FITTING_CURVE, BEFORE_DRAW_LEGEND_ENTRY, BEFORE_DRAW_LEGEND_ITEM, BEFORE_DRAW_MARKER, BEFORE_DRAW_MARKER_LINE, BEFORE_DRAW_MARKER_RANGE, BEFORE_DRAW_SERIES, BEFORE_DRAW_SERIES_TITLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafter()A notification sent to the device to cleanup after rendering is donevoidThis method is capable of applying a global transformation on the device specific graphics context Available transformation types are: SCALE, TRANSLATE, ROTATEvoidbefore()A notification sent to the device to initialize itself before rendering beginsvoidSends out a notification to a listener indicating that a structure group has changed (either via a start or end) notification.voiddispose()A notification sent to the device to free all allocated system resources.voiddrawArc(ArcRenderEvent are) This method is responsible for drawing an elliptical arc on the target rendering device's graphic context.voiddrawArea(AreaRenderEvent are) This method is responsible for drawing a custom defined area on the target rendering device's graphic context.voidThis method is responsible for drawing an image on the target rendering device's graphic context.voiddrawLine(LineRenderEvent lre) This method is responsible for drawing a line on the target rendering device's graphic context.voiddrawOval(OvalRenderEvent ore) This method is responsible for drawing an oval area on the target rendering device's graphic context.voidThis method is responsible for drawing a polygon on the target rendering device's graphic context.voidThis method is responsible for drawing a rectangle on the target rendering device's graphic context.voiddrawText(TextRenderEvent tre) This method renders text on the target rendering device's graphic context using one of the three methods: 1.voidvoidfillArc(ArcRenderEvent are) This method is responsible for filling an elliptical arc on the target rendering device's graphic context.voidfillArea(AreaRenderEvent are) This method is responsible for filling a custom defined area on the target rendering device's graphic context.voidfillOval(OvalRenderEvent ore) This method is responsible for filling an oval area on the target rendering device's graphic context.voidThis method is responsible for filling a polygon on the target rendering device's graphic context.voidThis method is responsible for filling a rectangle on the target rendering device's graphic context.Returns the chart computation.Returns an instance of the low level display server capable of providing text metrics, screen resolution, etc.Returns an instance of the low level graphics context being used to render primitivesfinal LocaleProvides the locale to device renderer implementations as needed to retrieve localized resources for presentation.Returns the MIME type of the output image that the device renderer creates.final com.ibm.icu.util.ULocaleProvides the locale to device renderer implementations as needed to retrieve localized resources for presentation.booleanIndicated to the caller if the device renderer needs additional structure definition callbacks to identify how primitives are to be grouped to possibly aid in client side event handling.voidpresentException(Exception cexp) Notifies a device renderer to present an exception in its contextvoidSets the chart computation.voidsetClip(ClipRenderEvent cre) This method is responsible for clipping an arbitrary area on the target rendering device's graphic context.voidsetProperty(String sProperty, Object oValue) Device-specific write-only properties that may be set for each device rendererMethods inherited from class org.eclipse.birt.chart.event.EventObjectCache
getEventObject
-
Constructor Details
-
DeviceAdapter
public DeviceAdapter()
-
-
Method Details
-
setProperty
Description copied from interface:IDeviceRendererDevice-specific write-only properties that may be set for each device renderer- Specified by:
setPropertyin interfaceIDeviceRenderer- Parameters:
sProperty- The property whose value is to be setoValue- The value associated with the property
-
getGraphicsContext
Description copied from interface:IDeviceRendererReturns an instance of the low level graphics context being used to render primitives- Specified by:
getGraphicsContextin interfaceIDeviceRenderer- Returns:
- An instance of the low level graphics context being used to render primitives
-
getDisplayServer
Description copied from interface:IDeviceRendererReturns an instance of the low level display server capable of providing text metrics, screen resolution, etc.- Specified by:
getDisplayServerin interfaceIDeviceRenderer- Returns:
- An instance of the low level display server capable of providing text metrics, screen resolution, etc.
-
getLocale
Description copied from interface:IDeviceRendererProvides the locale to device renderer implementations as needed to retrieve localized resources for presentation.- Specified by:
getLocalein interfaceIDeviceRenderer- Returns:
- The locale to be used
-
getULocale
public final com.ibm.icu.util.ULocale getULocale()Description copied from interface:IDeviceRendererProvides the locale to device renderer implementations as needed to retrieve localized resources for presentation.- Specified by:
getULocalein interfaceIDeviceRenderer- Returns:
- The locale to be used
-
needsStructureDefinition
public boolean needsStructureDefinition()Description copied from interface:IDeviceRendererIndicated to the caller if the device renderer needs additional structure definition callbacks to identify how primitives are to be grouped to possibly aid in client side event handling.- Specified by:
needsStructureDefinitionin interfaceIDeviceRenderer- Returns:
- 'true' if structure definition notificates are required in the device renderer implementation.
-
before
Description copied from interface:IDeviceRendererA notification sent to the device to initialize itself before rendering begins- Specified by:
beforein interfaceIDeviceRenderer- Throws:
ChartException
-
after
Description copied from interface:IDeviceRendererA notification sent to the device to cleanup after rendering is done- Specified by:
afterin interfaceIDeviceRenderer- Throws:
ChartException
-
dispose
public void dispose()Description copied from interface:IDeviceRendererA notification sent to the device to free all allocated system resources.- Specified by:
disposein interfaceIDeviceRenderer
-
setClip
Description copied from interface:IPrimitiveRendererThis method is responsible for clipping an arbitrary area on the target rendering device's graphic context.- Specified by:
setClipin interfaceIPrimitiveRenderer- Parameters:
cre- Encapsulated information that defines the area to be clipped
-
drawImage
Description copied from interface:IPrimitiveRendererThis method is responsible for drawing an image on the target rendering device's graphic context.- Specified by:
drawImagein interfaceIPrimitiveRenderer- Parameters:
ire- Encapsulated information that defines a polygon and its attributes- Throws:
ChartException
-
drawLine
Description copied from interface:IPrimitiveRendererThis method is responsible for drawing a line on the target rendering device's graphic context.- Specified by:
drawLinein interfaceIPrimitiveRenderer- Parameters:
lre- Encapsulated information that defines a line and its attributes- Throws:
ChartException
-
drawRectangle
Description copied from interface:IPrimitiveRendererThis method is responsible for drawing a rectangle on the target rendering device's graphic context.- Specified by:
drawRectanglein interfaceIPrimitiveRenderer- Parameters:
rre- Encapsulated information that defines a rectangle and its attributes- Throws:
ChartException
-
fillRectangle
Description copied from interface:IPrimitiveRendererThis method is responsible for filling a rectangle on the target rendering device's graphic context.- Specified by:
fillRectanglein interfaceIPrimitiveRenderer- Parameters:
rre- Encapsulated information that defines a rectangle and its attributes- Throws:
ChartException
-
drawPolygon
Description copied from interface:IPrimitiveRendererThis method is responsible for drawing a polygon on the target rendering device's graphic context.- Specified by:
drawPolygonin interfaceIPrimitiveRenderer- Parameters:
pre- Encapsulated information that defines a polygon and its attributes- Throws:
ChartException
-
fillPolygon
Description copied from interface:IPrimitiveRendererThis method is responsible for filling a polygon on the target rendering device's graphic context.- Specified by:
fillPolygonin interfaceIPrimitiveRenderer- Parameters:
pre- Encapsulated information that defines a polygon and its attributes- Throws:
ChartException
-
drawArc
Description copied from interface:IPrimitiveRendererThis method is responsible for drawing an elliptical arc on the target rendering device's graphic context.- Specified by:
drawArcin interfaceIPrimitiveRenderer- Parameters:
are- Encapsulated information that defines the arc and its attributes- Throws:
ChartException
-
fillArc
Description copied from interface:IPrimitiveRendererThis method is responsible for filling an elliptical arc on the target rendering device's graphic context.- Specified by:
fillArcin interfaceIPrimitiveRenderer- Parameters:
are- Encapsulated information that defines an arc and its attributes- Throws:
ChartException
-
enableInteraction
- Specified by:
enableInteractionin interfaceIPrimitiveRenderer- Throws:
ChartException
-
drawArea
Description copied from interface:IPrimitiveRendererThis method is responsible for drawing a custom defined area on the target rendering device's graphic context.- Specified by:
drawAreain interfaceIPrimitiveRenderer- Parameters:
are- Encapsulated information that defines the area and its attributes- Throws:
ChartException
-
fillArea
Description copied from interface:IPrimitiveRendererThis method is responsible for filling a custom defined area on the target rendering device's graphic context.- Specified by:
fillAreain interfaceIPrimitiveRenderer- Parameters:
are- Encapsulated information that defines the area and its attributes- Throws:
ChartException
-
drawOval
Description copied from interface:IPrimitiveRendererThis method is responsible for drawing an oval area on the target rendering device's graphic context.- Specified by:
drawOvalin interfaceIPrimitiveRenderer- Parameters:
ore- Encapsulated information that defines the oval and its attributes- Throws:
ChartException
-
fillOval
Description copied from interface:IPrimitiveRendererThis method is responsible for filling an oval area on the target rendering device's graphic context.- Specified by:
fillOvalin interfaceIPrimitiveRenderer- Parameters:
ore- Encapsulated information that defines the oval and its attributes- Throws:
ChartException
-
drawText
Description copied from interface:IPrimitiveRendererThis method renders text on the target rendering device's graphic context using one of the three methods: 1. Renders text (with optional insets, border, fill, etc) with the encapsulating container rectangle's corner or edge aligning against a given point 2. Renders a shadow offset with the encapsulating container rectangle's corner or edge aligning against a given point 3. Renders text (with optional insets, border, fill, etc) with the encapsulating container rectangle's bounding box aligned with a parent block's bounding box- Specified by:
drawTextin interfaceIPrimitiveRenderer- Throws:
ChartException
-
applyTransformation
Description copied from interface:IPrimitiveRendererThis method is capable of applying a global transformation on the device specific graphics context Available transformation types are: SCALE, TRANSLATE, ROTATE- Specified by:
applyTransformationin interfaceIPrimitiveRenderer- Throws:
ChartException
-
changeStructure
Description copied from interface:IStructureDefinitionListenerSends out a notification to a listener indicating that a structure group has changed (either via a start or end) notification.- Specified by:
changeStructurein interfaceIStructureDefinitionListener- Parameters:
scev- Encapsulated information associated with the structure change notification that identifies the source object being changed.
-
presentException
Description copied from interface:IDeviceRendererNotifies a device renderer to present an exception in its context- Specified by:
presentExceptionin interfaceIDeviceRenderer- Parameters:
cexp- The exception to be presented
-
getMimeType
Description copied from interface:IDeviceRendererReturns the MIME type of the output image that the device renderer creates. Returns null in case of native rendering (no image file is created)- Specified by:
getMimeTypein interfaceIDeviceRenderer- Returns:
- the MIME type as a String (e.g. "image/png")
-
getChartComputation
Description copied from interface:IDeviceRendererReturns the chart computation.- Specified by:
getChartComputationin interfaceIDeviceRenderer- Returns:
- IChartComputation
-
setChartComputation
Description copied from interface:IDeviceRendererSets the chart computation.- Specified by:
setChartComputationin interfaceIDeviceRenderer- Parameters:
cComp- IChartComputation
-