Changeset 4018 in josm
- Timestamp:
- 2011-04-06T19:09:47+02:00 (14 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
r4012 r4018 43 43 public class SearchAction extends JosmAction implements ParameterizedAction { 44 44 45 public static final int DEFAULT_SEARCH_HISTORY_SIZE = 1 0;45 public static final int DEFAULT_SEARCH_HISTORY_SIZE = 15; 46 46 47 47 private static final String SEARCH_EXPRESSION = "searchExpression"; … … 136 136 // -- prepare the combo box with the search expressions 137 137 // 138 JLabel label = new JLabel( initialValues instanceof Filter ? tr(" Please enter a filter string.") : tr("Please enter a search string."));138 JLabel label = new JLabel( initialValues instanceof Filter ? tr("Filter string:") : tr("Search string:")); 139 139 final HistoryComboBox hcbSearchString = new HistoryComboBox(); 140 140 hcbSearchString.setText(initialValues.text); … … 165 165 final JCheckBox regexSearch = new JCheckBox(tr("regular expression"), initialValues.regexSearch); 166 166 167 JPanel top = new JPanel(new GridBagLayout()); 168 top.add(label, GBC.std().insets(0, 0, 5, 0)); 169 top.add(hcbSearchString, GBC.eol().fill(GBC.HORIZONTAL)); 167 170 JPanel left = new JPanel(new GridBagLayout()); 168 left.add(label, GBC.eop());169 left.add(hcbSearchString, GBC.eop().fill(GBC.HORIZONTAL));170 171 left.add(replace, GBC.eol()); 171 172 left.add(add, GBC.eol()); … … 212 213 right.add(description); 213 214 214 final JPanel p = new JPanel(); 215 p.add(left); 216 p.add(right); 215 final JPanel p = new JPanel(new GridBagLayout()); 216 p.add(top, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 5, 5, 0)); 217 p.add(left, GBC.std().anchor(GBC.NORTH).insets(5, 10, 10, 0)); 218 p.add(right, GBC.eol()); 217 219 ExtendedDialog dialog = new ExtendedDialog( 218 220 Main.parent, -
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingComboBox.java
r3891 r4018 145 145 } 146 146 ); 147 int maxsize=Math.max(getMaximumRowCount(),java.awt.Toolkit.getDefaultToolkit().getScreenSize().height/getPreferredSize().height - 1); 148 setMaximumRowCount(maxsize); 147 149 } 148 150 -
trunk/src/org/openstreetmap/josm/gui/widgets/HistoryComboBox.java
r3215 r4018 7 7 8 8 import org.openstreetmap.josm.gui.tagging.ac.AutoCompletingComboBox; 9 import org.openstreetmap.josm.Main; 9 10 10 11 public class HistoryComboBox extends AutoCompletingComboBox { 11 12 private ComboBoxHistory model; 12 13 14 public static final int DEFAULT_SEARCH_HISTORY_SIZE = 15; 15 13 16 public HistoryComboBox() { 14 setModel(model = new ComboBoxHistory(15)); 17 int maxsize = Main.pref.getInteger("search.history-size", DEFAULT_SEARCH_HISTORY_SIZE); 18 setModel(model = new ComboBoxHistory(maxsize)); 15 19 setEditable(true); 16 20 }
Note:
See TracChangeset
for help on using the changeset viewer.