Ignore:
Timestamp:
2012-09-30T18:18:27+02:00 (12 years ago)
Author:
Don-vip
Message:

fix #8088 - Width of edit box for long values

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingComboBox.java

    r5483 r5520  
    146146    }
    147147
     148    /**
     149     * Creates a <code>AutoCompletingComboBox</code> with a default prototype display value.
     150     */
    148151    public AutoCompletingComboBox() {
    149         super(new AutoCompletionListItem(JosmComboBox.DEFAULT_PROTOTYPE_DISPLAY_VALUE));
     152        this(JosmComboBox.DEFAULT_PROTOTYPE_DISPLAY_VALUE);
     153    }
     154
     155    /**
     156     * Creates a <code>AutoCompletingComboBox</code> with the specified prototype display value.
     157     * @param prototype the <code>Object</code> used to compute the maximum number of elements to be displayed at once before displaying a scroll bar.
     158     *                  It also affects the initial width of the combo box.
     159     * @since 5520
     160     */
     161    public AutoCompletingComboBox(String prototype) {
     162        super(new AutoCompletionListItem(prototype));
    150163        setRenderer(new AutoCompleteListCellRenderer());
    151164        final JTextComponent editor = (JTextComponent) this.getEditor().getEditorComponent();
Note: See TracChangeset for help on using the changeset viewer.