Source Code Cross Referenced for NativeWindow.java in  » Apache-Harmony-Java-SE » org-package » org » apache » harmony » awt » wtk » 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 » Apache Harmony Java SE » org package » org.apache.harmony.awt.wtk 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  Licensed to the Apache Software Foundation (ASF) under one or more
003:         *  contributor license agreements.  See the NOTICE file distributed with
004:         *  this work for additional information regarding copyright ownership.
005:         *  The ASF licenses this file to You under the Apache License, Version 2.0
006:         *  (the "License"); you may not use this file except in compliance with
007:         *  the License.  You may obtain a copy of the License at
008:         *
009:         *     http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         *  Unless required by applicable law or agreed to in writing, software
012:         *  distributed under the License is distributed on an "AS IS" BASIS,
013:         *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         *  See the License for the specific language governing permissions and
015:         *  limitations under the License.
016:         */
017:        /**
018:         * @author Mikhail Danilov
019:         * @version $Revision$
020:         */package org.apache.harmony.awt.wtk;
021:
022:        import java.awt.Image;
023:        import java.awt.Insets;
024:        import java.awt.Point;
025:        import java.awt.Rectangle;
026:
027:        import org.apache.harmony.awt.gl.MultiRectArea;
028:
029:        /**
030:         * Provides cross-platform way to manipulate native window.
031:         *
032:         * Results of methods are reported through native messages.
033:         */
034:        public interface NativeWindow {
035:            /**
036:             * Returns system id of the associated window
037:             * @return HWND on Windows, xwindow on X
038:             */
039:            long getId();
040:
041:            /**
042:             * Shows/hides window
043:             * @param v - new visibility
044:             */
045:            void setVisible(boolean v);
046:
047:            /**
048:             * Means only size should be changed
049:             */
050:            static final int BOUNDS_NOMOVE = 1;
051:
052:            /**
053:             * Means only position should be changed
054:             */
055:            static final int BOUNDS_NOSIZE = 2;
056:
057:            /**
058:             * Tries to set desired window bounds. It's not gurantied the
059:             * property will have the desired value. The value change
060:             * should be reported by system event (as for other properties).
061:             *
062:             * <p/>  If child, position is relative to parent window.
063:             * @param x - desired x
064:             * @param y - desired y
065:             * @param w - desired width
066:             * @param h - desired height
067:             * @param boundsMask - bitwise OR of BOUNDS_* constants.
068:             * Governs the new bounds interpretation.
069:             */
070:            void setBounds(int x, int y, int w, int h, int boundsMask);
071:
072:            /**
073:             * Returns last notified window bounds. This means the last bounds
074:             * reported by system event.
075:             *
076:             * <p/>  If child, position is relative to parent window.
077:             * @return last notified window bounds
078:             */
079:            Rectangle getBounds();
080:
081:            /**
082:             * Returns last notified insets. This means the last insets
083:             * reported by system event. Insets are margins around client area
084:             * ocupied by system provided decor, ususally border and titlebar.
085:             * @return last notified insets
086:             */
087:            Insets getInsets();
088:
089:            /**
090:             * Enables/disables processing of input (key, mouse) event
091:             * by window. If disabled input events are ignored.
092:             * @param value - if enabled
093:             */
094:            void setEnabled(boolean value);
095:
096:            /**
097:             * Sets the "focusable" window state.
098:             * @param value - if true makes window focusable
099:             */
100:            void setFocusable(boolean value);
101:
102:            /**
103:             *
104:             * @return current focusable window state
105:             */
106:            boolean isFocusable();
107:
108:            /**
109:             * Tries to set application input focus to the window or clear
110:             * current focus from focused window.
111:             *
112:             * <p/> For toplevel windows it's not gurantied focus will land in
113:             * desired window even if function returns true. Focus traversal should be tracked
114:             * by processing system events.
115:             *
116:             * @param focus  - if true sets focus, else clears focus
117:             * @return if success
118:             */
119:            boolean setFocus(boolean focus);
120:
121:            /**
122:             * Destroys the asscoiated window.
123:             * Attempts to use it thereafter can result in
124:             * unpredictable bechavior.
125:             */
126:            void dispose();
127:
128:            /**
129:             * Changes window Z-order to place this window under, If w is null
130:             * places places this window on the top. Z-order is per parent.
131:             * Toplevels a children of desktop in terms of Z-order.
132:             * @param w - window to place under.
133:             */
134:            void placeAfter(NativeWindow w);
135:
136:            /**
137:             * Places window on top of Z-order
138:             */
139:            void toFront();
140:
141:            /**
142:             * Places window on bottom of Z-order
143:             */
144:            void toBack();
145:
146:            /**
147:             * Makes the window resizable/not resizable by user
148:             * @param value - if resizable
149:             */
150:            void setResizable(boolean value);
151:
152:            /**
153:             * Sets the window caption
154:             * @param title - caption text
155:             */
156:            void setTitle(String title);
157:
158:            /**
159:             * Activate the mouse event capturing
160:             */
161:            void grabMouse();
162:
163:            /**
164:             * Deactivate mouse event capturing
165:             */
166:            void ungrabMouse();
167:
168:            /**
169:             * Set extended state for top-level window.
170:             *
171:             * @param state - new state, bitmask of ICONIFIED, MAXIMIZED_BOTH, etc.
172:             */
173:            void setState(int state);
174:
175:            /**
176:             * Set the image to be displayed in the minimized icon for
177:             * top-level [decorated] window.
178:             * @param image the icon image to be displayed
179:             */
180:            void setIconImage(Image image);
181:
182:            /**
183:             * Makes window top-most if value is true,
184:             * non-topmost(normal) otherwise.
185:             */
186:            void setAlwaysOnTop(boolean value);
187:
188:            /**
189:             * Set desired [top-level] window bounds when being in maximized state.
190:             * Fields set to Integer.MAX_VALUE are ignored[system-supplied values are
191:             * used instead]
192:             */
193:            void setMaximizedBounds(Rectangle bounds);
194:
195:            /**
196:             * Get absolute position on the screen
197:             */
198:            Point getScreenPos();
199:
200:            /**
201:             * Set a window "packed" flag:
202:             * the flag indicates that if insets change
203:             * client area shouldn't be resized, but frame
204:             * must be resized instead
205:             */
206:            void setPacked(boolean packed);
207:
208:            /**
209:             * Make window an "input method window" by setting
210:             * special window style, e. g. small title bar, no
211:             * close, minimize/maximize buttons. For internal
212:             * use by input method framework.
213:             *
214:             */
215:            void setIMStyle();
216:
217:            MultiRectArea getObscuredRegion(Rectangle part);
218:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.