FileDocCategorySizeDatePackage
MetalComboBoxEditor.javaAPI DocJava SE 5 API4232Fri Aug 26 14:58:06 BST 2005javax.swing.plaf.metal

MetalComboBoxEditor

public class MetalComboBoxEditor extends BasicComboBoxEditor
The default editor for Metal editable combo boxes

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see {@link java.beans.XMLEncoder}.

version
1.23 12/19/03
author
Steve Wilson

Fields Summary
protected static Insets
editorBorderInsets
Constructors Summary
public MetalComboBoxEditor()

        super();
        //editor.removeFocusListener(this);
        editor = new JTextField("",9) {
                // workaround for 4530952
                public void setText(String s) {
                    if (getText().equals(s)) {
                        return;
                    }
                    super.setText(s);
                }
            // The preferred and minimum sizes are overriden and padded by
            // 4 to keep the size as it previously was.  Refer to bugs
            // 4775789 and 4517214 for details.
            public Dimension getPreferredSize() {
                Dimension pref = super.getPreferredSize();
                pref.height += 4;
                return pref;
            }
            public Dimension getMinimumSize() {
                Dimension min = super.getMinimumSize();
                min.height += 4;
                return min;
            }
            };

        editor.setBorder( new EditorBorder() );
        //editor.addFocusListener(this);
    
Methods Summary