Changeset 1195 in josm for trunk/src


Ignore:
Timestamp:
2008-12-31T00:36:58+01:00 (11 years ago)
Author:
stoecker
Message:

fixed relation handling, applied language patches

Location:
trunk/src/org/openstreetmap/josm
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/Main.java

    r1188 r1195  
    479479            final Bounds b = BoundingBoxSelection.osmurl2bounds(s);
    480480            if (b == null)
    481                 JOptionPane.showMessageDialog(Main.parent, tr("Ignoring malformed url: \"{0}\"", s));
     481                JOptionPane.showMessageDialog(Main.parent, tr("Ignoring malformed URL: \"{0}\"", s));
    482482            else {
    483483                //DownloadTask osmTask = main.menu.download.downloadTasks.get(0);
     
    492492                main.menu.openFile.openFile(new File(new URI(s)));
    493493            } catch (URISyntaxException e) {
    494                 JOptionPane.showMessageDialog(Main.parent, tr("Ignoring malformed file url: \"{0}\"", s));
     494                JOptionPane.showMessageDialog(Main.parent, tr("Ignoring malformed file URL: \"{0}\"", s));
    495495            }
    496496            return;
  • trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java

    r1169 r1195  
    4646     */
    4747    public OpenLocationAction() {
    48         super(tr("Open Location..."), "openlocation", tr("Open a URL."),
     48        super(tr("Open Location..."), "openlocation", tr("Open an URL."),
    4949        Shortcut.registerShortcut("system:open_location", tr("File: {0}", tr("Open Location...")), KeyEvent.VK_L, Shortcut.GROUP_MENU), true);
    5050    }
  • trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java

    r1169 r1195  
    4141        super(tr("Orthogonalize shape"),
    4242            "ortho",
    43             tr("Move nodes so all angles are 90 or 270deg"),
     43            tr("Move nodes so all angles are 90 or 270 degree"),
    4444            Shortcut.registerShortcut("tools:orthogonalize", tr("Tool: {0}", tr("Orthogonalize")),
    4545            KeyEvent.VK_Q,
     
    7373            Way way = (Way)osm;
    7474            if ((way.nodes.size() < 5) || (!way.nodes.get(0).equals(way.nodes.get(way.nodes.size() - 1)))) {
    75                 JOptionPane.showMessageDialog(Main.parent, tr("Please select closed way(s) of at least four nodes."));
     75                JOptionPane.showMessageDialog(Main.parent, tr("Please select one ore more closed ways of at least four nodes."));
    7676                return;
    7777            }
  • trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java

    r1169 r1195  
    8686            if (tmpNodes.size() < 1) {
    8787                if (selection.size() > 1) {
    88                     JOptionPane.showMessageDialog(Main.parent, tr("None of these nodes is glued to anything else."));
     88                    JOptionPane.showMessageDialog(Main.parent, tr("None of these nodes are glued to anything else."));
    8989                } else {
    90                     JOptionPane.showMessageDialog(Main.parent, tr("None of this way's nodes is glued to anything else."));
     90                    JOptionPane.showMessageDialog(Main.parent, tr("None of this way's nodes are glued to anything else."));
    9191                }
    9292            } else {
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ZoomAction.java

    r1169 r1195  
    7575
    7676    @Override public String getModeHelpText() {
    77         return tr("Zoom by dragging or Ctrl+. or Ctrl+,; move with Ctrl+up,left,down,right; move zoom with right button");
     77        return tr("Zoom by dragging or Ctrl+. or Ctrl+,; move with Ctrl+up, left, down, right; move zoom with right button");
    7878    }
    7979}
  • trunk/src/org/openstreetmap/josm/actions/search/SelectionWebsiteLoader.java

    r1169 r1195  
    5555        } catch (IOException e) {
    5656            e.printStackTrace();
    57             JOptionPane.showMessageDialog(Main.parent, tr("Could not read from url: \"{0}\"",url));
     57            JOptionPane.showMessageDialog(Main.parent, tr("Could not read from URL: \"{0}\"",url));
    5858        } catch (SAXException e) {
    5959            e.printStackTrace();
    60             JOptionPane.showMessageDialog(Main.parent,tr("Parsing error in url: \"{0}\"",url));
     60            JOptionPane.showMessageDialog(Main.parent,tr("Parsing error in URL: \"{0}\"",url));
    6161        }
    6262    }
  • trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java

    r1169 r1195  
    134134
    135135        return applyCorrections(tagCorrectionsMap, roleCorrectionMap,
    136                 tr("When reverting this way, following changes to properties "
     136                tr("When reversing this way, the following changes to properties "
    137137                        + "of the way and its nodes are suggested in order "
    138138                        + "to maintain data consistency."));
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java

    r1193 r1195  
    3838    protected boolean zoomLevelDisplay;
    3939    protected boolean fillAreas;
     40    protected boolean drawMultipolygon;
    4041    protected int fillAlpha;
    4142    protected Color untaggedColor;
     
    4849    protected double circum;
    4950    protected String regionalNameOrder[];
    50     protected Collection<Way> alreadyDrawnWays = new LinkedList<Way>();
    51     protected Collection<Way> alreadyDrawnAreas = new LinkedList<Way>();
     51    protected Boolean selectedCall;
     52    protected Collection<OsmPrimitive> alreadyDrawn;
     53    protected Collection<Way> alreadyDrawnAreas;
    5254
    5355    protected boolean isZoomOk(ElemStyle e) {
     
    7375     */
    7476    public void visit(Node n) {
    75         IconElemStyle nodeStyle = styles.get(n);
     77        IconElemStyle nodeStyle = (IconElemStyle)styles.get(n);
    7678        if (nodeStyle != null && isZoomOk(nodeStyle))
    77             drawNode(n, nodeStyle.icon, nodeStyle.annotate);
     79            drawNode(n, nodeStyle.icon, nodeStyle.annotate, n.selected);
    7880        else if (n.selected)
    7981            drawNode(n, selectedColor, selectedNodeSize, selectedNodeRadius, fillSelectedNode);
     
    114116        }
    115117
    116         drawWay(w, l, areacolor);
    117     }
    118 
    119     public void drawWay(Way w, LineElemStyle l, Color color) {
     118        drawWay(w, l, areacolor, w.selected);
     119    }
     120
     121    public void drawWay(Way w, LineElemStyle l, Color color, Boolean selected) {
    120122        // show direction arrows, if draw.segment.relevant_directions_only is not set,
    121123        // the way is tagged with a direction key
     
    134136            dashed = l.dashed;
    135137        }
     138        if(selected)
     139            color = selectedColor;
    136140        if (realWidth > 0 && useRealWidth && !showDirection)
    137141        {
     
    294298    }
    295299
     300    public void drawSelected(OsmPrimitive osm, ElemStyle style, Boolean area,
     301    Boolean areaselected)
     302    {
     303        if(osm instanceof Way)
     304        {
     305            if(style instanceof AreaElemStyle)
     306            {
     307                drawWay((Way)osm, ((AreaElemStyle)style).line, selectedColor, true);
     308                if(area)
     309                    drawWayAsArea((Way)osm, areaselected ? selectedColor
     310                    : ((AreaElemStyle)style).color);
     311            }
     312            else
     313            {
     314                drawWay((Way)osm, (LineElemStyle)style, selectedColor, true);
     315            }
     316        }
     317        else if(osm instanceof Node)
     318        {
     319            if(style != null && isZoomOk(style))
     320                drawNode((Node)osm, ((IconElemStyle)style).icon,
     321                ((IconElemStyle)style).annotate, true);
     322            else
     323                drawNode((Node)osm, selectedColor, selectedNodeSize, selectedNodeRadius, fillSelectedNode);
     324        }
     325    }
     326
    296327    public void visit(Relation r) {
    297328        // draw multipolygon relations including their ways
    298         // other relations are not (yet?) drawn.
    299         if (r.incomplete) return;
    300 
    301         if(!Main.pref.getBoolean("mappaint.multipolygon",false)) return;
    302 
    303         if(!"multipolygon".equals(r.keys.get("type"))) return;
     329        // other relations are only drawn when selected
     330        if(r.selected)
     331        {
     332            if(selectedCall)
     333            {
     334                for (RelationMember m : r.members)
     335                {
     336                    /* second call - draw nodes */
     337                    if (!m.member.incomplete && !m.member.deleted
     338                    && m.member instanceof Node)
     339                    {
     340                        drawSelected(m.member, styles.get(m.member), true, true);
     341                        alreadyDrawn.add(m.member);
     342                    }
     343                }
     344                return;
     345            }
     346        }
     347        Boolean isMultipolygon = "multipolygon".equals(r.keys.get("type"));
     348        if (!drawMultipolygon || !isMultipolygon)
     349        {
     350            if(r.selected && !isMultipolygon)
     351            {
     352                for (RelationMember m : r.members)
     353                {
     354                    if (!m.member.incomplete && !m.member.deleted
     355                    && !(m.member instanceof Relation))
     356                    {
     357                        /* nodes drawn on second call */
     358                        if(!(m.member instanceof Node))
     359                            drawSelected(m.member, styles.get(m.member), true, true);
     360                        alreadyDrawn.add(m.member);
     361                    }
     362                }
     363            }
     364            return;
     365        }
    304366
    305367        Collection<Way> inner = new LinkedList<Way>();
     
    328390                        if(m.role == null || m.role.length() == 0)
    329391                            outer.add(w);
     392                        else if(r.selected)
     393                            drawSelected(m.member, styles.get(m.member), true, true);
    330394                    }
    331395                }
    332396                else
    333397                {
     398                    /* nodes drawn on second call */
    334399System.out.println("ERROR: Non-Way in multipolygon " + m.member);
    335400                }
     
    385450                for (Way w : outerclosed)
    386451                {
    387                     Color color = w.selected ? selectedColor
     452                    Color color = (w.selected || r.selected) ? selectedColor
    388453                    : ((AreaElemStyle)wayStyle).color;
    389454                    Polygon polygon = new Polygon();
     
    423488                {
    424489                    if(zoomok)
     490                    {
    425491                        drawWay(wInner, ((AreaElemStyle)wayStyle).line,
    426                         ((AreaElemStyle)wayStyle).color);
    427                     alreadyDrawnWays.add(wInner);
    428                 }
    429                 else if(wayStyle.equals(innerStyle))
    430                 {
     492                        ((AreaElemStyle)wayStyle).color, wInner.selected
     493                        || r.selected);
     494                    }
     495                    alreadyDrawn.add(wInner);
     496                }
     497                else
     498                {
     499                    if(r.selected)
     500                    {
     501                        drawSelected(wInner, innerStyle,
     502                        !wayStyle.equals(innerStyle), wInner.selected);
     503                        alreadyDrawn.add(wInner);
     504                    }
     505                    if(wayStyle.equals(innerStyle))
     506                    {
    431507System.out.println("WARNING: Inner waystyle equals multipolygon for way " + wInner);
    432                     alreadyDrawnAreas.add(wInner);
     508                        if(!r.selected)
     509                            alreadyDrawnAreas.add(wInner);
     510                    }
    433511                }
    434512            }
     
    439517                {
    440518                    if(zoomok)
     519                    {
    441520                        drawWay(wOuter, ((AreaElemStyle)wayStyle).line,
    442                         ((AreaElemStyle)wayStyle).color);
    443                     alreadyDrawnWays.add(wOuter);
     521                        ((AreaElemStyle)wayStyle).color, wOuter.selected
     522                        || r.selected);
     523                    }
     524                    alreadyDrawn.add(wOuter);
    444525                }
    445526                else
    446527                {
    447                     if(!wayStyle.equals(outerStyle))
     528                    if(outerStyle instanceof AreaElemStyle
     529                    && !wayStyle.equals(outerStyle))
     530                    {
    448531System.out.println("ERROR: Outer waystyle does not match multipolygon for way " + wOuter);
    449                     alreadyDrawnAreas.add(wOuter);
     532                    }
     533                    if(r.selected)
     534                    {
     535                        drawSelected(wOuter, outerStyle, false, false);
     536                        alreadyDrawn.add(wOuter);
     537                    }
     538//                    else if(outerStyle instanceof AreaElemStyle)
     539                        alreadyDrawnAreas.add(wOuter);
    450540                }
    451541            }
     
    470560    }
    471561
    472     // NEW
    473     protected void drawNode(Node n, ImageIcon icon, boolean annotate) {
     562    protected void drawNode(Node n, ImageIcon icon, boolean annotate, Boolean selected) {
    474563        Point p = nc.getPoint(n.eastNorth);
    475564        if ((p.x < 0) || (p.y < 0) || (p.x > nc.getWidth()) || (p.y > nc.getHeight())) return;
     
    485574            g.setFont(defaultFont);
    486575        }
    487         if (n.selected)
     576        if (selected)
    488577        {
    489578            g.setColor (  selectedColor );
     
    582671        circum = Main.map.mapView.getScale()*100*Main.proj.scaleFactor()*40041455; // circumference of the earth in meter
    583672        styles = MapPaintStyles.getStyles();
     673        drawMultipolygon = Main.pref.getBoolean("mappaint.multipolygon",false);
    584674        orderFont = new Font(Main.pref.get("mappaint.font","Helvetica"), Font.PLAIN, Main.pref.getInteger("mappaint.fontsize", 8));
    585675        String currentLocale = Locale.getDefault().getLanguage();
    586676        regionalNameOrder = Main.pref.get("mappaint.nameOrder", "name:"+currentLocale+";name;int_name").split(";");
    587677
     678        alreadyDrawn = new LinkedList<OsmPrimitive>();
     679        alreadyDrawnAreas = new LinkedList<Way>();
     680        selectedCall = false;
     681
    588682        if (fillAreas && styles.hasAreas()) {
    589683            Collection<Way> noAreaWays = new LinkedList<Way>();
     
    591685            for (final Relation osm : data.relations)
    592686            {
    593                 if (!osm.deleted && !osm.selected)
    594                 {
     687                if(!osm.deleted && !osm.incomplete)
    595688                    osm.visit(this);
    596                 }
    597689            }
    598690
    599691            for (final Way osm : data.ways)
    600692            {
    601                 if (!osm.incomplete && !osm.deleted && !alreadyDrawnWays.contains(osm))
     693                if (!osm.incomplete && !osm.deleted && !alreadyDrawn.contains(osm))
    602694                {
    603695                    if(styles.isArea((Way)osm) && !alreadyDrawnAreas.contains(osm))
     
    607699                }
    608700            }
    609             // free that stuff
    610             alreadyDrawnWays = null;
    611701            alreadyDrawnAreas = null;
    612702
     
    618708        {
    619709            for (final OsmPrimitive osm : data.ways)
    620                 if (!osm.incomplete && !osm.deleted)
     710                if (!osm.incomplete && !osm.deleted && !osm.selected)
    621711                    osm.visit(this);
    622712        }
    623713
    624         for (final OsmPrimitive osm : data.getSelected())
    625             if (!osm.incomplete && !osm.deleted){
     714        selectedCall = true;
     715        for (final OsmPrimitive osm : data.getSelected()) {
     716            if (!osm.incomplete && !osm.deleted
     717            && !(osm instanceof Node) && !alreadyDrawn.contains(osm))
    626718                osm.visit(this);
    627             }
     719        }
    628720
    629721        displaySegments();
    630722
    631723        for (final OsmPrimitive osm : data.nodes)
    632             if (!osm.incomplete && !osm.deleted)
     724            if (!osm.incomplete && !osm.deleted && !alreadyDrawn.contains(osm))
    633725                osm.visit(this);
     726
     727        alreadyDrawn = null;
    634728
    635729        if (virtualNodeSize != 0)
     
    637731            currentColor = nodeColor;
    638732            for (final OsmPrimitive osm : data.ways)
    639                 if (!osm.deleted)
     733                if (!osm.incomplete && !osm.deleted)
    640734                    visitVirtual((Way)osm);
    641735            displaySegments(null);
  • trunk/src/org/openstreetmap/josm/gui/MainApplet.java

    r1179 r1195  
    5555        {"password", tr("string"), tr("OSM Password.")},
    5656        {"geometry", tr("string"), tr("Resize the applet to the given geometry (format: WIDTHxHEIGHT)")},
    57         {"download", tr("string;string;..."), tr("Download each. Can be x1,y1,x2,y2 an url containing lat=y&lon=x&zoom=z or a filename")},
    58         {"downloadgps", tr("string;string;..."), tr("Download each as raw gps. Can be x1,y1,x2,y2 an url containing lat=y&lon=x&zoom=z or a filename")},
    59         {"selection", tr("string;string;..."), tr("Add each to the initial selection. Can be a google-like search string or an url which returns osm-xml")},
     57        {"download", tr("string;string;..."), tr("Download each. Can be x1,y1,x2,y2 an URL containing lat=y&lon=x&zoom=z or a filename")},
     58        {"downloadgps", tr("string;string;..."), tr("Download each as raw gps. Can be x1,y1,x2,y2 an URL containing lat=y&lon=x&zoom=z or a filename")},
     59        {"selection", tr("string;string;..."), tr("Add each to the initial selection. Can be a google-like search string or an URL which returns osm-xml")},
    6060        {"reset-preferences", tr("any"),tr("If specified, reset the configuration instead of reading it.")}
    6161    };
  • trunk/src/org/openstreetmap/josm/gui/PleaseWaitRunnable.java

    r1169 r1195  
    2020/**
    2121 * Instanced of this thread will display a "Please Wait" message in middle of JOSM
    22  * to indicate a progress beeing executed.
     22 * to indicate a progress being executed.
    2323 *
    2424 * @author Imi
  • trunk/src/org/openstreetmap/josm/gui/dialogs/RelationEditor.java

    r1169 r1195  
    1414import java.beans.PropertyChangeListener;
    1515import java.io.IOException;
    16 import java.lang.reflect.Array;
    1716import java.text.Collator;
    1817import java.util.ArrayList;
     
    304303            upDownPanel.setLayout(new BoxLayout(upDownPanel, BoxLayout.Y_AXIS));
    305304
    306 
    307 
    308             upDownPanel.add(createButton(null, "moveup", tr("Move the currently selected member(s) up"),
     305            upDownPanel.add(createButton(null, "moveup", tr("Move the currently selected members up"),
    309306                    KeyEvent.VK_U, new ActionListener() {
    310307                public void actionPerformed(ActionEvent e) {
     
    312309                }
    313310            }));
    314             upDownPanel.add(createButton(null, "movedown", tr("Move the currently selected member(s) down"),
     311            upDownPanel.add(createButton(null, "movedown", tr("Move the currently selected members down"),
    315312                    KeyEvent.VK_N, new ActionListener() {
    316313                public void actionPerformed(ActionEvent e) {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java

    r1084 r1195  
    44import static org.openstreetmap.josm.tools.I18n.marktr;
    55import static org.openstreetmap.josm.tools.I18n.tr;
     6import static org.openstreetmap.josm.tools.I18n.trn;
    67
    78import java.awt.BorderLayout;
     
    3738import org.openstreetmap.josm.data.osm.Node;
    3839import org.openstreetmap.josm.data.osm.OsmPrimitive;
     40import org.openstreetmap.josm.data.osm.Relation;
    3941import org.openstreetmap.josm.data.osm.Way;
    4042import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
     
    286288            int ways = 0;
    287289            int nodes = 0;
     290            int relations = 0;
    288291            for (OsmPrimitive o : sel) {
    289292                if (o instanceof Way)
     
    291294                else if (o instanceof Node)
    292295                    nodes++;
    293             }
    294             setText(String.format(tr("Selection: %d way(s) and %d node(s)"), new Object[] { ways, nodes }));
     296                else if (o instanceof Relation)
     297                    relations++;
     298            }
     299            String text = "";
     300            if(ways != 0)
     301                text += (text.length() > 0 ? ", " : "")
     302                + trn("{0} way", "{0} ways", ways, ways);
     303            if(nodes != 0)
     304                text += (text.length() > 0 ? ", " : "")
     305                + trn("{0} node", "{0} nodes", nodes, nodes);
     306            if(relations != 0)
     307                text += (text.length() > 0 ? ", " : "")
     308                + trn("{0} relation", "{0} relations", relations, relations);
     309            setText(tr("Selection: {0}", text));
    295310            addActionListener(this);
    296311        }
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java

    r1169 r1195  
    226226        });
    227227
    228         JMenuItem moveaudio = new JMenuItem(tr("Make Audio Marker At Play Head"), ImageProvider.get("addmarkers"));
     228        JMenuItem moveaudio = new JMenuItem(tr("Make Audio Marker at Play Head"), ImageProvider.get("addmarkers"));
    229229        moveaudio.putClientProperty("help", "Action/MakeAudioMarkerAtPlayHead");
    230230        moveaudio.addActionListener(new ActionListener(){
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java

    r1169 r1195  
    201201        if (ca == null) {
    202202            /* Not close enough to track, or no audio marker found for some other reason */
    203             JOptionPane.showMessageDialog(Main.parent, tr("You need to Drag the play head near to the GPX track whose associated sound track you were playing."));
     203            JOptionPane.showMessageDialog(Main.parent, tr("You need to drag the play head near to the GPX track whose associated sound track you were playing."));
    204204            endDrag(true);
    205205        } else {
     
    249249            WayPoint cw = recent.parentLayer.fromLayer.nearestPointOnTrack(en, enPlus25px.east() - en.east());
    250250            if (cw == null) {
    251                 JOptionPane.showMessageDialog(Main.parent, tr("You need to SHIFT-Drag the play head onto an audio marker or onto the track point where you want to synchronize."));
     251                JOptionPane.showMessageDialog(Main.parent, tr("You need to SHIFT-drag the play head onto an audio marker or onto the track point where you want to synchronize."));
    252252                endDrag(true);
    253253                return;
     
    259259        if(ca == null)
    260260        {
    261             JOptionPane.showMessageDialog(Main.parent,tr("Unable to create new Audio marker."));
     261            JOptionPane.showMessageDialog(Main.parent,tr("Unable to create new audio marker."));
    262262            endDrag(true);
    263263        }
  • trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java

    r1192 r1195  
    8888    }
    8989
    90     public IconElemStyle get(Node n)
    91     {
    92         StyleSet ss = getStyleSet(null, false);
     90    private ElemStyle getNode(Map<String, String> keys, StyleSet ss)
     91    {
    9392        IconElemStyle ret = null;
    94         if(ss != null && n.keys != null)
    95         {
    96             Iterator<String> iterator = n.keys.keySet().iterator();
    97             while(iterator.hasNext())
    98             {
    99                 String key = iterator.next();
    100                 String val = n.keys.get(key);
    101                 IconElemStyle style;
    102                 if((style = ss.icons.get("n" + key + "=" + val)) != null)
    103                 {
    104                     if(ret == null || style.priority > ret.priority)
    105                         ret = style;
    106                 }
    107                 if((style = ss.icons.get("b" + key + "=" + OsmUtils.getNamedOsmBoolean(val))) != null)
    108                 {
    109                     if(ret == null || style.priority > ret.priority)
    110                         ret = style;
    111                 }
    112                 if((style = ss.icons.get("x" + key)) != null)
    113                 {
    114                     if(ret == null || style.priority > ret.priority)
    115                         ret = style;
    116                 }
     93        Iterator<String> iterator = keys.keySet().iterator();
     94        while(iterator.hasNext())
     95        {
     96            String key = iterator.next();
     97            String val = keys.get(key);
     98            IconElemStyle style;
     99            if((style = ss.icons.get("n" + key + "=" + val)) != null)
     100            {
     101                if(ret == null || style.priority > ret.priority)
     102                    ret = style;
     103            }
     104            if((style = ss.icons.get("b" + key + "=" + OsmUtils.getNamedOsmBoolean(val))) != null)
     105            {
     106                if(ret == null || style.priority > ret.priority)
     107                    ret = style;
     108            }
     109            if((style = ss.icons.get("x" + key)) != null)
     110            {
     111                if(ret == null || style.priority > ret.priority)
     112                    ret = style;
    117113            }
    118114        }
     
    181177    }
    182178
    183     public ElemStyle get(Way w)
     179    public ElemStyle get(OsmPrimitive osm)
    184180    {
    185181        StyleSet ss = getStyleSet(null, false);
    186         return (ss == null || w.keys == null) ? null : get(w.keys, ss);
    187     }
    188 
    189     public ElemStyle get(Relation r)
    190     {
    191         StyleSet ss = getStyleSet(null, false);
    192         return (ss == null || r.keys == null) ? null : get(r.keys, ss);
     182        return (ss == null || osm.keys == null) ? null :
     183        ((osm instanceof Node) ? getNode(osm.keys, ss) : get(osm.keys, ss));
    193184    }
    194185
  • trunk/src/org/openstreetmap/josm/gui/preferences/ServerAccessPreference.java

    r1180 r1195  
    4545        JLabel warning = new JLabel(tr("<html>" +
    4646                "WARNING: The password is stored in plain text in the preferences file.<br>" +
    47                 "The password is transfered in plain text to the server, encoded in the url.<br>" +
     47                "The password is transfered in plain text to the server, encoded in the URL.<br>" +
    4848        "<b>Do not use a valuable Password.</b></html>"));
    4949        warning.setFont(warning.getFont().deriveFont(Font.ITALIC));
  • trunk/src/org/openstreetmap/josm/gui/preferences/TaggingPresetPreference.java

    r1180 r1195  
    8484        taggingPresetSources.setVisibleRowCount(3);
    8585
    86         taggingPresetSources.setToolTipText(tr("The sources (url or filename) of tagging preset definition files. See http://josm.openstreetmap.de/wiki/TaggingPresets for help."));
     86        taggingPresetSources.setToolTipText(tr("The sources (URL or filename) of tagging preset definition files. See http://josm.openstreetmap.de/wiki/TaggingPresets for help."));
    8787        addAnno.setToolTipText(tr("Add a new tagging preset source to the list."));
    8888        deleteAnno.setToolTipText(tr("Delete the selected source from the list."));
  • trunk/src/org/openstreetmap/josm/io/DiffResultReader.java

    r1169 r1195  
    7070            } catch (NullPointerException x) {
    7171                x.printStackTrace(); // SAXException does not chain correctly
    72                 throw new SAXException(tr("NullPointerException, Possibly some missing tags."), x);
     72                throw new SAXException(tr("NullPointerException, possibly some missing tags."), x);
    7373            }
    7474        }
  • trunk/src/org/openstreetmap/josm/io/OsmReader.java

    r1169 r1195  
    201201                         Collection<RelationMemberData> list = relations.get(current);
    202202                         if (list == null)
    203                               throw new SAXException(tr("Found <member> tag on non-relation."));
     203                              throw new SAXException(tr("Found <member> element in non-relation."));
    204204                         RelationMemberData emd = new RelationMemberData();
    205205                         emd.relationMember = new RelationMember();
     
    223223               } catch (NullPointerException x) {
    224224                    x.printStackTrace(); // SAXException does not chain correctly
    225                     throw new SAXException(tr("NullPointerException, Possibly some missing tags."), x);
     225                    throw new SAXException(tr("NullPointerException, possibly some missing tags."), x);
    226226               }
    227227          }
     
    460460          } catch (NumberFormatException e) {
    461461               e.printStackTrace();
    462                throw new SAXException(tr("Illformed Node id"));
     462               throw new SAXException(tr("Ill-formed node id"));
    463463          }
    464464
  • trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java

    r1189 r1195  
    114114        while (useChangesets && comment == null) {
    115115            comment = JOptionPane.showInputDialog(Main.parent,
    116                  tr("Provide a brief comment as to the changes to you are uploading:"),
     116                 tr("Provide a brief comment for the changes you are uploading:"),
    117117                 tr("Commit comment"), JOptionPane.QUESTION_MESSAGE);
    118118            if (comment == null)
  • trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java

    r1189 r1195  
    114114                    p.add(new JLabel("<html>" + tr("Please report a ticket at {0}","http://josm.openstreetmap.de/newticket") +
    115115                    "<br>" + tr("Include your steps to get to the error (as detailed as possible)!") +
    116                     "<br>" + tr("Try updating to the newest version of JOSM and all plugin before reporting a bug.") +
     116                    "<br>" + tr("Try updating to the newest version of JOSM and all plugins before reporting a bug.") +
    117117                    "<br>" + tr("Be sure to include the following information:") + "</html>"), GBC.eol());
    118118                    try {
  • trunk/src/org/openstreetmap/josm/tools/PlatformHook.java

    r1169 r1195  
    22package org.openstreetmap.josm.tools;
    33
    4 import static org.openstreetmap.josm.tools.I18n.tr;
    54import org.openstreetmap.josm.tools.Shortcut;
    65
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java

    r1169 r1195  
    22package org.openstreetmap.josm.tools;
    33
    4 import static org.openstreetmap.josm.tools.I18n.tr;
    54import org.openstreetmap.josm.tools.Shortcut;
    65import org.openstreetmap.josm.Main;
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java

    r1169 r1195  
    22package org.openstreetmap.josm.tools;
    33
    4 import static org.openstreetmap.josm.tools.I18n.tr;
    54import org.openstreetmap.josm.tools.Shortcut;
    65import org.openstreetmap.josm.Main;
Note: See TracChangeset for help on using the changeset viewer.