]> gcc.gnu.org Git - gcc.git/blob - libjava/javax/swing/JPopupMenu.java
[multiple changes]
[gcc.git] / libjava / javax / swing / JPopupMenu.java
1 /* JPopupMenu.java
2 Copyright (C) 2002, 2004 Free Software Foundation, Inc.
3
4 This file is part of GNU Classpath.
5
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 02111-1307 USA.
20
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
24 combination.
25
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module. An independent module is a module which is not derived from
33 or based on this library. If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so. If you do not wish to do so, delete this
36 exception statement from your version. */
37
38 package javax.swing;
39
40 import java.awt.BorderLayout;
41 import java.awt.Component;
42 import java.awt.Container;
43 import java.awt.Dimension;
44 import java.awt.Frame;
45 import java.awt.Graphics;
46 import java.awt.GridBagConstraints;
47 import java.awt.GridBagLayout;
48 import java.awt.Insets;
49 import java.awt.LayoutManager;
50 import java.awt.Panel;
51 import java.awt.Point;
52 import java.awt.Window;
53 import java.awt.event.KeyEvent;
54 import java.awt.event.MouseEvent;
55 import java.beans.PropertyChangeListener;
56 import java.io.IOException;
57 import java.io.ObjectInputStream;
58 import java.io.ObjectOutputStream;
59 import java.util.EventListener;
60 import java.util.Vector;
61 import javax.accessibility.Accessible;
62 import javax.accessibility.AccessibleContext;
63 import javax.accessibility.AccessibleRole;
64 import javax.swing.event.PopupMenuEvent;
65 import javax.swing.event.PopupMenuListener;
66 import javax.swing.plaf.PopupMenuUI;
67
68
69 /**
70 * DOCUMENT ME!
71 *
72 * @author $author$
73 * @version $Revision: 1.3.8.3 $
74 */
75 public class JPopupMenu extends JComponent implements Accessible, MenuElement
76 {
77 private static final String uiClassID = "PopupMenuUI";
78 private static final Object defaultLWPopupEnabledKey = null;
79 private static boolean defaultLWPopupEnabled = true;
80 transient Component invoker;
81 private int locationX;
82 private int locationY;
83 private String label;
84 private boolean paintBorder;
85 private Insets margin;
86 private boolean lightWeightPopupEnabled;
87 private SingleSelectionModel selectionModel;
88 private transient Popup popup;
89 private Point location;
90
91 /**
92 * Creates a new JPopupMenu object.
93 */
94 public JPopupMenu()
95 {
96 updateUI();
97
98 lightWeightPopupEnabled = defaultLWPopupEnabled;
99 selectionModel = new DefaultSingleSelectionModel();
100 }
101
102 /**
103 * Creates a new JPopupMenu object.
104 *
105 * @param label DOCUMENT ME!
106 */
107 public JPopupMenu(String label)
108 {
109 this.label = label;
110 }
111
112 /**
113 * DOCUMENT ME!
114 *
115 * @param stream DOCUMENT ME!
116 *
117 * @throws IOException DOCUMENT ME!
118 * @throws ClassNotFoundException DOCUMENT ME!
119 */
120 private void readObject(ObjectInputStream stream)
121 throws IOException, ClassNotFoundException
122 {
123 }
124
125 /**
126 * DOCUMENT ME!
127 *
128 * @param stream DOCUMENT ME!
129 *
130 * @throws IOException DOCUMENT ME!
131 */
132 private void writeObject(ObjectOutputStream stream) throws IOException
133 {
134 }
135
136 /**
137 * DOCUMENT ME!
138 *
139 * @param item DOCUMENT ME!
140 *
141 * @return DOCUMENT ME!
142 */
143 public JMenuItem add(JMenuItem item)
144 {
145 this.insert(item, -1);
146 return item;
147 }
148
149 /**
150 * DOCUMENT ME!
151 *
152 * @param text DOCUMENT ME!
153 *
154 * @return DOCUMENT ME!
155 */
156 public JMenuItem add(String text)
157 {
158 JMenuItem item = new JMenuItem(text);
159 return add(item);
160 }
161
162 /**
163 * DOCUMENT ME!
164 *
165 * @param action DOCUMENT ME!
166 *
167 * @return DOCUMENT ME!
168 */
169 public JMenuItem add(Action action)
170 {
171 JMenuItem item = new JMenuItem(action);
172 return add(item);
173 }
174
175 /**
176 * DOCUMENT ME!
177 *
178 * @param index DOCUMENT ME!
179 */
180 public void remove(int index)
181 {
182 super.remove(index);
183
184 GridBagConstraints constraints = new GridBagConstraints();
185 constraints.fill = GridBagConstraints.HORIZONTAL;
186 constraints.weightx = 100.0;
187 constraints.weighty = 100.0;
188
189 Component[] items = getComponents();
190 for (int i = index; i < items.length; i++)
191 {
192 constraints.gridy = i;
193 super.add(items[i], constraints, i);
194 }
195 }
196
197 /**
198 * DOCUMENT ME!
199 *
200 * @param action DOCUMENT ME!
201 * @param index DOCUMENT ME!
202 */
203 public void insert(Action action, int index)
204 {
205 JMenuItem item = new JMenuItem(action);
206 this.insert(item, index);
207 }
208
209 /**
210 * DOCUMENT ME!
211 *
212 * @param component DOCUMENT ME!
213 * @param index DOCUMENT ME!
214 */
215 public void insert(Component component, int index)
216 {
217 GridBagConstraints constraints = new GridBagConstraints();
218 constraints.fill = GridBagConstraints.HORIZONTAL;
219 constraints.weightx = 100.0;
220 constraints.weighty = 100.0;
221
222 if (index == -1)
223 index = getComponents().length;
224
225 constraints.gridy = index;
226 super.add(component, constraints, index);
227
228 // need to change constraints for the components that were moved by 1
229 // due to the insertion
230 if (index != -1)
231 {
232 Component[] items = getComponents();
233
234 for (int i = index + 1; i < items.length; i++)
235 {
236 constraints.gridy = i;
237 super.add(items[i], constraints, i);
238 }
239 }
240 }
241
242 /**
243 * DOCUMENT ME!
244 *
245 * @param graphics DOCUMENT ME!
246 */
247 protected void paintBorder(Graphics graphics)
248 {
249 if (paintBorder)
250 getBorder().paintBorder(this, graphics, 0, 0, getSize(null).width,
251 getSize(null).height);
252 }
253
254 /**
255 * DOCUMENT ME!
256 *
257 * @return DOCUMENT ME!
258 */
259 public static boolean getDefaultLightWeightPopupEnabled()
260 {
261 return defaultLWPopupEnabled;
262 }
263
264 /**
265 * DOCUMENT ME!
266 *
267 * @param enabled DOCUMENT ME!
268 */
269 public static void setDefaultLightWeightPopupEnabled(boolean enabled)
270 {
271 defaultLWPopupEnabled = enabled;
272 }
273
274 /**
275 * DOCUMENT ME!
276 *
277 * @return DOCUMENT ME!
278 */
279 public PopupMenuUI getUI()
280 {
281 return (PopupMenuUI) ui;
282 }
283
284 /**
285 * DOCUMENT ME!
286 *
287 * @param ui DOCUMENT ME!
288 */
289 public void setUI(PopupMenuUI ui)
290 {
291 super.setUI(ui);
292 }
293
294 /**
295 * DOCUMENT ME!
296 */
297 public void updateUI()
298 {
299 setUI((PopupMenuUI) UIManager.getUI(this));
300 invalidate();
301 }
302
303 /**
304 * DOCUMENT ME!
305 *
306 * @return DOCUMENT ME!
307 */
308 public String getUIClassID()
309 {
310 return "PopupMenuUI";
311 }
312
313 /**
314 * DOCUMENT ME!
315 *
316 * @return DOCUMENT ME!
317 */
318 public SingleSelectionModel getSelectionModel()
319 {
320 return selectionModel;
321 }
322
323 /**
324 * DOCUMENT ME!
325 *
326 * @param model DOCUMENT ME!
327 */
328 public void setSelectionModel(SingleSelectionModel model)
329 {
330 if (selectionModel != model)
331 {
332 SingleSelectionModel oldModel = this.selectionModel;
333 }
334 }
335
336 /**
337 * DOCUMENT ME!
338 *
339 * @param action DOCUMENT ME!
340 *
341 * @return DOCUMENT ME!
342 */
343 protected JMenuItem createActionComponent(Action action)
344 {
345 return null;
346 }
347
348 /**
349 * DOCUMENT ME!
350 *
351 * @param item DOCUMENT ME!
352 *
353 * @return DOCUMENT ME!
354 */
355 protected PropertyChangeListener createActionChangeListener(JMenuItem item)
356 {
357 return null;
358 }
359
360 /**
361 * DOCUMENT ME!
362 *
363 * @return DOCUMENT ME!
364 */
365 public boolean isLightWeightPopupEnabled()
366 {
367 return lightWeightPopupEnabled;
368 }
369
370 /**
371 * DOCUMENT ME!
372 *
373 * @param enabled DOCUMENT ME!
374 */
375 public void setLightWeightPopupEnabled(boolean enabled)
376 {
377 lightWeightPopupEnabled = enabled;
378 }
379
380 /**
381 * DOCUMENT ME!
382 *
383 * @return DOCUMENT ME!
384 */
385 public String getLabel()
386 {
387 return label;
388 }
389
390 /**
391 * DOCUMENT ME!
392 *
393 * @param label DOCUMENT ME!
394 */
395 public void setLabel(String label)
396 {
397 this.label = label;
398 }
399
400 /**
401 * DOCUMENT ME!
402 */
403 public void addSeparator()
404 {
405 }
406
407 /**
408 * DOCUMENT ME!
409 *
410 * @param listener DOCUMENT ME!
411 */
412 public void addPopupMenuListener(PopupMenuListener listener)
413 {
414 listenerList.add(PopupMenuListener.class, listener);
415 }
416
417 /**
418 * DOCUMENT ME!
419 *
420 * @param listener DOCUMENT ME!
421 */
422 public void removePopupMenuListener(PopupMenuListener listener)
423 {
424 listenerList.remove(PopupMenuListener.class, listener);
425 }
426
427 /**
428 * DOCUMENT ME!
429 */
430 protected void firePopupMenuWillBecomeVisible()
431 {
432 EventListener[] ll = listenerList.getListeners(PopupMenuListener.class);
433
434 for (int i = 0; i < ll.length; i++)
435 ((PopupMenuListener) ll[i]).popupMenuWillBecomeVisible(new PopupMenuEvent(this));
436 }
437
438 /**
439 * DOCUMENT ME!
440 */
441 protected void firePopupMenuWillBecomeInvisible()
442 {
443 EventListener[] ll = listenerList.getListeners(PopupMenuListener.class);
444
445 for (int i = 0; i < ll.length; i++)
446 ((PopupMenuListener) ll[i]).popupMenuWillBecomeInvisible(new PopupMenuEvent(this));
447 }
448
449 /**
450 * DOCUMENT ME!
451 */
452 protected void firePopupMenuCanceled()
453 {
454 EventListener[] ll = listenerList.getListeners(PopupMenuListener.class);
455
456 for (int i = 0; i < ll.length; i++)
457 ((PopupMenuListener) ll[i]).popupMenuCanceled(new PopupMenuEvent(this));
458 }
459
460 /**
461 * DOCUMENT ME!
462 */
463 public void pack()
464 {
465 }
466
467 /**
468 * DOCUMENT ME!
469 *
470 * @return DOCUMENT ME!
471 */
472 public boolean isVisible()
473 {
474 return super.visible;
475 }
476
477 /**
478 * DOCUMENT ME!
479 *
480 * @param visible DOCUMENT ME!
481 */
482 public void setVisible(boolean visible)
483 {
484 super.visible = visible;
485
486 firePopupMenuWillBecomeVisible();
487
488 if (visible)
489 {
490 Container rootContainer = (Container) SwingUtilities.getRoot(invoker);
491
492 boolean fit = true;
493 Dimension size;
494
495 // Determine the size of the popup menu
496 if (this.getSize().width == 0 && this.getSize().width == 0)
497 size = this.getPreferredSize();
498 else
499 size = this.getSize();
500
501 if ((size.width > (rootContainer.getWidth() - locationX))
502 || (size.height > (rootContainer.getHeight() - locationY)))
503 fit = false;
504
505 if (lightWeightPopupEnabled && fit)
506 popup = new LightWeightPopup(this);
507 else
508 {
509 if (fit)
510 popup = new MediumWeightPopup(this);
511 else
512 popup = new HeavyWeightPopup(this);
513 }
514
515 if (popup instanceof LightWeightPopup
516 || popup instanceof MediumWeightPopup)
517 {
518 JLayeredPane layeredPane;
519 layeredPane = SwingUtilities.getRootPane(invoker).getLayeredPane();
520 Point lp = layeredPane.getLocationOnScreen();
521 Point r = SwingUtilities.getRoot(invoker).getLocationOnScreen();
522 int px = locationX - (lp.x - r.x);
523 int py = locationY - (lp.y - r.y);
524 popup.show(px, py, size.width, size.height);
525 }
526 else
527 popup.show(locationX, locationY, size.width, size.height);
528 }
529 else
530 {
531 firePopupMenuWillBecomeInvisible();
532 popup.hide();
533 }
534 }
535
536 /**
537 * DOCUMENT ME!
538 *
539 * @param x DOCUMENT ME!
540 * @param y DOCUMENT ME!
541 */
542 public void setLocation(int x, int y)
543 {
544 locationX = x;
545 locationY = y;
546 }
547
548 /**
549 * DOCUMENT ME!
550 *
551 * @return DOCUMENT ME!
552 */
553 private boolean isPopupMenu()
554 {
555 return true;
556 }
557
558 /**
559 * DOCUMENT ME!
560 *
561 * @return DOCUMENT ME!
562 */
563 public Component getInvoker()
564 {
565 return invoker;
566 }
567
568 /**
569 * DOCUMENT ME!
570 *
571 * @param component DOCUMENT ME!
572 */
573 public void setInvoker(Component component)
574 {
575 invoker = component;
576 }
577
578 /**
579 * DOCUMENT ME!
580 *
581 * @param component DOCUMENT ME!
582 * @param x DOCUMENT ME!
583 * @param y DOCUMENT ME!
584 */
585 public void show(Component component, int x, int y)
586 {
587 setInvoker(component);
588
589 Point rootOnScreen;
590 rootOnScreen = SwingUtilities.getRoot(invoker).getLocationOnScreen();
591 Point invokerOnScreen = invoker.getLocationOnScreen();
592
593 int popupX = (invokerOnScreen.x - rootOnScreen.x) + x;
594 int popupY = (invokerOnScreen.y - rootOnScreen.y) + y;
595
596 setLocation(popupX , popupY);
597 setVisible(true);
598 }
599
600 /**
601 * DOCUMENT ME!
602 *
603 * @return DOCUMENT ME!
604 */
605 JPopupMenu getRootPopupMenu()
606 {
607 return null;
608 }
609
610 /**
611 * DOCUMENT ME!
612 *
613 * @param index DOCUMENT ME!
614 *
615 * @return DOCUMENT ME!
616 */
617 public Component getComponentAtIndex(int index)
618 {
619 return getComponent(index);
620 }
621
622 /**
623 * DOCUMENT ME!
624 *
625 * @param component DOCUMENT ME!
626 *
627 * @return DOCUMENT ME!
628 */
629 public int getComponentIndex(Component component)
630 {
631 Component[] items = getComponents();
632
633 for (int i = 0; i < items.length; i++)
634 {
635 if (items[i].equals(component))
636 return i;
637 }
638
639 return -1;
640 }
641
642 /**
643 * DOCUMENT ME!
644 *
645 * @param size DOCUMENT ME!
646 */
647 public void setPopupSize(Dimension size)
648 {
649 super.setSize(size);
650 }
651
652 /**
653 * DOCUMENT ME!
654 *
655 * @param x DOCUMENT ME!
656 * @param y DOCUMENT ME!
657 */
658 public void setPopupSize(int x, int y)
659 {
660 super.setSize(x, y);
661 }
662
663 /**
664 * DOCUMENT ME!
665 *
666 * @param selected DOCUMENT ME!
667 */
668 public void setSelected(Component selected)
669 {
670 int index = getComponentIndex(selected);
671 selectionModel.setSelectedIndex(index);
672 }
673
674 /**
675 * DOCUMENT ME!
676 *
677 * @return DOCUMENT ME!
678 */
679 public boolean isBorderPainted()
680 {
681 return paintBorder;
682 }
683
684 /**
685 * DOCUMENT ME!
686 *
687 * @param painted DOCUMENT ME!
688 */
689 public void setBorderPainted(boolean painted)
690 {
691 paintBorder = painted;
692 }
693
694 /**
695 * DOCUMENT ME!
696 *
697 * @return DOCUMENT ME!
698 */
699 public Insets getMargin()
700 {
701 return margin;
702 }
703
704 /**
705 * DOCUMENT ME!
706 *
707 * @return DOCUMENT ME!
708 */
709 protected String paramString()
710 {
711 return "JPopupMenu";
712 }
713
714 /**
715 * DOCUMENT ME!
716 *
717 * @param event DOCUMENT ME!
718 * @param path DOCUMENT ME!
719 * @param manager DOCUMENT ME!
720 */
721 public void processMouseEvent(MouseEvent event, MenuElement[] path,
722 MenuSelectionManager manager)
723 {
724 }
725
726 /**
727 * DOCUMENT ME!
728 *
729 * @param event DOCUMENT ME!
730 * @param path DOCUMENT ME!
731 * @param manager DOCUMENT ME!
732 */
733 public void processKeyEvent(KeyEvent event, MenuElement[] path,
734 MenuSelectionManager manager)
735 {
736 }
737
738 /**
739 * DOCUMENT ME!
740 *
741 * @param changed DOCUMENT ME!
742 */
743 public void menuSelectionChanged(boolean changed)
744 {
745 }
746
747 /**
748 * DOCUMENT ME!
749 *
750 * @return DOCUMENT ME!
751 */
752 public MenuElement[] getSubElements()
753 {
754 Component[] items = getComponents();
755 MenuElement[] subElements = new MenuElement[items.length];
756
757 for (int i = 0; i < items.length; i++)
758 subElements[i] = (MenuElement) items[i];
759
760 return subElements;
761 }
762
763 /**
764 * DOCUMENT ME!
765 *
766 * @return DOCUMENT ME!
767 */
768 public Component getComponent()
769 {
770 return this;
771 }
772
773 /**
774 * DOCUMENT ME!
775 *
776 * @param event DOCUMENT ME!
777 *
778 * @return DOCUMENT ME!
779 */
780 public boolean isPopupTrigger(MouseEvent event)
781 {
782 return ((PopupMenuUI)getUI()).isPopupTrigger(event);
783
784 }
785
786 /**
787 * DOCUMENT ME!
788 *
789 * @return DOCUMENT ME!
790 */
791 public AccessibleContext getAccessibleContext()
792 {
793 if (accessibleContext == null)
794 accessibleContext = new AccessibleJPopupMenu(this);
795
796 return accessibleContext;
797 }
798
799 /**
800 * DOCUMENT ME!
801 *
802 * @author $author$
803 * @version $Revision: 1.3.8.3 $
804 */
805 private interface Popup
806 {
807 /**
808 * DOCUMENT ME!
809 *
810 * @param x DOCUMENT ME!
811 * @param y DOCUMENT ME!
812 * @param width DOCUMENT ME!
813 * @param height DOCUMENT ME!
814 */
815 void show(int x, int y, int width, int height);
816
817 /**
818 * DOCUMENT ME!
819 */
820 void hide();
821 }
822
823 /**
824 * DOCUMENT ME!
825 *
826 * @author $author$
827 * @version $Revision: 1.3.8.3 $
828 */
829 private class LightWeightPopup extends JPanel implements Popup
830 {
831 /**
832 * Creates a new LightWeightPopup object.
833 *
834 * @param c DOCUMENT ME!
835 */
836 public LightWeightPopup(Container c)
837 {
838 this.add(c);
839 }
840
841 /**
842 * DOCUMENT ME!
843 *
844 * @param x DOCUMENT ME!
845 * @param y DOCUMENT ME!
846 * @param width DOCUMENT ME!
847 * @param height DOCUMENT ME!
848 */
849 public void show(int x, int y, int width, int height)
850 {
851 JLayeredPane layeredPane;
852 layeredPane = SwingUtilities.getRootPane(invoker).getLayeredPane();
853 this.setBounds(x, y, width, height);
854 layeredPane.add(this, JLayeredPane.POPUP_LAYER, 0);
855 }
856
857 /**
858 * DOCUMENT ME!
859 */
860 public void hide()
861 {
862 JLayeredPane layeredPane;
863 layeredPane = SwingUtilities.getRootPane(invoker).getLayeredPane();
864 int index = layeredPane.getIndexOf(this);
865 layeredPane.remove(index);
866 }
867 }
868
869 /**
870 * DOCUMENT ME!
871 *
872 * @author $author$
873 * @version $Revision: 1.3.8.3 $
874 */
875 private class MediumWeightPopup extends Panel implements Popup
876 {
877
878 /**
879 * Creates a new MediumWeightPopup object.
880 *
881 * @param c DOCUMENT ME!
882 */
883 public MediumWeightPopup(Container c)
884 {
885 this.add(c);
886 }
887
888 /**
889 * DOCUMENT ME!
890 *
891 * @param x DOCUMENT ME!
892 * @param y DOCUMENT ME!
893 * @param width DOCUMENT ME!
894 * @param heigth DOCUMENT ME!
895 */
896 public void show(int x, int y, int width, int heigth)
897 {
898 JLayeredPane layeredPane;
899 layeredPane = SwingUtilities.getRootPane(invoker).getLayeredPane();
900 layeredPane.add(this, JLayeredPane.POPUP_LAYER, 0);
901 this.setBounds(x, y, width, height);
902 }
903
904 /**
905 * DOCUMENT ME!
906 */
907 public void hide()
908 {
909 JLayeredPane layeredPane;
910 layeredPane = SwingUtilities.getRootPane(invoker).getLayeredPane();
911 int index = layeredPane.getIndexOf(this);
912 layeredPane.remove(index);
913 }
914 }
915
916 /**
917 * DOCUMENT ME!
918 *
919 * @author $author$
920 * @version $Revision: 1.3.8.3 $
921 */
922 private class HeavyWeightPopup extends JWindow implements Popup
923 {
924 /**
925 * Creates a new HeavyWeightPopup object.
926 *
927 * @param c DOCUMENT ME!
928 */
929 public HeavyWeightPopup(Container c)
930 {
931 this.setContentPane(c);
932 }
933
934 /**
935 * DOCUMENT ME!
936 *
937 * @param x DOCUMENT ME!
938 * @param y DOCUMENT ME!
939 * @param width DOCUMENT ME!
940 * @param height DOCUMENT ME!
941 */
942 public void show(int x, int y, int width, int height)
943 {
944 this.setBounds(x, y, width, height);
945 this.show();
946 }
947
948 /**
949 * DOCUMENT ME!
950 */
951 public void hide()
952 {
953 this.hide();
954 }
955 }
956
957 /**
958 * DOCUMENT ME!
959 *
960 * @author $author$
961 * @version $Revision: 1.3.8.3 $
962 */
963 public static class Separator extends JSeparator
964 {
965 /**
966 * Creates a new Separator object.
967 */
968 public Separator()
969 {
970 }
971
972 /**
973 * DOCUMENT ME!
974 *
975 * @return DOCUMENT ME!
976 */
977 public String getUIClassID()
978 {
979 return null;
980 }
981 }
982
983 /**
984 * DOCUMENT ME!
985 *
986 * @author $author$
987 * @version $Revision: 1.3.8.3 $
988 */
989 protected class AccessibleJPopupMenu extends AccessibleJComponent
990 {
991 /**
992 * Creates a new AccessibleJPopupMenu object.
993 *
994 * @param component DOCUMENT ME!
995 */
996 protected AccessibleJPopupMenu(JPopupMenu component)
997 {
998 super(component);
999 }
1000
1001 /**
1002 * DOCUMENT ME!
1003 *
1004 * @return DOCUMENT ME!
1005 */
1006 public AccessibleRole getAccessibleRole()
1007 {
1008 return AccessibleRole.POPUP_MENU;
1009 }
1010 }
1011 }
This page took 0.082836 seconds and 5 git commands to generate.