/** * This constructor sets up much of the functionality of the GUI, including the actual layout of * the components of the GUI, as well as handling the graph implementation. */ public MainWindow(Iterable<Document> corp) { corpus = corp; corpusIndex = corpus.iterator(); doc = corpusIndex.next(); /* * GUI Layout Creation */ // create the OverviewPanel which shows a reduced size snapshot of the entire graph predictionPanel = new PredictionListPanel(this); predictionPanel.setFont(font); tvPanel = new TextViewPanel(this); tvPanel.setFont(font); textSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, predictionPanel, tvPanel); textSplitPane.setDividerLocation(300); buttonPanel = createForwardBackPanel(doc); buttonPanel.setFont(font); editPanel = new PredictionEditPanel(this); editPanel.setFont(font); JSplitPane bottomSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, editPanel, buttonPanel); bottomSplitPane.setDividerLocation(120); mainSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, textSplitPane, bottomSplitPane); mainSplitPane.setDividerLocation(700); getContentPane().add(mainSplitPane); // splitPane1.setDividerLocation(0.8); this.setTitle("Prediction Viewer"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); displayRawText(); pack(); setSize(1200, 900); setVisible(true); }