public class DisplayAdapter extends java.lang.Object implements IDisplayServer
IDisplayServerinterface definition.| 构造器和说明 |
|---|
DisplayAdapter() |
| 限定符和类型 | 方法和说明 |
|---|---|
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()
Provides the locale to display server implementations as needed to
retrieve localized resources for presentation.
|
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 oMisc)
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 graphicContext)
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 |
setLocale(com.ibm.icu.util.ULocale lcl)
A convenience method provided to associate a locale with a display server
|
void |
setResourceFinder(IResourceFinder resourceFinder)
Set the resource finder, which will be used by loading image.
|
public void debug()
IDisplayServerlogCreation(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.debug 在接口中 IDisplayServerpublic void logCreation(java.lang.Object oMisc)
IDisplayServerlogCreation 在接口中 IDisplayServeroMisc - A device-specific object being createdpublic java.lang.Object createFont(FontDefinition fd)
IDisplayServercreateFont 在接口中 IDisplayServerfd - An font description for which a device specific resource is
being requestedpublic java.lang.Object getColor(ColorDefinition cd)
IDisplayServergetColor 在接口中 IDisplayServercd - A color description for which a device specific resource is
being requestedpublic int getDpiResolution()
IDisplayServergetDpiResolution 在接口中 IDisplayServerpublic void setDpiResolution(int dpi)
IDisplayServersetDpiResolution 在接口中 IDisplayServerdpi - The number of dots per inchpublic java.lang.Object loadImage(java.net.URL url)
throws ChartException
IDisplayServerloadImage 在接口中 IDisplayServerurl - The URL associated with the image locationChartExceptionpublic Size getSize(java.lang.Object oImage)
IDisplayServerloadImage(URL) methodgetSize 在接口中 IDisplayServeroImage - The image for which the size is being requestedpublic java.lang.Object getObserver()
IDisplayServergetObserver 在接口中 IDisplayServerpublic ITextMetrics getTextMetrics(Label la)
IDisplayServergetTextMetrics 在接口中 IDisplayServerla - The Label instance for which text metrics are being requestedpublic final java.util.Locale getLocale()
IDisplayServergetLocale 在接口中 IDisplayServerpublic final com.ibm.icu.util.ULocale getULocale()
IDisplayServergetULocale 在接口中 IDisplayServerpublic final void setLocale(com.ibm.icu.util.ULocale lcl)
setLocale 在接口中 IDisplayServerlcl - The locale to be setpublic void dispose()
IDisplayServerdispose 在接口中 IDisplayServerpublic void setGraphicsContext(java.lang.Object graphicContext)
IDisplayServersetGraphicsContext 在接口中 IDisplayServerpublic void setResourceFinder(IResourceFinder resourceFinder)
IDisplayServersetResourceFinder 在接口中 IDisplayServerpublic ITextMetrics getTextMetrics(Label la, boolean autoReuse)
IDisplayServergetTextMetrics 在接口中 IDisplayServerla - The Label instance for which text metrics are being requestedCopyright © 2005-2008 Actuate Corp. All rights reserved.