1 |
/* Container.java -- parent container class in AWT |
/* Container.java -- parent container class in AWT |
2 |
Copyright (C) 1999, 2000, 2002, 2003, 2004 Free Software Foundation |
Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005 Free Software Foundation |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
37 |
|
|
38 |
package java.awt; |
package java.awt; |
39 |
|
|
|
import java.awt.event.AWTEventListener; |
|
40 |
import java.awt.event.ContainerEvent; |
import java.awt.event.ContainerEvent; |
41 |
import java.awt.event.ContainerListener; |
import java.awt.event.ContainerListener; |
42 |
import java.awt.event.MouseEvent; |
import java.awt.event.MouseEvent; |
65 |
* list or bottom of the stacking order. |
* list or bottom of the stacking order. |
66 |
* |
* |
67 |
* @author original author unknown |
* @author original author unknown |
68 |
* @author Eric Blake <ebb9@email.byu.edu> |
* @author Eric Blake (ebb9@email.byu.edu) |
69 |
|
* @author Andrew John Hughes (gnu_andrew@member.fsf.org) |
70 |
* |
* |
71 |
* @since 1.0 |
* @since 1.0 |
72 |
* |
* |
73 |
* @status still missing 1.4 support |
* @status still missing 1.4 support, some generics from 1.5 |
74 |
*/ |
*/ |
75 |
public class Container extends Component |
public class Container extends Component |
76 |
{ |
{ |
1092 |
* |
* |
1093 |
* @since 1.4 |
* @since 1.4 |
1094 |
*/ |
*/ |
1095 |
public void setFocusTraversalKeys(int id, Set keystrokes) |
public void setFocusTraversalKeys(int id, |
1096 |
|
Set<? extends AWTKeyStroke> keystrokes) |
1097 |
{ |
{ |
1098 |
if (id != KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS && |
if (id != KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS && |
1099 |
id != KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS && |
id != KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS && |
1181 |
if (focusTraversalKeys == null) |
if (focusTraversalKeys == null) |
1182 |
focusTraversalKeys = new Set[3]; |
focusTraversalKeys = new Set[3]; |
1183 |
|
|
1184 |
keystrokes = Collections.unmodifiableSet (new HashSet (keystrokes)); |
keystrokes = |
1185 |
|
Collections.unmodifiableSet(new HashSet<AWTKeyStroke>(keystrokes)); |
1186 |
firePropertyChange (name, focusTraversalKeys[id], keystrokes); |
firePropertyChange (name, focusTraversalKeys[id], keystrokes); |
1187 |
|
|
1188 |
focusTraversalKeys[id] = keystrokes; |
focusTraversalKeys[id] = keystrokes; |
1200 |
* |
* |
1201 |
* @since 1.4 |
* @since 1.4 |
1202 |
*/ |
*/ |
1203 |
public Set getFocusTraversalKeys (int id) |
public Set<AWTKeyStroke> getFocusTraversalKeys (int id) |
1204 |
{ |
{ |
1205 |
if (id != KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS && |
if (id != KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS && |
1206 |
id != KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS && |
id != KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS && |