summaryrefslogtreecommitdiff
path: root/sun
diff options
context:
space:
mode:
authorRoman Kennke <roman@kennke.org>2007-06-22 09:52:04 +0000
committerRoman Kennke <roman@kennke.org>2007-06-22 09:52:04 +0000
commit3f1a4e8cdf9c4efd500d3f49490cea5d16e35563 (patch)
treedf42925e77c347adc23d5ee88383bda78f876533 /sun
parentc811fcb3307525899e33413e083ef34b2282fc34 (diff)
downloadclasspath-3f1a4e8cdf9c4efd500d3f49490cea5d16e35563.tar.gz
2007-06-22 Roman Kennke <roman@kennke.org>
* sun/awt/CausedFocusEvent.java: New class. Needed for compatibility in java.awt.peer. * java/awt/Dialog.java (ModalExclusionType): New enum. (ModalityType): New enum. * java/awt/Toolkit.java (isModalExclusionTypeSupported): New abstract method. (isModalityTypeSupported): New abstract method. * java/awt/peer/ComponentPeer.java (requestFocus): New method. * java/awt/peer/FramePeer.java (getBoundsPrivate): New method. * java/awt/peer/RobotPeer.java (dispose): New method. * java/awt/peer/WindowPeer.java (setAlwaysOnTop): New method. (updateFocusableWindowState): New method. (setModalBlocked): New method. (updateMinimumSize): New method. (updateIconImages): New method. * gnu/java/awt/peer/GLightweightPeer.java (requestFocus): New method. * gnu/java/awt/peer/gtk/GdkRobotPeer.java (dispose): New method. * gnu/java/awt/peer/gtk/GtkComponentPeer.java (requestFocus): New method. * gnu/java/awt/peer/gtk/GtkFramePeer.java (getBoundsPrivate): New method. * gnu/java/awt/peer/gtk/GtkToolkit.java (isModalExclusionTypeSupported): New method. (isModalityTypeSupported): New method. * gnu/java/awt/peer/gtk/GtkWindowPeer.java (updateIconImages): New method. (updateMinimumSize): New method. (setModalBlocked): New method. (updateFocusableWindowState): New method. (setAlwaysOnTop): New method. * gnu/java/awt/peer/headless/HeadlessToolkit.java (isModalExclusionTypeSupported): New method. (isModalityTypeSupported): New method. * gnu/java/awt/peer/qt/QtComponentPeer.java (requestFocus): New method. * gnu/java/awt/peer/qt/QtFramePeer.java (getBoundsPrivate): New method. * gnu/java/awt/peer/qt/QtToolkit.java (isModalExclusionTypeSupported): New method. (isModalityTypeSupported): New method. * gnu/java/awt/peer/qt/QtWindowPeer.java (updateIconImages): New method. (updateMinimumSize): New method. (setModalBlocked): New method. (updateFocusableWindowState): New method. (setAlwaysOnTop): New method. * gnu/java/awt/peer/swing/SwingComponentPeer.java (requestFocus): New method. * gnu/java/awt/peer/swing/SwingToolkit.java (isModalExclusionTypeSupported): New method. (isModalityTypeSupported): New method. * gnu/java/awt/peer/swing/SwingWindowPeer.java (updateIconImages): New method. (updateMinimumSize): New method. (setModalBlocked): New method. (updateFocusableWindowState): New method. (setAlwaysOnTop): New method. * gnu/java/awt/peer/x/XFramePeer.java (getBoundsPrivate): New method. * gnu/java/awt/peer/x/XToolkit.java (isModalExclusionTypeSupported): New method. (isModalityTypeSupported): New method.
Diffstat (limited to 'sun')
-rw-r--r--sun/awt/CausedFocusEvent.java89
1 files changed, 89 insertions, 0 deletions
diff --git a/sun/awt/CausedFocusEvent.java b/sun/awt/CausedFocusEvent.java
new file mode 100644
index 000000000..6e0feb9a7
--- /dev/null
+++ b/sun/awt/CausedFocusEvent.java
@@ -0,0 +1,89 @@
+/* CausedFocusEvent.java -- A special focus event for peers.
+ Copyright (C) 2007 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package sun.awt;
+
+import java.awt.Component;
+import java.awt.event.FocusEvent;
+
+/**
+ * Special FocusEvent for peers. This has additional knowledge about the
+ * cause of the focus change.
+ */
+public class CausedFocusEvent
+extends FocusEvent
+{
+
+ public enum Cause
+ {
+ UNKNOWN,
+ MOUSE_EVENT,
+ TRAVERSAL,
+ TRAVERSAL_UP,
+ TRAVERSAL_DOWN,
+ TRAVERSAL_FORWARD,
+ TRAVERSAL_BACKWARD,
+ MANUAL_REQUEST,
+ AUTOMATIC_TRAVERSE,
+ ROLLBACK,
+ NATIVE_SYSTEM,
+ ACTIVATION,
+ CLEAR_GLOBAL_FOCUS_OWNER,
+ RETARGETED
+ }
+
+ /**
+ * The cause of the focus change.
+ */
+ private Cause cause;
+
+ public CausedFocusEvent(Component c, int id, boolean temporary,
+ Component opposite, Cause cause)
+ {
+ super(c, id, temporary, opposite);
+ if (cause == null)
+ {
+ cause = Cause.UNKNOWN;
+ }
+ this.cause = cause;
+ }
+
+ public Cause getCause()
+ {
+ return cause;
+ }
+}