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);
}
Aggregations