]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - tim/prune/save/SvgExporter.java
Version 13.4, May 2012
[GpsPrune.git] / tim / prune / save / SvgExporter.java
index c27b2f359ae680fc560db1922a869b08000c30a8..4a86c5b5472c27f0b1b7e201ba658194b793b1f6 100644 (file)
@@ -31,6 +31,7 @@ import tim.prune.UpdateMessageBroker;
 import tim.prune.config.Config;
 import tim.prune.data.Track;
 import tim.prune.function.Export3dFunction;
+import tim.prune.gui.DialogCloser;
 import tim.prune.load.GenericFileFilter;
 import tim.prune.threedee.ThreeDModel;
 
@@ -131,8 +132,7 @@ public class SvgExporter extends Export3dFunction
                buttonPanel.add(okButton);
                JButton cancelButton = new JButton(I18nManager.getText("button.cancel"));
                cancelButton.addActionListener(new ActionListener() {
-                       public void actionPerformed(ActionEvent e)
-                       {
+                       public void actionPerformed(ActionEvent e) {
                                _dialog.dispose();
                        }
                });
@@ -148,6 +148,7 @@ public class SvgExporter extends Export3dFunction
                phiLabel.setHorizontalAlignment(SwingConstants.TRAILING);
                centralPanel.add(phiLabel);
                _phiField = new JTextField("" + _phi);
+               _phiField.addKeyListener(new DialogCloser(_dialog));
                centralPanel.add(_phiField);
                JLabel thetaLabel = new JLabel(I18nManager.getText("dialog.exportsvg.theta"));
                thetaLabel.setHorizontalAlignment(SwingConstants.TRAILING);
@@ -315,7 +316,7 @@ public class SvgExporter extends Export3dFunction
        {
                inWriter.write("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>");
                inWriter.write(inLineSeparator);
-               inWriter.write("<!-- Svg file produced by Prune - see http://activityworkshop.net/ -->");
+               inWriter.write("<!-- Svg file produced by GpsPrune - see http://activityworkshop.net/ -->");
                inWriter.write(inLineSeparator);
                inWriter.write("<svg width=\"800\" height=\"700\">");
                inWriter.write(inLineSeparator);
@@ -331,7 +332,7 @@ public class SvgExporter extends Export3dFunction
                                "<stop offset=\"100%\" stop-color=\"#008000\"/>" +
                                "</radialGradient>" +
                                "</defs>";
-                   inWriter.write(defs);
+                       inWriter.write(defs);
                        inWriter.write(inLineSeparator);
                }
                inWriter.write("<g inkscape:label=\"Layer 1\" inkscape:groupmode=\"layer\" id=\"layer1\">");