Changeset 6603 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2014-01-03T04:51:04+01:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/bbox/SourceButton.java
r6539 r6603 24 24 public class SourceButton extends JComponent { 25 25 26 private final int layerHeight = 20; 27 private final int leftPadding = 5; 28 private final int topPadding = 5; 29 private final int bottomPadding = 5; 30 26 private static final int LAYER_HEIGHT = 20; 27 private static final int LEFT_PADDING = 5; 28 private static final int TOP_PADDING = 5; 29 private static final int BOTTOM_PADDING = 5; 31 30 32 31 private TileSource[] sources; … … 47 46 48 47 public SourceButton(SlippyMapBBoxChooser slippyMapBBoxChooser, Collection<TileSource> sources) { 49 super();50 48 this.slippyMapBBoxChooser = slippyMapBBoxChooser; 51 49 setSources(sources); … … 68 66 toggle(); 69 67 } else { 70 int result = (point.y - 5) / layerHeight;68 int result = (point.y - 5) / LAYER_HEIGHT; 71 69 if (result >= 0 && result < SourceButton.this.sources.length) { 72 70 SourceButton.this.slippyMapBBoxChooser.toggleMapSource(SourceButton.this.sources[result]); … … 78 76 toggle(); 79 77 } 80 81 78 } 82 79 } … … 105 102 106 103 g.setColor(new Color(0, 0, 139, 179)); 107 g.fillRoundRect(0, 0, barWidth + shrinkImage.getIconWidth(), sources.length * layerHeight + topPadding + bottomPadding, 10, 10);104 g.fillRoundRect(0, 0, barWidth + shrinkImage.getIconWidth(), sources.length * LAYER_HEIGHT + TOP_PADDING + BOTTOM_PADDING, 10, 10); 108 105 for (int i=0; i<sources.length; i++) { 109 106 g.setColor(Color.WHITE); 110 g.fillOval( leftPadding, topPadding + i * layerHeight+ 6, radioButtonSize, radioButtonSize);111 g.drawString(sources[i].getName(), leftPadding + radioButtonSize + leftPadding, topPadding + i * layerHeight+ g.getFontMetrics().getHeight());107 g.fillOval(LEFT_PADDING, TOP_PADDING + i * LAYER_HEIGHT + 6, radioButtonSize, radioButtonSize); 108 g.drawString(sources[i].getName(), LEFT_PADDING + radioButtonSize + LEFT_PADDING, TOP_PADDING + i * LAYER_HEIGHT + g.getFontMetrics().getHeight()); 112 109 if (currentMap == i) { 113 110 g.setColor(Color.BLACK); 114 g.fillOval( leftPadding + 1, topPadding + 7 + i * layerHeight, radioButtonSize - 2, radioButtonSize - 2);111 g.fillOval(LEFT_PADDING + 1, TOP_PADDING + 7 + i * LAYER_HEIGHT, radioButtonSize - 2, radioButtonSize - 2); 115 112 } 116 113 } … … 155 152 } 156 153 barWidth = textWidth + 50; 157 shownDimension = new Dimension(barWidth + shrinkImage.getIconWidth(), sources.length * layerHeight + topPadding + bottomPadding);154 shownDimension = new Dimension(barWidth + shrinkImage.getIconWidth(), sources.length * LAYER_HEIGHT + TOP_PADDING + BOTTOM_PADDING); 158 155 } 159 156 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManager.java
r6070 r6603 20 20 import javax.swing.AbstractAction; 21 21 import javax.swing.DefaultListSelectionModel; 22 import javax.swing.ImageIcon; 22 23 import javax.swing.JComponent; 23 24 import javax.swing.JFrame; … … 61 62 public class ChangesetCacheManager extends JFrame { 62 63 64 /** The changeset download icon **/ 65 public static final ImageIcon DOWNLOAD_CONTENT_ICON = ImageProvider.get("dialogs/changeset", "downloadchangesetcontent"); 66 /** The changeset update icon **/ 67 public static final ImageIcon UPDATE_CONTENT_ICON = ImageProvider.get("dialogs/changeset", "updatechangesetcontent"); 68 63 69 /** the unique instance of the cache manager */ 64 70 private static ChangesetCacheManager instance; … … 160 166 161 167 // -- add the details panel 162 ChangesetDetailPanel pnlChangesetDetail ;163 tp.add(pnlChangesetDetail = new ChangesetDetailPanel());168 ChangesetDetailPanel pnlChangesetDetail = new ChangesetDetailPanel(); 169 tp.add(pnlChangesetDetail); 164 170 model.addPropertyChangeListener(pnlChangesetDetail); 165 171 … … 284 290 } 285 291 292 /** 293 * Constructs a new {@code ChangesetCacheManager}. 294 */ 286 295 public ChangesetCacheManager() { 287 296 build(); … … 483 492 public DownloadSelectedChangesetContentAction() { 484 493 putValue(NAME, tr("Download changeset content")); 485 putValue(SMALL_ICON, ImageProvider.get("dialogs/changeset", "downloadchangesetcontent"));494 putValue(SMALL_ICON, DOWNLOAD_CONTENT_ICON); 486 495 putValue(SHORT_DESCRIPTION, tr("Download the content of the selected changesets from the server")); 487 496 updateEnabledState(); … … 627 636 } 628 637 638 /** 639 * Runs the given changeset download task. 640 * @param task The changeset download task to run 641 */ 629 642 public void runDownloadTask(final ChangesetDownloadTask task) { 630 643 Main.worker.submit(task); 631 Runnable r = new Runnable() { 632 @Override public void run() { 644 Main.worker.submit(new Runnable() { 645 @Override 646 public void run() { 633 647 if (task.isCanceled() || task.isFailed()) return; 634 648 setSelectedChangesets(task.getDownloadedChangesets()); 635 649 } 636 }; 637 Main.worker.submit(r); 650 }); 638 651 } 639 652 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentPanel.java
r6340 r6603 59 59 * 60 60 */ 61 public class ChangesetContentPanel extends JPanel implements PropertyChangeListener {61 public class ChangesetContentPanel extends JPanel implements PropertyChangeListener { 62 62 63 63 private ChangesetContentTableModel model; 64 64 private Changeset currentChangeset; 65 65 66 private Do nwloadChangesetContentAction actDownloadContentAction;66 private DownloadChangesetContentAction actDownloadContentAction; 67 67 private ShowHistoryAction actShowHistory; 68 68 private SelectInCurrentLayerAction actSelectInCurrentLayerAction; 69 69 private ZoomInCurrentLayerAction actZoomInCurrentLayerAction; 70 70 71 private HeaderPanel pnlHeader;71 private final HeaderPanel pnlHeader = new HeaderPanel(); 72 72 73 73 protected void buildModels() { 74 74 DefaultListSelectionModel selectionModel =new DefaultListSelectionModel(); 75 75 model = new ChangesetContentTableModel(selectionModel); 76 actDownloadContentAction = new Do nwloadChangesetContentAction();76 actDownloadContentAction = new DownloadChangesetContentAction(); 77 77 actDownloadContentAction.initProperties(currentChangeset); 78 78 actShowHistory = new ShowHistoryAction(); … … 126 126 } 127 127 128 protected void build() {128 protected final void build() { 129 129 setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); 130 130 setLayout(new BorderLayout()); 131 131 buildModels(); 132 132 133 add(pnlHeader = new HeaderPanel(), BorderLayout.NORTH);133 add(pnlHeader, BorderLayout.NORTH); 134 134 add(buildActionButtonPanel(), BorderLayout.WEST); 135 135 add(buildContentPanel(), BorderLayout.CENTER); 136 137 136 } 138 137 … … 173 172 setCurrentChangeset(cs); 174 173 } 174 175 private final void alertNoPrimitivesTo(Collection<HistoryOsmPrimitive> primitives, String title, String helpTopic) { 176 HelpAwareOptionPane.showOptionDialog( 177 ChangesetContentPanel.this, 178 trn("<html>The selected object is not available in the current<br>" 179 + "edit layer ''{0}''.</html>", 180 "<html>None of the selected objects is available in the current<br>" 181 + "edit layer ''{0}''.</html>", 182 primitives.size(), 183 Main.main.getEditLayer().getName() 184 ), 185 title, JOptionPane.WARNING_MESSAGE, helpTopic 186 ); 187 } 175 188 176 189 /** … … 178 191 * 179 192 */ 180 class Do nwloadChangesetContentAction extends AbstractAction{181 public Do nwloadChangesetContentAction() {193 class DownloadChangesetContentAction extends AbstractAction{ 194 public DownloadChangesetContentAction() { 182 195 putValue(NAME, tr("Download content")); 183 putValue(SMALL_ICON, ImageProvider.get("dialogs/changeset","downloadchangesetcontent"));196 putValue(SMALL_ICON, ChangesetCacheManager.DOWNLOAD_CONTENT_ICON); 184 197 putValue(SHORT_DESCRIPTION, tr("Download the changeset content from the OSM server")); 185 198 } … … 201 214 if (cs.getContent() == null) { 202 215 putValue(NAME, tr("Download content")); 203 putValue(SMALL_ICON, ImageProvider.get("dialogs/changeset","downloadchangesetcontent"));216 putValue(SMALL_ICON, ChangesetCacheManager.DOWNLOAD_CONTENT_ICON); 204 217 putValue(SHORT_DESCRIPTION, tr("Download the changeset content from the OSM server")); 205 218 } else { 206 219 putValue(NAME, tr("Update content")); 207 putValue(SMALL_ICON, ImageProvider.get("dialogs/changeset","updatechangesetcontent"));220 putValue(SMALL_ICON, ChangesetCacheManager.UPDATE_CONTENT_ICON); 208 221 putValue(SHORT_DESCRIPTION, tr("Update the changeset content from the OSM server")); 209 222 } … … 221 234 } 222 235 223 class ShowHistoryAction extends AbstractAction implements ListSelectionListener{ 236 class ShowHistoryAction extends AbstractAction implements ListSelectionListener { 237 238 private final class ShowHistoryTask implements Runnable { 239 private final Collection<HistoryOsmPrimitive> primitives; 240 241 private ShowHistoryTask(Collection<HistoryOsmPrimitive> primitives) { 242 this.primitives = primitives; 243 } 244 245 @Override 246 public void run() { 247 try { 248 for (HistoryOsmPrimitive p : primitives) { 249 final History h = HistoryDataSet.getInstance().getHistory(p.getPrimitiveId()); 250 if (h == null) { 251 continue; 252 } 253 GuiHelper.runInEDT(new Runnable() { 254 @Override 255 public void run() { 256 HistoryBrowserDialogManager.getInstance().show(h); 257 } 258 }); 259 } 260 } catch (final Exception e) { 261 GuiHelper.runInEDT(new Runnable() { 262 @Override 263 public void run() { 264 BugReportExceptionHandler.handleException(e); 265 } 266 }); 267 } 268 } 269 } 270 224 271 public ShowHistoryAction() { 225 272 putValue(NAME, tr("Show history")); … … 250 297 } 251 298 252 Runnable r = new Runnable() { 253 @Override 254 public void run() { 255 try { 256 for (HistoryOsmPrimitive p : primitives) { 257 final History h = HistoryDataSet.getInstance().getHistory(p.getPrimitiveId()); 258 if (h == null) { 259 continue; 260 } 261 GuiHelper.runInEDT(new Runnable() { 262 @Override public void run() { 263 HistoryBrowserDialogManager.getInstance().show(h); 264 } 265 }); 266 } 267 } catch (final Exception e) { 268 GuiHelper.runInEDT(new Runnable() { 269 @Override 270 public void run() { 271 BugReportExceptionHandler.handleException(e); 272 } 273 }); 274 } 275 276 } 277 }; 278 Main.worker.submit(r); 279 } 280 281 protected void updateEnabledState() { 299 Main.worker.submit(new ShowHistoryTask(primitives)); 300 } 301 302 protected final void updateEnabledState() { 282 303 setEnabled(model.hasSelectedPrimitives()); 283 304 } … … 303 324 putValue(SHORT_DESCRIPTION, tr("Select the corresponding primitives in the current data layer")); 304 325 updateEnabledState(); 305 }306 307 protected void alertNoPrimitivesToSelect(Collection<HistoryOsmPrimitive> primitives) {308 HelpAwareOptionPane.showOptionDialog(309 ChangesetContentPanel.this,310 trn("<html>The selected object is not available in the current<br>"311 + "edit layer ''{0}''.</html>",312 "<html>None of the selected objects is available in the current<br>"313 + "edit layer ''{0}''.</html>",314 primitives.size(),315 Main.main.getEditLayer().getName()316 ),317 tr("Nothing to select"),318 JOptionPane.WARNING_MESSAGE,319 HelpUtil.ht("/Dialog/ChangesetCacheManager#NothingToSelectInLayer")320 );321 326 } 322 327 … … 336 341 } 337 342 if (target.isEmpty()) { 338 alertNoPrimitivesToSelect(selected); 343 alertNoPrimitivesTo(selected, tr("Nothing to select"), 344 HelpUtil.ht("/Dialog/ChangesetCacheManager#NothingToSelectInLayer")); 339 345 return; 340 346 } … … 342 348 } 343 349 344 public void updateEnabledState() {350 public final void updateEnabledState() { 345 351 if (Main.main == null || !Main.main.hasEditLayer()) { 346 352 setEnabled(false); … … 368 374 putValue(SHORT_DESCRIPTION, tr("Zoom to the corresponding objects in the current data layer")); 369 375 updateEnabledState(); 370 }371 372 protected void alertNoPrimitivesToZoomTo(Collection<HistoryOsmPrimitive> primitives) {373 HelpAwareOptionPane.showOptionDialog(374 ChangesetContentPanel.this,375 trn("<html>The selected object is not available in the current<br>"376 + "edit layer ''{0}''.</html>",377 "<html>None of the selected objects is available in the current<br>"378 + "edit layer ''{0}''.</html>",379 primitives.size(),380 Main.main.getEditLayer().getName()381 ),382 tr("Nothing to zoom to"),383 JOptionPane.WARNING_MESSAGE,384 HelpUtil.ht("/Dialog/ChangesetCacheManager#NothingToZoomTo")385 );386 376 } 387 377 … … 401 391 } 402 392 if (target.isEmpty()) { 403 alertNoPrimitivesToZoomTo(selected); 393 alertNoPrimitivesTo(selected, tr("Nothing to zoom to"), 394 HelpUtil.ht("/Dialog/ChangesetCacheManager#NothingToZoomTo")); 404 395 return; 405 396 } … … 408 399 } 409 400 410 public void updateEnabledState() {401 public final void updateEnabledState() { 411 402 if (Main.main == null || !Main.main.hasEditLayer()) { 412 403 setEnabled(false); … … 427 418 } 428 419 429 static privateclass HeaderPanel extends JPanel {420 private static class HeaderPanel extends JPanel { 430 421 431 422 private JMultilineLabel lblMessage; 432 423 private Changeset current; 433 424 434 protected void build() {425 protected final void build() { 435 426 setLayout(new FlowLayout(FlowLayout.LEFT)); 436 427 lblMessage = new JMultilineLabel( … … 455 446 putValue(NAME, tr("Download now")); 456 447 putValue(SHORT_DESCRIPTION, tr("Download the changeset content")); 457 putValue(SMALL_ICON, ImageProvider.get("dialogs/changeset", "downloadchangesetcontent"));448 putValue(SMALL_ICON, ChangesetCacheManager.DOWNLOAD_CONTENT_ICON); 458 449 } 459 450 -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDetailPanel.java
r6336 r6603 42 42 import org.openstreetmap.josm.tools.ImageProvider; 43 43 44 45 44 /** 46 45 * This panel displays the properties of the currently selected changeset in the … … 48 47 * 49 48 */ 50 public class ChangesetDetailPanel extends JPanel implements PropertyChangeListener{ 51 52 private JosmTextField tfID; 53 private JosmTextArea taComment; 54 private JosmTextField tfOpen; 55 private JosmTextField tfUser; 56 private JosmTextField tfCreatedOn; 57 private JosmTextField tfClosedOn; 58 private DonwloadChangesetContentAction actDownloadChangesetContent; 59 private UpdateChangesetAction actUpdateChangesets; 60 private RemoveFromCacheAction actRemoveFromCache; 61 private SelectInCurrentLayerAction actSelectInCurrentLayer; 62 private ZoomInCurrentLayerAction actZoomInCurrentLayerAction; 49 public class ChangesetDetailPanel extends JPanel implements PropertyChangeListener { 50 51 private final JosmTextField tfID = new JosmTextField(10); 52 private final JosmTextArea taComment = new JosmTextArea(5,40); 53 private final JosmTextField tfOpen = new JosmTextField(10); 54 private final JosmTextField tfUser = new JosmTextField(""); 55 private final JosmTextField tfCreatedOn = new JosmTextField(20); 56 private final JosmTextField tfClosedOn = new JosmTextField(20); 57 58 private final DownloadChangesetContentAction actDownloadChangesetContent = new DownloadChangesetContentAction(); 59 private final UpdateChangesetAction actUpdateChangesets = new UpdateChangesetAction(); 60 private final RemoveFromCacheAction actRemoveFromCache = new RemoveFromCacheAction(); 61 private final SelectInCurrentLayerAction actSelectInCurrentLayer = new SelectInCurrentLayerAction(); 62 private final ZoomInCurrentLayerAction actZoomInCurrentLayerAction = new ZoomInCurrentLayerAction(); 63 63 64 64 private Changeset current = null; … … 71 71 72 72 // -- remove from cache action 73 tb.add(actRemoveFromCache = new RemoveFromCacheAction());73 tb.add(actRemoveFromCache); 74 74 actRemoveFromCache.initProperties(current); 75 75 76 76 // -- changeset update 77 tb.add(actUpdateChangesets = new UpdateChangesetAction());77 tb.add(actUpdateChangesets); 78 78 actUpdateChangesets.initProperties(current); 79 79 80 80 // -- changeset content download 81 tb.add(actDownloadChangesetContent =new DonwloadChangesetContentAction());81 tb.add(actDownloadChangesetContent); 82 82 actDownloadChangesetContent.initProperties(current); 83 83 84 tb.add(actSelectInCurrentLayer = new SelectInCurrentLayerAction());84 tb.add(actSelectInCurrentLayer); 85 85 MapView.addEditLayerChangeListener(actSelectInCurrentLayer); 86 86 87 tb.add(actZoomInCurrentLayerAction = new ZoomInCurrentLayerAction());87 tb.add(actZoomInCurrentLayerAction); 88 88 MapView.addEditLayerChangeListener(actZoomInCurrentLayerAction); 89 89 … … 119 119 gc.weightx = 0.0; 120 120 gc.gridx = 1; 121 pnl.add(tfID = new JosmTextField(10), gc);121 pnl.add(tfID, gc); 122 122 tfID.setEditable(false); 123 123 … … 133 133 gc.weighty = 1.0; 134 134 gc.gridx = 1; 135 pnl.add(taComment = new JosmTextArea(5,40), gc);135 pnl.add(taComment, gc); 136 136 taComment.setEditable(false); 137 137 … … 146 146 gc.fill = GridBagConstraints.HORIZONTAL; 147 147 gc.gridx = 1; 148 pnl.add(tfOpen = new JosmTextField(10), gc);148 pnl.add(tfOpen, gc); 149 149 tfOpen.setEditable(false); 150 150 … … 159 159 gc.weightx = 1.0; 160 160 gc.gridx = 1; 161 pnl.add(tfUser = new JosmTextField(""), gc);161 pnl.add(tfUser, gc); 162 162 tfUser.setEditable(false); 163 163 … … 171 171 gc.fill = GridBagConstraints.HORIZONTAL; 172 172 gc.gridx = 1; 173 pnl.add(tfCreatedOn = new JosmTextField(20), gc);173 pnl.add(tfCreatedOn, gc); 174 174 tfCreatedOn.setEditable(false); 175 175 … … 183 183 gc.fill = GridBagConstraints.HORIZONTAL; 184 184 gc.gridx = 1; 185 pnl.add(tfClosedOn = new JosmTextField(20), gc);185 pnl.add(tfClosedOn, gc); 186 186 tfClosedOn.setEditable(false); 187 187 … … 189 189 } 190 190 191 protected void build() {191 protected final void build() { 192 192 setLayout(new BorderLayout()); 193 193 setBorder(BorderFactory.createEmptyBorder(3,3,3,3)); … … 259 259 if (! evt.getPropertyName().equals(ChangesetCacheManagerModel.CHANGESET_IN_DETAIL_VIEW_PROP)) 260 260 return; 261 Changeset cs = (Changeset)evt.getNewValue(); 262 setCurrentChangeset(cs); 261 setCurrentChangeset((Changeset)evt.getNewValue()); 263 262 } 264 263 … … 289 288 * 290 289 */ 291 class Do nwloadChangesetContentAction extends AbstractAction{292 public Do nwloadChangesetContentAction() {290 class DownloadChangesetContentAction extends AbstractAction { 291 public DownloadChangesetContentAction() { 293 292 putValue(NAME, tr("Download content")); 294 putValue(SMALL_ICON, ImageProvider.get("dialogs/changeset","downloadchangesetcontent"));293 putValue(SMALL_ICON, ChangesetCacheManager.DOWNLOAD_CONTENT_ICON); 295 294 putValue(SHORT_DESCRIPTION, tr("Download the changeset content from the OSM server")); 296 295 } … … 299 298 public void actionPerformed(ActionEvent evt) { 300 299 if (current == null) return; 301 ChangesetContentDownloadTask task = new ChangesetContentDownloadTask(ChangesetDetailPanel.this, current.getId());300 ChangesetContentDownloadTask task = new ChangesetContentDownloadTask(ChangesetDetailPanel.this, current.getId()); 302 301 ChangesetCacheManager.getInstance().runDownloadTask(task); 303 302 } … … 312 311 if (cs.getContent() == null) { 313 312 putValue(NAME, tr("Download content")); 314 putValue(SMALL_ICON, ImageProvider.get("dialogs/changeset","downloadchangesetcontent"));313 putValue(SMALL_ICON, ChangesetCacheManager.DOWNLOAD_CONTENT_ICON); 315 314 putValue(SHORT_DESCRIPTION, tr("Download the changeset content from the OSM server")); 316 315 } else { 317 316 putValue(NAME, tr("Update content")); 318 putValue(SMALL_ICON, ImageProvider.get("dialogs/changeset","updatechangesetcontent"));317 putValue(SMALL_ICON, ChangesetCacheManager.UPDATE_CONTENT_ICON); 319 318 putValue(SHORT_DESCRIPTION, tr("Update the changeset content from the OSM server")); 320 319 } … … 329 328 public UpdateChangesetAction() { 330 329 putValue(NAME, tr("Update changeset")); 331 putValue(SMALL_ICON, ImageProvider.get("dialogs/changeset","updatechangeset"));330 putValue(SMALL_ICON, ChangesetCacheManager.UPDATE_CONTENT_ICON); 332 331 putValue(SHORT_DESCRIPTION, tr("Update the changeset from the OSM server")); 333 332 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/SingleChangesetDownloadPanel.java
r6084 r6603 20 20 import org.openstreetmap.josm.gui.widgets.ChangesetIdTextField; 21 21 import org.openstreetmap.josm.gui.widgets.SelectAllOnFocusGainedDecorator; 22 import org.openstreetmap.josm.tools.ImageProvider;23 22 24 23 /** … … 80 79 81 80 public DownloadAction() { 82 putValue(SMALL_ICON, ImageProvider.get("dialogs/changeset", "downloadchangesetcontent"));81 putValue(SMALL_ICON, ChangesetCacheManager.DOWNLOAD_CONTENT_ICON); 83 82 putValue(SHORT_DESCRIPTION, tr("Download the changeset with the specified id, including the changeset content")); 84 83 updateEnabledState(); -
trunk/src/org/openstreetmap/josm/gui/mappaint/LabelCompositionStrategy.java
r6541 r6603 153 153 * The list of default name tags from which a label candidate is derived. 154 154 */ 155 static public final String[] DEFAULT_NAME_TAGS = {155 public static final String[] DEFAULT_NAME_TAGS = { 156 156 "name:" + LanguageInfo.getJOSMLocaleCode(), 157 157 "name", … … 167 167 * @since 6541 168 168 */ 169 static public final String[] DEFAULT_NAME_COMPLEMENT_TAGS = {169 public static final String[] DEFAULT_NAME_COMPLEMENT_TAGS = { 170 170 "capacity" 171 171 }; -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTable.java
r6578 r6603 12 12 import java.awt.event.MouseEvent; 13 13 import java.util.ArrayList; 14 import java.util.Collection;15 14 import java.util.List; 16 15 import java.util.Map; … … 120 119 if (llEditor.getValue() == 1) { 121 120 List<List<String>> data = llEditor.getData(); 122 @SuppressWarnings("unchecked")123 Collection<Collection<String>> stgValue = (Collection<Collection<String>>) stg.getValue();124 121 if (!llSetting.equalVal(data)) { 125 122 e.setValue(new Preferences.ListListSetting(data)); -
trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java
r6529 r6603 55 55 import org.openstreetmap.josm.tools.ImageProvider; 56 56 57 /** 58 * Preference settings for plugins. 59 * @since 168 60 */ 57 61 public final class PluginPreference extends DefaultTabPreferenceSetting { 58 62 … … 71 75 } 72 76 77 /** 78 * Returns the download summary string to be shown. 79 * @param task The plugin download task that has completed 80 * @return the download summary string to be shown. Contains summary of success/failed plugins. 81 */ 73 82 public static String buildDownloadSummary(PluginDownloadTask task) { 74 83 Collection<PluginInformation> downloaded = task.getDownloadedPlugins(); … … 469 478 } 470 479 471 static privateclass PluginConfigurationSitesPanel extends JPanel {480 private static class PluginConfigurationSitesPanel extends JPanel { 472 481 473 482 private DefaultListModel model; -
trunk/src/org/openstreetmap/josm/gui/widgets/EditableList.java
r6553 r6603 32 32 public final JButton deleteSrcButton = new JButton(tr("Delete")); 33 33 34 /** 35 * Constructs a new {@code EditableList}. 36 * @param title The title displayed in input dialog 37 */ 34 38 public EditableList(String title) { 35 39 this.title = title; … … 37 41 } 38 42 39 protected void build() {43 protected final void build() { 40 44 41 //setLayout(new GridBagLayout());42 45 setLayout(new BorderLayout()); 43 46
Note:
See TracChangeset
for help on using the changeset viewer.