Source Code Cross Referenced for ComponentInternals.java in  » Apache-Harmony-Java-SE » org-package » org » apache » harmony » awt » 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 
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 Pavel Dolgov
019:         * @version $Revision$
020:         */package org.apache.harmony.awt;
021:
022:        import java.awt.Component;
023:        import java.awt.Container;
024:        import java.awt.Dialog;
025:        import java.awt.Dimension;
026:        import java.awt.Image;
027:        import java.awt.Insets;
028:        import java.awt.Point;
029:        import java.awt.Rectangle;
030:        import java.awt.Window;
031:        import java.awt.Choice;
032:        import java.lang.reflect.InvocationTargetException;
033:
034:        import org.apache.harmony.awt.gl.MultiRectArea;
035:        import org.apache.harmony.awt.text.TextFieldKit;
036:        import org.apache.harmony.awt.text.TextKit;
037:        import org.apache.harmony.awt.wtk.NativeWindow;
038:
039:        /**
040:         *  The accessor to AWT private API
041:         */
042:        public abstract class ComponentInternals {
043:
044:            /**
045:             * @return the ComponentInternals instance to serve the requests
046:             */
047:            public static ComponentInternals getComponentInternals() {
048:                return ContextStorage.getComponentInternals();
049:            }
050:
051:            /**
052:             * This method must be called by AWT to establish the connection
053:             * @param internals - implementation of ComponentInternals created by AWT
054:             */
055:            public static void setComponentInternals(
056:                    ComponentInternals internals) {
057:                ContextStorage.setComponentInternals(internals);
058:            }
059:
060:            /**
061:             * The accessor to native resource connected to a component.
062:             * It returns non-<code>null</code> value only if component
063:             * already has the native resource
064:             */
065:            public abstract NativeWindow getNativeWindow(Component component);
066:
067:            /**
068:             * Connect Window object to existing native resource
069:             * @param nativeWindowId - id of native window to attach
070:             * @return Window object with special behaviour that
071:             * restricts manupulation with that window
072:             */
073:            public abstract Window attachNativeWindow(long nativeWindowId);
074:
075:            /**
076:             * Start mouse grab in "client" mode.
077:             * All mouse events in AWT components will be reported as usual,
078:             * mouse events that occured outside of AWT components will be sent to
079:             * the window passed as grabWindow parameter. When mouse grab is canceled
080:             * (because of click in non-AWT window or by task switching)
081:             * the whenCanceled callback is called
082:             *
083:             * @param grabWindow - window that will own the grab
084:             * @param whenCanceled - callback called when grab is canceled by user's action
085:             */
086:            public abstract void startMouseGrab(Window grabWindow,
087:                    Runnable whenCanceled);
088:
089:            /**
090:             * End mouse grab and resume normal processing of mouse events
091:             */
092:            public abstract void endMouseGrab();
093:
094:            /**
095:             * Set the <code>popup</code> flag of the window to true.
096:             * This window won't be controlled by window manager on Linux.
097:             * Call this method before the window is shown first time
098:             * @param window - the window that should become popup one
099:             */
100:            public abstract void makePopup(Window window);
101:
102:            /**
103:             * This method must be called by Graphics at the beginning of drawImage()
104:             * to store image drawing parameters (defined by application developer) in component
105:             *
106:             * @param comp - component that draws the image
107:             * @param image - image to be drawn
108:             * @param destLocation - location of the image upon the component's surface. Never null.
109:             * @param destSize - size of the component's area to be filled with the image.
110:             *                  Equals to null if size parameters omitted in drawImage.
111:             * @param source - area of the image to be drawn on the component.
112:             *                  Equals to null if src parameters omitted in drawImage.
113:             */
114:            public abstract void onDrawImage(Component comp, Image image,
115:                    Point destLocation, Dimension destSize, Rectangle source);
116:
117:            /**
118:             * Sets system's caret position.
119:             * This method should be called by text component to synchronize our caret position
120:             * with system's caret position.
121:             * @param x
122:             * @param y
123:             */
124:            public abstract void setCaretPos(Component c, int x, int y);
125:
126:            /**
127:             * NEVER USE IT. FORGET IT. IT DOES NOT EXIST.
128:             * See Toolkit.unsafeInvokeAndWait(Runnable).
129:             *
130:             * Accessor for Toolkit.unsafeInvokeAndWait(Runnable) method.
131:             * For use in exceptional cases only.
132:             * Read comments for Toolkit.unsafeInvokeAndWait(Runnable) before use.
133:             */
134:            public abstract void unsafeInvokeAndWait(Runnable runnable)
135:                    throws InterruptedException, InvocationTargetException;
136:
137:            public abstract TextKit getTextKit(Component comp);
138:
139:            public abstract void setTextKit(Component comp, TextKit kit);
140:
141:            public abstract TextFieldKit getTextFieldKit(Component comp);
142:
143:            public abstract void setTextFieldKit(Component comp,
144:                    TextFieldKit kit);
145:
146:            /**
147:             * Terminate event dispatch thread, completely destroy AWT context.<br>
148:             * Intended for multi-context mode, in single-context mode does nothing.
149:             *
150:             */
151:            public abstract void shutdown();
152:
153:            /**
154:             * Sets mouse events preprocessor for event queue
155:             */
156:            public abstract void setMouseEventPreprocessor(
157:                    MouseEventPreprocessor preprocessor);
158:
159:            /**
160:             * Create customized Choice using style
161:             */
162:            public abstract Choice createCustomChoice(ChoiceStyle style);
163:
164:            public abstract Insets getNativeInsets(Window w);
165:
166:            /**
167:             * Region to be repainted (could be null). Use this in overridden repaint()
168:             */
169:            public abstract MultiRectArea getRepaintRegion(Component c);
170:
171:            public abstract MultiRectArea subtractPendingRepaintRegion(
172:                    Component c, MultiRectArea mra);
173:
174:            /**
175:             * Returns true if the window was at least once painted due to native paint events
176:             */
177:            public abstract boolean wasPainted(Window w);
178:
179:            /**
180:             * The component's region hidden behind top-level windows
181:             * (belonging to both this Java app and all other apps), and behind
182:             * heavyweight components overlapping with passed component
183:             */
184:            public abstract MultiRectArea getObscuredRegion(Component c);
185:
186:            /**
187:             * An accessor to Container.addObscuredRegions() method
188:             * @see java.awt.Container#addObscuredRegions(MultiRectArea, Component)
189:             */
190:            public abstract void addObscuredRegions(MultiRectArea mra,
191:                    Component c, Container container);
192:
193:            /**
194:             * Makes it possible to call protected Toolkit.setDesktopProperty()
195:             * method from any class outside of java.awt package
196:             */
197:            public abstract void setDesktopProperty(String name, Object value);
198:
199:            /**
200:             * Makes it possible to start/stop dialog modal loop
201:             * from anywhere outside of java.awt package
202:             */
203:            public abstract void runModalLoop(Dialog dlg);
204:
205:            public abstract void endModalLoop(Dialog dlg);
206:
207:            /**
208:             * Sets component's visible flag only
209:             * (the component is not actually shown/hidden)
210:             */
211:            public abstract void setVisibleFlag(Component comp, boolean visible);
212:
213:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.