Package com.joshondesign.xml

Examples of com.joshondesign.xml.XMLWriter.start()



    private void saveRecentFiles(List<File> recentFiles, File file) {
        try {
            XMLWriter out = new XMLWriter(file);
            out.start("files");
            for(File f : recentFiles) {
                out.start("file","filepath",f.getAbsolutePath());
                out.end();
            }
            out.end();
View Full Code Here


    private void saveRecentFiles(List<File> recentFiles, File file) {
        try {
            XMLWriter out = new XMLWriter(file);
            out.start("files");
            for(File f : recentFiles) {
                out.start("file","filepath",f.getAbsolutePath());
                out.end();
            }
            out.end();
            out.close();
        } catch (Exception e) {
View Full Code Here

        private void saveSymbols() throws FileNotFoundException, UnsupportedEncodingException {
            u.p("persisting symbol set to: " + asset.getFile().getName());
            XMLWriter out = new XMLWriter(new PrintWriter(new OutputStreamWriter(new FileOutputStream(asset.getFile()), "UTF-8")),
                    asset.getFile().toURI());
            out.header();
            out.start("sketchy","version","-1");
            ExportProcessor.processFragment(new NativeExport(), out, getSymbols());
            out.end();
            out.close();
        }
View Full Code Here

        }

        public void pageStart(MultiFileOutput out, SketchDocument.SketchPage page) {
            out.startPage();
            XMLWriter xml = out.getXML();
            xml.start("html")
                .start("head");
            xml.start("style")
                .attr("type", "text/css")
                .text("body { background-color: " + toText(page.getDocument().getBackgroundFill()) + ";}")
                .end();
View Full Code Here

        public void pageStart(MultiFileOutput out, SketchDocument.SketchPage page) {
            out.startPage();
            XMLWriter xml = out.getXML();
            xml.start("html")
                .start("head");
            xml.start("style")
                .attr("type", "text/css")
                .text("body { background-color: " + toText(page.getDocument().getBackgroundFill()) + ";}")
                .end();
            xml.start("title").text("slide").end();
            xml.end();//head
View Full Code Here

                .start("head");
            xml.start("style")
                .attr("type", "text/css")
                .text("body { background-color: " + toText(page.getDocument().getBackgroundFill()) + ";}")
                .end();
            xml.start("title").text("slide").end();
            xml.end();//head
            xml.start("body");
        }

        public String getPageFilenameById(MultiFileOutput out, String linkTarget) {
View Full Code Here

                .attr("type", "text/css")
                .text("body { background-color: " + toText(page.getDocument().getBackgroundFill()) + ";}")
                .end();
            xml.start("title").text("slide").end();
            xml.end();//head
            xml.start("body");
        }

        public String getPageFilenameById(MultiFileOutput out, String linkTarget) {
            return out.getPageFilename(doc.getPageIndexById(linkTarget));
        }
View Full Code Here

                x += ((SResizeableNode) shape).getX();
                y += ((SResizeableNode) shape).getY();
            }
            XMLWriter xml = out.getXML();
            if(shape.isLink()) {
                xml.start("a", "href", getPageFilenameById(out,shape.getLinkTarget()));
            }
            xml.start("img")
                    .attr("src",imf.getName())
                    .attr("style","position:absolute;"
                        +" left:"+x+"px;"
View Full Code Here

            }
            XMLWriter xml = out.getXML();
            if(shape.isLink()) {
                xml.start("a", "href", getPageFilenameById(out,shape.getLinkTarget()));
            }
            xml.start("img")
                    .attr("src",imf.getName())
                    .attr("style","position:absolute;"
                        +" left:"+x+"px;"
                        +" top:" +y+"px;"
                    ).end();
View Full Code Here

        }

        public void pageEnd(MultiFileOutput out, SketchDocument.SketchPage page) {
            XMLWriter xml = out.getXML();
            int index = out.getPageIndex();
            xml.start("p")
                    .attr("id", "nav")
                    ;
            if(index > 0) {
                xml.start("a","href",out.getPageFilename(index-1));
                xml.text("&lt; prev");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.