Package javax.jnlp

Examples of javax.jnlp.FileSaveService


 
  public void savePatternToFile() {
    if (SETTINGS.APPLET_MODE) {

      try {
        FileSaveService save = (FileSaveService) ServiceManager
            .lookup("javax.jnlp.FileSaveService");

        Element root = new Element("SketchChairDoc");
        root.addAttribute(new Attribute("version", String
            .valueOf(SETTINGS.version)));
        root.appendChild(GLOBAL.sketchChairs.getCurChair().toXML());

        Document doc = new Document(root);
        //   outXML = ;// new FileOutputStream(name+".xml");

        ByteArrayOutputStream outXML = new ByteArrayOutputStream();
        Serializer serializer = new Serializer(outXML, "ISO-8859-1");
        serializer.write(doc);

        FileContents fc = save.saveFileDialog(null,
            new String[] { "chair" }, new ByteArrayInputStream(
                outXML.toByteArray()), null);

      } catch (Exception ex) {
        LOGGER.error("exception: " + ex);
View Full Code Here


    GLOBAL.dxfCapture = true;

    if (SETTINGS.APPLET_MODE) {

      FileSaveService save;
      try {
        save = (FileSaveService) ServiceManager
            .lookup("javax.jnlp.FileSaveService");
        GLOBAL.shapePack.build();
        FileContents fc = save.saveFileDialog(null,
            new String[] { "pdf" }, new ByteArrayInputStream(
                GLOBAL.shapePack.getPDFBuffered(GLOBAL.applet)
                    .toByteArray()), null);

      } catch (UnavailableServiceException e1) {
View Full Code Here

    if (GLOBAL.sketchChairs.getCurChair() != null)
      GLOBAL.sketchChairs.getCurChair().addToShapePack();

    if (SETTINGS.APPLET_MODE) {

      FileSaveService save;
      try {
        save = (FileSaveService) ServiceManager
            .lookup("javax.jnlp.FileSaveService");
        GLOBAL.shapePack.build();
        FileContents fc = save.saveFileDialog(null,
            new String[] { "dxf" }, new ByteArrayInputStream(
                GLOBAL.shapePack.getDXFBuffered(GLOBAL.applet)
                    .toByteArray()), null);

      } catch (UnavailableServiceException e1) {
View Full Code Here

    if (GLOBAL.sketchChairs.getCurChair() != null)
      GLOBAL.sketchChairs.getCurChair().addToShapePack();

    if (SETTINGS.APPLET_MODE) {

      FileSaveService save;
      try {
        save = (FileSaveService) ServiceManager
            .lookup("javax.jnlp.FileSaveService");
        GLOBAL.shapePack.build();
        FileContents fc = save.saveFileDialog(null,
            new String[] { "pdf" }, new ByteArrayInputStream(
                GLOBAL.shapePack.getPDFBuffered(GLOBAL.applet)
                    .toByteArray()), null);

      } catch (UnavailableServiceException e1) {
View Full Code Here

TOP

Related Classes of javax.jnlp.FileSaveService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.