source: trunk/gcc/libjava/javax/swing/JComboBox.java

Last change on this file was 1389, checked in by bird, 21 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 16.6 KB
Line 
1/* JComboBox.java --
2 Copyright (C) 2002 Free Software Foundation, Inc.
3
4This file is part of GNU Classpath.
5
6GNU Classpath is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
11GNU Classpath is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU Classpath; see the file COPYING. If not, write to the
18Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1902111-1307 USA.
20
21Linking this library statically or dynamically with other modules is
22making a combined work based on this library. Thus, the terms and
23conditions of the GNU General Public License cover the whole
24combination.
25
26As a special exception, the copyright holders of this library give you
27permission to link this library with independent modules to produce an
28executable, regardless of the license terms of these independent
29modules, and to copy and distribute the resulting executable under
30terms of your choice, provided that you also meet, for each linked
31independent module, the terms and conditions of the license of that
32module. An independent module is a module which is not derived from
33or based on this library. If you modify this library, you may extend
34this exception to your version of the library, but you are not
35obligated to do so. If you do not wish to do so, delete this
36exception statement from your version. */
37
38package javax.swing;
39
40// Imports
41import java.awt.*;
42import java.awt.event.*;
43import java.beans.*;
44import java.io.*;
45import java.util.*;
46import javax.accessibility.*;
47import javax.swing.event.*;
48import javax.swing.plaf.*;
49
50/**
51 * JComboBox
52 * @author Andrew Selkirk
53 * @version 1.0
54 */
55public class JComboBox extends JComponent implements ItemSelectable,
56 ListDataListener, ActionListener, Accessible {
57
58 //-------------------------------------------------------------
59 // Classes ----------------------------------------------------
60 //-------------------------------------------------------------
61
62 /**
63 * AccessibleJComboBox
64 */
65 protected class AccessibleJComboBox extends AccessibleJComponent
66 implements AccessibleAction, AccessibleSelection {
67
68 //-------------------------------------------------------------
69 // Variables --------------------------------------------------
70 //-------------------------------------------------------------
71
72
73 //-------------------------------------------------------------
74 // Initialization ---------------------------------------------
75 //-------------------------------------------------------------
76
77 /**
78 * Constructor AccessibleJComboBox
79 * @param component TODO
80 */
81 protected AccessibleJComboBox(JComboBox component) {
82 super(component);
83 // TODO
84 } // AccessibleJComboBox()
85
86
87 //-------------------------------------------------------------
88 // Methods ----------------------------------------------------
89 //-------------------------------------------------------------
90
91 /**
92 * getAccessibleChildrenCount
93 * @returns int
94 */
95 public int getAccessibleChildrenCount() {
96 return 0; // TODO
97 } // getAccessibleChildrenCount()
98
99 /**
100 * getAccessibleChild
101 * @param value0 TODO
102 * @returns Accessible
103 */
104 public Accessible getAccessibleChild(int value0) {
105 return null; // TODO
106 } // getAccessibleChild()
107
108 /**
109 * getAccessibleSelection
110 * @returns AccessibleSelection
111 */
112 public AccessibleSelection getAccessibleSelection() {
113 return null; // TODO
114 } // getAccessibleSelection()
115
116 /**
117 * getAccessibleSelection
118 * @param value0 TODO
119 * @returns Accessible
120 */
121 public Accessible getAccessibleSelection(int value0) {
122 return null; // TODO
123 } // getAccessibleSelection()
124
125 /**
126 * isAccessibleChildSelected
127 * @param value0 TODO
128 * @returns boolean
129 */
130 public boolean isAccessibleChildSelected(int value0) {
131 return false; // TODO
132 } // isAccessibleChildSelected()
133
134 /**
135 * getAccessibleRole
136 * @returns AccessibleRole
137 */
138 public AccessibleRole getAccessibleRole() {
139 return AccessibleRole.COMBO_BOX;
140 } // getAccessibleRole()
141
142 /**
143 * getAccessibleAction
144 * @returns AccessibleAction
145 */
146 public AccessibleAction getAccessibleAction() {
147 return null; // TODO
148 } // getAccessibleAction()
149
150 /**
151 * getAccessibleActionDescription
152 * @param value0 TODO
153 * @returns String
154 */
155 public String getAccessibleActionDescription(int value0) {
156 return null; // TODO
157 } // getAccessibleActionDescription()
158
159 /**
160 * getAccessibleActionCount
161 * @returns int
162 */
163 public int getAccessibleActionCount() {
164 return 0; // TODO
165 } // getAccessibleActionCount()
166
167 /**
168 * doAccessibleAction
169 * @param value0 TODO
170 * @returns boolean
171 */
172 public boolean doAccessibleAction(int value0) {
173 return false; // TODO
174 } // doAccessibleAction()
175
176 /**
177 * getAccessibleSelectionCount
178 * @returns int
179 */
180 public int getAccessibleSelectionCount() {
181 return 0; // TODO
182 } // getAccessibleSelectionCount()
183
184 /**
185 * addAccessibleSelection
186 * @param value0 TODO
187 */
188 public void addAccessibleSelection(int value0) {
189 // TODO
190 } // addAccessibleSelection()
191
192 /**
193 * removeAccessibleSelection
194 * @param value0 TODO
195 */
196 public void removeAccessibleSelection(int value0) {
197 // TODO
198 } // removeAccessibleSelection()
199
200 /**
201 * clearAccessibleSelection
202 */
203 public void clearAccessibleSelection() {
204 // TODO
205 } // clearAccessibleSelection()
206
207 /**
208 * selectAllAccessibleSelection
209 */
210 public void selectAllAccessibleSelection() {
211 // TODO
212 } // selectAllAccessibleSelection()
213
214
215 } // AccessibleJComboBox
216
217 /**
218 * KeySelectionManager
219 */
220 public static interface KeySelectionManager {
221
222 //-------------------------------------------------------------
223 // Methods ----------------------------------------------------
224 //-------------------------------------------------------------
225
226 /**
227 * selectionForKey
228 * @param value0 TODO
229 * @param value1 TODO
230 * @returns int
231 */
232 public abstract int selectionForKey(char value0, ComboBoxModel value1);
233
234
235 } // KeySelectionManager
236
237
238 //-------------------------------------------------------------
239 // Variables --------------------------------------------------
240 //-------------------------------------------------------------
241
242 /**
243 * uiClassID
244 */
245 private static final String uiClassID = "ComboBoxUI";
246
247 /**
248 * dataModel
249 */
250 protected ComboBoxModel dataModel;
251
252 /**
253 * renderer
254 */
255 protected ListCellRenderer renderer;
256
257 /**
258 * editor
259 */
260 protected ComboBoxEditor editor;
261
262 /**
263 * maximumRowCount
264 */
265 protected int maximumRowCount;
266
267 /**
268 * isEditable
269 */
270 protected boolean isEditable;
271
272 /**
273 * selectedItemReminder
274 */
275 protected Object selectedItemReminder;
276
277 /**
278 * keySelectionManager
279 */
280 protected JComboBox.KeySelectionManager keySelectionManager;
281
282 /**
283 * actionCommand
284 */
285 protected String actionCommand;
286
287 /**
288 * lightWeightPopupEnabled
289 */
290 protected boolean lightWeightPopupEnabled;
291
292
293 //-------------------------------------------------------------
294 // Initialization ---------------------------------------------
295 //-------------------------------------------------------------
296
297 /**
298 * Constructor JComboBox
299 * @param value0 TODO
300 */
301 public JComboBox(ComboBoxModel value0) {
302 // TODO
303 } // JComboBox()
304
305 /**
306 * Constructor JComboBox
307 * @param value0 TODO
308 */
309 public JComboBox(Object[] value0) {
310 // TODO
311 } // JComboBox()
312
313 /**
314 * Constructor JComboBox
315 * @param value0 TODO
316 */
317 public JComboBox(Vector value0) {
318 // TODO
319 } // JComboBox()
320
321 /**
322 * Constructor JComboBox
323 */
324 public JComboBox() {
325 // TODO
326 } // JComboBox()
327
328
329 //-------------------------------------------------------------
330 // Methods ----------------------------------------------------
331 //-------------------------------------------------------------
332
333 /**
334 * writeObject
335 * @param stream TODO
336 * @exception IOException TODO
337 */
338 private void writeObject(ObjectOutputStream stream) throws IOException {
339 // TODO
340 } // writeObject()
341
342 /**
343 * isEditable
344 * @returns boolean
345 */
346 public boolean isEditable() {
347 return false; // TODO
348 } // isEditable()
349
350 /**
351 * installAncestorListener
352 */
353 protected void installAncestorListener() {
354 // TODO
355 } // installAncestorListener()
356
357 /**
358 * setUI
359 * @param ui TODO
360 */
361 public void setUI(ComboBoxUI ui) {
362 super.setUI(ui);
363 } // setUI()
364
365 /**
366 * updateUI
367 */
368 public void updateUI() {
369 setUI((ComboBoxUI) UIManager.get(this));
370 invalidate();
371 } // updateUI()
372
373 /**
374 * getUIClassID
375 * @returns String
376 */
377 public String getUIClassID() {
378 return uiClassID;
379 } // getUIClassID()
380
381 /**
382 * getUI
383 * @returns ComboBoxUI
384 */
385 public ComboBoxUI getUI() {
386 return (ComboBoxUI) ui;
387 } // getUI()
388
389 /**
390 * setModel
391 * @param value0 TODO
392 */
393 public void setModel(ComboBoxModel value0) {
394 // TODO
395 } // setModel()
396
397 /**
398 * getModel
399 * @returns ComboBoxModel
400 */
401 public ComboBoxModel getModel() {
402 return null; // TODO
403 } // getModel()
404
405 /**
406 * setLightWeightPopupEnabled
407 * @param value0 TODO
408 */
409 public void setLightWeightPopupEnabled(boolean value0) {
410 // TODO
411 } // setLightWeightPopupEnabled()
412
413 /**
414 * isLightWeightPopupEnabled
415 * @returns boolean
416 */
417 public boolean isLightWeightPopupEnabled() {
418 return false; // TODO
419 } // isLightWeightPopupEnabled()
420
421 /**
422 * setEditable
423 * @param value0 TODO
424 */
425 public void setEditable(boolean value0) {
426 // TODO
427 } // setEditable()
428
429 /**
430 * setMaximumRowCount
431 * @param value0 TODO
432 */
433 public void setMaximumRowCount(int value0) {
434 // TODO
435 } // setMaximumRowCount()
436
437 /**
438 * getMaximumRowCount
439 * @returns int
440 */
441 public int getMaximumRowCount() {
442 return 0; // TODO
443 } // getMaximumRowCount()
444
445 /**
446 * setRenderer
447 * @param value0 TODO
448 */
449 public void setRenderer(ListCellRenderer value0) {
450 // TODO
451 } // setRenderer()
452
453 /**
454 * getRenderer
455 * @returns ListCellRenderer
456 */
457 public ListCellRenderer getRenderer() {
458 return null; // TODO
459 } // getRenderer()
460
461 /**
462 * setEditor
463 * @param value0 TODO
464 */
465 public void setEditor(ComboBoxEditor value0) {
466 // TODO
467 } // setEditor()
468
469 /**
470 * getEditor
471 * @returns ComboBoxEditor
472 */
473 public ComboBoxEditor getEditor() {
474 return null; // TODO
475 } // getEditor()
476
477 /**
478 * setSelectedItem
479 * @param value0 TODO
480 */
481 public void setSelectedItem(Object value0) {
482 // TODO
483 } // setSelectedItem()
484
485 /**
486 * getSelectedItem
487 * @returns Object
488 */
489 public Object getSelectedItem() {
490 return null; // TODO
491 } // getSelectedItem()
492
493 /**
494 * setSelectedIndex
495 * @param value0 TODO
496 */
497 public void setSelectedIndex(int value0) {
498 // TODO
499 } // setSelectedIndex()
500
501 /**
502 * getSelectedIndex
503 * @returns int
504 */
505 public int getSelectedIndex() {
506 return 0; // TODO
507 } // getSelectedIndex()
508
509 /**
510 * addItem
511 * @param value0 TODO
512 */
513 public void addItem(Object value0) {
514 // TODO
515 } // addItem()
516
517 /**
518 * insertItemAt
519 * @param value0 TODO
520 * @param value1 TODO
521 */
522 public void insertItemAt(Object value0, int value1) {
523 // TODO
524 } // insertItemAt()
525
526 /**
527 * removeItem
528 * @param value0 TODO
529 */
530 public void removeItem(Object value0) {
531 // TODO
532 } // removeItem()
533
534 /**
535 * removeItemAt
536 * @param value0 TODO
537 */
538 public void removeItemAt(int value0) {
539 // TODO
540 } // removeItemAt()
541
542 /**
543 * removeAllItems
544 */
545 public void removeAllItems() {
546 // TODO
547 } // removeAllItems()
548
549 /**
550 * showPopup
551 */
552 public void showPopup() {
553 // TODO
554 } // showPopup()
555
556 /**
557 * hidePopup
558 */
559 public void hidePopup() {
560 // TODO
561 } // hidePopup()
562
563 /**
564 * setPopupVisible
565 * @param value0 TODO
566 */
567 public void setPopupVisible(boolean value0) {
568 // TODO
569 } // setPopupVisible()
570
571 /**
572 * isPopupVisible
573 * @returns boolean
574 */
575 public boolean isPopupVisible() {
576 return false; // TODO
577 } // isPopupVisible()
578
579 /**
580 * addItemListener
581 * @param value0 TODO
582 */
583 public void addItemListener(ItemListener value0) {
584 // TODO
585 } // addItemListener()
586
587 /**
588 * removeItemListener
589 * @param value0 TODO
590 */
591 public void removeItemListener(ItemListener value0) {
592 // TODO
593 } // removeItemListener()
594
595 /**
596 * addActionListener
597 * @param value0 TODO
598 */
599 public void addActionListener(ActionListener value0) {
600 // TODO
601 } // addActionListener()
602
603 /**
604 * removeActionListener
605 * @param value0 TODO
606 */
607 public void removeActionListener(ActionListener value0) {
608 // TODO
609 } // removeActionListener()
610
611 /**
612 * setActionCommand
613 * @param value0 TODO
614 */
615 public void setActionCommand(String value0) {
616 // TODO
617 } // setActionCommand()
618
619 /**
620 * getActionCommand
621 * @returns String
622 */
623 public String getActionCommand() {
624 return null; // TODO
625 } // getActionCommand()
626
627 /**
628 * setAction
629 * @param value0 TODO
630 */
631 public void setAction(Action value0) {
632 // TODO
633 } // setAction()
634
635 /**
636 * isListener
637 * @param value0 TODO
638 * @param value1 TODO
639 * @returns boolean
640 */
641 private boolean isListener(Class value0, ActionListener value1) {
642 return false; // TODO
643 } // isListener()
644
645 /**
646 * getAction
647 * @returns Action
648 */
649 public Action getAction() {
650 return null; // TODO
651 } // getAction()
652
653 /**
654 * configurePropertiesFromAction
655 * @param value0 TODO
656 */
657 protected void configurePropertiesFromAction(Action value0) {
658 // TODO
659 } // configurePropertiesFromAction()
660
661 /**
662 * createActionPropertyChangeListener
663 * @param value0 TODO
664 * @returns PropertyChangeListener
665 */
666 protected PropertyChangeListener createActionPropertyChangeListener(Action value0) {
667 return null; // TODO
668 } // createActionPropertyChangeListener()
669
670 /**
671 * fireItemStateChanged
672 * @param value0 TODO
673 */
674 protected void fireItemStateChanged(ItemEvent value0) {
675 // TODO
676 } // fireItemStateChanged()
677
678 /**
679 * fireActionEvent
680 */
681 protected void fireActionEvent() {
682 // TODO
683 } // fireActionEvent()
684
685 /**
686 * selectedItemChanged
687 */
688 protected void selectedItemChanged() {
689 // TODO
690 } // selectedItemChanged()
691
692 /**
693 * getSelectedObjects
694 * @returns Object[]
695 */
696 public Object[] getSelectedObjects() {
697 return null; // TODO
698 } // getSelectedObjects()
699
700 /**
701 * actionPerformed
702 * @param value0 TODO
703 */
704 public void actionPerformed(ActionEvent value0) {
705 // TODO
706 } // actionPerformed()
707
708 /**
709 * contentsChanged
710 * @param value0 TODO
711 */
712 public void contentsChanged(ListDataEvent value0) {
713 // TODO
714 } // contentsChanged()
715
716 /**
717 * selectWithKeyChar
718 * @param value0 TODO
719 * @returns boolean
720 */
721 public boolean selectWithKeyChar(char value0) {
722 return false; // TODO
723 } // selectWithKeyChar()
724
725 /**
726 * intervalAdded
727 * @param value0 TODO
728 */
729 public void intervalAdded(ListDataEvent value0) {
730 // TODO
731 } // intervalAdded()
732
733 /**
734 * intervalRemoved
735 * @param value0 TODO
736 */
737 public void intervalRemoved(ListDataEvent value0) {
738 // TODO
739 } // intervalRemoved()
740
741 /**
742 * setEnabled
743 * @param value0 TODO
744 */
745 public void setEnabled(boolean value0) {
746 // TODO
747 } // setEnabled()
748
749 /**
750 * configureEditor
751 * @param value0 TODO
752 * @param value1 TODO
753 */
754 public void configureEditor(ComboBoxEditor value0, Object value1) {
755 // TODO
756 } // configureEditor()
757
758 /**
759 * processKeyEvent
760 * @param value0 TODO
761 */
762 public void processKeyEvent(KeyEvent value0) {
763 // TODO
764 } // processKeyEvent()
765
766 /**
767 * isFocusTraversable
768 * @returns boolean
769 */
770 public boolean isFocusTraversable() {
771 return false; // TODO
772 } // isFocusTraversable()
773
774 /**
775 * setKeySelectionManager
776 * @param value0 TODO
777 */
778 public void setKeySelectionManager(KeySelectionManager value0) {
779 // TODO
780 } // setKeySelectionManager()
781
782 /**
783 * getKeySelectionManager
784 * @returns JComboBox.KeySelectionManager
785 */
786 public JComboBox.KeySelectionManager getKeySelectionManager() {
787 return null; // TODO
788 } // getKeySelectionManager()
789
790 /**
791 * getItemCount
792 * @returns int
793 */
794 public int getItemCount() {
795 return 0; // TODO
796 } // getItemCount()
797
798 /**
799 * getItemAt
800 * @param value0 TODO
801 * @returns Object
802 */
803 public Object getItemAt(int value0) {
804 return null; // TODO
805 } // getItemAt()
806
807 /**
808 * createDefaultKeySelectionManager
809 * @returns KeySelectionManager
810 */
811 protected KeySelectionManager createDefaultKeySelectionManager() {
812 return null; // TODO
813 } // createDefaultKeySelectionManager()
814
815 /**
816 * paramString
817 * @returns String
818 */
819 protected String paramString() {
820 return null; // TODO
821 } // paramString()
822
823 /**
824 * getAccessibleContext
825 * @returns AccessibleContext
826 */
827 public AccessibleContext getAccessibleContext() {
828 if (accessibleContext == null) {
829 accessibleContext = new AccessibleJComboBox(this);
830 } // if
831 return accessibleContext;
832 } // getAccessibleContext()
833
834
835} // JComboBox
Note: See TracBrowser for help on using the repository browser.