Package org.antlr.works.visualization.graphics.graph

Examples of org.antlr.works.visualization.graphics.graph.GGraphAbstract


        if(window.editorRules.getEnclosingRuleAtPosition(window.getCaretPosition()) == null) {
            XJAlert.display(window.getJavaContainer(), "Export Rule to EPS", "There is no rule at cursor position.");
            return;
        }

        GGraphAbstract graph = window.syntaxDiagramTab.getCurrentGraph();

        if(graph == null) {
            XJAlert.display(window.getJavaContainer(), "Export Rule to EPS", "There is no graphical visualization.");
            return;
        }

        if(!XJFileChooser.shared().displaySaveDialog(window.getJavaContainer(), "eps", "EPS file", false))
            return;

        String file = XJFileChooser.shared().getSelectedFilePath();
        if(file == null)
            return;

        try {
            GEnginePS engine = new GEnginePS();

            GContext context = graph.getContext();
            GEngine oldEngine = context.engine;
            context.setEngine(engine);
            graph.draw();
            context.setEngine(oldEngine);

            XJUtils.writeStringToFile(engine.getPSText(), file);
        } catch (Exception e) {
            window.consoleTab.println(e);
View Full Code Here


        addKeyListener(new DefaultKeyListener());
    }

    public void setEnable(boolean flag) {
        for (Object graph1 : graphs) {
            GGraphAbstract graph = (GGraphAbstract) graph1;
            graph.setEnable(flag);
        }
    }
View Full Code Here

        return graphs;
    }

    public void applyContext() {
        for (Object graph1 : graphs) {
            GGraphAbstract graph = (GGraphAbstract) graph1;
            graph.setContext(context);
        }
    }
View Full Code Here

TOP

Related Classes of org.antlr.works.visualization.graphics.graph.GGraphAbstract

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.