Changeset 15824 in josm
- Timestamp:
- 2020-02-06T21:59:49+01:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r15496 r15824 715 715 p.add(new JLabel(tr("API version: {0}", (data.getVersion() != null) ? data.getVersion() : tr("unset"))), 716 716 GBC.eop().insets(15, 0, 0, 0)); 717 if (isUploadDiscouraged()) { 718 p.add(new JLabel(tr("Upload is discouraged")), GBC.eop().insets(15, 0, 0, 0)); 719 } 720 if (data.getUploadPolicy() == UploadPolicy.BLOCKED) { 721 p.add(new JLabel(tr("Upload is blocked")), GBC.eop().insets(15, 0, 0, 0)); 722 } 717 addConditionalInformation(p, tr("Layer is locked"), isLocked()); 718 addConditionalInformation(p, tr("Download is blocked"), data.getDownloadPolicy() == DownloadPolicy.BLOCKED); 719 addConditionalInformation(p, tr("Upload is discouraged"), isUploadDiscouraged()); 720 addConditionalInformation(p, tr("Upload is blocked"), data.getUploadPolicy() == UploadPolicy.BLOCKED); 723 721 724 722 return p; 725 723 } 726 724 727 @Override public Action[] getMenuEntries() { 725 private static void addConditionalInformation(JPanel p, String text, boolean condition) { 726 if (condition) { 727 p.add(new JLabel(text), GBC.eop().insets(15, 0, 0, 0)); 728 } 729 } 730 731 @Override 732 public Action[] getMenuEntries() { 728 733 List<Action> actions = new ArrayList<>(); 729 734 actions.addAll(Arrays.asList(
Note: See TracChangeset
for help on using the changeset viewer.