Changeset 29344 in osm
- Timestamp:
- 2013-03-06T21:44:56+01:00 (12 years ago)
- Location:
- applications/editors/josm/plugins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/measurement/src/org/openstreetmap/josm/plugins/measurement/MeasurementDialog.java
r28898 r29344 24 24 import org.openstreetmap.josm.gui.dialogs.ToggleDialog; 25 25 import org.openstreetmap.josm.gui.help.HelpUtil; 26 import org.openstreetmap.josm.gui.util.GuiHelper; 26 27 import org.openstreetmap.josm.tools.ImageProvider; 27 28 import org.openstreetmap.josm.tools.Shortcut; … … 159 160 } 160 161 } 161 selectLengthLabel.setText(NavigatableComponent.getDistText(length)); 162 segAngleLabel.setText(new DecimalFormat("#0.0").format(segAngle) + " \u00b0"); 163 selectAreaLabel.setText(NavigatableComponent.getAreaText(area)); 162 163 final String lengthLabel = NavigatableComponent.getDistText(length); 164 final String angleLabel = new DecimalFormat("#0.0").format(segAngle) + " \u00b0"; 165 final String areaLabel = NavigatableComponent.getAreaText(area); 166 167 GuiHelper.runInEDT(new Runnable() { 168 @Override 169 public void run() { 170 selectLengthLabel.setText(lengthLabel); 171 segAngleLabel.setText(angleLabel); 172 selectAreaLabel.setText(areaLabel); 173 } 174 }); 164 175 } 165 176 -
applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/AddRemoveMemberAction.java
r28693 r29344 18 18 import org.openstreetmap.josm.data.osm.RelationMember; 19 19 import org.openstreetmap.josm.data.osm.Way; 20 import org.openstreetmap.josm.gui.util.GuiHelper; 20 21 import org.openstreetmap.josm.tools.ImageProvider; 21 22 import org.openstreetmap.josm.tools.Shortcut; … … 127 128 protected void updateIcon() { 128 129 // todo: change icon based on selection 129 int state = 0; // 0=unknown, 1=add, 2=remove, 3=both130 final int state; // 0=unknown, 1=add, 2=remove, 3=both 130 131 if( getCurrentDataSet() == null || getCurrentDataSet().getSelected() == null 131 132 || getCurrentDataSet().getSelected().isEmpty() || rel == null || rel.get() == null ) … … 147 148 } 148 149 } 150 GuiHelper.runInEDT(new Runnable() { 151 @Override 152 public void run() { 149 153 // String name = state == 0 ? "?" : state == 1 ? "+" : state == 2 ? "-" : "±"; 150 154 // putValue(Action.NAME, name); 151 if( state == 0) {155 if (state == 0) { 152 156 // putValue(NAME, "?"); 153 putValue(SMALL_ICON, ImageProvider.get("relcontext", "addremove")); 154 } else { 155 String iconName = state == 1 ? "add" : state == 2 ? "remove" : "addremove"; 156 putValue(NAME, null); 157 putValue(SMALL_ICON, ImageProvider.get("relcontext", iconName)); 158 } 157 putValue(SMALL_ICON, ImageProvider.get("relcontext", "addremove")); 158 } else { 159 String iconName = state == 1 ? "add" : state == 2 ? "remove" : "addremove"; 160 putValue(NAME, null); 161 putValue(SMALL_ICON, ImageProvider.get("relcontext", iconName)); 162 } 163 } 164 }); 159 165 } 160 166 }
Note:
See TracChangeset
for help on using the changeset viewer.