Java Doc for Window.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) 


sun.porting.windowsystem.Window

Window
public interface Window (Code)
This is the public interface for a window object. In this context it is a relatively low-level object (not to be confused with java.awt.Window) which underlies the implementation of a set of toolkit peers. Window has only a small number of capabilities:
  • It is an opaque, clipped drawing surface (i.e. has a background color)
  • Its size can be dynamically changed
  • It is capable of being the target for input events
  • It can contain other Windows in a strict hierarchical fashion
  • It can exist without being visible (i.e. "mapped")
Finally, Window encapsulates some additional state:
  • X, Y position relative to its parent
  • Z order with respect to its siblings
  • keyboard and input focus
  • an associated cursor image

version:
   1.18, 08/19/02


Field Summary
final static  intDELIVER_ALL
     Delivery mode for grab: deliver all events to the grab window.
final static  intDISCARD_NOISY
     Delivery mode for grab: discard events not directed to the grabbing window.
final static  intDISCARD_SILENT
     Delivery mode for grab: discard events not directed to the grabbing window, giving no feedback.


Method Summary
 voidacquireInputFocus()
     Assign the keyboard input focus to this window.
 voiddispose()
     Dispose of any resources associated with the window, and mark it invalid.
 ColorgetBackgroundColor()
     Get the background color for the window (i.e.
 RectanglegetBounds(boolean global)
     Get the location and size of the window.
public  GraphicsgetGraphics()
     Get a graphics object for this window.
 java.lang.ObjectgetUserData()
     Return the window's "user data" field.
 voidgrabInput(int mode)
     Make this window grab all input.
 booleanhasGrab()
     Determine whether this window (actually its top-level ancestor) owns the input grab.
 booleanhasInputFocus()
     Determine whether this window has the keyboard input focus.
 booleanisMapped()
    
 voidmap()
     Make this window visible.
 voidreleaseGrab()
     Make this window (or its top-level ancestor) release the grab.
 voidsetBackgroundColor(Color c)
     Set the background color for the window (i.e.
 voidsetBounds(int x, int y, int w, int h)
     Set the location and/or size of the window.
 voidsetCursorImage(sun.porting.graphicssystem.CursorImage image)
     Set the cursor image to match the one supplied.
 voidsetStackingOrder(int n)
     Move this window so that it is Nth in its list of siblings.
 voidsetUserData(java.lang.Object o)
     Set the window's "user data" field to the given object.
 voidunmap()
     Make this window invisible.

Field Detail
DELIVER_ALL
final static int DELIVER_ALL(Code)
Delivery mode for grab: deliver all events to the grab window.



DISCARD_NOISY
final static int DISCARD_NOISY(Code)
Delivery mode for grab: discard events not directed to the grabbing window. Some auditory and/or visual feedback should accompany each discarded event.



DISCARD_SILENT
final static int DISCARD_SILENT(Code)
Delivery mode for grab: discard events not directed to the grabbing window, giving no feedback.





Method Detail
acquireInputFocus
void acquireInputFocus() throws IllegalStateException(Code)
Assign the keyboard input focus to this window.
throws:
  IllegalStateException - if the window is disposed or not mapped.



dispose
void dispose()(Code)
Dispose of any resources associated with the window, and mark it invalid. If the window has the grab or the input focus, implicitly releases them.



getBackgroundColor
Color getBackgroundColor()(Code)
Get the background color for the window (i.e. the color which will be used to erase it when damage occurs, etc.) The background color, as a Color object.



getBounds
Rectangle getBounds(boolean global) throws IllegalStateException(Code)
Get the location and size of the window. If global is true, the position will be returned in root coordinates; otherwise they will be relative to this window's parent.
Parameters:
  global - A flag indicating whether to return x and y inglobal or parent-relative coordinates. The position and size in pixels, as a Rectangle object.
throws:
  IllegalStateException - if the window has been disposed.



getGraphics
public Graphics getGraphics()(Code)
Get a graphics object for this window. The Graphics object which is returned will be created with a GeometryProvider which corresponds to this window; as a result, all drawing operations using this Graphics object will be located within, and clipped to this window.



getUserData
java.lang.Object getUserData()(Code)
Return the window's "user data" field. This is a convenience for Toolkit implementors which allows them to efficiently associate private data with each window.



grabInput
void grabInput(int mode) throws IllegalStateException(Code)
Make this window grab all input. Does not change keyboard focus. If this window is not a top-level window, the grab will be given to its top-level ancestor instead. The mode argument indicates what should be done with events that are not directed at the grab window.
Parameters:
  mode - how to handle events directed at other windows.
throws:
  IllegalStateException - if the window is disposed or not mapped,or if the grab is owned by someone else.Important note: the actual window that owns the explicit grab must always be a top-level window. It is the window system's responsibility to find the top-level ancestor when grabbing, and to ensure that the event target is owned by (not necessarily equal to) the grab owner.



hasGrab
boolean hasGrab() throws IllegalStateException(Code)
Determine whether this window (actually its top-level ancestor) owns the input grab. true if this window has the grab, false otherwise.
throws:
  IllegalStateException - if the window has been disposed.



hasInputFocus
boolean hasInputFocus() throws IllegalStateException(Code)
Determine whether this window has the keyboard input focus. true if this window has keyboard input focus, false otherwise.
throws:
  IllegalStateException - if the window has been disposed.



isMapped
boolean isMapped() throws IllegalStateException(Code)
Query the map state of the window true if the window is mapped (visible) false otherwise.
throws:
  IllegalStateException - if the window has been disposed.



map
void map() throws IllegalStateException(Code)
Make this window visible.
throws:
  IllegalStateException - if the window has been disposed.



releaseGrab
void releaseGrab() throws IllegalStateException(Code)
Make this window (or its top-level ancestor) release the grab. Does not change keyboard focus. Only explicitly-acquired grabs can be released by this method.
throws:
  IllegalStateException - if the window does not have the grabor has been disposed.



setBackgroundColor
void setBackgroundColor(Color c)(Code)
Set the background color for the window (i.e. the color which will be used to erase it when damage occurs, etc.)



setBounds
void setBounds(int x, int y, int w, int h) throws IllegalStateException(Code)
Set the location and/or size of the window. x and y are relative to this window's parent.
Parameters:
  x - x coordinate of the upper left corner, relative to parent.
Parameters:
  y - y coordinate of the upper left corner, relative to parent.
Parameters:
  w - width in pixels.
Parameters:
  h - height in pixels.
throws:
  IllegalStateException - if the window has been disposed.



setCursorImage
void setCursorImage(sun.porting.graphicssystem.CursorImage image)(Code)
Set the cursor image to match the one supplied.
Parameters:
  image - The contents of the cursor image
Parameters:
  hotX - The x coordinate of the hotspot
Parameters:
  hotY - The y coordinate of the hotspot
See Also:   sun.porting.graphicssystem.CursorImage



setStackingOrder
void setStackingOrder(int n) throws IllegalStateException(Code)
Move this window so that it is Nth in its list of siblings. N = 0 moves the window to the front; N = -1 moves it to the back. N = -2 moves it so it is above only the last window, etc.
throws:
  IllegalStateException - if the window has been disposed.



setUserData
void setUserData(java.lang.Object o)(Code)
Set the window's "user data" field to the given object. This is a convenience for Toolkit implementors which allows them to efficiently associate private data with each window.



unmap
void unmap() throws IllegalStateException(Code)
Make this window invisible. If the window has the grab or the input focus, implicitly releases them.
throws:
  IllegalStateException - if the window has been disposed.



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