fixes for host gcc 4.6.1
[zpugcc/jano.git] / toolchain / gcc / libjava / javax / swing / JComboBox.java
blob6da2b2e7bebbb584cec3698ee4096f54fa71cc72
1 /* JComboBox.java --
2 Copyright (C) 2002 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
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.
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.
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.
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.
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. */
39 package javax.swing;
41 import java.awt.*;
42 import java.awt.event.*;
43 import java.beans.*;
44 import java.io.*;
45 import java.util.*;
46 import javax.accessibility.*;
47 import javax.swing.event.*;
48 import javax.swing.plaf.*;
50 /**
51 * JComboBox
52 * @author Andrew Selkirk
53 * @version 1.0
55 public class JComboBox extends JComponent
56 implements ItemSelectable, ListDataListener, ActionListener, Accessible
58 private static final long serialVersionUID = 5654585963292734470L;
61 //-------------------------------------------------------------
62 // Classes ----------------------------------------------------
63 //-------------------------------------------------------------
65 /**
66 * AccessibleJComboBox
68 protected class AccessibleJComboBox extends AccessibleJComponent
69 implements AccessibleAction, AccessibleSelection {
71 //-------------------------------------------------------------
72 // Variables --------------------------------------------------
73 //-------------------------------------------------------------
76 //-------------------------------------------------------------
77 // Initialization ---------------------------------------------
78 //-------------------------------------------------------------
80 /**
81 * Constructor AccessibleJComboBox
82 * @param component TODO
84 protected AccessibleJComboBox(JComboBox component) {
85 super(component);
86 // TODO
87 } // AccessibleJComboBox()
90 //-------------------------------------------------------------
91 // Methods ----------------------------------------------------
92 //-------------------------------------------------------------
94 /**
95 * getAccessibleChildrenCount
96 * @returns int
98 public int getAccessibleChildrenCount() {
99 return 0; // TODO
100 } // getAccessibleChildrenCount()
103 * getAccessibleChild
104 * @param value0 TODO
105 * @returns Accessible
107 public Accessible getAccessibleChild(int value0) {
108 return null; // TODO
109 } // getAccessibleChild()
112 * getAccessibleSelection
113 * @returns AccessibleSelection
115 public AccessibleSelection getAccessibleSelection() {
116 return null; // TODO
117 } // getAccessibleSelection()
120 * getAccessibleSelection
121 * @param value0 TODO
122 * @returns Accessible
124 public Accessible getAccessibleSelection(int value0) {
125 return null; // TODO
126 } // getAccessibleSelection()
129 * isAccessibleChildSelected
130 * @param value0 TODO
131 * @returns boolean
133 public boolean isAccessibleChildSelected(int value0) {
134 return false; // TODO
135 } // isAccessibleChildSelected()
138 * getAccessibleRole
139 * @returns AccessibleRole
141 public AccessibleRole getAccessibleRole() {
142 return AccessibleRole.COMBO_BOX;
143 } // getAccessibleRole()
146 * getAccessibleAction
147 * @returns AccessibleAction
149 public AccessibleAction getAccessibleAction() {
150 return null; // TODO
151 } // getAccessibleAction()
154 * getAccessibleActionDescription
155 * @param value0 TODO
156 * @returns String
158 public String getAccessibleActionDescription(int value0) {
159 return null; // TODO
160 } // getAccessibleActionDescription()
163 * getAccessibleActionCount
164 * @returns int
166 public int getAccessibleActionCount() {
167 return 0; // TODO
168 } // getAccessibleActionCount()
171 * doAccessibleAction
172 * @param value0 TODO
173 * @returns boolean
175 public boolean doAccessibleAction(int value0) {
176 return false; // TODO
177 } // doAccessibleAction()
180 * getAccessibleSelectionCount
181 * @returns int
183 public int getAccessibleSelectionCount() {
184 return 0; // TODO
185 } // getAccessibleSelectionCount()
188 * addAccessibleSelection
189 * @param value0 TODO
191 public void addAccessibleSelection(int value0) {
192 // TODO
193 } // addAccessibleSelection()
196 * removeAccessibleSelection
197 * @param value0 TODO
199 public void removeAccessibleSelection(int value0) {
200 // TODO
201 } // removeAccessibleSelection()
204 * clearAccessibleSelection
206 public void clearAccessibleSelection() {
207 // TODO
208 } // clearAccessibleSelection()
211 * selectAllAccessibleSelection
213 public void selectAllAccessibleSelection() {
214 // TODO
215 } // selectAllAccessibleSelection()
218 } // AccessibleJComboBox
221 * KeySelectionManager
223 public static interface KeySelectionManager {
225 //-------------------------------------------------------------
226 // Methods ----------------------------------------------------
227 //-------------------------------------------------------------
230 * selectionForKey
231 * @param value0 TODO
232 * @param value1 TODO
233 * @returns int
235 int selectionForKey(char value0, ComboBoxModel value1);
238 } // KeySelectionManager
241 //-------------------------------------------------------------
242 // Variables --------------------------------------------------
243 //-------------------------------------------------------------
246 * uiClassID
248 private static final String uiClassID = "ComboBoxUI";
251 * dataModel
253 protected ComboBoxModel dataModel;
256 * renderer
258 protected ListCellRenderer renderer;
261 * editor
263 protected ComboBoxEditor editor;
266 * maximumRowCount
268 protected int maximumRowCount;
271 * isEditable
273 protected boolean isEditable;
276 * selectedItemReminder
278 protected Object selectedItemReminder;
281 * keySelectionManager
283 protected JComboBox.KeySelectionManager keySelectionManager;
286 * actionCommand
288 protected String actionCommand;
291 * lightWeightPopupEnabled
293 protected boolean lightWeightPopupEnabled;
296 //-------------------------------------------------------------
297 // Initialization ---------------------------------------------
298 //-------------------------------------------------------------
301 * Constructor JComboBox
302 * @param value0 TODO
304 public JComboBox(ComboBoxModel value0) {
305 // TODO
306 } // JComboBox()
309 * Constructor JComboBox
310 * @param value0 TODO
312 public JComboBox(Object[] value0) {
313 // TODO
314 } // JComboBox()
317 * Constructor JComboBox
318 * @param value0 TODO
320 public JComboBox(Vector value0) {
321 // TODO
322 } // JComboBox()
325 * Constructor JComboBox
327 public JComboBox() {
328 // TODO
329 } // JComboBox()
332 //-------------------------------------------------------------
333 // Methods ----------------------------------------------------
334 //-------------------------------------------------------------
337 * writeObject
338 * @param stream TODO
339 * @exception IOException TODO
341 private void writeObject(ObjectOutputStream stream) throws IOException {
342 // TODO
343 } // writeObject()
346 * isEditable
347 * @returns boolean
349 public boolean isEditable() {
350 return false; // TODO
351 } // isEditable()
354 * installAncestorListener
356 protected void installAncestorListener() {
357 // TODO
358 } // installAncestorListener()
361 * setUI
362 * @param ui TODO
364 public void setUI(ComboBoxUI ui) {
365 super.setUI(ui);
366 } // setUI()
369 * updateUI
371 public void updateUI() {
372 setUI((ComboBoxUI) UIManager.get(this));
373 invalidate();
374 } // updateUI()
377 * getUIClassID
378 * @returns String
380 public String getUIClassID() {
381 return uiClassID;
382 } // getUIClassID()
385 * getUI
386 * @returns ComboBoxUI
388 public ComboBoxUI getUI() {
389 return (ComboBoxUI) ui;
390 } // getUI()
393 * setModel
394 * @param value0 TODO
396 public void setModel(ComboBoxModel value0) {
397 // TODO
398 } // setModel()
401 * getModel
402 * @returns ComboBoxModel
404 public ComboBoxModel getModel() {
405 return null; // TODO
406 } // getModel()
409 * setLightWeightPopupEnabled
410 * @param value0 TODO
412 public void setLightWeightPopupEnabled(boolean value0) {
413 // TODO
414 } // setLightWeightPopupEnabled()
417 * isLightWeightPopupEnabled
418 * @returns boolean
420 public boolean isLightWeightPopupEnabled() {
421 return false; // TODO
422 } // isLightWeightPopupEnabled()
425 * setEditable
426 * @param value0 TODO
428 public void setEditable(boolean value0) {
429 // TODO
430 } // setEditable()
433 * setMaximumRowCount
434 * @param value0 TODO
436 public void setMaximumRowCount(int value0) {
437 // TODO
438 } // setMaximumRowCount()
441 * getMaximumRowCount
442 * @returns int
444 public int getMaximumRowCount() {
445 return 0; // TODO
446 } // getMaximumRowCount()
449 * setRenderer
450 * @param value0 TODO
452 public void setRenderer(ListCellRenderer value0) {
453 // TODO
454 } // setRenderer()
457 * getRenderer
458 * @returns ListCellRenderer
460 public ListCellRenderer getRenderer() {
461 return null; // TODO
462 } // getRenderer()
465 * setEditor
466 * @param value0 TODO
468 public void setEditor(ComboBoxEditor value0) {
469 // TODO
470 } // setEditor()
473 * getEditor
474 * @returns ComboBoxEditor
476 public ComboBoxEditor getEditor() {
477 return null; // TODO
478 } // getEditor()
481 * setSelectedItem
482 * @param value0 TODO
484 public void setSelectedItem(Object value0) {
485 // TODO
486 } // setSelectedItem()
489 * getSelectedItem
490 * @returns Object
492 public Object getSelectedItem() {
493 return null; // TODO
494 } // getSelectedItem()
497 * setSelectedIndex
498 * @param value0 TODO
500 public void setSelectedIndex(int value0) {
501 // TODO
502 } // setSelectedIndex()
505 * getSelectedIndex
506 * @returns int
508 public int getSelectedIndex() {
509 return 0; // TODO
510 } // getSelectedIndex()
513 * addItem
514 * @param value0 TODO
516 public void addItem(Object value0) {
517 // TODO
518 } // addItem()
521 * insertItemAt
522 * @param value0 TODO
523 * @param value1 TODO
525 public void insertItemAt(Object value0, int value1) {
526 // TODO
527 } // insertItemAt()
530 * removeItem
531 * @param value0 TODO
533 public void removeItem(Object value0) {
534 // TODO
535 } // removeItem()
538 * removeItemAt
539 * @param value0 TODO
541 public void removeItemAt(int value0) {
542 // TODO
543 } // removeItemAt()
546 * removeAllItems
548 public void removeAllItems() {
549 // TODO
550 } // removeAllItems()
553 * showPopup
555 public void showPopup() {
556 // TODO
557 } // showPopup()
560 * hidePopup
562 public void hidePopup() {
563 // TODO
564 } // hidePopup()
567 * setPopupVisible
568 * @param value0 TODO
570 public void setPopupVisible(boolean value0) {
571 // TODO
572 } // setPopupVisible()
575 * isPopupVisible
576 * @returns boolean
578 public boolean isPopupVisible() {
579 return false; // TODO
580 } // isPopupVisible()
583 * addItemListener
584 * @param value0 TODO
586 public void addItemListener(ItemListener value0) {
587 // TODO
588 } // addItemListener()
591 * removeItemListener
592 * @param value0 TODO
594 public void removeItemListener(ItemListener value0) {
595 // TODO
596 } // removeItemListener()
599 * addActionListener
600 * @param value0 TODO
602 public void addActionListener(ActionListener value0) {
603 // TODO
604 } // addActionListener()
607 * removeActionListener
608 * @param value0 TODO
610 public void removeActionListener(ActionListener value0) {
611 // TODO
612 } // removeActionListener()
615 * setActionCommand
616 * @param value0 TODO
618 public void setActionCommand(String value0) {
619 // TODO
620 } // setActionCommand()
623 * getActionCommand
624 * @returns String
626 public String getActionCommand() {
627 return null; // TODO
628 } // getActionCommand()
631 * setAction
632 * @param value0 TODO
634 public void setAction(Action value0) {
635 // TODO
636 } // setAction()
639 * isListener
640 * @param value0 TODO
641 * @param value1 TODO
642 * @returns boolean
644 private boolean isListener(Class value0, ActionListener value1) {
645 return false; // TODO
646 } // isListener()
649 * getAction
650 * @returns Action
652 public Action getAction() {
653 return null; // TODO
654 } // getAction()
657 * configurePropertiesFromAction
658 * @param value0 TODO
660 protected void configurePropertiesFromAction(Action value0) {
661 // TODO
662 } // configurePropertiesFromAction()
665 * createActionPropertyChangeListener
666 * @param value0 TODO
667 * @returns PropertyChangeListener
669 protected PropertyChangeListener createActionPropertyChangeListener(Action value0) {
670 return null; // TODO
671 } // createActionPropertyChangeListener()
674 * fireItemStateChanged
675 * @param value0 TODO
677 protected void fireItemStateChanged(ItemEvent value0) {
678 // TODO
679 } // fireItemStateChanged()
682 * fireActionEvent
684 protected void fireActionEvent() {
685 // TODO
686 } // fireActionEvent()
689 * selectedItemChanged
691 protected void selectedItemChanged() {
692 // TODO
693 } // selectedItemChanged()
696 * getSelectedObjects
697 * @returns Object[]
699 public Object[] getSelectedObjects() {
700 return null; // TODO
701 } // getSelectedObjects()
704 * actionPerformed
705 * @param value0 TODO
707 public void actionPerformed(ActionEvent value0) {
708 // TODO
709 } // actionPerformed()
712 * contentsChanged
713 * @param value0 TODO
715 public void contentsChanged(ListDataEvent value0) {
716 // TODO
717 } // contentsChanged()
720 * selectWithKeyChar
721 * @param value0 TODO
722 * @returns boolean
724 public boolean selectWithKeyChar(char value0) {
725 return false; // TODO
726 } // selectWithKeyChar()
729 * intervalAdded
730 * @param value0 TODO
732 public void intervalAdded(ListDataEvent value0) {
733 // TODO
734 } // intervalAdded()
737 * intervalRemoved
738 * @param value0 TODO
740 public void intervalRemoved(ListDataEvent value0) {
741 // TODO
742 } // intervalRemoved()
745 * setEnabled
746 * @param value0 TODO
748 public void setEnabled(boolean value0) {
749 // TODO
750 } // setEnabled()
753 * configureEditor
754 * @param value0 TODO
755 * @param value1 TODO
757 public void configureEditor(ComboBoxEditor value0, Object value1) {
758 // TODO
759 } // configureEditor()
762 * processKeyEvent
763 * @param value0 TODO
765 public void processKeyEvent(KeyEvent value0) {
766 // TODO
767 } // processKeyEvent()
770 * isFocusTraversable
771 * @returns boolean
772 * @deprecated
774 public boolean isFocusTraversable() {
775 return false; // TODO
776 } // isFocusTraversable()
779 * setKeySelectionManager
780 * @param value0 TODO
782 public void setKeySelectionManager(KeySelectionManager value0) {
783 // TODO
784 } // setKeySelectionManager()
787 * getKeySelectionManager
788 * @returns JComboBox.KeySelectionManager
790 public JComboBox.KeySelectionManager getKeySelectionManager() {
791 return null; // TODO
792 } // getKeySelectionManager()
795 * getItemCount
796 * @returns int
798 public int getItemCount() {
799 return 0; // TODO
800 } // getItemCount()
803 * getItemAt
804 * @param value0 TODO
805 * @returns Object
807 public Object getItemAt(int value0) {
808 return null; // TODO
809 } // getItemAt()
812 * createDefaultKeySelectionManager
813 * @returns KeySelectionManager
815 protected KeySelectionManager createDefaultKeySelectionManager() {
816 return null; // TODO
817 } // createDefaultKeySelectionManager()
820 * paramString
821 * @returns String
823 protected String paramString() {
824 return null; // TODO
825 } // paramString()
828 * getAccessibleContext
829 * @returns AccessibleContext
831 public AccessibleContext getAccessibleContext() {
832 if (accessibleContext == null) {
833 accessibleContext = new AccessibleJComboBox(this);
834 } // if
835 return accessibleContext;
836 } // getAccessibleContext()
839 } // JComboBox