public class ImageMaker
{
+ public static final String SVG_DESCRIPTION = "Scalable Vector Graphics";
+
+ public static final String SVG_EXTENSION = "svg";
+
+ public static final String EPS_DESCRIPTION = "Encapsulated Postscript";
+
+ public static final String EPS_EXTENSION = "eps";
+
+ public static final String PNG_EXTENSION = "png";
+
+ public static final String PNG_DESCRIPTION = "Portable network graphics";
+
+ public static final String HTML_EXTENSION = "html";
+
+ public static final String HTML_DESCRIPTION = "Hypertext Markup Language";
+
EpsGraphics2D pg;
SVGGraphics2D g2;
out.close();
break;
case PNG:
- ImageIO.write(bi, "png", out);
+ ImageIO.write(bi, PNG_EXTENSION, out);
out.flush();
out.close();
break;
{
return null;
}
- return new jalview.io.JalviewFileChooser(
- jalview.bin.Cache.getProperty("LAST_DIRECTORY"),
- new String[] { "png" },
- new String[] { "Portable network graphics" },
- "Portable network graphics");
+ return new JalviewFileChooser(PNG_EXTENSION, PNG_DESCRIPTION);
}
static JalviewFileChooser getEPSChooser()
{
return null;
}
- return new jalview.io.JalviewFileChooser(
- jalview.bin.Cache.getProperty("LAST_DIRECTORY"),
- new String[] { "eps" },
- new String[] { "Encapsulated Postscript" },
- "Encapsulated Postscript");
+ return new JalviewFileChooser(EPS_EXTENSION, EPS_DESCRIPTION);
}
private void setProgressMessage(String message)
{
return null;
}
- return new jalview.io.JalviewFileChooser(
- jalview.bin.Cache.getProperty("LAST_DIRECTORY"),
- new String[] { "svg" },
- new String[] { "Scalable Vector Graphics" },
- "Scalable Vector Graphics");
+ return new JalviewFileChooser(SVG_EXTENSION, SVG_DESCRIPTION);
}
}