Changeset 9844 in josm


Ignore:
Timestamp:
2016-02-20T23:50:52+01:00 (4 years ago)
Author:
wiktorn
Message:

Use HTML formatting for projection warning message for line wrapping.

Closes: #12426

Location:
trunk/src/org/openstreetmap/josm/gui/layer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/Layer.java

    r9510 r9844  
    505505    public void projectionChanged(Projection oldValue, Projection newValue) {
    506506        if (!isProjectionSupported(newValue)) {
     507            String message = "<html><body><p>" + tr("The layer {0} does not support the new projection {1}.", getName(), newValue.toCode()) + "</p>" +
     508                    "<p style='width: 450px;'>" + tr("Supported projections are: {0}", nameSupportedProjections()) + "</p>" +
     509                    tr("Change the projection again or remove the layer.");
     510
    507511            JOptionPane.showMessageDialog(Main.parent,
    508                     tr("The layer {0} does not support the new projection {1}.\n"
    509                             + "Supported projections are: {2}\n"
    510                             + "Change the projection again or remove the layer.",
    511                             getName(), newValue.toCode(), nameSupportedProjections()),
    512                             tr("Warning"),
    513                             JOptionPane.WARNING_MESSAGE);
     512                    message,
     513                    tr("Warning"),
     514                    JOptionPane.WARNING_MESSAGE);
    514515        }
    515516    }
  • trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java

    r9430 r9844  
    128128
    129129        if (isReprojectionPossible()) {
    130             appendix = ". " + tr("JOSM will use EPSG:4326 to query the server, but results may vary "
    131                     + "depending on the WMS server");
     130            appendix = ". <p>" + tr("JOSM will use EPSG:4326 to query the server, but results may vary "
     131                    + "depending on the WMS server") + "</p>";
    132132        }
    133133        return ret.substring(0, ret.length()-2) + appendix;
     
    139139
    140140        if (!isProjectionSupported(newValue)) {
    141             String message = tr("The layer {0} does not support the new projection {1}.\n"
    142                     + " Supported projections are: {2}\n"
    143                     + "Change the projection again or remove the layer.",
    144                     getName(), newValue.toCode(), nameSupportedProjections());
     141            String message =
     142                    "<html><body><p>" + tr("The layer {0} does not support the new projection {1}.", getName(), newValue.toCode()) +
     143                    "<p style='width: 450px; position: absolute; margin: 0px;'>" + tr("Supported projections are: {0}", nameSupportedProjections()) + "</p>" +
     144                    "<p>" + tr("Change the projection again or remove the layer.");
    145145
    146146            ExtendedDialog warningDialog = new ExtendedDialog(Main.parent, tr("Warning"), new String[]{tr("OK")}).
Note: See TracChangeset for help on using the changeset viewer.