Package org.eclipse.birt.chart.device
Interface IDeviceRenderer
- All Superinterfaces:
EventListener
,IPrimitiveRenderer
,IStructureDefinitionListener
- All Known Implementing Classes:
DeviceAdapter
Combines the primitive rendering notifications provided in the primitive and
other convenience methods needed by a device renderer. In addition, it
provides an accessor to retrieve the underlying graphics context on which
primitives are being rendered.
Any new device renderer would have to implement this interface for it to
transparently build charts via the rendering framework provided.
Note that the device renderer works in conjunction with a display server
implementation to correctly layout primitives.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
A property name that indicates if alt attribute in area tag of image map will be used to display data point value.static final String
A Property to enable/disable the caching of the image stream on disk Default is false.static final String
A property name that identifies an instance of a cached java.awt.Image that may be passed in for potential reuse.static final String
A property name that indicates if the output associated with the device should be compressed ('true') or written out as is uncompressed ('false').static final String
A property name that indicates the dpi (dots/pixels per inch) resolution to use when rendering to the device.static final String
A property name that identifies the expected bounds of the chart being generated.static final String
A property name that identifies a device-specific file identifier.static final String
A property name that identifies an output format identifierstatic final String
A property name that identifies a device-specific graphics contextstatic final String
A property name that identifies a device-specific visual component (e.g.Fields 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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
after()
A notification sent to the device to cleanup after rendering is donevoid
before()
A notification sent to the device to initialize itself before rendering beginsvoid
dispose()
A notification sent to the device to free all allocated system resources.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 primitivesDeprecated.Returns the MIME type of the output image that the device renderer creates.com.ibm.icu.util.ULocale
Provides the locale to device renderer implementations as needed to retrieve localized resources for presentation.boolean
Indicated 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.void
Notifies a device renderer to present an exception in its contextvoid
Sets the chart computation.void
setProperty
(String sProperty, Object oValue) Device-specific write-only properties that may be set for each device rendererMethods inherited from interface org.eclipse.birt.chart.device.IPrimitiveRenderer
applyTransformation, drawArc, drawArea, drawImage, drawLine, drawOval, drawPolygon, drawRectangle, drawText, enableInteraction, fillArc, fillArea, fillOval, fillPolygon, fillRectangle, setClip
Methods inherited from interface org.eclipse.birt.chart.device.IStructureDefinitionListener
changeStructure
-
Field Details
-
FILE_IDENTIFIER
A property name that identifies a device-specific file identifier. The value can be either file path or instance of output stream.- See Also:
-
FORMAT_IDENTIFIER
A property name that identifies an output format identifier- See Also:
-
GRAPHICS_CONTEXT
A property name that identifies a device-specific graphics context- See Also:
-
UPDATE_NOTIFIER
A property name that identifies a device-specific visual component (e.g. used for event detection)- See Also:
-
EXPECTED_BOUNDS
A property name that identifies the expected bounds of the chart being generated. This notification is sent out to provide the renderer with a hint about the location and size of the output being generated typically used with an Image file output. This is internally set by the 'Generator'.- See Also:
-
CACHED_IMAGE
A property name that identifies an instance of a cached java.awt.Image that may be passed in for potential reuse. In general, the image device renderers are configured to create a new image instance for every chart image generation request if a cached image is not specified. Ensure that the image passed in externally uses the correct size in pixels equivalent to the expected bounds specified in points.- See Also:
-
COMPRESSED_OUTPUT
A property name that indicates if the output associated with the device should be compressed ('true') or written out as is uncompressed ('false'). Device renderers should interpret a missing undefined value as uncompressed.- See Also:
-
DPI_RESOLUTION
A property name that indicates the dpi (dots/pixels per inch) resolution to use when rendering to the device. This is used to convert 'points' in pixels (a point is 1/72 inch). If not indicated, it will use the default dpi resolution of the corresponding display server (typically 96dpi)- See Also:
-
CACHE_ON_DISK
A Property to enable/disable the caching of the image stream on disk Default is false.- See Also:
-
AREA_ALT_ENABLED
A property name that indicates if alt attribute in area tag of image map will be used to display data point value.- See Also:
-
-
Method Details
-
setProperty
Device-specific write-only properties that may be set for each device renderer- Parameters:
sProperty
- The property whose value is to be setoValue
- The value associated with the property
-
getGraphicsContext
Object getGraphicsContext()Returns an instance of the low level graphics context being used to render primitives- Returns:
- An instance of the low level graphics context being used to render primitives
-
getDisplayServer
IDisplayServer getDisplayServer()Returns an instance of the low level display server capable of providing text metrics, screen resolution, etc.- Returns:
- An instance of the low level display server capable of providing text metrics, screen resolution, etc.
-
needsStructureDefinition
boolean needsStructureDefinition()Indicated 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.- Returns:
- 'true' if structure definition notificates are required in the device renderer implementation.
-
before
A notification sent to the device to initialize itself before rendering begins- Throws:
ChartException
-
after
A notification sent to the device to cleanup after rendering is done- Throws:
ChartException
-
dispose
void dispose()A notification sent to the device to free all allocated system resources. -
presentException
Notifies a device renderer to present an exception in its context- Parameters:
ex
- The exception to be presented
-
getLocale
Deprecated.usegetULocale()
instead.Provides the locale to device renderer implementations as needed to retrieve localized resources for presentation.- Returns:
- The locale to be used
-
getULocale
com.ibm.icu.util.ULocale getULocale()Provides the locale to device renderer implementations as needed to retrieve localized resources for presentation.- Returns:
- The locale to be used
- Since:
- 2.1
-
getMimeType
String getMimeType()Returns the MIME type of the output image that the device renderer creates. Returns null in case of native rendering (no image file is created)- Returns:
- the MIME type as a String (e.g. "image/png")
- Since:
- 2.3
-
getChartComputation
IChartComputation getChartComputation()Returns the chart computation.- Returns:
- IChartComputation
- Since:
- 2.5
-
setChartComputation
Sets the chart computation.- Parameters:
cComp
- IChartComputation- Since:
- 2.5
-
getULocale()
instead.