Changeset 11713 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2017-03-10T02:28:00+01:00 (8 years ago)
- Location:
- trunk
- Files:
-
- 33 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 12 12 junit*.properties 13 13 foobar 14 pmd-josm.xml
-
- Property svn:ignore
-
trunk/src/org/openstreetmap/josm/Main.java
r11656 r11713 82 82 import org.openstreetmap.josm.gui.layer.TMSLayer; 83 83 import org.openstreetmap.josm.gui.preferences.ToolbarPreferences; 84 import org.openstreetmap.josm.gui.preferences.display.LafPreference; 84 85 import org.openstreetmap.josm.gui.preferences.imagery.ImageryPreference; 85 86 import org.openstreetmap.josm.gui.preferences.map.MapPaintPreference; … … 765 766 766 767 String defaultlaf = platform.getDefaultStyle(); 767 String laf = Main.pref.get("laf", defaultlaf);768 String laf = LafPreference.LAF.get(); 768 769 try { 769 770 UIManager.setLookAndFeel(laf); … … 787 788 } catch (UnsupportedLookAndFeelException ex) { 788 789 info("Look and Feel not supported: " + laf); 789 Main.pref.put("laf",defaultlaf);790 LafPreference.LAF.put(defaultlaf); 790 791 trace(ex); 791 792 } 792 793 } else { 793 794 info("Look and Feel not found: " + laf); 794 Main.pref.put("laf",defaultlaf);795 LafPreference.LAF.put(defaultlaf); 795 796 } 796 797 } catch (UnsupportedLookAndFeelException e) { 797 798 info("Look and Feel not supported: " + laf); 798 Main.pref.put("laf",defaultlaf);799 LafPreference.LAF.put(defaultlaf); 799 800 trace(e); 800 801 } catch (InstantiationException | IllegalAccessException e) { -
trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java
r11383 r11713 137 137 * Constructs a new {@code AutoScaleAction}. 138 138 * @param mode The autoscale mode (one of {@link AutoScaleAction#MODES}) 139 * @param marker Used only to differentiate from default constructor 139 * @param marker Must be set to false. Used only to differentiate from default constructor 140 140 */ 141 141 private AutoScaleAction(String mode, boolean marker) { 142 super( false);142 super(marker); 143 143 this.mode = mode; 144 144 } -
trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java
r11652 r11713 53 53 */ 54 54 public ImageryAdjustAction(AbstractTileSourceLayer<?> layer) { 55 super(tr("New offset"), "adjustimg", 56 tr("Adjust the position of this imagery layer"), Main.map, 57 cursor); 55 super(tr("New offset"), "adjustimg", tr("Adjust the position of this imagery layer"), cursor); 58 56 putValue("toolbar", Boolean.FALSE); 59 57 this.layer = layer; -
trunk/src/org/openstreetmap/josm/actions/LassoModeAction.java
r7937 r11713 22 22 /* ICON(mapmode/) */ "rope", 23 23 tr("Lasso selection mode: select objects within a hand-drawn region"), 24 null,25 24 ImageProvider.getCursor("normal", "rope")); 26 25 } -
trunk/src/org/openstreetmap/josm/actions/mapmode/AddNoteAction.java
r10433 r11713 13 13 import org.openstreetmap.josm.data.coor.LatLon; 14 14 import org.openstreetmap.josm.data.osm.NoteData; 15 import org.openstreetmap.josm.gui.MapFrame;16 15 import org.openstreetmap.josm.gui.NoteInputDialog; 17 16 import org.openstreetmap.josm.gui.Notification; … … 30 29 /** 31 30 * Construct a new map mode. 32 * @param mapFrame Map frame to pass to the superconstructor33 31 * @param data Note data container. Must not be null 32 * @since 11713 34 33 */ 35 public AddNoteAction(MapFrame mapFrame, NoteData data) { 36 super(tr("Add a new Note"), "addnote", 37 tr("Add note mode"), 38 mapFrame, ImageProvider.getCursor("crosshair", "create_note")); 34 public AddNoteAction(NoteData data) { 35 super(tr("Add a new Note"), "addnote", tr("Add note mode"), 36 ImageProvider.getCursor("crosshair", "create_note")); 39 37 CheckParameterUtil.ensureParameterNotNull(data, "data"); 40 38 noteData = data; -
trunk/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java
r10716 r11713 22 22 import org.openstreetmap.josm.data.osm.Relation; 23 23 import org.openstreetmap.josm.data.osm.WaySegment; 24 import org.openstreetmap.josm.gui.MapFrame;25 24 import org.openstreetmap.josm.gui.dialogs.relation.RelationDialogManager; 26 25 import org.openstreetmap.josm.gui.layer.Layer; … … 89 88 /** 90 89 * Construct a new DeleteAction. Mnemonic is the delete - key. 91 * @ param mapFrame The frame this action belongs to.92 */ 93 public DeleteAction( MapFrame mapFrame) {90 * @since 11713 91 */ 92 public DeleteAction() { 94 93 super(tr("Delete Mode"), 95 94 "delete", … … 97 96 Shortcut.registerShortcut("mapmode:delete", tr("Mode: {0}", tr("Delete")), 98 97 KeyEvent.VK_DELETE, Shortcut.CTRL), 99 mapFrame,100 98 ImageProvider.getCursor("normal", "delete")); 101 99 } 102 100 103 @Override public void enterMode() { 101 @Override 102 public void enterMode() { 104 103 super.enterMode(); 105 104 if (!isEnabled()) -
trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
r11601 r11713 54 54 import org.openstreetmap.josm.data.preferences.StrokeProperty; 55 55 import org.openstreetmap.josm.gui.MainMenu; 56 import org.openstreetmap.josm.gui.MapFrame;57 56 import org.openstreetmap.josm.gui.MapView; 58 57 import org.openstreetmap.josm.gui.MapViewState.MapViewPoint; … … 156 155 /** 157 156 * Constructs a new {@code DrawAction}. 158 * @ param mapFrame Map frame159 */ 160 public DrawAction( MapFrame mapFrame) {157 * @since 11713 158 */ 159 public DrawAction() { 161 160 super(tr("Draw"), "node/autonode", tr("Draw nodes"), 162 161 Shortcut.registerShortcut("mapmode:draw", tr("Mode: {0}", tr("Draw")), KeyEvent.VK_A, Shortcut.DIRECT), 163 mapFrame,ImageProvider.getCursor("crosshair", null));162 ImageProvider.getCursor("crosshair", null)); 164 163 165 164 snappingShortcut = Shortcut.registerShortcut("mapmode:drawanglesnapping", -
trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java
r11542 r11713 45 45 import org.openstreetmap.josm.data.preferences.ColorProperty; 46 46 import org.openstreetmap.josm.gui.MainMenu; 47 import org.openstreetmap.josm.gui.MapFrame;48 47 import org.openstreetmap.josm.gui.MapView; 49 48 import org.openstreetmap.josm.gui.draw.MapViewPath; … … 210 209 /** 211 210 * Creates a new ExtrudeAction 212 * @ param mapFrame The MapFrame this action belongs to.213 */ 214 public ExtrudeAction( MapFrame mapFrame) {211 * @since 11713 212 */ 213 public ExtrudeAction() { 215 214 super(tr("Extrude"), /* ICON(mapmode/) */ "extrude/extrude", tr("Create areas"), 216 215 Shortcut.registerShortcut("mapmode:extrude", tr("Mode: {0}", tr("Extrude")), KeyEvent.VK_X, Shortcut.DIRECT), 217 mapFrame,218 216 ImageProvider.getCursor("normal", "rectangle")); 219 217 putValue("help", ht("/Action/Extrude")); -
trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyAction.java
r11542 r11713 40 40 import org.openstreetmap.josm.data.preferences.IntegerProperty; 41 41 import org.openstreetmap.josm.data.preferences.StrokeProperty; 42 import org.openstreetmap.josm.gui.MapFrame;43 42 import org.openstreetmap.josm.gui.MapView; 44 43 import org.openstreetmap.josm.gui.draw.MapViewPath; … … 111 110 /** 112 111 * Constructs a new {@code ImproveWayAccuracyAction}. 113 * @ param mapFrame Map frame112 * @since 11713 114 113 */ 115 public ImproveWayAccuracyAction( MapFrame mapFrame) {114 public ImproveWayAccuracyAction() { 116 115 super(tr("Improve Way Accuracy"), "improvewayaccuracy", 117 116 tr("Improve Way Accuracy mode"), 118 117 Shortcut.registerShortcut("mapmode:ImproveWayAccuracy", 119 118 tr("Mode: {0}", tr("Improve Way Accuracy")), 120 KeyEvent.VK_W, Shortcut.DIRECT), mapFrame,Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));119 KeyEvent.VK_W, Shortcut.DIRECT), Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); 121 120 122 121 readPreferences(); -
trunk/src/org/openstreetmap/josm/actions/mapmode/MapMode.java
r11421 r11713 11 11 import org.openstreetmap.josm.Main; 12 12 import org.openstreetmap.josm.actions.JosmAction; 13 import org.openstreetmap.josm.data.Preferences.PreferenceChangeEvent; 14 import org.openstreetmap.josm.data.Preferences.PreferenceChangedListener; 13 15 import org.openstreetmap.josm.gui.MapFrame; 14 16 import org.openstreetmap.josm.gui.layer.Layer; 15 17 import org.openstreetmap.josm.tools.ImageProvider; 16 18 import org.openstreetmap.josm.tools.Shortcut; 17 import org.openstreetmap.josm.data.Preferences.PreferenceChangeEvent;18 import org.openstreetmap.josm.data.Preferences.PreferenceChangedListener;19 19 20 20 /** … … 36 36 * @param tooltip a longer description of the action that will be displayed in the tooltip. 37 37 * @param shortcut a ready-created shortcut object or null if you don't want a shortcut. 38 * @param mapFrame unused but kept for plugin compatibility. Can be {@code null}39 * @ param cursor cursor displayed when map mode is active40 */ 41 public MapMode(String name, String iconName, String tooltip, Shortcut shortcut, MapFrame mapFrame,Cursor cursor) {38 * @param cursor cursor displayed when map mode is active 39 * @since 11713 40 */ 41 public MapMode(String name, String iconName, String tooltip, Shortcut shortcut, Cursor cursor) { 42 42 super(name, "mapmode/"+iconName, tooltip, shortcut, false); 43 43 this.cursor = cursor; … … 50 50 * @param iconName icon filename in {@code mapmode} directory 51 51 * @param tooltip a longer description of the action that will be displayed in the tooltip. 52 * @param mapFrame unused but kept for plugin compatibility. Can be {@code null}53 * @ param cursor cursor displayed when map mode is active54 */ 55 public MapMode(String name, String iconName, String tooltip, MapFrame mapFrame,Cursor cursor) {52 * @param cursor cursor displayed when map mode is active 53 * @since 11713 54 */ 55 public MapMode(String name, String iconName, String tooltip, Cursor cursor) { 56 56 putValue(NAME, name); 57 57 new ImageProvider("mapmode", iconName).getResource().attachImageIcon(this); 58 58 putValue(SHORT_DESCRIPTION, tooltip); 59 59 this.cursor = cursor; 60 } 61 62 /** 63 * Constructor for mapmodes without a menu 64 * @param name the action's text 65 * @param iconName icon filename in {@code mapmode} directory 66 * @param tooltip a longer description of the action that will be displayed in the tooltip. 67 * @param shortcut a ready-created shortcut object or null if you don't want a shortcut. 68 * @param mapFrame unused but kept for plugin compatibility. Can be {@code null} 69 * @param cursor cursor displayed when map mode is active 70 * @deprecated use {@link #MapMode(String, String, String, Shortcut, Cursor) instead} 71 */ 72 @Deprecated 73 public MapMode(String name, String iconName, String tooltip, Shortcut shortcut, MapFrame mapFrame, Cursor cursor) { 74 this(name, iconName, tooltip, shortcut, cursor); 75 } 76 77 /** 78 * Constructor for mapmodes with a menu (no shortcut will be registered) 79 * @param name the action's text 80 * @param iconName icon filename in {@code mapmode} directory 81 * @param tooltip a longer description of the action that will be displayed in the tooltip. 82 * @param mapFrame unused but kept for plugin compatibility. Can be {@code null} 83 * @param cursor cursor displayed when map mode is active 84 * @deprecated use {@link #MapMode(String, String, String, Cursor) instead} 85 */ 86 @Deprecated 87 public MapMode(String name, String iconName, String tooltip, MapFrame mapFrame, Cursor cursor) { 88 this(name, iconName, tooltip, cursor); 60 89 } 61 90 -
trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWayAction.java
r11542 r11713 153 153 Shortcut.registerShortcut("mapmode:parallel", tr("Mode: {0}", 154 154 tr("Parallel")), KeyEvent.VK_P, Shortcut.SHIFT), 155 mapFrame,ImageProvider.getCursor("normal", "parallel"));155 ImageProvider.getCursor("normal", "parallel")); 156 156 putValue("help", ht("/Action/Parallel")); 157 157 mv = mapFrame.mapView; -
trunk/src/org/openstreetmap/josm/actions/mapmode/PlayHeadDragMode.java
r11381 r11713 11 11 import org.openstreetmap.josm.data.coor.EastNorth; 12 12 import org.openstreetmap.josm.gui.layer.markerlayer.PlayHeadMarker; 13 import org.openstreetmap.josm.tools.Shortcut; 13 14 14 15 /** … … 30 31 */ 31 32 public PlayHeadDragMode(PlayHeadMarker m) { 32 super(tr("Drag play head"), "playheaddrag", tr("Drag play head"), null, 33 Main.map,Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));33 super(tr("Drag play head"), "playheaddrag", tr("Drag play head"), (Shortcut) null, 34 Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR)); 34 35 playHeadMarker = m; 35 36 } -
trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
r11553 r11713 182 182 super(tr("Select"), "move/move", tr("Select, move, scale and rotate objects"), 183 183 Shortcut.registerShortcut("mapmode:select", tr("Mode: {0}", tr("Select")), KeyEvent.VK_S, Shortcut.DIRECT), 184 mapFrame,185 184 ImageProvider.getCursor("normal", "selection")); 186 185 mv = mapFrame.mapView; -
trunk/src/org/openstreetmap/josm/actions/mapmode/ZoomAction.java
r10241 r11713 44 44 super(tr("Zoom"), "zoom", tr("Zoom and move map"), 45 45 Shortcut.registerShortcut("mapmode:zoom", tr("Mode: {0}", tr("Zoom")), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE), 46 mapFrame,ImageProvider.getCursor("normal", "zoom"));46 ImageProvider.getCursor("normal", "zoom")); 47 47 selectionManager = new SelectionManager(this, true, mapFrame.mapView); 48 48 } -
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r11650 r11713 293 293 args.getSingle(Option.GEOMETRY).orElse(null), 294 294 !args.hasOption(Option.NO_MAXIMIZE) && Main.pref.getBoolean("gui.maximized", false)); 295 final MainFrame mainFrame = new MainFrame(contentPanePrivate, mainPanel,geometry);295 final MainFrame mainFrame = new MainFrame(contentPanePrivate, geometry); 296 296 Main.parent = mainFrame; 297 297 -
trunk/src/org/openstreetmap/josm/gui/MainFrame.java
r11348 r11713 55 55 */ 56 56 public MainFrame() { 57 this(new JPanel(), new MainPanel(Main.getLayerManager()), newWindowGeometry(new Rectangle(10, 10, 500, 500)));57 this(new JPanel(), new WindowGeometry(new Rectangle(10, 10, 500, 500))); 58 58 } 59 59 … … 61 61 * Create a new main window. The parameters will be removed in the future. 62 62 * @param contentPanePrivate The content 63 * @param mainPanel The main panel.64 63 * @param geometry The inital geometry to use. 65 */ 66 public MainFrame(Container contentPanePrivate, MainPanel mainPanel, WindowGeometry geometry) { 64 * @since 11713 65 */ 66 public MainFrame(Container contentPanePrivate, WindowGeometry geometry) { 67 67 super(); 68 68 this.geometry = geometry; -
trunk/src/org/openstreetmap/josm/gui/MainPanel.java
r11551 r11713 84 84 85 85 private MapFrame createNewMapFrame() { 86 MapFrame mapFrame = new MapFrame(null , null);86 MapFrame mapFrame = new MapFrame(null); 87 87 // Required by many components. 88 88 Main.map = mapFrame; -
trunk/src/org/openstreetmap/josm/gui/MapFrame.java
r11536 r11713 183 183 /** 184 184 * Constructs a new {@code MapFrame}. 185 * @param contentPane Ignored. Main content pane is used.186 185 * @param viewportData the initial viewport of the map. Can be null, then 187 186 * the viewport is derived from the layer data. 188 */ 189 public MapFrame(JPanel contentPane, ViewportData viewportData) { 187 * @since 11713 188 */ 189 public MapFrame(ViewportData viewportData) { 190 190 setSize(400, 400); 191 191 setLayout(new BorderLayout()); 192 192 193 mapView = new MapView(Main.getLayerManager(), contentPane,viewportData);193 mapView = new MapView(Main.getLayerManager(), viewportData); 194 194 195 195 splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true); … … 228 228 mapModeSelect = new SelectAction(this); 229 229 mapModeSelectLasso = new LassoModeAction(); 230 mapModeDraw = new DrawAction( this);230 mapModeDraw = new DrawAction(); 231 231 mapModeZoom = new ZoomAction(this); 232 232 … … 235 235 addMapMode(new IconToggleButton(mapModeDraw)); 236 236 addMapMode(new IconToggleButton(mapModeZoom, true)); 237 addMapMode(new IconToggleButton(new DeleteAction( this), true));237 addMapMode(new IconToggleButton(new DeleteAction(), true)); 238 238 addMapMode(new IconToggleButton(new ParallelWayAction(this), true)); 239 addMapMode(new IconToggleButton(new ExtrudeAction( this), true));240 addMapMode(new IconToggleButton(new ImproveWayAccuracyAction( Main.map), false));239 addMapMode(new IconToggleButton(new ExtrudeAction(), true)); 240 addMapMode(new IconToggleButton(new ImproveWayAccuracyAction(), false)); 241 241 toolBarActionsGroup.setSelected(allMapModeButtons.get(0).getModel(), true); 242 242 toolBarActions.setFloatable(false); -
trunk/src/org/openstreetmap/josm/gui/MapMover.java
r11553 r11713 15 15 16 16 import javax.swing.AbstractAction; 17 import javax.swing.JPanel;18 17 19 18 import org.openstreetmap.gui.jmapviewer.JMapViewer; … … 38 37 public static final BooleanProperty PROP_ZOOM_REVERSE_WHEEL = new BooleanProperty("zoom.reverse-wheel", false); 39 38 40 private static final JMapViewerUpdater jMapViewerUpdater = new JMapViewerUpdater(); 39 static { 40 new JMapViewerUpdater(); 41 } 41 42 42 43 private static class JMapViewerUpdater implements PreferenceChangedListener { … … 117 118 * Constructs a new {@code MapMover}. 118 119 * @param navComp the navigatable component 119 * @ param contentPane Ignored. The main action map is used.120 */ 121 public MapMover(NavigatableComponent navComp , JPanel contentPane) {120 * @since 11713 121 */ 122 public MapMover(NavigatableComponent navComp) { 122 123 this.nc = navComp; 123 124 nc.addMouseListener(this); -
trunk/src/org/openstreetmap/josm/gui/MapView.java
r11226 r11713 237 237 * the viewport is derived from the layer data. 238 238 * @since 10279 239 */ 239 * @deprecated use {@link #MapView(MainLayerManager, ViewportData)} instead 240 */ 241 @Deprecated 240 242 public MapView(MainLayerManager layerManager, final JPanel contentPane, final ViewportData viewportData) { 243 this(layerManager, viewportData); 244 } 245 246 /** 247 * Constructs a new {@code MapView}. 248 * @param layerManager The layers to display. 249 * @param viewportData the initial viewport of the map. Can be null, then 250 * the viewport is derived from the layer data. 251 * @since 11713 252 */ 253 public MapView(MainLayerManager layerManager, final ViewportData viewportData) { 241 254 this.layerManager = layerManager; 242 255 initialViewport = viewportData; … … 249 262 public void componentResized(ComponentEvent e) { 250 263 removeComponentListener(this); 251 252 mapMover = new MapMover(MapView.this, contentPane); 264 mapMover = new MapMover(MapView.this); 253 265 } 254 266 }); 255 267 256 // listen dto selection changes to redraw the map268 // listens to selection changes to redraw the map 257 269 DataSet.addSelectionListener(repaintSelectionChangedListener); 258 270 -
trunk/src/org/openstreetmap/josm/gui/datatransfer/importers/OsmLinkPaster.java
r11357 r11713 14 14 import org.openstreetmap.josm.data.coor.EastNorth; 15 15 import org.openstreetmap.josm.data.coor.LatLon; 16 import org.openstreetmap.josm.data.preferences.BooleanProperty;17 16 import org.openstreetmap.josm.gui.MapView; 18 17 import org.openstreetmap.josm.gui.layer.OsmDataLayer; … … 35 34 } 36 35 37 private static final BooleanProperty PASTE_REFERRERS = new BooleanProperty("paste.url.download-referrers", true);38 36 private static final String OSM_SERVER = "^https?\\://(\\w+\\.)?(osm|openstreetmap)\\.org/"; 39 37 … … 68 66 } 69 67 70 protectedstatic LatLon parseLatLon(String transferData) {68 static LatLon parseLatLon(String transferData) { 71 69 Matcher matcher = Pattern 72 70 .compile(OSM_SERVER + "#map=(?<zoom>\\d+)/(?<lat>-?\\d+\\.\\d+)/(?<lon>-?\\d+\\.\\d+)$") -
trunk/src/org/openstreetmap/josm/gui/dialogs/NotesDialog.java
r11386 r11713 355 355 Main.getLayerManager().addLayer(new NoteLayer()); 356 356 } 357 Main.map.selectMapMode(new AddNoteAction( Main.map,noteData));357 Main.map.selectMapMode(new AddNoteAction(noteData)); 358 358 } 359 359 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java
r11628 r11713 86 86 private DefaultMutableTreeNode lastSelectedNode; 87 87 88 private transient OsmDataLayer linkedLayer;89 90 88 /** 91 89 * Constructor -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManager.java
r11593 r11713 294 294 actDownloadSelectedChangesets = new DownloadSelectedChangesetsAction(model); 295 295 actDownloadSelectedContent = new DownloadSelectedChangesetContentAction(model); 296 actDownloadSelectedChangesetObjects = new DownloadSelectedChangesetObjectsAction( model);296 actDownloadSelectedChangesetObjects = new DownloadSelectedChangesetObjectsAction(); 297 297 298 298 cp.add(buildToolbarPanel(), BorderLayout.NORTH); … … 556 556 private class DownloadSelectedChangesetObjectsAction extends AbstractAction implements ListSelectionListener { 557 557 558 DownloadSelectedChangesetObjectsAction( ChangesetCacheManagerModel model) {558 DownloadSelectedChangesetObjectsAction() { 559 559 putValue(NAME, tr("Download changed objects")); 560 560 new ImageProvider("downloadprimitive").getResource().attachImageIcon(this); -
trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
r11383 r11713 89 89 super(d.getString(GpxConstants.META_NAME)); 90 90 data = d; 91 drawHelper = new GpxDrawHelper(data , getColorProperty());91 drawHelper = new GpxDrawHelper(data); 92 92 SystemOfMeasurement.addSoMChangeListener(drawHelper); 93 93 ensureTrackVisibilityLength(); -
trunk/src/org/openstreetmap/josm/gui/layer/MapViewPaintable.java
r10609 r11713 72 72 * @since 10458 73 73 */ 74 publicinterface LayerPainter {74 interface LayerPainter { 75 75 76 76 /** -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java
r11704 r11713 39 39 import org.openstreetmap.josm.data.gpx.GpxData; 40 40 import org.openstreetmap.josm.data.gpx.WayPoint; 41 import org.openstreetmap.josm.data.preferences.AbstractProperty;42 41 import org.openstreetmap.josm.data.preferences.ColorProperty; 43 42 import org.openstreetmap.josm.gui.MapView; … … 206 205 * Constructs a new {@code GpxDrawHelper}. 207 206 * @param gpxData GPX data 208 * @param abstractProperty The color to draw with 209 * @since 10824 210 */ 211 public GpxDrawHelper(GpxData gpxData, AbstractProperty<Color> abstractProperty) { 207 * @since 11713 208 */ 209 public GpxDrawHelper(GpxData gpxData) { 212 210 data = gpxData; 213 211 setupColors(); -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java
r10837 r11713 40 40 */ 41 41 @FunctionalInterface 42 publicinterface ToTagConvertable {42 interface ToTagConvertable { 43 43 /** 44 44 * Converts the current condition to a tag -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
r11374 r11713 58 58 @Target(ElementType.METHOD) 59 59 @Retention(RetentionPolicy.RUNTIME) 60 static@interface NullableArguments {}60 @interface NullableArguments {} 61 61 62 62 private static final List<Method> arrayFunctions = new ArrayList<>(); -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj
r11623 r11713 67 67 * Nicer way to refer to a lexical state. 68 68 */ 69 public staticenum LexicalState {69 public enum LexicalState { 70 70 /** the preprocessor */ 71 71 PREPROCESSOR(0), -
trunk/src/org/openstreetmap/josm/gui/preferences/display/LafPreference.java
r11366 r11713 26 26 import org.openstreetmap.josm.Main; 27 27 import org.openstreetmap.josm.actions.ExpertToggleAction; 28 import org.openstreetmap.josm.data.preferences.StringProperty; 28 29 import org.openstreetmap.josm.gui.MapMover; 29 30 import org.openstreetmap.josm.gui.NavigatableComponent; … … 44 45 */ 45 46 public class LafPreference implements SubPreferenceSetting { 47 48 /** 49 * Look-and-feel property. 50 * @since 11713 51 */ 52 public static final StringProperty LAF = new StringProperty("laf", Main.platform.getDefaultStyle()); 46 53 47 54 static final class LafListCellRenderer implements ListCellRenderer<LookAndFeelInfo> { … … 100 107 } 101 108 102 String laf = Main.pref.get("laf", Main.platform.getDefaultStyle());109 String laf = LAF.get(); 103 110 for (int i = 0; i < lafCombo.getItemCount(); ++i) { 104 111 if (lafCombo.getItemAt(i).getClassName().equals(laf)) { … … 203 210 NavigatableComponent.PROP_ZOOM_INTERMEDIATE_STEPS.put(zoomIntermediateSteps.isSelected()); 204 211 NavigatableComponent.PROP_ZOOM_RATIO.put(Math.pow(2, 1/(double) spinZoomRatio.getModel().getValue())); 205 mod |= Main.pref.put("laf",((LookAndFeelInfo) lafCombo.getSelectedItem()).getClassName());212 mod |= LAF.put(((LookAndFeelInfo) lafCombo.getSelectedItem()).getClassName()); 206 213 return mod; 207 214 } -
trunk/src/org/openstreetmap/josm/gui/progress/ProgressMonitor.java
r11100 r11713 33 33 34 34 @FunctionalInterface 35 publicinterface CancelListener {35 interface CancelListener { 36 36 void operationCanceled(); 37 37 }
Note:
See TracChangeset
for help on using the changeset viewer.