Changeset 999 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2008-09-21T14:03:38+02:00 (16 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 42 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AlignInRectangleAction.java
r627 r999 17 17 import org.openstreetmap.josm.command.SequenceCommand; 18 18 import org.openstreetmap.josm.data.coor.EastNorth; 19 import org.openstreetmap.josm.data.coor.LatLon;20 19 import org.openstreetmap.josm.data.osm.Node; 21 20 import org.openstreetmap.josm.data.osm.OsmPrimitive; -
trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java
r996 r999 15 15 import org.openstreetmap.josm.command.AddCommand; 16 16 import org.openstreetmap.josm.command.ChangeCommand; 17 import org.openstreetmap.josm.command.MoveCommand;18 17 import org.openstreetmap.josm.command.SequenceCommand; 19 18 import org.openstreetmap.josm.data.coor.EastNorth; 20 import org.openstreetmap.josm.data.coor.LatLon;21 19 import org.openstreetmap.josm.data.osm.Node; 22 20 import org.openstreetmap.josm.data.osm.OsmPrimitive; -
trunk/src/org/openstreetmap/josm/actions/HistoryInfoAction.java
r968 r999 6 6 import java.awt.event.ActionEvent; 7 7 import java.awt.event.KeyEvent; 8 import java.util.Collection;9 import java.util.Collections;10 import java.util.LinkedList;11 8 12 9 import org.openstreetmap.josm.Main; -
trunk/src/org/openstreetmap/josm/actions/PasteAction.java
r811 r999 12 12 import java.util.LinkedList; 13 13 import java.util.List; 14 15 import java.awt.event.MouseMotionListener;16 import javax.swing.JOptionPane;17 14 18 15 import org.openstreetmap.josm.Main; … … 56 53 } else { 57 54 mPosition = Main.map.mapView.getEastNorth(Main.map.mapView.lastMEvent.getX(), Main.map.mapView.lastMEvent.getY()); 58 } ;55 } 59 56 60 57 double offsetEast = mPosition.east() - (maxEast + minEast)/2.0; -
trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java
r858 r999 15 15 16 16 import org.openstreetmap.josm.Main; 17 import org.openstreetmap.josm.actions.JosmAction;18 17 import org.openstreetmap.josm.command.AddCommand; 19 18 import org.openstreetmap.josm.command.ChangeCommand; -
trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
r845 r999 39 39 import org.openstreetmap.josm.command.Command; 40 40 import org.openstreetmap.josm.command.SequenceCommand; 41 import org.openstreetmap.josm.data.Preferences;42 41 import org.openstreetmap.josm.data.SelectionChangedListener; 43 42 import org.openstreetmap.josm.data.coor.EastNorth; -
trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java
r804 r999 22 22 import org.openstreetmap.josm.command.Command; 23 23 import org.openstreetmap.josm.command.SequenceCommand; 24 import org.openstreetmap.josm.data.Preferences;25 24 import org.openstreetmap.josm.data.coor.EastNorth; 26 25 import org.openstreetmap.josm.data.osm.Node; … … 68 67 69 68 /** 70 * The screen distance which needs to be travelled before something71 * counts as a move, in pixels72 */73 private int initialMoveThreshold = 15;74 private boolean initialMoveThresholdExceeded = false;75 /**76 69 * Create a new SelectAction 77 70 * @param mapFrame The MapFrame this action belongs to. … … 82 75 getCursor("normal", "selection", Cursor.DEFAULT_CURSOR)); 83 76 putValue("help", "Action/Extrude/Extrude"); 84 try { initialMoveDelay = Integer.parseInt(Main.pref.get("edit.initial-move-delay","200")); } catch (NumberFormatException x) {} 85 try { initialMoveThreshold = Integer.parseInt(Main.pref.get("edit.initial-move-threshold","5")); } catch (NumberFormatException x) {} 77 initialMoveDelay = Main.pref.getInteger("edit.initial-move-delay",200); 86 78 selectedColor = Main.pref.getColor(marktr("selected"), Color.YELLOW); 87 79 } … … 268 260 } 269 261 } 270 271 272 262 } -
trunk/src/org/openstreetmap/josm/data/Bounds.java
r746 r999 3 3 4 4 import java.awt.geom.Rectangle2D; 5 import java.awt.geom.RectangularShape;6 5 7 6 import org.openstreetmap.josm.data.coor.LatLon; … … 71 70 72 71 /** 73 * Returns the lat/lon bounding box asan object of type Rectangle2D.Double74 * @return 72 * Converts the lat/lon bounding box to an object of type Rectangle2D.Double 73 * @return the bounding box to Rectangle2D.Double 75 74 */ 76 75 public Rectangle2D.Double asRect() { -
trunk/src/org/openstreetmap/josm/data/osm/DataSet.java
r755 r999 2 2 package org.openstreetmap.josm.data.osm; 3 3 4 import java.awt.Polygon;5 import java.awt.Shape;6 4 import java.awt.geom.Area; 7 5 import java.util.Arrays; -
trunk/src/org/openstreetmap/josm/data/osm/Node.java
r755 r999 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.tools.I18n.trn;6 7 5 import java.text.DecimalFormat; 8 6 import java.text.NumberFormat; -
trunk/src/org/openstreetmap/josm/data/osm/Relation.java
r766 r999 5 5 6 6 import java.util.ArrayList; 7 import java.util.Arrays;8 7 import java.util.List; 9 8 -
trunk/src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java
r998 r999 7 7 import java.awt.Color; 8 8 import java.awt.Font; 9 import java.awt.Graphics;10 9 import java.awt.Graphics2D; 11 10 import java.awt.Point; 12 11 import java.awt.Polygon; 13 import java.awt.RenderingHints;14 12 import java.awt.Stroke; 15 13 import java.awt.geom.GeneralPath; … … 20 18 21 19 import org.openstreetmap.josm.Main; 22 import org.openstreetmap.josm.actions.UnselectAllAction;23 import org.openstreetmap.josm.data.Preferences;24 20 import org.openstreetmap.josm.data.osm.DataSet; 25 21 import org.openstreetmap.josm.data.osm.Node; … … 28 24 import org.openstreetmap.josm.data.osm.Way; 29 25 import org.openstreetmap.josm.data.osm.visitor.SimplePaintVisitor; 30 import org.openstreetmap.josm.gui.NavigatableComponent;31 26 import org.openstreetmap.josm.gui.mappaint.AreaElemStyle; 32 27 import org.openstreetmap.josm.gui.mappaint.ElemStyle; -
trunk/src/org/openstreetmap/josm/data/osm/visitor/SimplePaintVisitor.java
r987 r999 16 16 17 17 import org.openstreetmap.josm.Main; 18 import org.openstreetmap.josm.data.Preferences;19 18 import org.openstreetmap.josm.data.osm.DataSet; 20 19 import org.openstreetmap.josm.data.osm.RelationMember; … … 22 21 import org.openstreetmap.josm.data.osm.OsmPrimitive; 23 22 import org.openstreetmap.josm.data.osm.Relation; 24 import org.openstreetmap.josm.data.osm.RelationMember;25 23 import org.openstreetmap.josm.data.osm.Way; 26 24 import org.openstreetmap.josm.gui.NavigatableComponent; -
trunk/src/org/openstreetmap/josm/gui/GettingStarted.java
r800 r999 19 19 20 20 import org.openstreetmap.josm.Main; 21 import org.openstreetmap.josm.tools.ImageProvider;22 21 import org.openstreetmap.josm.tools.OpenBrowser; 23 22 import org.openstreetmap.josm.tools.WikiReader; … … 26 25 public class GettingStarted extends JPanel { 27 26 28 private JPanel panel;29 27 static private String content = ""; 30 28 31 29 public class LinkGeneral extends JEditorPane implements HyperlinkListener { 32 private String action;33 30 public LinkGeneral(String text) { 34 31 setContentType("text/html"); … … 73 70 /* look for hrefs of the form wiki/MessageOfTheDay>123 where > can also be <,<=,>= and the number is the revision number */ 74 71 int start = 0; 75 boolean nothingIncluded = true;76 72 Pattern versionPattern = Pattern.compile("\\<a[^\\>]*href\\=\\\"([^\\\"]*\\/wiki\\/)(MessageOfTheDay(\\%3E%3D|%3C%3D|\\%3E|\\%3C)([0-9]+))\\\"[^\\>]*\\>[^\\<]*\\<\\/a\\>", Pattern.CASE_INSENSITIVE|Pattern.DOTALL|Pattern.MULTILINE); 77 73 Matcher matcher = versionPattern.matcher(motdcontent); … … 119 115 if (message.indexOf(emptyIndicator) == -1) { 120 116 content += message.replace("<html>", "").replace("</html>", "").replace("<div id=\"searchable\">", "").replace("</div>", ""); 121 nothingIncluded = false;122 117 } 123 118 } catch (IOException ioe) { … … 125 120 try { 126 121 content += wr.read(url).replace("<html>", "").replace("</html>", "").replace("<div id=\"searchable\">", "").replace("</div>", ""); 127 nothingIncluded = false;128 122 } catch (IOException ioe2) { 129 123 } -
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r976 r999 52 52 * Main application Startup 53 53 */ 54 @SuppressWarnings("deprecation")55 54 public static void main(final String[] argArray) { 56 55 ///////////////////////////////////////////////////////////////////////// -
trunk/src/org/openstreetmap/josm/gui/MapScaler.java
r861 r999 15 15 import org.openstreetmap.josm.data.coor.LatLon; 16 16 import org.openstreetmap.josm.data.projection.Projection; 17 import org.openstreetmap.josm.tools.ColorHelper;18 17 19 18 public class MapScaler extends JComponent implements Helpful { 20 19 21 20 private final NavigatableComponent mv; 22 private final Projection proj;23 24 21 public MapScaler(NavigatableComponent mv, Projection proj) { 25 22 this.mv = mv; 26 this.proj = proj;27 23 setSize(100,30); 28 24 setOpaque(false); -
trunk/src/org/openstreetmap/josm/gui/MapStatus.java
r861 r999 68 68 class ImageLabel extends JPanel { 69 69 private JLabel tf; 70 private JLabel lbl;71 70 private int chars; 72 71 public ImageLabel(String img, String tooltip, int chars) { … … 74 73 setLayout(new GridBagLayout()); 75 74 setBackground(Color.decode("#b8cfe5")); 76 add( lbl =new JLabel(ImageProvider.get("statusline/"+img+".png")), GBC.std().anchor(GBC.WEST).insets(0,1,1,0));75 add(new JLabel(ImageProvider.get("statusline/"+img+".png")), GBC.std().anchor(GBC.WEST).insets(0,1,1,0)); 77 76 add(tf = new JLabel(), GBC.std().fill(GBC.BOTH).anchor(GBC.WEST).insets(2,1,1,0)); 78 77 setToolTipText(tooltip); -
trunk/src/org/openstreetmap/josm/gui/MapView.java
r989 r999 9 9 import java.awt.Graphics2D; 10 10 import java.awt.Point; 11 import java.awt.Transparency;12 11 import java.awt.event.MouseEvent; 13 12 import java.awt.event.MouseMotionListener; … … 29 28 import org.openstreetmap.josm.actions.MoveAction; 30 29 import org.openstreetmap.josm.data.Bounds; 31 import org.openstreetmap.josm.data.Preferences;32 30 import org.openstreetmap.josm.data.SelectionChangedListener; 33 31 import org.openstreetmap.josm.data.coor.EastNorth; -
trunk/src/org/openstreetmap/josm/gui/SelectionManager.java
r845 r999 7 7 import java.awt.Point; 8 8 import java.awt.Rectangle; 9 import java.awt.event.ActionEvent;10 9 import java.awt.event.InputEvent; 11 import java.awt.event.KeyEvent;12 10 import java.awt.event.MouseEvent; 13 11 import java.awt.event.MouseListener; … … 18 16 import java.util.LinkedList; 19 17 20 import javax.swing.AbstractAction;21 import javax.swing.JComponent;22 import javax.swing.KeyStroke;23 24 import org.openstreetmap.josm.Main;25 18 import org.openstreetmap.josm.data.osm.Node; 26 19 import org.openstreetmap.josm.data.osm.OsmPrimitive; -
trunk/src/org/openstreetmap/josm/gui/SideButton.java
r758 r999 2 2 3 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 import static org.openstreetmap.josm.tools.I18n.marktr;5 6 4 import java.awt.event.ActionListener; 7 5 import java.awt.Insets; -
trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java
r804 r999 31 31 import org.openstreetmap.josm.Main; 32 32 import org.openstreetmap.josm.command.ConflictResolveCommand; 33 import org.openstreetmap.josm.data.Preferences;34 33 import org.openstreetmap.josm.data.SelectionChangedListener; 35 34 import org.openstreetmap.josm.data.osm.DataSet; -
trunk/src/org/openstreetmap/josm/gui/dialogs/RelationEditor.java
r988 r999 219 219 if (RelationEditor.this.relation == null) { 220 220 Main.main.undoRedo.add(new AddCommand(clone)); 221 Main.ds.fireSelectionChanged(Main.ds.getSelected());221 DataSet.fireSelectionChanged(Main.ds.getSelected()); 222 222 } else if (!RelationEditor.this.relation.realEqual(clone, true)) { 223 223 Main.main.undoRedo.add(new ChangeCommand(RelationEditor.this.relation, clone)); 224 Main.ds.fireSelectionChanged(Main.ds.getSelected());224 DataSet.fireSelectionChanged(Main.ds.getSelected()); 225 225 } 226 226 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
r997 r999 22 22 import org.openstreetmap.josm.Main; 23 23 import org.openstreetmap.josm.command.DeleteCommand; 24 import org.openstreetmap.josm.data.osm.DataSet; 24 25 import org.openstreetmap.josm.data.osm.OsmPrimitive; 25 26 import org.openstreetmap.josm.data.osm.Relation; … … 114 115 list.setSize(Main.ds.relations.size()); 115 116 int i = 0; 116 for (OsmPrimitive e : Main.ds.sort(Main.ds.relations)) {117 for (OsmPrimitive e : DataSet.sort(Main.ds.relations)) { 117 118 if (!e.deleted && !e.incomplete) 118 119 list.setElementAt(e, i++); -
trunk/src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java
r807 r999 99 99 } 100 100 } 101 } ;101 } 102 102 103 103 osmUrl.getDocument().addDocumentListener(new osmUrlRefresher()); -
trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
r941 r999 67 67 import org.openstreetmap.josm.io.GpxWriter; 68 68 import org.openstreetmap.josm.io.MultiPartFormOutputStream; 69 import org.openstreetmap.josm.tools.ColorHelper;70 69 import org.openstreetmap.josm.tools.DontShowAgainInfo; 71 70 import org.openstreetmap.josm.tools.GBC; -
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r994 r999 35 35 import org.openstreetmap.josm.actions.SaveAsAction; 36 36 import org.openstreetmap.josm.command.Command; 37 import org.openstreetmap.josm.data.Preferences;38 37 import org.openstreetmap.josm.data.coor.EastNorth; 39 38 import org.openstreetmap.josm.data.coor.LatLon; -
trunk/src/org/openstreetmap/josm/gui/layer/RawGpsLayer.java
r804 r999 49 49 import org.openstreetmap.josm.gui.dialogs.LayerListPopup; 50 50 import org.openstreetmap.josm.io.MultiPartFormOutputStream; 51 import org.openstreetmap.josm.tools.ColorHelper;52 51 import org.openstreetmap.josm.tools.DontShowAgainInfo; 53 52 import org.openstreetmap.josm.tools.GBC; -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java
r944 r999 39 39 import org.openstreetmap.josm.gui.layer.Layer; 40 40 import org.openstreetmap.josm.tools.AudioPlayer; 41 import org.openstreetmap.josm.tools.ColorHelper;42 41 import org.openstreetmap.josm.tools.ImageProvider; 43 42 -
trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyleHandler.java
r991 r999 37 37 icon.init(); 38 38 } 39 } ;39 } 40 40 41 41 public ElemStyleHandler(String name) { -
trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java
r990 r999 8 8 9 9 import org.openstreetmap.josm.data.osm.Node; 10 import org.openstreetmap.josm.data.osm.OsmPrimitive;11 10 import org.openstreetmap.josm.data.osm.OsmUtils; 12 11 import org.openstreetmap.josm.data.osm.Way; -
trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java
r990 r999 12 12 13 13 public boolean over; 14 public enum WidthMode { ABSOLUTE, PERCENT, OFFSET } ;14 public enum WidthMode { ABSOLUTE, PERCENT, OFFSET } 15 15 public WidthMode widthMode; 16 16 … … 57 57 widthMode = WidthMode.ABSOLUTE; 58 58 overlays = null; 59 } ;59 } 60 60 61 61 // get width for overlays -
trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
r991 r999 1 1 package org.openstreetmap.josm.gui.mappaint; 2 2 3 import java.awt.Toolkit;4 import java.io.File;5 import java.io.FileReader;6 import java.net.URL;7 import java.util.HashMap;8 3 import java.util.LinkedList; 9 4 import java.util.List; 10 import java.util.Iterator;11 5 12 6 import javax.swing.ImageIcon; 13 7 14 8 import org.openstreetmap.josm.Main; 15 import org.openstreetmap.josm.data.osm.OsmPrimitive;16 9 import org.openstreetmap.josm.gui.mappaint.ElemStyles; 17 10 import org.openstreetmap.josm.io.MirroredInputStream; -
trunk/src/org/openstreetmap/josm/gui/preferences/AdvancedPreference.java
r930 r999 48 48 { 49 49 JLabel label=new JLabel(); 50 String s = defaults.get( (String)value);50 String s = defaults.get(value); 51 51 if(s != null) 52 52 { … … 60 60 label.setText((String)value); 61 61 return label; 62 } ;62 } 63 63 }; 64 64 final JTable list = new JTable(model); -
trunk/src/org/openstreetmap/josm/gui/preferences/FilePreferences.java
r938 r999 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import javax.swing.Box;7 6 import javax.swing.JCheckBox; 8 7 import javax.swing.JSeparator; -
trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java
r939 r999 47 47 48 48 /** 49 * Only the plugin name, it 's jar location and the description.49 * Only the plugin name, its jar location and the description. 50 50 * In other words, this is the minimal requirement the plugin preference page 51 51 * needs to show the plugin as available … … 53 53 * @author imi 54 54 */ 55 public static class PluginDescription implements Comparable {55 public static class PluginDescription implements Comparable<Object> { 56 56 // Note: All the following need to be public instance variables of 57 57 // type String. (Plugin description XMLs from the server are parsed -
trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceSetting.java
r627 r999 11 11 12 12 /** 13 * Called , when OK is pressed to save the setting in the Preferences file.13 * Called when OK is pressed to save the setting in the preferences file. 14 14 */ 15 15 void ok(); -
trunk/src/org/openstreetmap/josm/gui/preferences/TaggingPresetPreference.java
r895 r999 12 12 import java.util.StringTokenizer; 13 13 14 import javax.swing.Action;15 14 import javax.swing.BorderFactory; 16 15 import javax.swing.Box; -
trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java
r824 r999 145 145 for (Action a : actions.values()) 146 146 { 147 us.put(a.getValue( a.NAME).toString()+a.toString(), a);147 us.put(a.getValue(Action.NAME).toString()+a.toString(), a); 148 148 } 149 149 for (String a : us.keySet()) -
trunk/src/org/openstreetmap/josm/io/BoundingBoxDownloader.java
r806 r999 8 8 9 9 import org.openstreetmap.josm.Main; 10 import org.openstreetmap.josm.data.Bounds;11 import org.openstreetmap.josm.data.coor.LatLon;12 10 import org.openstreetmap.josm.data.osm.DataSet; 13 import org.openstreetmap.josm.data.osm.DataSource;14 11 import org.openstreetmap.josm.data.gpx.GpxData; 15 12 import org.xml.sax.SAXException; -
trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java
r906 r999 2 2 package org.openstreetmap.josm.io; 3 3 4 import static org.openstreetmap.josm.tools.I18n.tr;5 6 import java.io.BufferedReader;7 4 import java.io.BufferedInputStream; 8 5 import java.io.BufferedOutputStream; … … 11 8 import java.io.FileOutputStream; 12 9 import java.io.InputStream; 13 import java.io.InputStreamReader;14 10 import java.io.IOException; 15 11 import java.net.URL; … … 22 18 * <p> 23 19 * The file mirrored is only downloaded if it has been more than one day since last download 24 *25 * @param url The URL of the remote file26 * @param destDir The destination dir of the mirrored file27 * @param maxTime The time interval, in seconds, to check if the file changed. If less than 0, it defaults to 1 week28 * @return The local file29 20 */ 30 21 public class MirroredInputStream extends InputStream { -
trunk/src/org/openstreetmap/josm/io/MyHttpURLConnection.java
r627 r999 2 2 package org.openstreetmap.josm.io; 3 3 4 import java.net.ProtocolException;5 4 import java.io.*; 6 5 import java.net.URL; -
trunk/src/org/openstreetmap/josm/io/NmeaReader.java
r938 r999 8 8 import java.io.InputStream; 9 9 import java.io.InputStreamReader; 10 import java.text.ParseException;11 import java.text.SimpleDateFormat;12 10 import java.util.ArrayList; 13 import java.util.Calendar;14 11 import java.util.Collection; 15 import java.util.Date;16 12 17 import org.openstreetmap.josm.data.coor.EastNorth;18 13 import org.openstreetmap.josm.data.coor.LatLon; 19 14 import org.openstreetmap.josm.data.gpx.GpxData;
Note:
See TracChangeset
for help on using the changeset viewer.