Changeset 6977 in josm
- Timestamp:
- 2014-04-15T00:43:24+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AddNodeAction.java
r6380 r6977 23 23 private String textLatLon, textEastNorth; 24 24 25 /** 26 * Constructs a new {@code AddNodeAction}. 27 */ 25 28 public AddNodeAction() { 26 29 super(tr("Add Node..."), "addnode", tr("Add a node by entering latitude / longitude or easting / northing."), -
trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java
r6961 r6977 257 257 for(int i = 1; i < nodes.size()-1; i++) 258 258 if(nodes.get(i) == node) { 259 System.out.printf("Find 2 neighbors\n");260 259 neighbors.add(nodes.get(i-1)); 261 260 neighbors.add(nodes.get(i+1)); 262 //lines.add(new Line(nodes.get(i-1), nodes.get(i+1)));263 261 } 264 262 if(neighbors.size() == 0) -
trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java
r6942 r6977 97 97 * Class designed to create a couple between a node and its angle relative to the center of the circle. 98 98 */ 99 private class PolarNode { 99 private static class PolarNode { 100 100 double a; 101 101 Node node; … … 111 111 * Comparator used to order PolarNode relative to their angle. 112 112 */ 113 private class PolarNodeComparator implements Comparator<PolarNode> { 113 private static class PolarNodeComparator implements Comparator<PolarNode> { 114 114 115 115 @Override … … 186 186 double yc = 0.5 * (y1 + y2); 187 187 center = new EastNorth(xc, yc); 188 } else if (nodes.size() == 3){188 } else { 189 189 // triangle: three single nodes needed or a way with three nodes 190 190 center = Geometry.getCenter(nodes); -
trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java
r6976 r6977 54 54 private final LinkedList<Command> cmds = new LinkedList<Command>(); 55 55 private int cmdsCount = 0; 56 private final Li nkedList<Relation> addedRelations = new LinkedList<Relation>();56 private final List<Relation> addedRelations = new LinkedList<Relation>(); 57 57 58 58 /** -
trunk/src/org/openstreetmap/josm/gui/MapStatus.java
r6960 r6977 717 717 private class MapStatusPopupMenu extends JPopupMenu { 718 718 719 private final JMenuItem jumpButton = createActionComponent(Main.main.menu.jumpToAct);719 private final JMenuItem jumpButton = add(Main.main.menu.jumpToAct); 720 720 721 721 private final Collection<JCheckBoxMenuItem> somItems = new ArrayList<JCheckBoxMenuItem>(); … … 743 743 } 744 744 745 add(jumpButton);746 745 add(separator); 747 746 add(doNotHide); … … 751 750 public void popupMenuWillBecomeVisible(PopupMenuEvent e) { 752 751 Component invoker = ((JPopupMenu)e.getSource()).getInvoker(); 753 jumpButton.setVisible(invoker == latText || invoker ==lonText);754 String currentSOM = ProjectionPreference.PROP_SYSTEM_OF_MEASUREMENT.get(); ;752 jumpButton.setVisible(latText.equals(invoker) || lonText.equals(invoker)); 753 String currentSOM = ProjectionPreference.PROP_SYSTEM_OF_MEASUREMENT.get(); 755 754 for (JMenuItem item : somItems) { 756 755 item.setSelected(item.getText().equals(currentSOM)); 757 item.setVisible( invoker ==distText);756 item.setVisible(distText.equals(invoker)); 758 757 } 759 separator.setVisible( invoker ==distText);758 separator.setVisible(distText.equals(invoker)); 760 759 doNotHide.setSelected(Main.pref.getBoolean("statusbar.always-visible", true)); 761 760 } -
trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesWithReferrersTask.java
r6973 r6977 75 75 // All downloaded primitives are put in a tmpLayer 76 76 tmpLayer = new OsmDataLayer(new DataSet(), OsmDataLayer.createNewName(), null); 77 //Main.main.addLayer(tmpLayer);78 77 } 79 78 … … 194 193 * Dialog for report a problem during download. 195 194 * @param errs Primitives involved 196 * @param TITLETitle of dialog197 * @param TEXTDetail message198 * @param LIST_LABELList of primitives description199 * @param msgType Type of message {@seeJOptionPane}195 * @param title Title of dialog 196 * @param text Detail message 197 * @param listLabel List of primitives description 198 * @param msgType Type of message, see {@link JOptionPane} 200 199 * @return The Dialog object 201 200 */ 202 201 private static ExtendedDialog reportProblemDialog(Set<PrimitiveId> errs, 203 String TITLE, StringTEXT, StringLIST_LABEL, int msgType) {202 String title, String text, String listLabel, int msgType) { 204 203 JPanel p = new JPanel(new GridBagLayout()); 205 p.add(new HtmlPanel( TEXT), GBC.eop());206 if ( LIST_LABEL!= null) {207 JLabel missing = new JLabel( LIST_LABEL);204 p.add(new HtmlPanel(text), GBC.eop()); 205 if (listLabel != null) { 206 JLabel missing = new JLabel(listLabel); 208 207 missing.setFont(missing.getFont().deriveFont(Font.PLAIN)); 209 208 p.add(missing, GBC.eol()); … … 221 220 return new ExtendedDialog( 222 221 Main.parent, 223 TITLE,222 title, 224 223 new String[] { tr("Ok") }) 225 224 .setButtonIcons(new String[] { "ok" }) -
trunk/src/org/openstreetmap/josm/gui/io/UploadPrimitivesTask.java
r6643 r6977 7 7 import static org.openstreetmap.josm.tools.I18n.trn; 8 8 9 import java.io.IOException;10 9 import java.lang.reflect.InvocationTargetException; 11 10 import java.util.HashSet; … … 38 37 import org.openstreetmap.josm.io.OsmTransferException; 39 38 import org.openstreetmap.josm.tools.ImageProvider; 40 import org.xml.sax.SAXException;41 39 42 40 /** 43 * The task for uploading a collection of primitives 41 * The task for uploading a collection of primitives. 44 42 * 45 43 */ 46 public class UploadPrimitivesTask extends 44 public class UploadPrimitivesTask extends AbstractUploadTask { 47 45 private boolean uploadCanceled = false; 48 46 private Exception lastException = null; … … 240 238 } 241 239 242 @Override protected void realRun() throws SAXException, IOException{240 @Override protected void realRun() { 243 241 try { 244 242 uploadloop:while(true) { … … 294 292 } 295 293 } 296 // if required close the changeset 297 // 298 if (strategy.isCloseChangesetAfterUpload() && changeset != null && !changeset.isNew() && changeset.isOpen()) { 299 OsmApi.getOsmApi().closeChangeset(changeset, progressMonitor.createSubTaskMonitor(0, false)); 300 } 294 // if required close the changeset 295 // 296 if (strategy.isCloseChangesetAfterUpload() && changeset != null && !changeset.isNew() && changeset.isOpen()) { 297 OsmApi.getOsmApi().closeChangeset(changeset, progressMonitor.createSubTaskMonitor(0, false)); 298 } 301 299 } catch (Exception e) { 302 300 if (uploadCanceled) { -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java
r6958 r6977 64 64 * Class to format a length according to SystemOfMesurement. 65 65 */ 66 private final class TrackLength { 66 private static final class TrackLength { 67 67 private double value; 68 68 … … 88 88 * Comparator for TrackLength objects 89 89 */ 90 private final class LengthContentComparator implements Comparator<TrackLength> { 90 private static final class LengthContentComparator implements Comparator<TrackLength> { 91 91 92 92 /** -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
r6949 r6977 265 265 final Node n = w.getNode(i - 1); 266 266 final Environment e2 = e.withPrimitive(n).withParent(w).withChild(e.osm); 267 if (left.matches(e2)) { 268 if (link.matches(e2.withLinkContext())) { 269 e.child = n; 270 e.index = i; 271 e.parent = w; 272 return true; 273 } 267 if (left.matches(e2) && link.matches(e2.withLinkContext())) { 268 e.child = n; 269 e.index = i; 270 e.parent = w; 271 return true; 274 272 } 275 273 } -
trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java
r6943 r6977 51 51 String java = System.getProperty("java.version"); 52 52 String os = System.getProperty("os.version"); 53 if (java != null && java.startsWith("1.6") && os != null && ( 54 os.startsWith("10.7.") || os.startsWith("10.8") || os.startsWith("10.9"))) { 53 if (java != null && java.startsWith("1.6") && os != null && os.matches("^10\\.[789].*")) { 55 54 askUpdateJava(java); 56 55 } -
trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
r6962 r6977 46 46 String os = getOSDescription(); 47 47 if (java != null && java.startsWith("1.6") && os != null && ( 48 os.startsWith("Linux Debian GNU/Linux 7") || os.startsWith("Linux Mint") || 49 os.startsWith("Linux Ubuntu 12") || os.startsWith("Linux Ubuntu 13") || os.startsWith("Linux Ubuntu 14"))) { 48 os.startsWith("Linux Debian GNU/Linux 7") || os.startsWith("Linux Mint") || os.matches("^Linux Ubuntu 1[234].*"))) { 50 49 String url; 51 50 // apturl does not exist on Debian (see #8465) -
trunk/src/org/openstreetmap/josm/tools/Utils.java
r6972 r6977 75 75 private static final int MILLIS_OF_DAY = 86400000; 76 76 77 public static String URL_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~:/?#[]@!$&'()*+,;="; 77 public static final String URL_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~:/?#[]@!$&'()*+,;="; 78 78 79 79 /**
Note:
See TracChangeset
for help on using the changeset viewer.