📄 basiccomboboxui.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu Apr 27 23:40:25 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Class BasicComboBoxUI</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/BasicComboBoxUI.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../javax/swing/plaf/basic/BasicComboBoxRenderer.UIResource.html"><B>PREV CLASS</B></A> <A HREF="../../../../javax/swing/plaf/basic/BasicComboBoxUI.ComboBoxLayoutManager.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="BasicComboBoxUI.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#inner_class_summary">INNER</A> | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.swing.plaf.basic</FONT><BR>Class BasicComboBoxUI</H2><PRE><A HREF="../../../../java/lang/Object.html">java.lang.Object</A> | +--<A HREF="../../../../javax/swing/plaf/ComponentUI.html">javax.swing.plaf.ComponentUI</A> | +--<A HREF="../../../../javax/swing/plaf/ComboBoxUI.html">javax.swing.plaf.ComboBoxUI</A> | +--<B>javax.swing.plaf.basic.BasicComboBoxUI</B></PRE><DL><DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../javax/swing/plaf/metal/MetalComboBoxUI.html">MetalComboBoxUI</A></DD></DL><HR><DL><DT>public class <B>BasicComboBoxUI</B><DT>extends <A HREF="../../../../javax/swing/plaf/ComboBoxUI.html">ComboBoxUI</A></DL><P>Basic UI for JComboBox. This class adds and removes components from the JComboBox. The arrow button and the editor are managed by this object. The popup menu is handled by BasicComboPopup. BasicComboPopup supplies this class with a MouseListener, MouseMotionListener, and a KeyListener. These listeners are added to the arrow button and the JComboBox by default. Subclasses of BasicComboBoxUI should attach the listeners to whichever components they like. installListeners() is where listeners get added to the JComboBox (and model). configureEditor() is where listeners get added to the editor. configureArrowButton() is where listeners get added to the arrow button. Inner classes for handling events: FocusHandler ItemHandler ListDataHandler PropertyChangeHandler KeyHandler<P><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><A NAME="inner_class_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Inner Class Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> class</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/swing/plaf/basic/BasicComboBoxUI.ComboBoxLayoutManager.html">BasicComboBoxUI.ComboBoxLayoutManager</A></B></CODE><BR> This layout manager handles the 'standard' layout of combo boxes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> class</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/swing/plaf/basic/BasicComboBoxUI.FocusHandler.html">BasicComboBoxUI.FocusHandler</A></B></CODE><BR> This listener hides the popup when the focus is lost.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> class</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/swing/plaf/basic/BasicComboBoxUI.ItemHandler.html">BasicComboBoxUI.ItemHandler</A></B></CODE><BR> This listener watches for changes to the selection in the combo box and updates the display of the currently selected item.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> class</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/swing/plaf/basic/BasicComboBoxUI.KeyHandler.html">BasicComboBoxUI.KeyHandler</A></B></CODE><BR> This listener checks to see if the key event isn't a navigation key.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> class</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/swing/plaf/basic/BasicComboBoxUI.ListDataHandler.html">BasicComboBoxUI.ListDataHandler</A></B></CODE><BR> This listener watches for changes in the data and revalidates.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> class</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/swing/plaf/basic/BasicComboBoxUI.PropertyChangeHandler.html">BasicComboBoxUI.PropertyChangeHandler</A></B></CODE><BR> This listener watches for bound properties that have changed in the JComboBox.</TD></TR></TABLE> <!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../../../javax/swing/JButton.html">JButton</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/swing/plaf/basic/BasicComboBoxUI.html#arrowButton">arrowButton</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../../../java/awt/Dimension.html">Dimension</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/swing/plaf/basic/BasicComboBoxUI.html#cachedMinimumSize">cachedMinimumSize</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../../../javax/swing/JComboBox.html">JComboBox</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/swing/plaf/basic/BasicComboBoxUI.html#comboBox">comboBox</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../../../javax/swing/CellRendererPane.html">CellRendererPane</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/swing/plaf/basic/BasicComboBoxUI.html#currentValuePane">currentValuePane</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../../../java/awt/Component.html">Component</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/swing/plaf/basic/BasicComboBoxUI.html#editor">editor</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../../../java/awt/event/FocusListener.html">FocusListener</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/swing/plaf/basic/BasicComboBoxUI.html#focusListener">focusListener</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/swing/plaf/basic/BasicComboBoxUI.html#hasFocus">hasFocus</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/swing/plaf/basic/BasicComboBoxUI.html#isMinimumSizeDirty">isMinimumSizeDirty</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../../../java/awt/event/ItemListener.html">ItemListener</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/swing/plaf/basic/BasicComboBoxUI.html#itemListener">itemListener</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../../../java/awt/event/KeyListener.html">KeyListener</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/swing/plaf/basic/BasicComboBoxUI.html#keyListener">keyListener</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../../../javax/swing/JList.html">JList</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/swing/plaf/basic/BasicComboBoxUI.html#listBox">listBox</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../../../javax/swing/event/ListDataListener.html">ListDataListener</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/swing/plaf/basic/BasicComboBoxUI.html#listDataListener">listDataListener</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../../../javax/swing/plaf/basic/ComboPopup.html">ComboPopup</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/swing/plaf/basic/BasicComboBoxUI.html#popup">popup</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../../../java/awt/event/KeyListener.html">KeyListener</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/swing/plaf/basic/BasicComboBoxUI.html#popupKeyListener">popupKeyListener</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../../../java/awt/event/MouseListener.html">MouseListener</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/swing/plaf/basic/BasicComboBoxUI.html#popupMouseListener">popupMouseListener</A></B></CODE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -