|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IDisplayServer
Provides generic services to a device renderer for computing metrics and centralized creation of device specific resources. This class is analogus to an X server interface associated with a device.
Method Summary | |
---|---|
java.lang.Object |
createFont(FontDefinition fd)
Attempts to create a new font resource associated with a specific device for use in rendering or computations |
void |
debug()
Lists out all resources that were previously logged explicitly by the logCreation(Object) method or those internally created by
each of the resource creation methods. |
void |
dispose()
A notification sent to the device to free all allocated system resources. |
java.lang.Object |
getColor(ColorDefinition cd)
Attempts to create a new color resource associated with a specific device |
int |
getDpiResolution()
Returns the resolution of the device in dots per inch As an example, for a display screen, the dots correspond to pixels and a typical value for a Win32 OS is 96 DPI. |
java.util.Locale |
getLocale()
Deprecated. use getULocale() instead. |
java.lang.Object |
getObserver()
An observer is typically associated with certain device types to aid in image loading and image metadata retrieval. |
Size |
getSize(java.lang.Object oImage)
Returns the size(width, height) of the device specific image that was previously loaded by the loadImage(URL) method |
ITextMetrics |
getTextMetrics(Label la)
An instance of a text metrics computation class capable of providing text metric information associated with a given Label to aid in typically computing the size of rendered text |
ITextMetrics |
getTextMetrics(Label la,
boolean autoReuse)
An instance of a text metrics computation class capable of providing text metric information associated with a given Label to aid in typically computing the size of rendered text |
com.ibm.icu.util.ULocale |
getULocale()
Provides the locale to display server implementations as needed to retrieve localized resources for presentation. |
java.lang.Object |
loadImage(java.net.URL url)
Attempts to use device specific libraries to load an image for use with the device renderer |
void |
logCreation(java.lang.Object o)
Log creation of a resource for which leaks are to be tracked |
void |
setDpiResolution(int dpi)
Sets the dpi resolution. |
void |
setGraphicsContext(java.lang.Object graphicsContext)
Set the graphic context on the device renderer, which is required for font computations (SWT uses org.eclipse.swt.graphics.GC and Swing uses java.awt.Graphics2D) It is the responsibility of the caller to dispose the Graphics Context |
void |
setResourceFinder(IResourceFinder resourceFinder)
Set the resource finder, which will be used by loading image. |
Method Detail |
---|
void debug()
logCreation(Object)
method or those internally created by
each of the resource creation methods. Once this method is invoked, all
entries written into the log should be flushed.
void logCreation(java.lang.Object o)
o
- A device-specific object being createdjava.lang.Object createFont(FontDefinition fd)
fd
- An font description for which a device specific resource is
being requested
java.lang.Object getColor(ColorDefinition cd)
cd
- A color description for which a device specific resource is
being requested
int getDpiResolution()
void setDpiResolution(int dpi)
dpi
- The number of dots per inchjava.lang.Object loadImage(java.net.URL url) throws ChartException
url
- The URL associated with the image location
ChartException
Size getSize(java.lang.Object oImage)
loadImage(URL)
method
oImage
- The image for which the size is being requested
java.lang.Object getObserver()
ITextMetrics getTextMetrics(Label la)
la
- The Label instance for which text metrics are being requested
ITextMetrics getTextMetrics(Label la, boolean autoReuse)
la
- The Label instance for which text metrics are being requestedautoReuse
-
java.util.Locale getLocale()
getULocale()
instead.
com.ibm.icu.util.ULocale getULocale()
void dispose()
void setGraphicsContext(java.lang.Object graphicsContext)
graphicContext
- void setResourceFinder(IResourceFinder resourceFinder)
resourceFinder
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |