summaryrefslogtreecommitdiffstats
path: root/libjava/java/awt/Window.java
diff options
context:
space:
mode:
authormkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-15 09:21:55 +0000
committermkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-15 09:21:55 +0000
commit97da26a07200506208144d5571c3d38e1b6147eb (patch)
tree7b1568d550111d47732726dd7a7f5bdc5e660ddf /libjava/java/awt/Window.java
parent552fa8a24cc6e8fd57a6ee0ab24e6444877bbb74 (diff)
downloadppe42-gcc-97da26a07200506208144d5571c3d38e1b6147eb.tar.gz
ppe42-gcc-97da26a07200506208144d5571c3d38e1b6147eb.zip
2003-02-15 Michael Koch <konqueror@gmx.de>
* java/awt/CheckboxMenuItem.java (CheckBoxMenuItem): Dont implement Serializable. (getListeners): New method, (getItemListeners): New method. * java/awt/Choice.java (getListeners): New method, (getItemListeners): New method. * java/awt/Container.java (getListeners): Added exception documentation. (setFocusTraversalKeys): Throw exceptions, added documentattion. (getFocusTraversalKeys): Added documentation. (areFocusTraversalKeysSet): Added documentation. (applyComponentOrientation): Added documentation. * java/awt/ContainerOrderFocusTraversalPolicy.java (implicitDownCycleTraversal): Renamed from downCycle for serialization. (ContainerOrderFocusTraversalPolicy): Added documentation. (accept): Reformated. * java/awt/Dialog.java (Dialog): Dont implement Serializable. (Dialog): Added documentation. * java/awt/Font.java (Font): Dont use absolute class name. * java/awt/Frame.java (Frame): Font implement Serializable. * java/awt/List.java (getListeners): New method, (getActionListeners): New method. (getItemListeners): New method. * java/awt/Menu.java (countItems): New deprecated method. * java/awt/Scrollbar.java (getListeners): New method, (getAdjustmentListeners): New method, * java/awt/TextComponent.java (getListeners): New method, (getTextListeners): New method, * java/awt/TextField.java (getListeners): New method, (getActionListeners): New method. * java/awt/Window.java (windowFocusListener): New member variable. (windowStateListener): New member variable. (getWindowFocusListeners): New method. (getWindowStateListeners): New method. (addWindowFocusListener): New method. (addWindowStateListener): New method. (removeWindowFocusListener): New method. (removeWindowStateListener): New method. * java/awt/datatransfer/DataFlavor.java (isRepresentationClassByteBuffer): New method. (isRepresentationClassCharBuffer): New method. (isRepresentationClassReader): New method. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62933 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/awt/Window.java')
-rw-r--r--libjava/java/awt/Window.java66
1 files changed, 66 insertions, 0 deletions
diff --git a/libjava/java/awt/Window.java b/libjava/java/awt/Window.java
index dbfe92c71b8..805152e5405 100644
--- a/libjava/java/awt/Window.java
+++ b/libjava/java/awt/Window.java
@@ -39,7 +39,9 @@ exception statement from your version. */
package java.awt;
import java.awt.event.WindowEvent;
+import java.awt.event.WindowFocusListener;
import java.awt.event.WindowListener;
+import java.awt.event.WindowStateListener;
import java.awt.peer.WindowPeer;
import java.awt.peer.ComponentPeer;
import java.util.EventListener;
@@ -61,6 +63,8 @@ public class Window extends Container
private int windowSerializedDataVersion = 0; // FIXME
private transient WindowListener windowListener;
+ private transient WindowFocusListener windowFocusListener;
+ private transient WindowStateListener windowStateListener;
private transient GraphicsConfiguration graphicsConfiguration;
/**
@@ -381,6 +385,68 @@ public class Window extends Container
}
/**
+ * Returns an array of all the window focus listeners registered on this
+ * window.
+ *
+ * @since 1.4
+ */
+ public synchronized WindowFocusListener[] getWindowFocusListeners()
+ {
+ return (WindowFocusListener[])
+ AWTEventMulticaster.getListeners(windowFocusListener,
+ WindowFocusListener.class);
+ }
+
+ /**
+ * Returns an array of all the window state listeners registered on this
+ * window.
+ *
+ * @since 1.4
+ */
+ public synchronized WindowStateListener[] getWindowStateListeners()
+ {
+ return (WindowStateListener[])
+ AWTEventMulticaster.getListeners(windowStateListener,
+ WindowStateListener.class);
+ }
+
+ /**
+ * Adds the specified listener to this window.
+ */
+ public void addWindowFocusListener (WindowFocusListener wfl)
+ {
+ AWTEventMulticaster.add (windowFocusListener, wfl);
+ }
+
+ /**
+ * Adds the specified listener to this window.
+ *
+ * @since 1.4
+ */
+ public void addWindowStateListener (WindowStateListener wsl)
+ {
+ AWTEventMulticaster.add (windowStateListener, wsl);
+ }
+
+ /**
+ * Removes the specified listener from this window.
+ */
+ public void removeWindowFocusListener (WindowFocusListener wfl)
+ {
+ AWTEventMulticaster.remove (windowFocusListener, wfl);
+ }
+
+ /**
+ * Removes the specified listener from this window.
+ *
+ * @since 1.4
+ */
+ public void removeWindowStateListener (WindowStateListener wsl)
+ {
+ AWTEventMulticaster.remove (windowStateListener, wsl);
+ }
+
+ /**
* Returns an array of all the objects currently registered as FooListeners
* upon this Window. FooListeners are registered using the addFooListener
* method.
OpenPOWER on IntegriCloud