From 782abbc35148e347889155efaa0a33042e2c0344 Mon Sep 17 00:00:00 2001 From: Vincent Privat Date: Thu, 11 May 2017 01:23:46 +0200 Subject: [PATCH] fix warnings --- .../josm/plugins/dxfimport/DxfImportTask.java | 5 ----- .../josm/plugins/dxfimport/ImportDialog.java | 22 ------------------- 2 files changed, 27 deletions(-) diff --git a/src/org/openstreetmap/josm/plugins/dxfimport/DxfImportTask.java b/src/org/openstreetmap/josm/plugins/dxfimport/DxfImportTask.java index 896c6d4..5cead14 100644 --- a/src/org/openstreetmap/josm/plugins/dxfimport/DxfImportTask.java +++ b/src/org/openstreetmap/josm/plugins/dxfimport/DxfImportTask.java @@ -38,7 +38,6 @@ public class DxfImportTask extends PleaseWaitRunnable { LinkedList nodes = new LinkedList<>(); LinkedList ways = new LinkedList<>(); -// private List files; // old way, with multiple file conversion private File file; private boolean canceled; @@ -169,8 +168,6 @@ protected void realRun() throws IOException, OsmTransferException { try { SVGUniverse universe = new SVGUniverse(); universe.setVerbose(Main.pref.getBoolean("importdxf.verbose", false)); -// for (File f : files) { -// if (f.isDirectory()) continue; if (canceled) { return; } @@ -189,7 +186,6 @@ protected void realRun() throws IOException, OsmTransferException { Rectangle2D bbox = root.getBoundingBox(); this.center = this.center.add(-bbox.getCenterX() * scale, bbox.getCenterY() * scale); processElement(root, null); -// Files.delete(tempPath); // deleting temp file, leave no traces } catch (IOException e) { throw e; } catch (Exception e) { @@ -203,7 +199,6 @@ protected void realRun() throws IOException, OsmTransferException { cmds.add(new AddCommand(w)); } Main.main.undoRedo.add(new SequenceCommand("Import primitives", cmds)); -// } } public static void processUsingKabeja(File file, String tempFile) { diff --git a/src/org/openstreetmap/josm/plugins/dxfimport/ImportDialog.java b/src/org/openstreetmap/josm/plugins/dxfimport/ImportDialog.java index d57066c..253796a 100644 --- a/src/org/openstreetmap/josm/plugins/dxfimport/ImportDialog.java +++ b/src/org/openstreetmap/josm/plugins/dxfimport/ImportDialog.java @@ -19,7 +19,6 @@ public class ImportDialog extends ExtendedDialog { private JFormattedTextField tsdiv = new JFormattedTextField(NumberFormat.getInstance()); private JFormattedTextField tsnum = new JFormattedTextField(NumberFormat.getInstance()); -// private JFormattedTextField tsteps = new JFormattedTextField(NumberFormat.getIntegerInstance()); public ImportDialog() { super(Main.parent, tr("Import dxf"), @@ -37,14 +36,8 @@ public ImportDialog() { pscale.add(new JLabel(tr("m")), GBC.std().insets(10, 0, 0, 0)); panel.add(pscale, GBC.eop().fill(GBC.HORIZONTAL)); -// final JLabel label = new JLabel("Curve steps:"); -// panel.add(label, GBC.std()); -// label.setLabelFor(tsteps); -// panel.add(tsteps, GBC.eol().fill(GBC.HORIZONTAL)); - tsnum.setValue(Settings.getScaleNumerator()); tsdiv.setValue(Settings.getScaleDivisor()); -// tsteps.setValue(Settings.getCurveSteps()); setContent(panel); setupDialog(); @@ -70,24 +63,9 @@ public double getScaleDivisor() { } } -// public int getCurveSteps() { -// try { -// int result = NumberFormat.getIntegerInstance().parse(tsteps.getText()).intValue(); -// if (result < 1) -// return 1; -// return result; -// } catch (ParseException e) { -// return 4; -// } -// } - public void saveSettings() { Settings.setScaleNumerator(getScaleNumerator()); Settings.setScaleDivisor(getScaleDivisor()); -// Settings.setCurveSteps(getCurveSteps()); - System.out.println("Set_ScaleN:" + getScaleNumerator()); - System.out.println("Set_ScaleD:" + getScaleDivisor()); -// System.out.println("Set_CurveSteps:" + getCurveSteps()); } }