| java.lang.Object sun.porting.windowsystem.WindowSystem
WindowSystem | abstract public class WindowSystem (Code) | | This is the top-level entry point for a window system implementation.
It manages the creation of resources (windows, images, fonts, cursors)
and the delivery of input events.
version: 1.28, 08/19/02 |
Method Summary | |
public void | beep() Emits an audio beep. | 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. | public Dimension | getBestCursorSize(int width, int height) Find the nearest supported cursor size. | 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. | public static WindowSystem | getDefaultWindowSystem() Obtain an object corresponding to the default window system. | abstract public Window | getFocusWindow() Get the window that has the keyboard input focus, or null if the
focus is not assigned to any window. | public sun.awt.peer.FontPeer | getFont(String name, int style) Get an implementation of a typeface with the given name and
style. | public java.awt.FontMetrics | getFontMetrics(java.awt.Font font) Get a valid FontMetrics object for the given font. | abstract public Window | getGrabbingWindow() Get the window that has grabbed input, or null if none has.
A Window object corresponding to the window that has grabbedinput events. | public Image | getImage(java.awt.image.ImageProducer producer) Get an implementation of an image that corresponds to the
given ImageRepresentation object. | public int | getMaximumCursorColors() Returns the maximum number of colors allowed in a cursor. | 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. | abstract public Window | getRootWindow() Return the root window. | public java.awt.image.ColorModel | getScreenColorModel() Get the color model of the screen. | public int | getScreenResolution() Return the resolution of the screen, in pixels per inch. | public boolean | isCursorVisible() Query the visibility of the cursor. | public CursorImage | makeCursorImage(java.awt.Image img, int hotX, int hotY) Create a new CursorImage object. | public Image | makeDrawableImage(java.awt.Component c, int w, int h) Get an Image object for use as an offscreen
drawing area. | public sun.porting.graphicssystem.Region | makeRegion(int x, int y, int w, int h) Get a new rectangular region. | abstract public Window | makeTopLevelWindow(int windowType, int x, int y, int w, int h) Create a new top-level window of the given type
and having the specified dimensions. | abstract public Window | makeWindow(Window parent, int x, int y, int w, int h) Create a new window as a child of the given parent window,
and having the specified dimensions. | public boolean | prepareScrImage(java.awt.Image image, int width, int height, java.awt.image.ImageObserver observer) Prepares an image for rendering. | abstract public void | registerToolkitEventHandler(ToolkitEventHandler h) Register a callback handler for receiving events. | public void | setCursorImage(CursorImage image) Set the cursor image to match the supplied CursorImage . | public void | setCursorVisibility(boolean visible) Set the visibility of the cursor. | abstract public void | setWindowFactory(WindowFactory factory) Change the factory object used to create windows. | abstract public void | start() Start the window system running. | public void | sync() Synchronizes the graphics state. |
WindowSystem | public WindowSystem()(Code) | | Make a new WindowSystem object
|
WindowSystem | public WindowSystem(GraphicsSystem gfx)(Code) | | Make a new WindowSystem object running on top of the specified GraphicsSystem .
|
beep | public void beep()(Code) | | Emits an audio beep.
|
checkScrImage | 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 since: JDK1.0 |
getBestCursorSize | public Dimension getBestCursorSize(int width, int height)(Code) | | Find the nearest supported cursor size.
true if the size is supported, false otherwise. |
getCursorImage | 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. |
getDefaultWindowSystem | public static WindowSystem getDefaultWindowSystem()(Code) | | Obtain an object corresponding to the default window system.
|
getFocusWindow | abstract public Window getFocusWindow()(Code) | | Get the window that has the keyboard input focus, or null if the
focus is not assigned to any window.
A Window object corresponding to the window that will receiveany keyboard events which occur. |
getFont | 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 .
Parameters: name - The name of the typeface Parameters: style - The style (PLAIN , BOLD , ITALIC ) of the font. A FontPeer for the nearest matching font. See Also: java.awt.Font |
getGrabbingWindow | abstract public Window getGrabbingWindow()(Code) | | Get the window that has grabbed input, or null if none has.
A Window object corresponding to the window that has grabbedinput events. Note that the grabbing window will not have the keyboardfocus unless it has been specifically assigned to it. |
getImage | public Image getImage(java.awt.image.ImageProducer producer)(Code) | | Get an implementation of an image that corresponds to the
given ImageRepresentation object.
Parameters: image - The ImageRepresentation object describing this image See Also: java.awt.Image See Also: sun.awt.ImageRepresentation An image, initialized from the given ImageRepresentation . |
getMaximumCursorColors | 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 | 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. 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. |
getRootWindow | abstract public Window getRootWindow()(Code) | | Return the root window. Use with caution!
|
getScreenColorModel | public java.awt.image.ColorModel getScreenColorModel()(Code) | | Get the color model of the screen.
The color model, as a java.awt.image.ColorModel object |
getScreenResolution | public int getScreenResolution()(Code) | | Return the resolution of the screen, in pixels per inch.
|
isCursorVisible | public boolean isCursorVisible()(Code) | | Query the visibility of the cursor.
true if the cursor is currently visible. |
makeDrawableImage | public Image makeDrawableImage(java.awt.Component c, int w, int h)(Code) | | Get an Image object for use as an offscreen
drawing area. The object should have the specified size
and color model.
Parameters: w - The width of the offscreen image Parameters: h - The height of the offscreen image An offscreen image into which graphics can be drawn. |
makeRegion | public sun.porting.graphicssystem.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. |
makeTopLevelWindow | abstract public Window makeTopLevelWindow(int windowType, int x, int y, int w, int h)(Code) | | Create a new top-level window of the given type
and having the specified dimensions. Uses the current
WindowFactory .
Parameters: windowType - The type of the window Parameters: x - the x coordinate for the window's upper left hand corner,in the global coordinate system Parameters: y - the y coordinate for the window's upper left hand corner,in the global coordinate system Parameters: w - the width of the window Parameters: h - the height of the window The new Window object. |
makeWindow | abstract public Window makeWindow(Window parent, int x, int y, int w, int h)(Code) | | Create a new window as a child of the given parent window,
and having the specified dimensions. Uses the current
WindowFactory .
Parameters: parent - The parent window. Parameters: x - the x coordinate for the window's upper left hand corner,in the coordinate system of the parent window. Parameters: y - the y coordinate for the window's upper left hand corner,in the coordinate system of the parent window. Parameters: w - the width of the window Parameters: h - the height of the window The new Window object. |
prepareScrImage | 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 since: JDK1.0 |
setCursorImage | public void setCursorImage(CursorImage image)(Code) | | Set the cursor image to match the supplied CursorImage .
Parameters: image - The cursor image |
setCursorVisibility | public void setCursorVisibility(boolean visible)(Code) | | Set the visibility of the cursor.
Parameters: visible - Whether to make the cursor visible or hidden. |
setWindowFactory | abstract public void setWindowFactory(WindowFactory factory)(Code) | | Change the factory object used to create windows. (The factory
mechanism is used in case a subclass of Window is needed.)
If factory is null, use the window system's default factory.
|
start | abstract public void start()(Code) | | Start the window system running. This will create the root
window, etc. (A separate start mechanism is necessary in
order to break the mutual dependency between WindowSystem and
WindowFactory.)
|
sync | 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.
|
|
|