File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424import java .util .Hashtable ;
2525import java .util .Map ;
2626
27+ import javax .swing .JOptionPane ;
2728import javax .xml .parsers .DocumentBuilder ;
2829import javax .xml .parsers .DocumentBuilderFactory ;
2930import javax .xml .transform .OutputKeys ;
@@ -91,6 +92,8 @@ public Svg2Xml(Svg2XmlGui gui)
9192
9293 // TODO add SVG viewbox support, or manual setting of viewbox
9394
95+ ArrayList <File > destPaths = new ArrayList <File >();
96+
9497 boolean isLastInGroup = true ;
9598 boolean isNewGroup = true ;
9699 String groupXml = new String ();
@@ -589,19 +592,39 @@ else if (aspectRatio.toLowerCase().equals("variable"))
589592 writer .write (groupXml );
590593 writer .close ();
591594
595+ // JOptionPane.showMessageDialog(gui.getFrame(), "Conversion completed.\nThe library is genereted in:\n" + myDestRoot);
596+ if (!destPaths .contains (myDestRoot ))
597+ {
598+ destPaths .add (myDestRoot );
599+ }
600+
592601 }
593602 catch (Exception ex )
594603 {
595604 ex .printStackTrace ();
596605 }
597606 }
607+
598608 }
599609 catch (Exception e )
600610 {
601611 e .printStackTrace ();
602612 }
603613 }
604-
614+
615+ String destFolders = new String ();
616+
617+ for (int i = 0 ; i < destPaths .size (); i ++)
618+ {
619+ String currPath = destPaths .get (i ).getAbsolutePath ();
620+
621+ if (!destFolders .contains (currPath ))
622+ {
623+ destFolders = destFolders + "\n " + currPath ;
624+ }
625+ }
626+
627+ JOptionPane .showMessageDialog (gui .getFrame (), "Conversion completed.\n The libraries are genereted in:" + destFolders );
605628 }
606629
607630 /**
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ public class Svg2XmlGui implements ActionListener{
6060 protected File [] sourceFiles ;
6161 protected File destPath ;
6262
63+ protected JFrame frame = new JFrame ();
6364 protected JRadioButton useAbsScaleComponent = new JRadioButton ();
6465 protected JTextField absXScaleComponent = new JTextField ();
6566 protected JCheckBox calculateBorderComponent = new JCheckBox ();
@@ -91,7 +92,6 @@ public void startHere(String[] args, Svg2XmlGui gui)
9192 Svg2Xml .main (args );
9293 }
9394
94- JFrame frame = new JFrame ();
9595
9696 JPanel filePanel = new JPanel (new GridLayout (1 ,2 ));
9797 JPanel settingsPanel = new JPanel ();
@@ -321,6 +321,11 @@ public void setRelativeScaling(boolean relativeScaling)
321321 this .relativeScaling = relativeScaling ;
322322 }
323323
324+ public JFrame getFrame ()
325+ {
326+ return this .frame ;
327+ }
328+
324329 public double getRelativeScaleRatio ()
325330 {
326331 return relativeScaleRatio ;
You can’t perform that action at this time.
0 commit comments