Changeset 6296 in josm
- Timestamp:
- 2013-10-04T03:27:01+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 66 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r6265 r6296 672 672 // 673 673 try { 674 //CoordinateFormat format = CoordinateFormat.valueOf(Main.pref.get("coordinates"));675 674 CoordinateFormat.setCoordinateFormat(CoordinateFormat.valueOf(Main.pref.get("coordinates"))); 676 675 } catch (IllegalArgumentException iae) { -
trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java
r6130 r6296 42 42 public final class CreateCircleAction extends JosmAction { 43 43 44 /** 45 * Constructs a new {@code CreateCircleAction}. 46 */ 44 47 public CreateCircleAction() { 45 48 super(tr("Create Circle"), "createcircle", tr("Create a circle from three selected nodes."), … … 179 182 cmds.add(new DeleteCommand(n1)); 180 183 } 181 182 // or insert it183 // wayToAdd.nodes.add((numberOfNodesInCircle - 1) / 2, n1);184 184 } 185 185 -
trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java
r6245 r6296 36 36 public static final ArrayList<FileExporter> exporters; 37 37 38 // add some file types only if the relevant classes are there ;38 // add some file types only if the relevant classes are there. 39 39 // this gives us the option to painlessly drop them from the .jar 40 40 // and build JOSM versions without support for these formats -
trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java
r6093 r6296 94 94 95 95 private static void pruneSuccsAndReverse(List<Integer> is) { 96 //if (is.size() < 2) return;97 98 96 HashSet<Integer> is2 = new HashSet<Integer>(); 99 97 for (int i : is) { -
trunk/src/org/openstreetmap/josm/actions/MoveAction.java
r6084 r6296 40 40 } else if (dir == Direction.LEFT) { 41 41 directiontext = tr("left"); 42 } else { //dir == Direction.RIGHT) {42 } else { 43 43 directiontext = tr("right"); 44 44 } -
trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java
r6130 r6296 383 383 // rotate back and log the change 384 384 final Collection<Command> commands = new LinkedList<Command>(); 385 // OrthogonalizeAction.rememberMovements.clear();386 385 for (Node n: allNodes) { 387 386 EastNorth tmp = new EastNorth(nX.get(n), nY.get(n)); … … 448 447 // sum up segments 449 448 EastNorth h = new EastNorth(0.,0.); 450 //double lh = EN.abs(h);451 449 EastNorth v = new EastNorth(0.,0.); 452 //double lv = EN.abs(v);453 450 for (int i = 0; i < nSeg; ++i) { 454 451 EastNorth segment = EN.diff(en[i+1], en[i]); -
trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java
r6248 r6296 228 228 // Segment cannot be simplified - try shorter segments 229 229 buildSimplifiedNodeList(wnew, from, imax,threshold,simplifiedNodes); 230 //simplifiedNodes.add(wnew.get(imax));231 230 buildSimplifiedNodeList(wnew, imax, to, threshold,simplifiedNodes); 232 231 } else { -
trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
r6289 r6296 1613 1613 hdg-=360; 1614 1614 } 1615 //fixed=true;1616 //absoluteFix=true;1617 1615 customBaseHeading=hdg; 1618 1616 } -
trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyAction.java
r6069 r6296 207 207 protected void updateEnabledState() { 208 208 setEnabled(getEditLayer() != null); 209 // setEnabled(Main.main.getActiveLayer() instanceof OsmDataLayer);210 209 } 211 210 -
trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
r6246 r6296 944 944 osm = nearest; 945 945 946 // Point p = e.getPoint();947 // updateKeyModifiers(e); // cycleSetup called only after updateModifiers !948 949 946 if (!(alt || multipleMatchesParameter)) { 950 947 // no real cycling, just one element in cycle list -
trunk/src/org/openstreetmap/josm/command/ChangeRelationMemberRoleCommand.java
r5077 r6296 30 30 // The old role 31 31 private String oldRole; 32 // Old value of modified ;32 // Old value of modified 33 33 private Boolean oldModified; 34 34 -
trunk/src/org/openstreetmap/josm/command/ScaleCommand.java
r4918 r6296 69 69 @Override 70 70 protected void transformNodes() { 71 // scalingFactor = 2.0;72 71 for (Node n : nodes) { 73 72 EastNorth oldEastNorth = oldStates.get(n).eastNorth; -
trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java
r6258 r6296 484 484 if (item.getNodeType() != Node.ELEMENT_NODE) continue; 485 485 String elementName = item.getNodeName(); 486 //if (monitor!=null) monitor.indeterminateSubTask(elementName);487 486 Element elem = (Element) item; 488 487 … … 684 683 685 684 /** 686 * subs ititute ${expression} = expression evaluated by JavaScript685 * substitute ${expression} = expression evaluated by JavaScript 687 686 */ 688 687 private String evalVars(String s) { … … 691 690 StringBuffer sb = new StringBuffer(); 692 691 while (mr.find()) { 693 try { 694 String result = engine.eval(mr.group(1)).toString(); 695 mr.appendReplacement(sb, result); 696 } catch (ScriptException ex) { 697 log("Error: Can not evaluate expression %s : %s", mr.group(1), ex.getMessage()); 698 //mr.appendReplacement(sb, mr.group(0)); 699 } 692 try { 693 String result = engine.eval(mr.group(1)).toString(); 694 mr.appendReplacement(sb, result); 695 } catch (ScriptException ex) { 696 log("Error: Can not evaluate expression %s : %s", mr.group(1), ex.getMessage()); 697 } 700 698 } 701 699 mr.appendTail(sb); -
trunk/src/org/openstreetmap/josm/data/coor/QuadTiling.java
r6171 r6296 63 63 64 64 static long lon2x(double lon) { 65 //return Math.round((lon + 180.0) * QuadBuckets.WORLD_PARTS / 360.0)-1;66 65 long ret = (long)((lon + 180.0) * WORLD_PARTS / 360.0); 67 66 if (ret == WORLD_PARTS) { … … 72 71 73 72 static long lat2y(double lat) { 74 //return Math.round((lat + 90.0) * QuadBuckets.WORLD_PARTS / 180.0)-1;75 73 long ret = (long)((lat + 90.0) * WORLD_PARTS / 180.0); 76 74 if (ret == WORLD_PARTS) { -
trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java
r6206 r6296 148 148 * PN^2 = (Axp + Byp + C)^2 / RS^2 that is the distance from P to the line 149 149 * 150 * so if PN^2 is less than PNmin^2 (initialized to tolerance) we can reject the line ;150 * so if PN^2 is less than PNmin^2 (initialized to tolerance) we can reject the line 151 151 * otherwise... determine if the projected poijnt lies within the bounds of the line: PR^2 - 152 152 * PN^2 <= RS^2 and PS^2 - PN^2 <= RS^2 -
trunk/src/org/openstreetmap/josm/data/imagery/GeorefImage.java
r6248 r6296 148 148 } 149 149 long freeMem = Runtime.getRuntime().maxMemory() - Runtime.getRuntime().totalMemory(); 150 //Main.debug("Free Memory: "+ (freeMem/1024/1024) +" MB");151 150 // Notice that this value can get negative due to integer overflows 152 //Main.debug("Img Size: "+ (width*height*3/1024/1024) +" MB");153 151 154 152 int multipl = alphaChannel ? 4 : 3; -
trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java
r6069 r6296 80 80 protected void mergePrimitive(OsmPrimitive source, Collection<? extends OsmPrimitive> candidates) { 81 81 if (!source.isNew() ) { 82 // try to merge onto a matching primitive with the same 83 // defined id 82 // try to merge onto a matching primitive with the same defined id 84 83 // 85 84 if (mergeById(source)) 86 85 return; 87 //if (!source.isVisible())88 // ignore it89 // return;90 86 } else { 91 87 // ignore deleted primitives from source … … 101 97 if (target.hasEqualSemanticAttributes(source)) { 102 98 mergedMap.put(source.getPrimitiveId(), target.getPrimitiveId()); 103 // copy the technical attributes from other 104 // version 99 // copy the technical attributes from other version 105 100 target.setVisible(source.isVisible()); 106 101 target.setUser(source.getUser()); -
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r6248 r6296 1127 1127 if (!isNew() && id != other.id) 1128 1128 return false; 1129 // if (isIncomplete() && ! other.isIncomplete() || !isIncomplete() && other.isIncomplete())1130 1129 if (isIncomplete() ^ other.isIncomplete()) // exclusive or operator for performance (see #7159) 1131 1130 return false; -
trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java
r6235 r6296 506 506 QBLevel<T> next; 507 507 next = q.nextContentNode(); 508 //if (consistency_testing && (orig == next))509 508 if (orig == next) { 510 509 abort("got same leaf back leaf: " + q.isLeaf()); -
trunk/src/org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java
r6084 r6296 249 249 // equal semantics is valid for subclasses like {@link HistoryOsmNode} etc. too. 250 250 // So, don't enforce equality of class. 251 //252 // if (getClass() != obj.getClass())253 // return false;254 251 HistoryOsmPrimitive other = (HistoryOsmPrimitive) obj; 255 252 if (id != other.id) -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
r6248 r6296 498 498 } else { 499 499 TexturePaint texture = new TexturePaint(fillImage.getImage(), 500 // new Rectangle(polygon.xpoints[0], polygon.ypoints[0], fillImage.getWidth(), fillImage.getHeight()));501 500 new Rectangle(0, 0, fillImage.getWidth(), fillImage.getHeight())); 502 501 g.setPaint(texture); … … 511 510 512 511 if (text != null && isShowNames()) { 513 /* 514 * abort if we can't compose the label to be rendered 515 */ 512 // abort if we can't compose the label to be rendered 516 513 if (text.labelCompositionStrategy == null) return; 517 514 String name = text.labelCompositionStrategy.compose(osm); … … 522 519 Rectangle2D nb = fontMetrics.getStringBounds(name, g); // if slow, approximate by strlen()*maxcharbounds(font) 523 520 524 // Point2D c = getCentroid(polygon);525 521 // Using the Centroid is Nicer for buildings like: +--------+ 526 522 // but this needs to be fast. As most houses are | 42 | … … 528 524 // will have to do. ++ 529 525 // Centroids are not optimal either, just imagine a U-shaped house. 530 // Point2D c = new Point2D.Double(pb.x + pb.width / 2.0, pb.y + pb.height / 2.0);531 // Rectangle2D.Double centeredNBounds =532 // new Rectangle2D.Double(c.getX() - nb.getWidth()/2,533 // c.getY() - nb.getHeight()/2,534 // nb.getWidth(),535 // nb.getHeight());536 526 537 527 Rectangle centeredNBounds = new Rectangle(pb.x + (int)((pb.width - nb.getWidth())/2.0), -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/Multipolygon.java
r6248 r6296 488 488 } 489 489 } 490 } /* for(i = ... */491 } /* while(joined) */490 } 491 } 492 492 493 493 if (nodes == null) { … … 497 497 498 498 result.add(new JoinedWay(nodes, wayIds, selected)); 499 } /* while(left != 0) */499 } 500 500 501 501 return result; … … 575 575 return innerWays; 576 576 } 577 /* 578 public List<PolyData> getInnerPolygons() { 579 return innerPolygons; 580 } 581 582 public List<PolyData> getOuterPolygons() { 583 return outerPolygons; 584 } 585 */ 577 586 578 public List<PolyData> getCombinedPolygons() { 587 579 return combinedPolygons; -
trunk/src/org/openstreetmap/josm/data/validation/tests/DeprecatedTags.java
r6240 r6296 186 186 return test(key, value).remove(key); 187 187 } 188 /* 189 DeprecationCheck testAndRemove(String key) { 190 return test(key).remove(key); 191 } 192 */ 188 193 189 DeprecationCheck alternative(String key, String value) { 194 190 alternatives.add(new Tag(key, value)); -
trunk/src/org/openstreetmap/josm/gui/GettingStarted.java
r6248 r6296 140 140 public void run() { 141 141 lg.setText(fixImageLinks(content)); 142 // lg.moveCaretPosition(0);143 142 } 144 143 }); -
trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java
r6087 r6296 199 199 setPartiallyIdentified(userName); 200 200 } else { 201 // same name in the preferences as JOSM already knows about ;201 // same name in the preferences as JOSM already knows about. 202 202 // keep the state, be it partially or fully identified 203 203 } -
trunk/src/org/openstreetmap/josm/gui/MapFrame.java
r6267 r6296 598 598 } 599 599 600 /* 601 * Remove panel from top of MapView by class */ 600 /** 601 * Remove panel from top of MapView by class 602 */ 602 603 public void removeTopPanel(Class<?> type) { 603 604 int n = leftPanel.getComponentCount(); … … 607 608 leftPanel.remove(i); 608 609 leftPanel.doLayout(); 609 // repaint();610 610 return; 611 611 } -
trunk/src/org/openstreetmap/josm/gui/MapStatus.java
r6267 r6296 322 322 oldMousePos = ms.mousePos; 323 323 } catch (ConcurrentModificationException x) { 324 //x.printStackTrace();324 Main.warn(x); 325 325 } catch (NullPointerException x) { 326 //x.printStackTrace();326 Main.warn(x); 327 327 } finally { 328 328 if (ds != null) { -
trunk/src/org/openstreetmap/josm/gui/MenuScroller.java
r6246 r6296 38 38 public class MenuScroller { 39 39 40 //private JMenu menu;41 40 private JPopupMenu menu; 42 41 private Component[] menuItems; -
trunk/src/org/openstreetmap/josm/gui/MultiSplitLayout.java
r6248 r6296 19 19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 20 */ 21 22 //package org.jdesktop.swingx;23 21 package org.openstreetmap.josm.gui; 24 22 … … 70 68 * is changed, all PropertyChangeListeners are fired. 71 69 * 72 * @author Hans Muller 70 * @author Hans Muller - SwingX 73 71 * @see MultiSplitPane 74 72 */ 75 76 73 public class MultiSplitLayout implements LayoutManager { 77 74 private final Map<String, Component> childMap = new HashMap<String, Component>(); -
trunk/src/org/openstreetmap/josm/gui/MultiSplitPane.java
r6084 r6296 19 19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 20 */ 21 22 //package org.jdesktop.swingx;23 21 package org.openstreetmap.josm.gui; 24 22 … … 45 43 * is changed, all PropertyChangeListeners are fired. 46 44 * 47 * @author Hans Muller 45 * @author Hans Muller - SwingX 48 46 */ 49 47 public class MultiSplitPane extends JPanel { -
trunk/src/org/openstreetmap/josm/gui/actionsupport/AlignImageryPanel.java
r6070 r6296 65 65 add(closeButton, GBC.std(3,1).anchor(GBC.EAST)); 66 66 } 67 // setBorder(new EmptyBorder(12, 12, 12, 12));68 67 setBorder(new CompoundBorder(new EtchedBorder(EtchedBorder.LOWERED), new EmptyBorder(12, 12, 12, 12))); 69 68 setBackground(new Color(224, 236, 249)); … … 79 78 } 80 79 } 81 82 80 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
r6105 r6296 170 170 })); 171 171 172 // activate DEL in the list of relations173 //displaylist.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE,0), "deleteRelation");174 //displaylist.getActionMap().put("deleteRelation", deleteAction);175 176 172 InputMapUtils.unassignCtrlShiftUpDown(displaylist, JComponent.WHEN_FOCUSED); 177 173 -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/ChangesetQueryTask.java
r5903 r6296 110 110 } 111 111 112 // update the global changeset cache with the downloaded changesets ;112 // update the global changeset cache with the downloaded changesets. 113 113 // this will trigger change events which views are listening to. They 114 114 // will update their views accordingly. -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
r6104 r6296 793 793 tr("Add all objects selected in the current dataset before the first member")); 794 794 putValue(SMALL_ICON, ImageProvider.get("dialogs/conflict", "copystartright")); 795 // putValue(NAME, tr("Add Selected"));796 795 refreshEnabled(); 797 796 } … … 821 820 putValue(SHORT_DESCRIPTION, tr("Add all objects selected in the current dataset after the last member")); 822 821 putValue(SMALL_ICON, ImageProvider.get("dialogs/conflict", "copyendright")); 823 // putValue(NAME, tr("Add Selected"));824 822 refreshEnabled(); 825 823 } … … 850 848 tr("Add all objects selected in the current dataset before the first selected member")); 851 849 putValue(SMALL_ICON, ImageProvider.get("dialogs/conflict", "copybeforecurrentright")); 852 // putValue(NAME, tr("Add Selected"));853 850 refreshEnabled(); 854 851 } … … 887 884 tr("Add all objects selected in the current dataset after the last selected member")); 888 885 putValue(SMALL_ICON, ImageProvider.get("dialogs/conflict", "copyaftercurrentright")); 889 // putValue(NAME, tr("Add Selected"));890 886 refreshEnabled(); 891 887 } … … 922 918 putValue(SHORT_DESCRIPTION, tr("Remove all members referring to one of the selected objects")); 923 919 putValue(SMALL_ICON, ImageProvider.get("dialogs/relation", "deletemembers")); 924 // putValue(NAME, tr("Remove Selected"));925 920 updateEnabledState(); 926 921 } … … 1068 1063 String tooltip = tr("Move the currently selected members up"); 1069 1064 putValue(SMALL_ICON, ImageProvider.get("dialogs", "moveup")); 1070 // putValue(NAME, tr("Move Up"));1071 1065 Shortcut sc = Shortcut.registerShortcut("relationeditor:moveup", tr("Relation Editor: Move Up"), 1072 1066 KeyEvent.VK_UP, Shortcut.ALT); … … 1091 1085 String tooltip = tr("Move the currently selected members down"); 1092 1086 putValue(SMALL_ICON, ImageProvider.get("dialogs", "movedown")); 1093 // putValue(NAME, tr("Move Down"));1094 1087 Shortcut sc = Shortcut.registerShortcut("relationeditor:movedown", tr("Relation Editor: Move Down"), 1095 1088 KeyEvent.VK_DOWN, Shortcut.ALT); … … 1447 1440 putValue(SHORT_DESCRIPTION, tr("Add an empty tag")); 1448 1441 putValue(SMALL_ICON, ImageProvider.get("dialogs", "add")); 1449 // putValue(NAME, tr("Cancel"));1450 1442 setEnabled(true); 1451 1443 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableColumnModel.java
r3210 r6296 28 28 col.setResizable(true); 29 29 col.setPreferredWidth(300); 30 // col.setCellRenderer(new OsmPrimitivRenderer());31 30 col.setCellRenderer(new MemberTableMemberCellRenderer()); 32 31 addColumn(col); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableLinkedCellRenderer.java
r6085 r6296 34 34 this.value = (WayConnectionType) value; 35 35 renderForeground(isSelected); 36 //setText(value.toString());37 36 setToolTipText(((WayConnectionType)value).getToolTip()); 38 37 renderBackground(getModel(table), null, isSelected); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java
r6093 r6296 660 660 661 661 /** 662 * get a node we can link against when sorting members663 * @param element the element we want to link against664 * @param linked_element already linked against element665 * @return the unlinked node if element is a way, the node itself if element is a node, null otherwise666 */667 /*private static Node getUnusedNode(RelationMember element, RelationMember linked_element)668 {669 Node result = null;670 671 if (element.isWay()) {672 Way w = element.getWay();673 if (linked_element.isWay()) {674 Way x = linked_element.getWay();675 if ((w.firstNode() == x.firstNode()) || (w.firstNode() == x.lastNode())) {676 result = w.lastNode();677 } else {678 result = w.firstNode();679 }680 } else if (linked_element.isNode()) {681 Node m = linked_element.getNode();682 if (w.firstNode() == m) {683 result = w.lastNode();684 } else {685 result = w.firstNode();686 }687 }688 } else if (element.isNode()) {689 Node n = element.getNode();690 result = n;691 }692 693 return result;694 }*/695 696 697 /**698 662 * Sort the selected relation members by the way they are linked. 699 663 */ … … 770 734 } 771 735 } 772 773 // private static void unconnectPreviousLink(List<WayConnectionType> con, int beg, boolean backward){774 // int i = beg;775 // while(true){776 // WayConnectionType t = con.get(i--);777 // t.isOnewayOppositeConnected = false;778 // if(backward && t.isOnewayLoopBackwardPart) break;779 // if(!backward && t.isOnewayLoopForwardPart) break;780 // }781 // }782 783 736 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationNodeMap.java
r5630 r6296 100 100 101 101 remaining.addAll(map.ways.keySet()); 102 103 /*104 * Clean up the maps, i.e. remove nodes from roundabouts and dead ends that105 * cannot be used in future. (only for performance)106 */107 // Iterator<Map.Entry<Node,TreeSet<Integer>>> it = map.nodes.entrySet().iterator();108 // while (it.hasNext()) {109 // Map.Entry<Node,TreeSet<Integer>> nodeLinks = it.next();110 //111 // if (nodeLinks.getValue().size() < 2) {112 // if (nodeLinks.getValue().size() != 1) throw new AssertionError();113 //114 // Integer d_way = nodeLinks.getValue().iterator().next();115 // TreeSet<Node> d_way_nodes = map.ways.get(d_way);116 // d_way_nodes.remove(nodeLinks.getKey());117 //118 // it.remove();119 // continue;120 // }121 // }122 102 } 123 103 -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculator.java
r6289 r6296 167 167 wct.isOnewayLoopForwardPart = true; 168 168 } 169 if (dirFW == NONE && dirBW == NONE) { //Not connected to previous 170 // unconnectPreviousLink(con, i, true); 171 // unconnectPreviousLink(con, i, false); 169 // Not connected to previous 170 if (dirFW == NONE && dirBW == NONE) { 172 171 wct.linkPrev = false; 173 if (RelationSortUtils.isOneway(m)) {172 if (RelationSortUtils.isOneway(m)) { 174 173 wct.isOnewayHead = true; 175 174 lastForwardWay = i-1; -
trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java
r6203 r6296 210 210 class RemoveAction extends AbstractAction implements ListSelectionListener{ 211 211 public RemoveAction() { 212 //putValue(NAME, tr("Remove"));213 212 putValue(SMALL_ICON, ImageProvider.get("dialogs", "delete")); 214 213 putValue(SHORT_DESCRIPTION, tr("Remove the currently selected bookmarks")); … … 237 236 class RenameAction extends AbstractAction implements ListSelectionListener{ 238 237 public RenameAction() { 239 //putValue(NAME, tr("Remove"));240 238 putValue(SMALL_ICON, ImageProvider.get("dialogs", "edit")); 241 239 putValue(SHORT_DESCRIPTION, tr("Rename the currently selected bookmark")); -
trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java
r6084 r6296 339 339 340 340 public static boolean isAutorunEnabled() { 341 //String autorun=Main.pref.get("download.autorun",null);342 //boolean expert=ExpertToggleAction.isExpert();343 //return (autorun==null && !expert) || "true".equals(autorun) ;344 341 return Main.pref.getBoolean("download.autorun",false); 345 342 } … … 352 349 353 350 /** 354 * Replies the currently selected download area. May be null, if no download area is selected 355 * yet. 351 * Replies the currently selected download area. May be null, if no download area is selected yet. 356 352 */ 357 353 public Bounds getSelectedDownloadArea() { -
trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java
r6248 r6296 471 471 class ReloadAction extends AbstractAction { 472 472 public ReloadAction() { 473 //putValue(NAME, tr("Reload"));474 473 putValue(SHORT_DESCRIPTION, tr("Reload the current help page")); 475 474 putValue(SMALL_ICON, ImageProvider.get("dialogs", "refresh")); … … 487 486 this.history = history; 488 487 history.addObserver(this); 489 //putValue(NAME, tr("Back"));490 488 putValue(SHORT_DESCRIPTION, tr("Go to the previous page")); 491 489 putValue(SMALL_ICON, ImageProvider.get("help", "previous")); … … 508 506 this.history = history; 509 507 history.addObserver(this); 510 //putValue(NAME, tr("Forward"));511 508 putValue(SHORT_DESCRIPTION, tr("Go to the next page")); 512 509 putValue(SMALL_ICON, ImageProvider.get("help", "next")); … … 526 523 class HomeAction extends AbstractAction { 527 524 public HomeAction() { 528 //putValue(NAME, tr("Home"));529 525 putValue(SHORT_DESCRIPTION, tr("Go to the JOSM help home page")); 530 526 putValue(SMALL_ICON, ImageProvider.get("help", "home")); -
trunk/src/org/openstreetmap/josm/gui/help/HelpUtil.java
r6143 r6296 119 119 if(ret == null) 120 120 return ret; 121 ret = "/" + ret + Main.pref.get("help.pathhelp", "/Help").replaceAll("^\\/+", ""); // remove leading / ;121 ret = "/" + ret + Main.pref.get("help.pathhelp", "/Help").replaceAll("^\\/+", ""); // remove leading / 122 122 return ret.replaceAll("\\/+", "\\/"); // collapse sequences of // 123 123 } -
trunk/src/org/openstreetmap/josm/gui/io/ChangesetManagementPanel.java
r6267 r6296 302 302 class RefreshAction extends AbstractAction { 303 303 public RefreshAction() { 304 //putValue(NAME, tr("Reload"));305 304 putValue(SHORT_DESCRIPTION, tr("Load the list of your open changesets from the server")); 306 305 putValue(SMALL_ICON, ImageProvider.get("dialogs", "refresh")); … … 320 319 class CloseChangesetAction extends AbstractAction implements ItemListener{ 321 320 public CloseChangesetAction() { 322 //putValue(NAME, tr("Close"));323 321 putValue(SMALL_ICON, ImageProvider.get("closechangeset")); 324 322 putValue(SHORT_DESCRIPTION, tr("Close the currently selected open changeset")); -
trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java
r6258 r6296 497 497 498 498 @Override 499 public void windowOpened(WindowEvent e) {500 //startUserInput();501 }502 503 @Override504 499 public void windowActivated(WindowEvent arg0) { 505 500 if (tpConfigPanels.getSelectedIndex() == 0) { -
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r6248 r6296 383 383 Area a = data.getDataSourceArea(); 384 384 385 // copy the merged layer's data source info; 386 // only add source rectangles if they are not contained in the 387 // layer already. 385 // copy the merged layer's data source info. 386 // only add source rectangles if they are not contained in the layer already. 388 387 for (DataSource src : from.dataSources) { 389 388 if (a == null || !a.contains(src.bounds.asRect())) { -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
r6248 r6296 1 1 // License: GPL. See LICENSE file for details. 2 // Copyright 2007 by Christian Gallioz (aka khris78)3 // Parts of code from Geotagged plugin (by Rob Neild)4 5 2 package org.openstreetmap.josm.gui.layer.geoimage; 6 3 … … 81 78 import org.xml.sax.SAXException; 82 79 83 /** This class displays the window to select the GPX file and the offset (timezone + delta). 80 /** 81 * This class displays the window to select the GPX file and the offset (timezone + delta). 84 82 * Then it correlates the images of the layer with that GPX file. 85 83 */ … … 541 539 cbShowThumbs = new JCheckBox(tr("Show Thumbnail images on the map"), ticked); 542 540 cbShowThumbs.setEnabled(!yLayer.thumbsLoaded); 543 /*cbShowThumbs.addItemListener(new ItemListener() {544 public void itemStateChanged(ItemEvent e) {545 if (e.getStateChange() == ItemEvent.SELECTED) {546 yLayer.loadThumbs();547 } else {548 }549 }550 });*/551 541 552 542 int y=0; … … 1051 1041 timezone = (double)Math.round(tz * 2)/2; // hours, rounded to one decimal place 1052 1042 delta = Math.round(diff - timezone*60*60); // seconds 1053 1054 /*Main.debug("phto " + firstExifDate);1055 Main.debug("gpx " + firstGPXDate);1056 Main.debug("diff " + diff);1057 Main.debug("difh " + diffInH);1058 Main.debug("days " + dayOffset);1059 Main.debug("time " + tz);1060 Main.debug("fix " + timezone);1061 Main.debug("offt " + delta);*/1062 1043 1063 1044 tfTimezone.getDocument().removeDocumentListener(statusBarUpdater); -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
r6292 r6296 1 1 // License: GPL. See LICENSE file for details. 2 // Copyright 2007 by Christian Gallioz (aka khris78)3 // Parts of code from Geotagged plugin (by Rob Neild)4 // and the core JOSM source code (by Immanuel Scholz and others)5 2 package org.openstreetmap.josm.gui.layer.geoimage; 6 3 -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageDisplay.java
r6090 r6296 1 1 // License: GPL. See LICENSE file for details. 2 // Copyright 2007 by Christian Gallioz (aka khris78)3 4 2 package org.openstreetmap.josm.gui.layer.geoimage; 5 3 -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageEntry.java
r6084 r6296 1 1 // License: GPL. See LICENSE file for details. 2 // Copyright 2007 by Christian Gallioz (aka khris78)3 // Parts of code from Geotagged plugin (by Rob Neild)4 // and the core JOSM source code (by Immanuel Scholz and others)5 6 2 package org.openstreetmap.josm.gui.layer.geoimage; 7 3 … … 13 9 import org.openstreetmap.josm.data.coor.LatLon; 14 10 15 /* 11 /** 16 12 * Stores info about each image 17 13 */ 18 19 14 final public class ImageEntry implements Comparable<ImageEntry>, Cloneable { 20 15 private File file; -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java
r6084 r6296 1 1 // License: GPL. See LICENSE file for details. 2 // Copyright 2007 by Christian Gallioz (aka khris78)3 // Parts of code from Geotagged plugin (by Rob Neild)4 // and the core JOSM source code (by Immanuel Scholz and others)5 6 2 package org.openstreetmap.josm.gui.layer.geoimage; 7 3 … … 56 52 public static ImageViewerDialog getInstance() { 57 53 if (dialog == null) 58 throw new AssertionError( ); // a new instance needs to be created first54 throw new AssertionError("a new instance needs to be created first"); 59 55 return dialog; 60 56 } … … 68 64 tr("Tool: {0}", tr("Display geotagged images")), KeyEvent.VK_Y, Shortcut.DIRECT), 200); 69 65 70 / * Don't show a detached dialog right from the start. */66 // Don't show a detached dialog right from the start. 71 67 if (isShowing && !isDocked) { 72 68 setIsShowing(false); … … 219 215 public void displayImage(GeoImageLayer layer, ImageEntry entry) { 220 216 synchronized(this) { 221 // if (currentLayer == layer && currentEntry == entry) { 222 // repaint(); 223 // return; 224 // } TODO: pop up image dialog but don't load image again 217 // TODO: pop up image dialog but don't load image again 225 218 226 219 if (centerView && Main.isDisplayingMapView() && entry != null && entry.getPos() != null) { … … 245 238 osd.append(tr("\nDirection {0}\u00b0", Math.round(entry.getExifImgDir()))); 246 239 } 247 //if (entry.getPos() != null) {248 // osd.append(tr("\nlat: {0}, lon: {1}", Double.toString(entry.getPos().lat()), Double.toString(entry.getPos().lon())));249 //}250 //osd.append(tr("\nfile mtime: {0}", Long.toString(entry.getFile().lastModified())));251 240 DateFormat dtf = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT); 252 241 if (entry.getExifTime() != null) { -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/JpegFileFilter.java
r2711 r6296 1 1 // License: GPL. See LICENSE file for details. 2 // Copyright 2007 by Christian Gallioz (aka khris78)3 // Parts of code from Geotagged plugin (by Rob Neild)4 // and the core JOSM source code (by Immanuel Scholz and others)5 6 2 package org.openstreetmap.josm.gui.layer.geoimage; 7 3 8 4 import static org.openstreetmap.josm.tools.I18n.tr; 9 5 10 //import javax.swing.JFileChooser;11 6 import java.io.File; 12 7 -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java
r6084 r6296 38 38 private Timer timer = null; 39 39 private double animationInterval = 0.0; // seconds 40 // private Rectangle audioTracer = null;41 // private Icon audioTracerIcon = null;42 40 static private PlayHeadMarker playHead = null; 43 41 private MapMode oldMode = null; -
trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java
r6084 r6296 387 387 public TestAccessTokenAction() { 388 388 putValue(NAME, tr("Test Access Token")); 389 /* putValue(SHORT_DESCRIPTION, ""); */390 389 putValue(SMALL_ICON, ImageProvider.get("about")); 391 390 } -
trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java
r6248 r6296 824 824 @Override 825 825 public Dimension preferredLayoutSize(Container parent) { 826 Dimension l = new Dimension(200, 200); //left.getPreferredSize();827 Dimension r = new Dimension(200, 200); //right.getPreferredSize();826 Dimension l = new Dimension(200, 200); 827 Dimension r = new Dimension(200, 200); 828 828 return new Dimension(l.width+r.width+10+buttons.getPreferredSize().width,Math.max(l.height, r.height)); 829 829 } -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java
r6248 r6296 246 246 log.append(CustomConfigurator.getLog()); 247 247 } 248 //try { Main.pref.save(); } catch (IOException ex) { }249 248 log.append("</html>"); 250 249 String msg = log.toString().replace("\n", "<br/>"); … … 253 252 + "You can reject preferences changes by pressing \"Cancel\" in preferences dialog <br/>" 254 253 + "To activate some changes JOSM restart may be needed.</html>"), msg).showDialog(); 255 256 //JOptionPane.showMessageDialog(Main.parent,257 // tr("Installed plugins and some changes in preferences will start to work after JOSM restart"), tr("Warning"), JOptionPane.WARNING_MESSAGE);258 254 259 255 readPreferences(tmpPrefs); -
trunk/src/org/openstreetmap/josm/gui/preferences/display/DrawingPreference.java
r6084 r6296 51 51 @Override 52 52 public void addGui(PreferenceTabbedPane gui) { 53 //gui.display.setPreferredSize(new Dimension(400,600));54 53 gpxPanel = new GPXSettingsPanel(); 55 54 gui.addValidationListener(gpxPanel); -
trunk/src/org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java
r6087 r6296 109 109 } 110 110 111 /** 112 * Constructs a new {@code OsmApiUrlInputPanel}. 113 */ 111 114 public OsmApiUrlInputPanel() { 112 115 build(); … … 152 155 OsmApi.getOsmApi().initialize(null); 153 156 } catch (Exception x) { 154 // ignore;157 Main.warn(x); 155 158 } 156 159 } -
trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java
r6248 r6296 368 368 protected void init() { 369 369 setAutoResizeMode(JTable.AUTO_RESIZE_OFF); 370 //setCellSelectionEnabled(true);371 370 setRowSelectionAllowed(true); 372 371 setColumnSelectionAllowed(true); -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java
r6248 r6296 957 957 try { 958 958 Method method = Class.forName(class_method[0]).getMethod(class_method[1]); 959 // Check method is public static String[] methodName() ;959 // Check method is public static String[] methodName() 960 960 int mod = method.getModifiers(); 961 961 if (Modifier.isPublic(mod) && Modifier.isStatic(mod) -
trunk/src/org/openstreetmap/josm/gui/widgets/JosmComboBox.java
r6288 r6296 119 119 for (Object value : possibleValues) { 120 120 if (value != null) { 121 // These two lines work with a "classic" renderer,121 // With a "classic" renderer, we could call setPrototypeDisplayValue(value) + getPreferredSize() 122 122 // but not with TaggingPreset custom renderer that return a dummy height if index is equal to -1 123 //setPrototypeDisplayValue(value);124 //Dimension dim = getPreferredSize();125 126 123 // So we explicitely call the renderer by simulating a correct index for the current value 127 124 Component c = getRenderer().getListCellRendererComponent(list, value, i, true, true); -
trunk/src/org/openstreetmap/josm/io/NmeaReader.java
r6287 r6296 239 239 240 240 // checksum check: 241 // the bytes between the $ and the * are xored ;241 // the bytes between the $ and the * are xored 242 242 // if there is no * or other meanities it will throw 243 243 // and result in a malformed packet. -
trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java
r6142 r6296 168 168 169 169 private static final long serialVersionUID = 1L; 170 ///private final DefaultCellEditor textEditor = new DefaultCellEditor( new JTextField() );171 170 172 171 @Override … … 288 287 } 289 288 290 /*289 /** 291 290 * parse addtags parameters Example URL (part): 292 291 * addtags=wikipedia:de%3DResidenzschloss Dresden|name:en%3DDresden Castle -
trunk/src/org/openstreetmap/josm/plugins/PluginListParser.java
r6085 r6296 65 65 String url = null; 66 66 StringBuilder manifest = new StringBuilder(); 67 /*68 code structure:69 for () {70 A;71 B;72 C;73 }74 B;75 */76 67 for (String line = r.readLine(); line != null; line = r.readLine()) { 77 68 if (line.startsWith("\t")) { -
trunk/src/org/openstreetmap/josm/tools/Diff.java
r6295 r6296 272 272 && yoff + SNAKE_LIMIT <= y && y < ylim) 273 273 { 274 /* We have a good enough best diagonal ;275 now insist that it end with a significant snake. */274 /* We have a good enough best diagonal. 275 now insist that it end with a significant snake. */ 276 276 int k; 277 277 … … 305 305 && yoff < y && y <= ylim - SNAKE_LIMIT) 306 306 { 307 /* We have a good enough best diagonal ;308 now insist that it end with a significant snake. */307 /* We have a good enough best diagonal. 308 now insist that it end with a significant snake. */ 309 309 int k; 310 310 … … 363 363 int d = diag (xoff, xlim, yoff, ylim); 364 364 int c = cost; 365 //int f = fdiag[fdiagoff + d];366 365 int b = bdiag[bdiagoff + d]; 367 366 -
trunk/src/org/openstreetmap/josm/tools/Geometry.java
r6246 r6296 498 498 } 499 499 500 //order points so p1.lat <= p2.lat ;500 //order points so p1.lat <= p2.lat 501 501 if (newPoint.getEastNorth().getY() > oldPoint.getEastNorth().getY()) { 502 502 p1 = oldPoint;
Note:
See TracChangeset
for help on using the changeset viewer.