summaryrefslogtreecommitdiff
path: root/libjava/classpath/javax/swing/plaf/metal/MetalComboBoxUI.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/javax/swing/plaf/metal/MetalComboBoxUI.java')
-rw-r--r--libjava/classpath/javax/swing/plaf/metal/MetalComboBoxUI.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalComboBoxUI.java b/libjava/classpath/javax/swing/plaf/metal/MetalComboBoxUI.java
index a43ee3cb04f..0006b78fee3 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalComboBoxUI.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalComboBoxUI.java
@@ -313,4 +313,40 @@ public class MetalComboBoxUI extends BasicComboBoxUI
d.height + insetsH + 1);
}
+ /**
+ * Configures the editor for this combo box.
+ */
+ public void configureEditor()
+ {
+ ComboBoxEditor cbe = comboBox.getEditor();
+ if (cbe != null)
+ {
+ cbe.getEditorComponent().setFont(comboBox.getFont());
+ cbe.setItem(comboBox.getSelectedItem());
+ cbe.addActionListener(comboBox);
+ }
+ }
+
+ /**
+ * Unconfigures the editor for this combo box.
+ */
+ public void unconfigureEditor()
+ {
+ ComboBoxEditor cbe = comboBox.getEditor();
+ if (cbe != null)
+ {
+ cbe.getEditorComponent().setFont(null);
+ cbe.setItem(null);
+ cbe.removeActionListener(comboBox);
+ }
+ }
+
+ /**
+ * Lays out the ComboBox
+ */
+ public void layoutComboBox(Container parent,
+ MetalComboBoxUI.MetalComboBoxLayoutManager manager)
+ {
+ manager.layoutContainer(parent);
+ }
}