summaryrefslogtreecommitdiffstats
path: root/libjava/java/awt/CheckboxMenuItem.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/CheckboxMenuItem.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/CheckboxMenuItem.java')
-rw-r--r--libjava/java/awt/CheckboxMenuItem.java28
1 files changed, 26 insertions, 2 deletions
diff --git a/libjava/java/awt/CheckboxMenuItem.java b/libjava/java/awt/CheckboxMenuItem.java
index 88218397c3c..4f41568218a 100644
--- a/libjava/java/awt/CheckboxMenuItem.java
+++ b/libjava/java/awt/CheckboxMenuItem.java
@@ -43,6 +43,7 @@ import java.awt.peer.MenuItemPeer;
import java.awt.peer.MenuComponentPeer;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
+import java.util.EventListener;
/**
* This class implements a menu item that has a checkbox on it indicating
@@ -51,8 +52,7 @@ import java.awt.event.ItemListener;
* @author Aaron M. Renn (arenn@urbanophile.com)
* @author Tom Tromey <tromey@redhat.com>
*/
-public class CheckboxMenuItem extends MenuItem implements ItemSelectable,
- java.io.Serializable
+public class CheckboxMenuItem extends MenuItem implements ItemSelectable
{
/*
@@ -296,5 +296,29 @@ paramString()
+ "," + super.paramString());
}
+ /**
+ * Returns an array of all the objects currently registered as FooListeners
+ * upon this <code>CheckboxMenuItem</code>. FooListeners are registered using
+ * the addFooListener method.
+ *
+ * @exception ClassCastException If listenerType doesn't specify a class or
+ * interface that implements java.util.EventListener.
+ */
+ public EventListener[] getListeners (Class listenerType)
+ {
+ if (listenerType == ItemListener.class)
+ return AWTEventMulticaster.getListeners (item_listeners, listenerType);
+
+ return super.getListeners (listenerType);
+ }
+
+ /**
+ * Returns an aray of all item listeners currently registered to this
+ * <code>CheckBoxMenuItem</code>.
+ */
+ public ItemListener[] getItemListeners ()
+ {
+ return (ItemListener[]) getListeners (ItemListener.class);
+ }
} // class CheckboxMenuItem
OpenPOWER on IntegriCloud