| java.lang.Object sun.porting.graphicssystem.GraphicsSystem
GraphicsSystem | abstract public class GraphicsSystem (Code) | | This is the top-level entry point for a graphics system implementation.
It manages creation of resources (images, fonts, cursors), access to the
screen, and drawing to offscreen memory regions.
version: 1.26, 08/19/02 |
Method Summary | |
abstract public void | beep() Emits an audio beep. | abstract public int | checkScrImage(java.awt.Image image, int width, int height, java.awt.image.ImageObserver observer) Indicates the construction status of a specified image that is
being prepared for display.
If the values of the width and height arguments are both
-1 , this method returns the construction status of
a screen representation of the specified image in this toolkit. | abstract public Dimension | getBestCursorSize(int width, int height) Find the nearest supported cursor size. | abstract public CursorImage | getCursorImage(Cursor c) Get a CursorImage object that corresponds to a standard
"system" cursor.
Parameters: c - A Cursor object which specifies a standard system cursor. | abstract public Point | getCursorLocation() Get the cursor hotspot. | public static GraphicsSystem | getDefaultGraphicsSystem() Get a GraphicsSystem object corresponding to the default graphics system. | abstract public sun.awt.peer.FontPeer | getFont(String name, int style) Get an implementation of a typeface with the given name and
style. | abstract public java.awt.FontMetrics | getFontMetrics(java.awt.Font font) Get a valid FontMetrics object for the given font. | abstract public java.awt.Image | getImage(java.awt.image.ImageProducer producer) Create an Image object with the given ImageProducer . | abstract public int | getMaximumCursorColors() Returns the maximum number of colors allowed in a cursor. | abstract public Dimension | getMaximumCursorSize() Get the maximum supported size for a cursor.
a Dimension object containing the maximum cursor size, ornull if there is no maximum. | public Drawable | getScreen() Get a Drawable object corresponding to the default screen. | abstract public int | getScreenResolution() Return the resolution of the screen, in pixels per inch. | abstract public Drawable[] | getScreens() Get Drawable objects corresponding to the available screens. | abstract public boolean | isCursorVisible() Query the visibility of the cursor. | abstract public CursorImage | makeCursorImage(Image img, int hotX, int hotY) Create a new CursorImage object. | abstract public Image | makeDrawableImage(java.awt.Component c, int w, int h) Get an Image object for use as an offscreen
drawing area related to the given component. | abstract public Region | makeRegion(int x, int y, int w, int h) Get a new rectangular Region . | abstract public boolean | prepareScrImage(java.awt.Image image, int width, int height, java.awt.image.ImageObserver observer) Prepares an image for rendering. | abstract public void | registerEventHandler(EventHandler h) Register a callback handler for receiving events. | abstract public void | setCursorImage(CursorImage image) Set the cursor image to match the supplied CursorImage object. | abstract public void | setCursorVisibility(boolean visible) Set the visibility of the cursor. | abstract public void | sync() Synchronizes the graphics state.
Some systems may do buffering of graphics events;
this method ensures that the display is up-to-date. |
beep | abstract public void beep()(Code) | | Emits an audio beep.
|
checkScrImage | abstract public int checkScrImage(java.awt.Image image, int width, int height, java.awt.image.ImageObserver observer)(Code) | | Indicates the construction status of a specified image that is
being prepared for display.
If the values of the width and height arguments are both
-1 , this method returns the construction status of
a screen representation of the specified image in this toolkit.
Otherwise, this method returns the construction status of a
scaled representation of the image at the specified width
and height.
This method does not cause the image to begin loading.
An application must call prepareImage to force
the loading of an image.
This method is called by the component's checkImage
methods.
Information on the flags returned by this method can be found
with the definition of the ImageObserver interface.
Parameters: image - the image whose status is being checked. Parameters: width - the width of the scaled version whose status isbeing checked, or -1 . Parameters: height - the height of the scaled version whose statusis being checked, or -1 . Parameters: observer - the ImageObserver object to benotified as the image is being prepared. the bitwise inclusive OR of theImageObserver flags for the image data that is currently available. See Also: java.awt.Toolkit.prepareImage(java.awt.Imageintintjava.awt.image.ImageObserver) See Also: java.awt.Component.checkImage(java.awt.Imagejava.awt.image.ImageObserver) See Also: java.awt.Component.checkImage(java.awt.Imageintintjava.awt.image.ImageObserver) See Also: java.awt.image.ImageObserver |
getBestCursorSize | abstract public Dimension getBestCursorSize(int width, int height)(Code) | | Find the nearest supported cursor size.
true if the size is supported, false otherwise. |
getCursorImage | abstract public CursorImage getCursorImage(Cursor c)(Code) | | Get a CursorImage object that corresponds to a standard
"system" cursor.
Parameters: c - A Cursor object which specifies a standard system cursor. The corresponding CursorImage. |
getCursorLocation | abstract public Point getCursorLocation()(Code) | | Get the cursor hotspot.
|
getDefaultGraphicsSystem | public static GraphicsSystem getDefaultGraphicsSystem()(Code) | | Get a GraphicsSystem object corresponding to the default graphics system.
The default graphics system is determined by the value of the system property
sun.graphicssystem .
A GraphicsSystem object for the default graphics system. |
getFont | abstract public sun.awt.peer.FontPeer getFont(String name, int style)(Code) | | Get an implementation of a typeface with the given name and
style. Style values are as in java.awt.Font . If an exact match
is not possible, returns the closest available match according to
a system-dependent algorithm.
Parameters: name - The name of the typeface Parameters: style - The style (e.g. PLAIN , BOLD , ITALIC ) of the font. A FontPeer corresponding to the nearest matching font. See Also: java.awt.Font |
getFontMetrics | abstract public java.awt.FontMetrics getFontMetrics(java.awt.Font font)(Code) | | Get a valid FontMetrics object for the given font.
Parameters: font - The java font descriptor for the font The corresponding FontMetrics object. See Also: java.awt.Font |
getImage | abstract public java.awt.Image getImage(java.awt.image.ImageProducer producer)(Code) | | Create an Image object with the given ImageProducer .
The width, height and color model will all be determined later, when
the image data is decoded.
Parameters: producer - The ImageProducer object which will supply the image data An Image , initialized from the given ImageProducer object. |
getMaximumCursorColors | abstract public int getMaximumCursorColors()(Code) | | Returns the maximum number of colors allowed in a cursor. "Transparent"
is not to be counted as a color.
the maximum number of colors supported in a cursor image. |
getMaximumCursorSize | abstract public Dimension getMaximumCursorSize()(Code) | | Get the maximum supported size for a cursor.
a Dimension object containing the maximum cursor size, ornull if there is no maximum. While a return value of null implies thatthere is no maximum, it does not guarantee that all sizes aresupported, because aspect ratio has not been taken into account. |
getScreen | public Drawable getScreen()(Code) | | Get a Drawable object corresponding to the default screen.
A Drawable object for the default screen. |
getScreenResolution | abstract public int getScreenResolution()(Code) | | Return the resolution of the screen, in pixels per inch.
|
getScreens | abstract public Drawable[] getScreens()(Code) | | Get Drawable objects corresponding to the available screens.
An array of Drawable objects. |
isCursorVisible | abstract public boolean isCursorVisible()(Code) | | Query the visibility of the cursor.
true if the cursor is currently visible. |
makeCursorImage | abstract public CursorImage makeCursorImage(Image img, int hotX, int hotY)(Code) | | Create a new CursorImage object.
|
makeDrawableImage | abstract public Image makeDrawableImage(java.awt.Component c, int w, int h)(Code) | | Get an Image object for use as an offscreen
drawing area related to the given component.
The desired width and height must be supplied.
Parameters: component - The Component with which this image is associated Parameters: w - the width of the image Parameters: h - the height of the image An offscreen Image into which graphics can be drawn. See Also: java.awt.Image See Also: sun.awt.Image See Also: sun.awt.ImageRepresentation |
makeRegion | abstract public Region makeRegion(int x, int y, int w, int h)(Code) | | Get a new rectangular Region .
Parameters: x - The upper left x coordinate of the region Parameters: y - The upper left y coordinate of the region Parameters: w - The width of the region Parameters: h - The height of the region The newly-created Region object. |
prepareScrImage | abstract public boolean prepareScrImage(java.awt.Image image, int width, int height, java.awt.image.ImageObserver observer)(Code) | | Prepares an image for rendering.
If the values of the width and height arguments are both
-1 , this method prepares the image for rendering
on the default screen; otherwise, this method prepares an image
for rendering on the default screen at the specified width and height.
The image data is downloaded asynchronously in another thread,
and an appropriately scaled screen representation of the image is
generated.
This method is called by components prepareImage
methods.
Information on the flags returned by this method can be found
with the definition of the ImageObserver interface.
Parameters: image - the image for which to prepare a screen representation. Parameters: width - the width of the desired screen representation, or -1 . Parameters: height - the height of the desired screen representation, or -1 . Parameters: observer - the ImageObserver object to be notified as the image is being prepared. true if the image has already been fully prepared; false otherwise. See Also: java.awt.Component.prepareImage(java.awt.Imagejava.awt.image.ImageObserver) See Also: java.awt.Component.prepareImage(java.awt.Imageintintjava.awt.image.ImageObserver) See Also: java.awt.image.ImageObserver |
setCursorImage | abstract public void setCursorImage(CursorImage image)(Code) | | Set the cursor image to match the supplied CursorImage object.
Parameters: image - The contents of the cursor image. |
setCursorVisibility | abstract public void setCursorVisibility(boolean visible)(Code) | | Set the visibility of the cursor.
Parameters: visible - true to make the cursor visible, false otherwise. |
sync | abstract public void sync()(Code) | | Synchronizes the graphics state.
Some systems may do buffering of graphics events;
this method ensures that the display is up-to-date. It is useful
for animation.
|
|
|