Changeset 155 in josm for src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
- Timestamp:
- 2006-10-08T17:29:58+02:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
r153 r155 126 126 JPanel buttonPanel = new JPanel(new GridLayout(1,2)); 127 127 128 JButton button = new JButton(tr("Select"), ImageProvider.get("mapmode/selection/select")); 129 button.setToolTipText(tr("Set the selected elements on the map to the selected items in the list above.")); 130 button.addActionListener(new ActionListener(){ 128 buttonPanel.add(createButton("Select", "mapmode/selection/select", "Set the selected elements on the map to the selected items in the list above.", new ActionListener(){ 131 129 public void actionPerformed(ActionEvent e) { 132 130 updateMap(); 133 131 } 134 }); 135 buttonPanel.add(button); 136 137 button = new JButton(tr("Reload"), ImageProvider.get("dialogs", "refresh")); 138 button.setToolTipText(tr("Refresh the selection list.")); 139 button.addActionListener(new ActionListener(){ 132 })); 133 134 buttonPanel.add(createButton("Reload", "dialogs/refresh", "Refresh the selection list.", new ActionListener(){ 140 135 public void actionPerformed(ActionEvent e) { 141 136 selectionChanged(Main.ds.getSelected()); 142 } 143 }); 144 buttonPanel.add(button); 145 146 button = new JButton(tr("Search"), ImageProvider.get("dialogs", "search")); 147 button.setToolTipText(tr("Search for objects.")); 148 button.addActionListener(new ActionListener(){ 137 } 138 })); 139 140 buttonPanel.add(createButton("Search", "dialogs/search", "Search for objects.", new ActionListener(){ 149 141 private String lastSearch = ""; 150 142 public void actionPerformed(ActionEvent e) { … … 185 177 search(lastSearch, mode); 186 178 } 187 }); 188 buttonPanel.add(button); 179 })); 189 180 190 181 add(buttonPanel, BorderLayout.SOUTH); 191 182 selectionChanged(Main.ds.getSelected()); 183 } 184 185 private JButton createButton(String name, String icon, String tooltip, ActionListener action) { 186 JButton button = new JButton(tr(name), ImageProvider.get(icon)); 187 button.setToolTipText(tr(tooltip)); 188 button.addActionListener(action); 189 button.putClientProperty("help", "Dialog/SelectionList/"+name); 190 return button; 192 191 } 193 192
Note:
See TracChangeset
for help on using the changeset viewer.