Search in sources :

Example 1 with FactorAnalysisRunner

use of edu.cmu.tetradapp.model.FactorAnalysisRunner in project tetrad by cmu-phil.

the class FactorAnalysisEditor method setup.

// ==========================PROTECTED METHODS============================//
/**
 * Sets up the editor, does the layout, and so on.
 */
protected void setup(String resultLabel) {
    FactorAnalysisRunner runner = (FactorAnalysisRunner) getAlgorithmRunner();
    Graph graph = runner.getGraph();
    JTextArea display = new JTextArea(runner.getOutput());
    JScrollPane scrollPane = new JScrollPane(display);
    scrollPane.setPreferredSize(new Dimension(500, 400));
    display.setEditable(false);
    display.setFont(new Font("Monospaced", Font.PLAIN, 12));
    GraphUtils.circleLayout(graph, 225, 200, 150);
    GraphUtils.fruchtermanReingoldLayout(graph);
    GraphWorkbench workbench = new GraphWorkbench(graph);
    JScrollPane graphPane = new JScrollPane(workbench);
    graphPane.setPreferredSize(new Dimension(500, 400));
    Box box = Box.createHorizontalBox();
    box.add(scrollPane);
    box.add(Box.createHorizontalStrut(3));
    box.add(Box.createHorizontalStrut(5));
    box.add(Box.createHorizontalGlue());
    Box vBox = Box.createVerticalBox();
    vBox.add(Box.createVerticalStrut(15));
    vBox.add(box);
    vBox.add(Box.createVerticalStrut(5));
    box.add(graphPane);
    JPanel panel = new JPanel();
    panel.setLayout(new BorderLayout());
    panel.add(vBox, BorderLayout.CENTER);
    add(panel);
}
Also used : TimeLagGraph(edu.cmu.tetrad.graph.TimeLagGraph) Graph(edu.cmu.tetrad.graph.Graph) GraphWorkbench(edu.cmu.tetradapp.workbench.GraphWorkbench) FactorAnalysisRunner(edu.cmu.tetradapp.model.FactorAnalysisRunner)

Aggregations

Graph (edu.cmu.tetrad.graph.Graph)1 TimeLagGraph (edu.cmu.tetrad.graph.TimeLagGraph)1 FactorAnalysisRunner (edu.cmu.tetradapp.model.FactorAnalysisRunner)1 GraphWorkbench (edu.cmu.tetradapp.workbench.GraphWorkbench)1