From 8aa540d2f783474d1d2e06f16744bf67b9c1facc Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Fri, 10 Mar 2006 21:46:48 +0000 Subject: Imported GNU Classpath 0.90 Imported GNU Classpath 0.90 * scripts/makemake.tcl: Set gnu/java/awt/peer/swing to ignore. * gnu/classpath/jdwp/VMFrame.java (SIZE): New constant. * java/lang/VMCompiler.java: Use gnu.java.security.hash.MD5. * java/lang/Math.java: New override file. * java/lang/Character.java: Merged from Classpath. (start, end): Now 'int's. (canonicalName): New field. (CANONICAL_NAME, NO_SPACES_NAME, CONSTANT_NAME): New constants. (UnicodeBlock): Added argument. (of): New overload. (forName): New method. Updated unicode blocks. (sets): Updated. * sources.am: Regenerated. * Makefile.in: Likewise. From-SVN: r111942 --- libjava/classpath/java/awt/Choice.java | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) (limited to 'libjava/classpath/java/awt/Choice.java') diff --git a/libjava/classpath/java/awt/Choice.java b/libjava/classpath/java/awt/Choice.java index df93c5b..2e55d19 100644 --- a/libjava/classpath/java/awt/Choice.java +++ b/libjava/classpath/java/awt/Choice.java @@ -468,15 +468,16 @@ getSelectedIndex() public synchronized void select(int index) { - if ((index < 0) || (index > getItemCount())) + if ((index < 0) || (index >= getItemCount())) throw new IllegalArgumentException("Bad index: " + index); - this.selectedIndex = index; - if (peer != null) - { + if (pItems.size() > 0) { + selectedIndex = index; ChoicePeer cp = (ChoicePeer) peer; - cp.select (index); - } + if (cp != null) { + cp.select(index); + } + } } /*************************************************************************/ @@ -573,18 +574,6 @@ processItemEvent(ItemEvent event) item_listeners.itemStateChanged(event); } -void -dispatchEventImpl(AWTEvent e) -{ - if (e.id <= ItemEvent.ITEM_LAST - && e.id >= ItemEvent.ITEM_FIRST - && (item_listeners != null - || (eventMask & AWTEvent.ITEM_EVENT_MASK) != 0)) - processEvent(e); - else - super.dispatchEventImpl(e); -} - /*************************************************************************/ /** -- cgit v1.1