12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package sun.awt;
27
28 import sun.misc.Unsafe;
29
30 import javax.accessibility.AccessibleContext;
31 import java.awt.*;
32 import java.awt.dnd.DragSourceContext;
33 import java.awt.dnd.DropTargetContext;
34 import java.awt.dnd.peer.DragSourceContextPeer;
35 import java.awt.dnd.peer.DropTargetContextPeer;
36 import java.awt.event.InputEvent;
37 import java.awt.event.InvocationEvent;
38 import java.awt.event.KeyEvent;
39 import java.awt.geom.Point2D;
40 import java.awt.image.BufferStrategy;
41 import java.awt.peer.ComponentPeer;
42
43 import java.awt.peer.MenuComponentPeer;
44 import java.lang.reflect.InvocationTargetException;
45 import java.security.AccessControlContext;
46
47 import java.io.File;
48 import java.util.ResourceBundle;
49 import java.util.Vector;
50
51 /**
87 * Gets the bounds of this component in the form of a
88 * <code>Rectangle</code> object. The bounds specify this
89 * component's width, height, and location relative to
90 * its parent.
91 */
92 Rectangle getBounds(Component comp);
93 /*
94 * Sets the shape of a lw component to cut out from hw components.
95 *
96 * See 6797587, 6776743, 6768307, and 6768332 for details
97 */
98 void setMixingCutoutShape(Component comp, Shape shape);
99
100 /**
101 * Sets GraphicsConfiguration value for the component.
102 */
103 void setGraphicsConfiguration(Component comp, GraphicsConfiguration gc);
104 /*
105 * Requests focus to the component.
106 */
107 boolean requestFocus(Component comp, CausedFocusEvent.Cause cause);
108 /*
109 * Determines if the component can gain focus.
110 */
111 boolean canBeFocusOwner(Component comp);
112
113 /**
114 * Returns whether the component is visible without invoking
115 * any client code.
116 */
117 boolean isVisible(Component comp);
118
119 /**
120 * Sets the RequestFocusController.
121 */
122 void setRequestFocusController(RequestFocusController requestController);
123
124 /**
125 * Returns the appContext of the component.
126 */
127 AppContext getAppContext(Component comp);
421 int getExtendedState(Frame frame);
422 /*
423 * Gets the maximized bounds of this frame.
424 */
425 Rectangle getMaximizedBounds(Frame frame);
426 }
427
428 /**
429 * An interface of accessor for the java.awt.KeyboardFocusManager class.
430 */
431 public interface KeyboardFocusManagerAccessor {
432 /**
433 * Indicates whether the native implementation should
434 * proceed with a pending focus request for the heavyweight.
435 */
436 int shouldNativelyFocusHeavyweight(Component heavyweight,
437 Component descendant,
438 boolean temporary,
439 boolean focusedWindowChangeAllowed,
440 long time,
441 CausedFocusEvent.Cause cause);
442 /**
443 * Delivers focus for the lightweight descendant of the heavyweight
444 * synchronously.
445 */
446 boolean processSynchronousLightweightTransfer(Component heavyweight,
447 Component descendant,
448 boolean temporary,
449 boolean focusedWindowChangeAllowed,
450 long time);
451 /**
452 * Removes the last focus request for the heavyweight from the queue.
453 */
454 void removeLastFocusRequest(Component heavyweight);
455
456 /**
457 * Sets the most recent focus owner in the window.
458 */
459 void setMostRecentFocusOwner(Window window, Component component);
460
461 /**
|
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package sun.awt;
27
28 import sun.misc.Unsafe;
29
30 import javax.accessibility.AccessibleContext;
31 import java.awt.*;
32 import java.awt.event.FocusEvent.Cause;
33 import java.awt.dnd.DragSourceContext;
34 import java.awt.dnd.DropTargetContext;
35 import java.awt.dnd.peer.DragSourceContextPeer;
36 import java.awt.dnd.peer.DropTargetContextPeer;
37 import java.awt.event.InputEvent;
38 import java.awt.event.InvocationEvent;
39 import java.awt.event.KeyEvent;
40 import java.awt.geom.Point2D;
41 import java.awt.image.BufferStrategy;
42 import java.awt.peer.ComponentPeer;
43
44 import java.awt.peer.MenuComponentPeer;
45 import java.lang.reflect.InvocationTargetException;
46 import java.security.AccessControlContext;
47
48 import java.io.File;
49 import java.util.ResourceBundle;
50 import java.util.Vector;
51
52 /**
88 * Gets the bounds of this component in the form of a
89 * <code>Rectangle</code> object. The bounds specify this
90 * component's width, height, and location relative to
91 * its parent.
92 */
93 Rectangle getBounds(Component comp);
94 /*
95 * Sets the shape of a lw component to cut out from hw components.
96 *
97 * See 6797587, 6776743, 6768307, and 6768332 for details
98 */
99 void setMixingCutoutShape(Component comp, Shape shape);
100
101 /**
102 * Sets GraphicsConfiguration value for the component.
103 */
104 void setGraphicsConfiguration(Component comp, GraphicsConfiguration gc);
105 /*
106 * Requests focus to the component.
107 */
108 boolean requestFocus(Component comp, Cause cause);
109 /*
110 * Determines if the component can gain focus.
111 */
112 boolean canBeFocusOwner(Component comp);
113
114 /**
115 * Returns whether the component is visible without invoking
116 * any client code.
117 */
118 boolean isVisible(Component comp);
119
120 /**
121 * Sets the RequestFocusController.
122 */
123 void setRequestFocusController(RequestFocusController requestController);
124
125 /**
126 * Returns the appContext of the component.
127 */
128 AppContext getAppContext(Component comp);
422 int getExtendedState(Frame frame);
423 /*
424 * Gets the maximized bounds of this frame.
425 */
426 Rectangle getMaximizedBounds(Frame frame);
427 }
428
429 /**
430 * An interface of accessor for the java.awt.KeyboardFocusManager class.
431 */
432 public interface KeyboardFocusManagerAccessor {
433 /**
434 * Indicates whether the native implementation should
435 * proceed with a pending focus request for the heavyweight.
436 */
437 int shouldNativelyFocusHeavyweight(Component heavyweight,
438 Component descendant,
439 boolean temporary,
440 boolean focusedWindowChangeAllowed,
441 long time,
442 Cause cause);
443 /**
444 * Delivers focus for the lightweight descendant of the heavyweight
445 * synchronously.
446 */
447 boolean processSynchronousLightweightTransfer(Component heavyweight,
448 Component descendant,
449 boolean temporary,
450 boolean focusedWindowChangeAllowed,
451 long time);
452 /**
453 * Removes the last focus request for the heavyweight from the queue.
454 */
455 void removeLastFocusRequest(Component heavyweight);
456
457 /**
458 * Sets the most recent focus owner in the window.
459 */
460 void setMostRecentFocusOwner(Window window, Component component);
461
462 /**
|