Changeset 33842 in osm for applications/editors/josm/plugins/graphview
- Timestamp:
- 2017-11-21T00:48:47+01:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/graphview
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/graphview/build.xml
r32680 r33842 2 2 <project name="graphview" default="dist" basedir="."> 3 3 <property name="commit.message" value="option to change graph colors; closes ticket 5523 in JOSM Trac"/> 4 <property name="plugin.main.version" value="1 0580"/>4 <property name="plugin.main.version" value="12987"/> 5 5 6 6 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/access/AccessType.java
r32620 r33842 15 15 UNDEFINED(); 16 16 17 private String[] valueStrings;17 private final String[] valueStrings; 18 18 AccessType(String... valueStrings) { 19 19 this.valueStrings = valueStrings; -
applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/util/ValueStringParser.java
r32620 r33842 5 5 import java.util.regex.Pattern; 6 6 7 import org.openstreetmap.josm. Main;7 import org.openstreetmap.josm.tools.Logging; 8 8 9 9 public final class ValueStringParser { … … 27 27 28 28 } catch (NumberFormatException nfe) { 29 Main.trace(nfe);29 Logging.trace(nfe); 30 30 } 31 31 … … 55 55 56 56 } catch (NumberFormatException nfe) { 57 Main.trace(nfe);57 Logging.trace(nfe); 58 58 } 59 59 } … … 90 90 return (float) Integer.parseInt(kmhString); 91 91 } catch (NumberFormatException nfe) { 92 Main.trace(nfe);92 Logging.trace(nfe); 93 93 } 94 94 } … … 103 103 return KM_PER_MILE * mph; 104 104 } catch (NumberFormatException nfe) { 105 Main.trace(nfe);105 Logging.trace(nfe); 106 106 } 107 107 } … … 173 173 } 174 174 } catch (NumberFormatException nfe) { 175 Main.trace(nfe);175 Logging.trace(nfe); 176 176 } 177 177 } -
applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/GraphViewPlugin.java
r32620 r33842 18 18 19 19 import org.openstreetmap.josm.Main; 20 import org.openstreetmap.josm.gui.MainApplication; 20 21 import org.openstreetmap.josm.gui.MapFrame; 21 22 import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent; … … 50 51 import org.openstreetmap.josm.plugins.graphview.plugin.preferences.GraphViewPreferences; 51 52 import org.openstreetmap.josm.plugins.graphview.plugin.preferences.InternalRuleset; 53 import org.openstreetmap.josm.tools.Logging; 52 54 53 55 /** … … 123 125 graphViewLayer.setNodePositioner(new DefaultNodePositioner()); 124 126 125 Main .getLayerManager().addLayer(graphViewLayer);127 MainApplication.getLayerManager().addLayer(graphViewLayer); 126 128 } 127 129 } 128 130 } catch (AccessRulesetSyntaxException e) { 129 131 JOptionPane.showMessageDialog(Main.parent, tr("Syntax exception in access ruleset:\n{0}", e)); 130 Main.error(e);132 Logging.error(e); 131 133 } catch (FileNotFoundException e) { 132 134 JOptionPane.showMessageDialog(Main.parent, tr("File not found:\n{0}", e)); 133 Main.error(e);135 Logging.error(e); 134 136 } catch (IOException e) { 135 137 JOptionPane.showMessageDialog(Main.parent, tr("Problem when accessing a file:\n{0}", e)); 136 Main.error(e);138 Logging.error(e); 137 139 } 138 140 } … … 156 158 } catch (AccessRulesetSyntaxException e) { 157 159 JOptionPane.showMessageDialog(Main.parent, tr("Syntax exception in access ruleset:\n{0}", e)); 158 Main.error(e);160 Logging.error(e); 159 161 } catch (FileNotFoundException e) { 160 162 JOptionPane.showMessageDialog(Main.parent, tr("File not found:\n", e)); 161 Main.error(e);163 Logging.error(e); 162 164 } catch (IOException e) { 163 165 JOptionPane.showMessageDialog(Main.parent, tr("Problem when accessing a file:\n{0}", e)); 164 Main.error(e);166 Logging.error(e); 165 167 } 166 168 } … … 225 227 newFrame.addToggleDialog(laneDialog); 226 228 } 227 Main .getLayerManager().addLayerChangeListener(this);229 MainApplication.getLayerManager().addLayerChangeListener(this); 228 230 } else { 229 Main .getLayerManager().removeLayerChangeListener(this);231 MainApplication.getLayerManager().removeLayerChangeListener(this); 230 232 } 231 233 } … … 235 237 if (e.getRemovedLayer() == graphViewLayer) { 236 238 graphViewLayer = null; 237 } else if (e.getRemovedLayer() == Main .getLayerManager().getEditLayer()) { //data layer removed239 } else if (e.getRemovedLayer() == MainApplication.getLayerManager().getEditLayer()) { //data layer removed 238 240 if (graphViewLayer != null) { 239 Main .getLayerManager().removeLayer(graphViewLayer);241 MainApplication.getLayerManager().removeLayer(graphViewLayer); 240 242 graphViewLayer = null; 241 243 } -
applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/data/JOSMDataSource.java
r32620 r33842 9 9 import java.util.Set; 10 10 11 import org.openstreetmap.josm.Main;12 11 import org.openstreetmap.josm.data.osm.Node; 13 12 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 15 14 import org.openstreetmap.josm.data.osm.RelationMember; 16 15 import org.openstreetmap.josm.data.osm.Way; 16 import org.openstreetmap.josm.gui.MainApplication; 17 17 import org.openstreetmap.josm.plugins.graphview.core.data.DataSource; 18 18 import org.openstreetmap.josm.plugins.graphview.core.data.DataSourceObserver; … … 49 49 @Override 50 50 public Iterable<Node> getNodes() { 51 return new FilteredOsmPrimitiveIterable<>(Main .getLayerManager().getEditDataSet().getNodes());51 return new FilteredOsmPrimitiveIterable<>(MainApplication.getLayerManager().getEditDataSet().getNodes()); 52 52 } 53 53 54 54 @Override 55 55 public Iterable<Relation> getRelations() { 56 return new FilteredRelationIterable(Main .getLayerManager().getEditDataSet().getRelations());56 return new FilteredRelationIterable(MainApplication.getLayerManager().getEditDataSet().getRelations()); 57 57 } 58 58 59 59 @Override 60 60 public Iterable<Way> getWays() { 61 return new FilteredOsmPrimitiveIterable<>(Main .getLayerManager().getEditDataSet().getWays());61 return new FilteredOsmPrimitiveIterable<>(MainApplication.getLayerManager().getEditDataSet().getWays()); 62 62 } 63 63 -
applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/dialogs/GraphViewDialog.java
r32620 r33842 28 28 import javax.swing.JPanel; 29 29 30 import org.openstreetmap.josm.Main;31 30 import org.openstreetmap.josm.gui.SideButton; 32 31 import org.openstreetmap.josm.gui.dialogs.ToggleDialog; … … 42 41 import org.openstreetmap.josm.plugins.graphview.plugin.preferences.GraphViewPreferences; 43 42 import org.openstreetmap.josm.plugins.graphview.plugin.preferences.InternalRuleset; 43 import org.openstreetmap.josm.tools.Logging; 44 44 import org.openstreetmap.josm.tools.Shortcut; 45 45 … … 256 256 } catch (IOException ioe) { 257 257 //don't add to rulesetFiles 258 Main.debug(ioe);258 Logging.debug(ioe); 259 259 } 260 260 } -
applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/preferences/GraphViewPreferences.java
r32620 r33842 26 26 27 27 import org.openstreetmap.josm.Main; 28 import org.openstreetmap.josm.data.preferences.NamedColorProperty; 28 29 import org.openstreetmap.josm.plugins.graphview.core.access.AccessParameters; 29 30 import org.openstreetmap.josm.plugins.graphview.core.access.AccessType; … … 258 259 } 259 260 260 Main.pref.put ("graphview.useInternalRulesets", useInternalRulesets);261 Main.pref.putBoolean("graphview.useInternalRulesets", useInternalRulesets); 261 262 262 263 Main.pref.put("graphview.rulesetFolder", rulesetFolder.getPath()); … … 269 270 } 270 271 271 Main.pref.putColor(marktr("graphview default node"), Color.WHITE); 272 Main.pref.putColor(marktr("graphview default segment"), Color.WHITE); 273 Main.pref.putColor(marktr("graphview arrowhead core"), Color.BLACK); 274 275 Main.pref.put("graphview.separateDirections", separateDirections); 272 Main.pref.putBoolean("graphview.separateDirections", separateDirections); 276 273 277 274 Main.pref.putDouble("graphview.arrowheadPlacement", arrowheadPlacement); … … 317 314 } 318 315 319 nodeColor = Main.pref.getColor(marktr("graphview default node"), Color.WHITE);320 segmentColor = Main.pref.getColor(marktr("graphview default segment"), Color.WHITE);321 arrowheadFillColor = Main.pref.getColor(marktr("graphview arrowhead core"), Color.BLACK);316 nodeColor = new NamedColorProperty(marktr("graphview default node"), Color.WHITE).get(); 317 segmentColor = new NamedColorProperty(marktr("graphview default segment"), Color.WHITE).get(); 318 arrowheadFillColor = new NamedColorProperty(marktr("graphview arrowhead core"), Color.BLACK).get(); 322 319 separateDirections = Main.pref.getBoolean("graphview.separateDirections", false); 323 320 -
applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/preferences/InternalRuleset.java
r32620 r33842 7 7 GERMANY("resources/accessRuleset_de.xml"); 8 8 9 private String resourceName;9 private final String resourceName; 10 10 11 11 InternalRuleset(String resourceName) { -
applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/preferences/VehiclePropertyStringParser.java
r32620 r33842 10 10 import java.util.List; 11 11 12 import org.openstreetmap.josm.Main;13 12 import org.openstreetmap.josm.plugins.graphview.core.property.VehiclePropertyType; 14 13 import org.openstreetmap.josm.plugins.graphview.core.property.VehiclePropertyTypes; 15 14 import org.openstreetmap.josm.plugins.graphview.core.util.ValueStringParser; 15 import org.openstreetmap.josm.tools.Logging; 16 16 17 17 /** … … 128 128 } 129 129 } catch (NumberFormatException e) { 130 Main.trace(e);130 Logging.trace(e); 131 131 } 132 132
Note:
See TracChangeset
for help on using the changeset viewer.