Changeset 10438 in josm for trunk/src/org
- Timestamp:
- 2016-06-20T17:58:21+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManager.java
r10378 r10438 24 24 import javax.swing.DefaultListSelectionModel; 25 25 import javax.swing.ImageIcon; 26 import javax.swing.JButton; 26 27 import javax.swing.JComponent; 27 28 import javax.swing.JFrame; … … 49 50 import org.openstreetmap.josm.gui.HelpAwareOptionPane; 50 51 import org.openstreetmap.josm.gui.JosmUserIdentityManager; 51 import org.openstreetmap.josm.gui.SideButton;52 52 import org.openstreetmap.josm.gui.dialogs.changeset.query.ChangesetQueryDialog; 53 53 import org.openstreetmap.josm.gui.help.ContextSensitiveHelpAction; … … 71 71 public class ChangesetCacheManager extends JFrame { 72 72 73 // CHECKSTYLE.OFF: SingleSpaceSeparator74 /** The changeset download icon **/75 public static final ImageIcon DOWNLOAD_CONTENT_ICON = ImageProvider.get("dialogs/changeset", "downloadchangesetcontent");76 /** The changeset update icon **/77 public static final ImageIcon UPDATE_CONTENT_ICON = ImageProvider.get("dialogs/changeset", "updatechangesetcontent");78 // CHECKSTYLE.ON: SingleSpaceSeparator79 80 73 /** the unique instance of the cache manager */ 81 74 private static volatile ChangesetCacheManager instance; … … 134 127 JPanel pnl = new JPanel(new FlowLayout(FlowLayout.LEFT)); 135 128 136 SideButton btn = new SideButton(new QueryAction());129 JButton btn = new JButton(new QueryAction()); 137 130 pnl.add(btn); 138 131 pnl.add(new SingleChangesetDownloadPanel()); 139 pnl.add(new SideButton(new DownloadMyChangesets()));132 pnl.add(new JButton(new DownloadMyChangesets())); 140 133 141 134 return pnl; … … 151 144 152 145 //-- cancel and close action 153 pnl.add(new SideButton(new CancelAction()));146 pnl.add(new JButton(new CancelAction())); 154 147 155 148 //-- help action 156 pnl.add(new SideButton(new ContextSensitiveHelpAction(HelpUtil.ht("/Dialog/ChangesetManager"))));149 pnl.add(new JButton(new ContextSensitiveHelpAction(HelpUtil.ht("/Dialog/ChangesetManager")))); 157 150 158 151 return pnl; … … 359 352 CancelAction() { 360 353 putValue(NAME, tr("Close")); 361 putValue(SMALL_ICON, ImageProvider.get("cancel"));354 new ImageProvider("cancel").getResource().attachImageIcon(this); 362 355 putValue(SHORT_DESCRIPTION, tr("Close the dialog")); 363 356 } … … 380 373 QueryAction() { 381 374 putValue(NAME, tr("Query")); 382 putValue(SMALL_ICON, ImageProvider.get("dialogs", "search"));375 new ImageProvider("dialogs", "search").getResource().attachImageIcon(this); 383 376 putValue(SHORT_DESCRIPTION, tr("Launch the dialog for querying changesets")); 384 377 setEnabled(!Main.isOffline(OnlineResource.OSM_API)); … … 416 409 RemoveFromCacheAction(ChangesetCacheManagerModel model) { 417 410 putValue(NAME, tr("Remove from cache")); 418 putValue(SMALL_ICON, ImageProvider.get("dialogs", "delete"));411 new ImageProvider("dialogs", "delete").getResource().attachImageIcon(this); 419 412 putValue(SHORT_DESCRIPTION, tr("Remove the selected changesets from the local cache")); 420 413 this.model = model; … … 446 439 CloseSelectedChangesetsAction(ChangesetCacheManagerModel model) { 447 440 putValue(NAME, tr("Close")); 448 putValue(SMALL_ICON, ImageProvider.get("closechangeset"));441 new ImageProvider("closechangeset").getResource().attachImageIcon(this); 449 442 putValue(SHORT_DESCRIPTION, tr("Close the selected changesets")); 450 443 this.model = model; … … 490 483 DownloadSelectedChangesetsAction(ChangesetCacheManagerModel model) { 491 484 putValue(NAME, tr("Update changeset")); 492 putValue(SMALL_ICON, ImageProvider.get("dialogs/changeset", "updatechangeset"));485 new ImageProvider("dialogs/changeset", "updatechangeset").getResource().attachImageIcon(this); 493 486 putValue(SHORT_DESCRIPTION, tr("Updates the selected changesets with current data from the OSM server")); 494 487 this.model = model; … … 523 516 DownloadSelectedChangesetContentAction(ChangesetCacheManagerModel model) { 524 517 putValue(NAME, tr("Download changeset content")); 525 putValue(SMALL_ICON, DOWNLOAD_CONTENT_ICON);518 new ImageProvider("dialogs/changeset", "downloadchangesetcontent").getResource().attachImageIcon(this); 526 519 putValue(SHORT_DESCRIPTION, tr("Download the content of the selected changesets from the server")); 527 520 this.model = model; … … 570 563 DownloadMyChangesets() { 571 564 putValue(NAME, tr("My changesets")); 572 putValue(SMALL_ICON, ImageProvider.get("dialogs/changeset", "downloadchangeset"));565 new ImageProvider("dialogs/changeset", "downloadchangeset").getResource().attachImageIcon(this); 573 566 putValue(SHORT_DESCRIPTION, tr("Download my changesets from the OSM server (max. 100 changesets)")); 574 567 setEnabled(!Main.isOffline(OnlineResource.OSM_API)); -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentPanel.java
r10413 r10438 253 253 ShowHistoryAction() { 254 254 putValue(NAME, tr("Show history")); 255 putValue(SMALL_ICON, ImageProvider.get("dialogs", "history"));255 new ImageProvider("dialogs", "history").getResource().attachImageIcon(this); 256 256 putValue(SHORT_DESCRIPTION, tr("Download and show the history of the selected objects")); 257 257 updateEnabledState(); … … 371 371 SelectInCurrentLayerAction() { 372 372 putValue(NAME, tr("Select in layer")); 373 putValue(SMALL_ICON, ImageProvider.get("dialogs", "select"));373 new ImageProvider("dialogs", "select").getResource().attachImageIcon(this); 374 374 putValue(SHORT_DESCRIPTION, tr("Select the corresponding primitives in the current data layer")); 375 375 updateEnabledState(); … … 394 394 ZoomInCurrentLayerAction() { 395 395 putValue(NAME, tr("Zoom to in layer")); 396 putValue(SMALL_ICON, ImageProvider.get("dialogs/autoscale", "selection"));396 new ImageProvider("dialogs/autoscale", "selection").getResource().attachImageIcon(this); 397 397 putValue(SHORT_DESCRIPTION, tr("Zoom to the corresponding objects in the current data layer")); 398 398 updateEnabledState(); … … 442 442 putValue(NAME, tr("Download now")); 443 443 putValue(SHORT_DESCRIPTION, tr("Download the changeset content")); 444 putValue(SMALL_ICON, ChangesetCacheManager.DOWNLOAD_CONTENT_ICON);444 new ImageProvider("dialogs/changeset", "downloadchangesetcontent").getResource().attachImageIcon(this); 445 445 } 446 446 -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDetailPanel.java
r10413 r10438 273 273 RemoveFromCacheAction() { 274 274 putValue(NAME, tr("Remove from cache")); 275 putValue(SMALL_ICON, ImageProvider.get("dialogs", "delete"));275 new ImageProvider("dialogs", "delete").getResource().attachImageIcon(this); 276 276 putValue(SHORT_DESCRIPTION, tr("Remove the changeset in the detail view panel from the local cache")); 277 277 } … … 296 296 UpdateChangesetAction() { 297 297 putValue(NAME, tr("Update changeset")); 298 putValue(SMALL_ICON, ChangesetCacheManager.UPDATE_CONTENT_ICON);298 new ImageProvider("dialogs/changeset", "updatechangesetcontent").getResource().attachImageIcon(this); 299 299 putValue(SHORT_DESCRIPTION, tr("Update the changeset from the OSM server")); 300 300 } … … 324 324 SelectInCurrentLayerAction() { 325 325 putValue(NAME, tr("Select in layer")); 326 putValue(SMALL_ICON, ImageProvider.get("dialogs", "select"));326 new ImageProvider("dialogs", "select").getResource().attachImageIcon(this); 327 327 putValue(SHORT_DESCRIPTION, tr("Select the primitives in the content of this changeset in the current data layer")); 328 328 updateEnabledState(); … … 385 385 ZoomInCurrentLayerAction() { 386 386 putValue(NAME, tr("Zoom to in layer")); 387 putValue(SMALL_ICON, ImageProvider.get("dialogs/autoscale", "selection"));387 new ImageProvider("dialogs/autoscale", "selection").getResource().attachImageIcon(this); 388 388 putValue(SHORT_DESCRIPTION, tr("Zoom to the objects in the content of this changeset in the current data layer")); 389 389 updateEnabledState(); -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDiscussionPanel.java
r10124 r10438 25 25 import org.openstreetmap.josm.data.osm.Changeset; 26 26 import org.openstreetmap.josm.io.OnlineResource; 27 import org.openstreetmap.josm.tools.ImageProvider; 27 28 28 29 /** … … 64 65 UpdateChangesetDiscussionAction() { 65 66 putValue(NAME, tr("Update changeset discussion")); 66 putValue(SMALL_ICON, ChangesetCacheManager.UPDATE_CONTENT_ICON);67 new ImageProvider("dialogs/changeset", "updatechangesetcontent").getResource().attachImageIcon(this); 67 68 putValue(SHORT_DESCRIPTION, tr("Update the changeset discussion from the OSM server")); 68 69 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/DownloadChangesetContentAction.java
r10124 r10438 11 11 import org.openstreetmap.josm.actions.downloadtasks.ChangesetContentDownloadTask; 12 12 import org.openstreetmap.josm.tools.CheckParameterUtil; 13 import org.openstreetmap.josm.tools.ImageProvider; 13 14 14 15 /** … … 26 27 CheckParameterUtil.ensureParameterNotNull(component, "component"); 27 28 putValue(NAME, tr("Download content")); 28 putValue(SMALL_ICON, ChangesetCacheManager.DOWNLOAD_CONTENT_ICON);29 new ImageProvider("dialogs/changeset", "downloadchangesetcontent").getResource().attachImageIcon(this); 29 30 putValue(SHORT_DESCRIPTION, tr("Download the changeset content from the OSM server")); 30 31 this.component = component; … … 51 52 if (component.getCurrentChangeset().getContent() == null) { 52 53 putValue(NAME, tr("Download content")); 53 putValue(SMALL_ICON, ChangesetCacheManager.DOWNLOAD_CONTENT_ICON);54 new ImageProvider("dialogs/changeset", "downloadchangesetcontent").getResource().attachImageIcon(this); 54 55 putValue(SHORT_DESCRIPTION, tr("Download the changeset content from the OSM server")); 55 56 } else { 56 57 putValue(NAME, tr("Update content")); 57 putValue(SMALL_ICON, ChangesetCacheManager.UPDATE_CONTENT_ICON);58 new ImageProvider("dialogs/changeset", "updatechangesetcontent").getResource().attachImageIcon(this); 58 59 putValue(SHORT_DESCRIPTION, tr("Update the changeset content from the OSM server")); 59 60 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/SingleChangesetDownloadPanel.java
r10378 r10438 22 22 import org.openstreetmap.josm.gui.widgets.SelectAllOnFocusGainedDecorator; 23 23 import org.openstreetmap.josm.io.OnlineResource; 24 import org.openstreetmap.josm.tools.ImageProvider; 24 25 25 26 /** … … 80 81 81 82 DownloadAction() { 82 putValue(SMALL_ICON, ChangesetCacheManager.DOWNLOAD_CONTENT_ICON);83 new ImageProvider("dialogs/changeset", "downloadchangesetcontent").getResource().attachImageIcon(this); 83 84 putValue(SHORT_DESCRIPTION, tr("Download the changeset with the specified id, including the changeset content")); 84 85 updateEnabledState();
Note:
See TracChangeset
for help on using the changeset viewer.