Java Doc for WindowSystem.java in  » 6.0-JDK-Modules » j2me » sun » porting » windowsystem » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » j2me » sun.porting.windowsystem 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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


Field Summary
protected  GraphicsSystemgfxSys
    

Constructor Summary
public  WindowSystem()
    
public  WindowSystem(GraphicsSystem gfx)
     Make a new WindowSystem object running on top of the specified GraphicsSystem.

Method Summary
public  voidbeep()
     Emits an audio beep.
public  intcheckScrImage(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  DimensiongetBestCursorSize(int width, int height)
     Find the nearest supported cursor size.
public  CursorImagegetCursorImage(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  WindowSystemgetDefaultWindowSystem()
     Obtain an object corresponding to the default window system.
abstract public  WindowgetFocusWindow()
     Get the window that has the keyboard input focus, or null if the focus is not assigned to any window.
public  sun.awt.peer.FontPeergetFont(String name, int style)
     Get an implementation of a typeface with the given name and style.
public  java.awt.FontMetricsgetFontMetrics(java.awt.Font font)
     Get a valid FontMetrics object for the given font.
abstract public  WindowgetGrabbingWindow()
     Get the window that has grabbed input, or null if none has. A Window object corresponding to the window that has grabbedinput events.
public  ImagegetImage(java.awt.image.ImageProducer producer)
     Get an implementation of an image that corresponds to the given ImageRepresentation object.
public  intgetMaximumCursorColors()
     Returns the maximum number of colors allowed in a cursor.
public  DimensiongetMaximumCursorSize()
     Get the maximum supported size for a cursor. a Dimension object containing the maximum cursor size, ornull if there is no maximum.
abstract public  WindowgetRootWindow()
     Return the root window.
public  java.awt.image.ColorModelgetScreenColorModel()
     Get the color model of the screen.
public  intgetScreenResolution()
     Return the resolution of the screen, in pixels per inch.
public  booleanisCursorVisible()
     Query the visibility of the cursor.
public  CursorImagemakeCursorImage(java.awt.Image img, int hotX, int hotY)
     Create a new CursorImage object.
public  ImagemakeDrawableImage(java.awt.Component c, int w, int h)
     Get an Image object for use as an offscreen drawing area.
public  sun.porting.graphicssystem.RegionmakeRegion(int x, int y, int w, int h)
     Get a new rectangular region.
abstract public  WindowmakeTopLevelWindow(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  WindowmakeWindow(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  booleanprepareScrImage(java.awt.Image image, int width, int height, java.awt.image.ImageObserver observer)
     Prepares an image for rendering.
abstract public  voidregisterToolkitEventHandler(ToolkitEventHandler h)
     Register a callback handler for receiving events.
public  voidsetCursorImage(CursorImage image)
     Set the cursor image to match the supplied CursorImage.
public  voidsetCursorVisibility(boolean visible)
     Set the visibility of the cursor.
abstract public  voidsetWindowFactory(WindowFactory factory)
     Change the factory object used to create windows.
abstract public  voidstart()
     Start the window system running.
public  voidsync()
     Synchronizes the graphics state.

Field Detail
gfxSys
protected GraphicsSystem gfxSys(Code)




Constructor Detail
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.




Method Detail
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



getFontMetrics
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



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.



makeCursorImage
public CursorImage makeCursorImage(java.awt.Image img, int hotX, int hotY)(Code)
Create a new CursorImage object.



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




registerToolkitEventHandler
abstract public void registerToolkitEventHandler(ToolkitEventHandler h) throws IllegalStateException(Code)
Register a callback handler for receiving events.
Parameters:
  h - The callback handler, a ToolkitEventHandler object.
throws:
  IllegalStateException - if there is already a handlerregistered.



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.



Methods inherited from java.lang.Object
public boolean equals(Object obj)(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.