< prev index next >
src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java
Print this page
@@ -45,17 +45,17 @@
* many simpler components. This class creates and manages the listeners
* on the combo box and the combo box model. These listeners update the user
* interface in response to changes in the properties and state of the combo box.
* <p>
* All event handling is handled by listener classes created with the
- * <code>createxxxListener()</code> methods and internal classes.
+ * {@code createxxxListener()} methods and internal classes.
* You can change the behavior of this class by overriding the
- * <code>createxxxListener()</code> methods and supplying your own
+ * {@code createxxxListener()} methods and supplying your own
* event listeners or subclassing from the ones supplied in this class.
* <p>
* For adding specific actions,
- * overide <code>installKeyboardActions</code> to add actions in response to
+ * overide {@code installKeyboardActions} to add actions in response to
* KeyStroke bindings. See the article <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/keybinding.html">How to Use Key Bindings</a>
*
* @author Arnaud Weber
* @author Tom Santos
* @author Mark Davidson
@@ -434,11 +434,11 @@
}
/**
* Removes the installed listeners from the combo box and its model.
* The number and types of listeners removed and in this method should be
- * the same that was added in <code>installListeners</code>
+ * the same that was added in {@code installListeners}
*/
protected void uninstallListeners() {
if ( keyListener != null ) {
comboBox.removeKeyListener( keyListener );
}
@@ -471,69 +471,69 @@
}
/**
* Creates the popup portion of the combo box.
*
- * @return an instance of <code>ComboPopup</code>
+ * @return an instance of {@code ComboPopup}
* @see ComboPopup
*/
protected ComboPopup createPopup() {
return new BasicComboPopup( comboBox );
}
/**
- * Creates a <code>KeyListener</code> which will be added to the
+ * Creates a {@code KeyListener} which will be added to the
* combo box. If this method returns null then it will not be added
* to the combo box.
*
- * @return an instance <code>KeyListener</code> or null
+ * @return an instance {@code KeyListener} or null
*/
protected KeyListener createKeyListener() {
return getHandler();
}
/**
- * Creates a <code>FocusListener</code> which will be added to the combo box.
+ * Creates a {@code FocusListener} which will be added to the combo box.
* If this method returns null then it will not be added to the combo box.
*
- * @return an instance of a <code>FocusListener</code> or null
+ * @return an instance of a {@code FocusListener} or null
*/
protected FocusListener createFocusListener() {
return getHandler();
}
/**
* Creates a list data listener which will be added to the
- * <code>ComboBoxModel</code>. If this method returns null then
+ * {@code ComboBoxModel}. If this method returns null then
* it will not be added to the combo box model.
*
- * @return an instance of a <code>ListDataListener</code> or null
+ * @return an instance of a {@code ListDataListener} or null
*/
protected ListDataListener createListDataListener() {
return getHandler();
}
/**
- * Creates an <code>ItemListener</code> which will be added to the
+ * Creates an {@code ItemListener} which will be added to the
* combo box. If this method returns null then it will not
* be added to the combo box.
* <p>
* Subclasses may override this method to return instances of their own
* ItemEvent handlers.
*
- * @return an instance of an <code>ItemListener</code> or null
+ * @return an instance of an {@code ItemListener} or null
*/
protected ItemListener createItemListener() {
return null;
}
/**
- * Creates a <code>PropertyChangeListener</code> which will be added to
+ * Creates a {@code PropertyChangeListener} which will be added to
* the combo box. If this method returns null then it will not
* be added to the combo box.
*
- * @return an instance of a <code>PropertyChangeListener</code> or null
+ * @return an instance of a {@code PropertyChangeListener} or null
*/
protected PropertyChangeListener createPropertyChangeListener() {
return getHandler();
}
@@ -548,25 +548,25 @@
}
/**
* Creates the default renderer that will be used in a non-editiable combo
* box. A default renderer will used only if a renderer has not been
- * explicitly set with <code>setRenderer</code>.
+ * explicitly set with {@code setRenderer}.
*
- * @return a <code>ListCellRender</code> used for the combo box
+ * @return a {@code ListCellRender} used for the combo box
* @see javax.swing.JComboBox#setRenderer
*/
protected ListCellRenderer<Object> createRenderer() {
return new BasicComboBoxRenderer.UIResource();
}
/**
* Creates the default editor that will be used in editable combo boxes.
* A default editor will be used only if an editor has not been
- * explicitly set with <code>setEditor</code>.
+ * explicitly set with {@code setEditor}.
*
- * @return a <code>ComboBoxEditor</code> used for the combo box
+ * @return a {@code ComboBoxEditor} used for the combo box
* @see javax.swing.JComboBox#setEditor
*/
protected ComboBoxEditor createEditor() {
return new BasicComboBoxEditor.UIResource();
}
@@ -599,11 +599,11 @@
* it finds a key event that wasn't a navigation key it dispatches it to
* JComboBox.selectWithKeyChar() so that it can do type-ahead.
*
* This public inner class should be treated as protected.
* Instantiate it only within subclasses of
- * <code>BasicComboBoxUI</code>.
+ * {@code BasicComboBoxUI}.
*/
public class KeyHandler extends KeyAdapter {
@Override
public void keyPressed( KeyEvent e ) {
getHandler().keyPressed(e);
@@ -614,11 +614,11 @@
* This listener hides the popup when the focus is lost. It also repaints
* when focus is gained or lost.
*
* This public inner class should be treated as protected.
* Instantiate it only within subclasses of
- * <code>BasicComboBoxUI</code>.
+ * {@code BasicComboBoxUI}.
*/
public class FocusHandler implements FocusListener {
public void focusGained( FocusEvent e ) {
getHandler().focusGained(e);
}
@@ -628,15 +628,15 @@
}
}
/**
* This listener watches for changes in the
- * <code>ComboBoxModel</code>.
+ * {@code ComboBoxModel}.
* <p>
* This public inner class should be treated as protected.
* Instantiate it only within subclasses of
- * <code>BasicComboBoxUI</code>.
+ * {@code BasicComboBoxUI}.
*
* @see #createListDataListener
*/
public class ListDataHandler implements ListDataListener {
public void contentsChanged( ListDataEvent e ) {
@@ -656,11 +656,11 @@
* This listener watches for changes to the selection in the
* combo box.
* <p>
* This public inner class should be treated as protected.
* Instantiate it only within subclasses of
- * <code>BasicComboBoxUI</code>.
+ * {@code BasicComboBoxUI}.
*
* @see #createItemListener
*/
public class ItemHandler implements ItemListener {
// This class used to implement behavior which is now redundant.
@@ -675,11 +675,11 @@
* call the superclass methods to ensure that the combo box ui correctly
* handles property changes.
* <p>
* This public inner class should be treated as protected.
* Instantiate it only within subclasses of
- * <code>BasicComboBoxUI</code>.
+ * {@code BasicComboBoxUI}.
*
* @see #createPropertyChangeListener
*/
public class PropertyChangeHandler implements PropertyChangeListener {
public void propertyChange(PropertyChangeEvent e) {
@@ -704,11 +704,11 @@
* the arrow button to the right and the editor to the left. If there is no
* editor it still keeps the arrow button to the right.
*
* This public inner class should be treated as protected.
* Instantiate it only within subclasses of
- * <code>BasicComboBoxUI</code>.
+ * {@code BasicComboBoxUI}.
*/
public class ComboBoxLayoutManager implements LayoutManager {
public void addLayoutComponent(String name, Component comp) {}
public void removeLayoutComponent(Component comp) {}
@@ -772,11 +772,11 @@
}
/**
* This public method is implementation specific and should be private.
* do not call or override. To implement a specific editor create a
- * custom <code>ComboBoxEditor</code>
+ * custom {@code ComboBoxEditor}
*
* @see #createEditor
* @see javax.swing.JComboBox#setEditor
* @see javax.swing.ComboBoxEditor
*/
< prev index next >