Changeset 486 in josm
- Timestamp:
- 2007-12-14T02:00:43+01:00 (17 years ago)
- Location:
- trunk
- Files:
-
- 332 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/.classpath
r402 r486 2 2 <classpath> 3 3 <classpathentry kind="src" path="src"/> 4 <classpathentry excluding="build/|dist/|src/|test/" including="images/|presets/ " kind="src" path=""/>4 <classpathentry excluding="build/|dist/|src/|test/" including="images/|presets/|styles/" kind="src" path=""/> 5 5 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> 6 6 <classpathentry kind="lib" path="lib/metadata-extractor-2.3.1-nosun.jar"/> -
trunk/build.xml
r445 r486 30 30 </copy> 31 31 32 <!-- styles --> 33 <copy todir="build/styles"> 34 <fileset dir="styles" /> 35 </copy> 36 32 37 <!-- create josm-custom.jar --> 33 38 <delete file="dist/josm-custom.jar"/> -
trunk/src/org/openstreetmap/josm/Main.java
r463 r486 53 53 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 54 54 import org.openstreetmap.josm.gui.layer.OsmDataLayer.CommandQueueListener; 55 import org.openstreetmap.josm.gui.preferences.MapPaintPreference; 55 56 import org.openstreetmap.josm.gui.preferences.TaggingPresetPreference; 56 57 import org.openstreetmap.josm.gui.preferences.ToolbarPreferences; … … 120 121 */ 121 122 public final MainMenu menu; 122 123 124 123 125 124 … … 186 185 187 186 TaggingPresetPreference.initialize(); 187 MapPaintPreference.initialize(); 188 188 189 189 toolbar.refreshToolbarControl(); … … 203 203 if (System.getProperty("josm.plugins") != null) 204 204 plugins.addAll(Arrays.asList(System.getProperty("josm.plugins").split(","))); 205 206 // we remove mappaint from the preferences on startup but this is just 207 // in case it crept in through the properties: 208 if (plugins.contains("mappaint")) { 209 plugins.remove("mappaint"); 210 System.out.println("Warning - loading of mappaint plugin was requested. This JOSM version has built-in mappaint support. The plugin is not required."); 211 } 212 205 213 if (plugins.isEmpty()) 206 214 return; -
trunk/src/org/openstreetmap/josm/data/Preferences.java
r480 r486 136 136 return all; 137 137 } 138 138 139 synchronized public boolean getBoolean(final String key) { 139 140 return getBoolean(key, false); … … 144 145 return properties.containsKey(key) ? Boolean.parseBoolean(properties.get(key)) : def; 145 146 } 146 147 147 148 148 synchronized public void put(final String key, final String value) { … … 159 159 firePreferenceChanged(key, Boolean.toString(value)); 160 160 } 161 162 161 163 162 private final void firePreferenceChanged(final String key, final String value) { … … 207 206 properties.put("projection", "org.openstreetmap.josm.data.projection.Epsg4326"); 208 207 properties.put("draw.segment.direction", "true"); 208 properties.put("draw.wireframe", "false"); 209 209 properties.put("layerlist.visible", "true"); 210 210 properties.put("propertiesdialog.visible", "true"); -
trunk/src/org/openstreetmap/josm/data/coor/Coordinate.java
r456 r486 3 3 4 4 import java.io.Serializable; 5 6 7 8 5 9 6 /** -
trunk/src/org/openstreetmap/josm/data/osm/visitor/SimplePaintVisitor.java
r367 r486 21 21 22 22 /** 23 * A visitor that paint a simple scheme of every primitive it visits to a23 * A visitor that paints a simple scheme of every primitive it visits to a 24 24 * previous set graphic environment. 25 25 * -
trunk/src/org/openstreetmap/josm/gui/GettingStarted.java
r484 r486 50 50 panel = new JPanel(new GridBagLayout()); 51 51 52 panel.add(new JLabel(tr("<html><h2>You are running the latest \"modeless\" JOSM version.</h2>" + 53 "<h3>This version (almost) does away with the old edit modes, like \"add node and connect\"<br>" + 54 "etc.; instead, there are only four modes: zoom, select, edit, and delete." + 55 "<br>The edit mode will do what you want in most cases (also see the mini help about<br>" + 56 "modifier keys at the bottom of the screen).</h3>" + 57 "<h3>If this is the first time you use JOSM since 08 October, you will also find that with the<br>" + 58 "0.5 API, segments have gone and relations have been added. You will find general<br>" + 59 "information about the changes on the OSM wiki, and there's a page on using relations<br>"+ 60 "in the JOSM online help." + 52 panel.add(new JLabel(tr("<html><h2>You are running the latest JOSM version with built-in mappaint support.</h2>" + 53 "<h3>The mappaint plugin is no longer necessary and has been removed from your configuration<br>" + 54 "file (if it was present). You can now switch between the \"classic\" display and the mappaint<br>" + 55 "style by toggling the \"Wireframe\" option in the \"View\" menu.</h3>" + 56 "<h3>If you have not used new JOSM versions for a while, you will also discover that this JOSM<br>" + 57 "is \"modeless\". It (almost) does away with the old edit modes, like \"add node and connect\" etc.;<br>"+ 58 "instead, there are only four modes: zoom, select, edit, and delete. The edit mode will do what<br>"+ 59 "you want in most cases (also see the mini help about modifier keys at the bottom of the screen)." + 61 60 "</h3>")), GBC.eol()); 62 61 -
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r442 r486 111 111 } else { 112 112 Main.pref.load(); 113 114 // this is temporary code to ease the transition to built-in mappaint 115 List<String> plugins = new LinkedList<String>(); 116 if (Main.pref.hasKey("plugins")) 117 plugins.addAll(Arrays.asList(Main.pref.get("plugins").split(","))); 118 119 if (plugins.contains("mappaint")) { 120 plugins.remove("mappaint"); 121 // XXX is there really no "public static String.join" or something? 122 StringBuilder tmp = new StringBuilder(); 123 for (String p : plugins) { if (tmp.length()>0) tmp.append(","); tmp.append(p); } 124 Main.pref.put("plugins", tmp.toString()); 125 Main.pref.put("draw.wireframe", false); 126 } else if (!Main.pref.hasKey("draw.wireframe")) { 127 Main.pref.put("draw.wireframe", true); 128 } 113 129 } 114 130 } catch (final IOException e1) { -
trunk/src/org/openstreetmap/josm/gui/MainMenu.java
r466 r486 10 10 11 11 import javax.swing.Action; 12 import javax.swing.JCheckBoxMenuItem; 12 13 import javax.swing.JMenu; 13 14 import javax.swing.JMenuBar; … … 15 16 import javax.swing.KeyStroke; 16 17 18 import org.openstreetmap.josm.Main; 17 19 import org.openstreetmap.josm.actions.JosmAction; 18 20 import org.openstreetmap.josm.actions.AboutAction; … … 44 46 import org.openstreetmap.josm.actions.search.SearchAction; 45 47 import org.openstreetmap.josm.data.DataSetChecker; 48 import org.openstreetmap.josm.data.Preferences; 46 49 47 50 /** … … 156 159 current.setAccelerator(autoScaleAction.shortCut); 157 160 } 161 viewMenu.addSeparator(); 162 163 // TODO move code to an "action" like the others? 164 final JCheckBoxMenuItem wireframe = new JCheckBoxMenuItem(tr("Wireframe view")); 165 wireframe.setSelected(Main.pref.getBoolean("draw.wireframe", true)); 166 wireframe.setAccelerator(KeyStroke.getKeyStroke("alt W")); 167 wireframe.addActionListener(new ActionListener() { 168 public void actionPerformed(ActionEvent ev) { 169 Main.pref.put("draw.wireframe", wireframe.isSelected()); 170 Main.map.mapView.repaint(); 171 } 172 }); 173 viewMenu.add(wireframe); 174 158 175 add(viewMenu); 159 176 -
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r483 r486 41 41 import org.openstreetmap.josm.data.osm.Way; 42 42 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; 43 import org.openstreetmap.josm.data.osm.visitor.MapPaintVisitor; 43 44 import org.openstreetmap.josm.data.osm.visitor.MergeVisitor; 44 45 import org.openstreetmap.josm.data.osm.visitor.SimplePaintVisitor; … … 116 117 public final LinkedList<DataChangeListener> listenerDataChanged = new LinkedList<DataChangeListener>(); 117 118 118 private SimplePaintVisitor mapPainter = new SimplePaintVisitor(); 119 119 private SimplePaintVisitor wireframeMapPainter = new SimplePaintVisitor(); 120 private MapPaintVisitor standardMapPainter = new MapPaintVisitor(); 121 120 122 /** 121 123 * Construct a OsmDataLayer. … … 158 160 } 159 161 } 160 mapPainter.setGraphics(g); 161 mapPainter.setNavigatableComponent(mv); 162 mapPainter.inactive = inactive; 163 mapPainter.visitAll(data); 162 163 if (Main.pref.getBoolean("draw.wireframe")) { 164 wireframeMapPainter.setGraphics(g); 165 wireframeMapPainter.setNavigatableComponent(mv); 166 wireframeMapPainter.inactive = inactive; 167 wireframeMapPainter.visitAll(data); 168 } 169 else 170 { 171 standardMapPainter.setGraphics(g); 172 standardMapPainter.setNavigatableComponent(mv); 173 standardMapPainter.inactive = inactive; 174 standardMapPainter.visitAll(data); 175 } 164 176 Main.map.conflictDialog.paintConflicts(g, mv); 165 177 } … … 321 333 } 322 334 323 324 public void setMapPainter(SimplePaintVisitor mapPainter) {325 this.mapPainter = mapPainter;326 }327 328 335 public void fireDataChange() { 329 336 for (DataChangeListener dcl : listenerDataChanged) { -
trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java
r319 r486 101 101 settings.add(new DrawingPreference()); 102 102 settings.add(new ColorPreference()); 103 settings.add(new MapPaintPreference()); 103 104 settings.add(new ServerAccessPreference()); 104 105 settings.add(new CsvPreference());
Note:
See TracChangeset
for help on using the changeset viewer.