FileDocCategorySizeDatePackage
MetalComboBoxEditor.javaAPI DocJava SE 6 API4566Tue Jun 10 00:26:50 BST 2008javax.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.25 11/30/05
author
Steve Wilson

Fields Summary
protected static Insets
editorBorderInsets
The default editor border Insets. This field might not be used.
private static final Insets
SAFE_EDITOR_BORDER_INSETS
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