Example usage for javax.swing JSplitPane TOP

List of usage examples for javax.swing JSplitPane TOP

Introduction

In this page you can find the example usage for javax.swing JSplitPane TOP.

Prototype

String TOP

To view the source code for javax.swing JSplitPane TOP.

Click Source Link

Document

Used to add a Component above the other Component.

Usage

From source file:Main.java

public static Component getChild(Component parent, String name) {
    parent = getContainer(parent);/*from  w w  w .j av a2  s  .  com*/

    if (parent instanceof JSplitPane) {
        JSplitPane split = (JSplitPane) parent;
        if (JSplitPane.TOP.equals(name)) {
            return split.getTopComponent();
        } else if (JSplitPane.LEFT.equals(name)) {
            return split.getLeftComponent();
        } else if (JSplitPane.RIGHT.equals(name)) {
            return split.getRightComponent();
        } else if (JSplitPane.BOTTOM.equals(name)) {
            return split.getBottomComponent();
        }
    }
    Container cont = (Container) parent;
    for (int i = 0; i < cont.getComponentCount(); i++) {
        Component comp = cont.getComponent(i);
        if (name.equals(comp.getName())) {
            return comp;
        }
    }
    if (name.endsWith(VIEW_SUFFIX)) {
        String subName = name.substring(0, name.length() - VIEW_SUFFIX.length());
        if (subName.isEmpty()) {
            return parent;
        }
        return getContainer(getChild(parent, subName));
    }

    throw new IllegalArgumentException("No component named " + name);
}

From source file:eu.cassandra.platform.gui.GUI.java

public GUI() {
    //redirectSystemStreams();
    a = new ListenInstallationComboBox();
    installationCombo.setPreferredSize(new Dimension(300, 20));

    startButton.addActionListener(new ListenStartButton());
    exitButton.addActionListener(new ListenExitButton());
    projectFileField.addMouseListener(new ListenProjectFileField());

    logTextAreaScrollPane.setPreferredSize(new Dimension(400, 500));

    projectFileField.setPreferredSize(new Dimension(600, 20));
    //      projectFileField.setText(new File(Params.SIM_PROPS).getAbsolutePath());
    projectFileField.setText("");
    projectFileField.setEditable(false);

    f.setJMenuBar(menuBar);/*  www . j a  v  a 2s. c o m*/

    menuFile.add(menuItemQuit);
    menuHelp.add(menuItemAbout);
    menuBar.add(menuFile);
    menuBar.add(menuHelp);

    statsTextArea.setFont(new Font("Tahoma", Font.BOLD, 12));

    TimeSeries series = new TimeSeries("");
    dataset = new TimeSeriesCollection(series);
    JFreeChart chart = createChart("Consumption", dataset);
    ChartPanel chartPanel = new ChartPanel(chart);
    graphScrollPane = new JScrollPane(chartPanel);

    buttonPanel.add(projectFileField);
    buttonPanel.add(startButton);
    buttonPanel.add(holdButton);
    buttonPanel.add(installationCombo);
    buttonPanel.add(exitButton);

    statsTextArea.setText("Statistics:\n");
    logTextArea.setText("Logs:\n");

    JSplitPane textAreaSplitPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT);

    textAreaSplitPanel.setDividerLocation((int) (Toolkit.getDefaultToolkit().getScreenSize().getHeight() / 2));
    textAreaSplitPanel.add(statsTextAreaScrollPane, JSplitPane.TOP);
    textAreaSplitPanel.add(logTextAreaScrollPane, JSplitPane.BOTTOM);

    JSplitPane mainSplitPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
    mainSplitPanel.add(graphScrollPane, JSplitPane.LEFT);
    mainSplitPanel.add(textAreaSplitPanel, JSplitPane.RIGHT);
    mainSplitPanel.setDividerLocation((int) (Toolkit.getDefaultToolkit().getScreenSize().getWidth() / 1.5));

    f.getContentPane().setLayout(new BorderLayout());
    f.getContentPane().add(mainSplitPanel, BorderLayout.CENTER);
    f.getContentPane().add(buttonScrollPane, BorderLayout.SOUTH);

    f.addWindowListener(new ListenCloseWdw());
    menuItemQuit.addActionListener(new ListenMenuQuit());
}

From source file:org.ash.history.MainPreview.java

/**
 * Load calendar and add to JSplitPane/*from  ww w  . j a  v a  2s . c o  m*/
 * 
 * @param envDir
 */
private void loadCalendarPreview(String envDir) {

    try {

        // Create new instance of CalendarH
        CalendarH calendarH = new CalendarH(envDir, this);

        // Close preview instance of ASHDatabaseH
        if (this.ashDBPrevPeriod != null)
            this.ashDBPrevPeriod.close();
        this.ashDBPrevPeriod = calendarH.getDatabaseHistory();

        splitCalendarPreview = new JSplitPane();
        splitCalendarPreview.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
        splitCalendarPreview.add(calendarH, JSplitPane.LEFT);
        splitCalendarPreview.add(new JPanel(), JSplitPane.RIGHT);
        splitCalendarPreview.setDividerLocation(splitCalendarPreviewDivLocation);
        splitCalendarPreview.setOneTouchExpandable(true);

        this.main.removeAll();

        splitMainPane = new JSplitPane();
        splitMainPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
        splitMainPane.add(splitCalendarPreview, JSplitPane.TOP);
        splitMainPane.add(new JPanel(), JSplitPane.BOTTOM);
        splitMainPane.setDividerLocation(splitMainPaneDivLocation);
        splitMainPane.setOneTouchExpandable(true);

        this.main.add(splitMainPane);
        this.validate();

    } catch (Exception e) {
        e.printStackTrace();
    }
}

From source file:com.peterbochs.sourceleveldebugger.SourceLevelDebugger3.java

private void initGUI() {
    try {/*from w w w  .j a  va  2s  .  c  o  m*/
        this.setPreferredSize(new java.awt.Dimension(975, 563));
        {
            jMainSplitPane = new JSplitPane();
            this.add(getJErrorLabel(), "errorLabel");
            this.add(jMainSplitPane, "MAIN");
            jMainSplitPane.setDividerLocation(200);
            {
                jPanel4 = new JPanel();
                jMainSplitPane.add(jPanel4, JSplitPane.RIGHT);
                BorderLayout jPanel4Layout = new BorderLayout();
                jPanel4.setLayout(jPanel4Layout);
                {
                    jSplitPane3 = new JSplitPane();
                    jPanel4.add(jSplitPane3, BorderLayout.CENTER);
                    jSplitPane3.setOrientation(JSplitPane.VERTICAL_SPLIT);
                    jSplitPane3.setDividerLocation(500);
                    {
                        jPanel6 = new JPanel();
                        jSplitPane3.add(jPanel6, JSplitPane.TOP);
                        jSplitPane3.add(getJInfoTabbedPane(), JSplitPane.BOTTOM);
                        BorderLayout jPanel6Layout = new BorderLayout();
                        jPanel6.setLayout(jPanel6Layout);
                        {
                            jMainTabbedPane = new JMaximizableTabbedPane();
                            jPanel6.add(jMainTabbedPane, BorderLayout.CENTER);
                            {
                                jASMPanel = new JPanel();
                                jMainTabbedPane.addTab(MyLanguage.getString("ASM/C"), null, jASMPanel, null);
                                jMainTabbedPane.addTab("Dwarf", null, getJDwarfPanel(), null);
                                jMainTabbedPane.addTab("Code base", null, getCodeBasePanel(), null);
                                jMainTabbedPane.addTab("Call Graph", null, getCallGraphPanel(), null);
                                BorderLayout jASMPanelLayout = new BorderLayout();
                                jASMPanel.setLayout(jASMPanelLayout);
                                {
                                    instructionTableScrollPane = new JScrollPane();
                                    instructionTableScrollPane.getVerticalScrollBar()
                                            .addAdjustmentListener(new AdjustmentListener() {
                                                boolean isRunning;

                                                public void adjustmentValueChanged(AdjustmentEvent evt) {
                                                    /*   JScrollBar vbar = (JScrollBar) evt.getSource();
                                                            
                                                       if (evt.getValueIsAdjusting()) {
                                                          return;
                                                       }
                                                       if ((vbar.getValue() + vbar.getVisibleAmount()) == vbar.getMaximum()) {
                                                          if (!isRunning) {
                                                             try {
                                                                isRunning = true;
                                                                final CardLayout cl = (CardLayout) (peterBochsDebugger.jMainPanel.getLayout());
                                                                cl.show(peterBochsDebugger.jMainPanel, "Running Label");
                                                                //                                             new Thread("update instruction thread") {
                                                                //                                                public void run() {
                                                                //                                                   long address = Long.parseLong(instructionTable.getValueAt(instructionTable.getRowCount() - 1, 1).toString()
                                                                //                                                         .substring(2), 16);
                                                                //                                                   peterBochsDebugger.updateInstruction(address, true);
                                                                //                                                   peterBochsDebugger.updateBreakpointTableColor();
                                                                ////                                                   cl.show(peterBochsDebugger.jMainPanel, peterBochsDebugger.currentPanel);
                                                                //
                                                                //                                                   isRunning = false;
                                                                //                                                }
                                                                //                                             }.start();
                                                            
                                                             } catch (Exception ex) {
                                                             }
                                                          }
                                                            
                                                       }*/
                                                }

                                            });
                                    jASMPanel.add(instructionTableScrollPane, BorderLayout.CENTER);
                                    {
                                        instructionTable = new JTable();
                                        instructionTableScrollPane.setViewportView(instructionTable);
                                        instructionTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
                                        instructionTable
                                                .setModel(PeterBochsDebugger.instructionTable.getModel());
                                        instructionTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN);
                                        instructionTable.getTableHeader().setReorderingAllowed(false);
                                        instructionTable.getColumnModel().getColumn(0).setMaxWidth(20);
                                        instructionTable.getColumnModel().getColumn(1).setPreferredWidth(40);
                                        instructionTable.getColumnModel().getColumn(2).setPreferredWidth(200);
                                        instructionTable.getColumnModel().getColumn(3).setPreferredWidth(40);
                                        instructionTable.setShowGrid(false);
                                        instructionTable.setDefaultRenderer(String.class,
                                                new InstructionTableCellRenderer());
                                        instructionTable.addMouseListener(new MouseAdapter() {
                                            public void mouseClicked(MouseEvent evt) {
                                                instructionTableMouseClicked(evt);
                                            }
                                        });
                                    }
                                }
                                {
                                    jInstructionControlPanel = new JPanel();
                                    jASMPanel.add(jInstructionControlPanel, BorderLayout.NORTH);
                                    {
                                        jInstructionComboBox = new JComboBox();
                                        jInstructionControlPanel.add(jInstructionComboBox);
                                        jInstructionComboBox.setEditable(true);
                                        jInstructionComboBox.addActionListener(new ActionListener() {
                                            public void actionPerformed(ActionEvent evt) {
                                                jInstructionComboBoxActionPerformed(evt);
                                            }
                                        });
                                    }
                                    {
                                        disassembleButton = new JButton();
                                        jInstructionControlPanel.add(disassembleButton);
                                        disassembleButton.setText(MyLanguage.getString("Disassemble"));
                                        disassembleButton.addActionListener(new ActionListener() {
                                            public void actionPerformed(ActionEvent evt) {
                                                disassembleButtonActionPerformed(evt);
                                            }
                                        });
                                    }
                                    {
                                        disassembleCSEIPButton = new JButton();
                                        jInstructionControlPanel.add(disassembleCSEIPButton);
                                        disassembleCSEIPButton
                                                .setText(MyLanguage.getString("Disassemble") + " cs:eip");
                                        disassembleCSEIPButton.setEnabled(true);
                                        disassembleCSEIPButton.addActionListener(new ActionListener() {
                                            public void actionPerformed(ActionEvent evt) {
                                                disassembleCSEIPButtonActionPerformed(evt);
                                            }
                                        });
                                    }
                                    {
                                        jInstructionUpTenButton = new JButton();
                                        jInstructionControlPanel.add(jInstructionUpTenButton);
                                        jInstructionUpTenButton
                                                .setIcon(new ImageIcon(getClass().getClassLoader().getResource(
                                                        "com/peterbochs/icons/famfam_icons/arrow_up10.png")));
                                        jInstructionUpTenButton.addActionListener(new ActionListener() {
                                            public void actionPerformed(ActionEvent evt) {
                                                jInstructionUpTenButtonActionPerformed(evt);
                                            }
                                        });
                                    }
                                    {
                                        jInstructionUpButton = new JButton();
                                        jInstructionControlPanel.add(jInstructionUpButton);
                                        jInstructionUpButton
                                                .setIcon(new ImageIcon(getClass().getClassLoader().getResource(
                                                        "com/peterbochs/icons/famfam_icons/arrow_up1.png")));
                                        jInstructionUpButton.addActionListener(new ActionListener() {
                                            public void actionPerformed(ActionEvent evt) {
                                                jInstructionUpButtonActionPerformed(evt);
                                            }
                                        });
                                    }
                                    {
                                        jInstructionDownButton = new JButton();
                                        jInstructionControlPanel.add(jInstructionDownButton);
                                        jInstructionDownButton
                                                .setIcon(new ImageIcon(getClass().getClassLoader().getResource(
                                                        "com/peterbochs/icons/famfam_icons/arrow_down.png")));
                                        jInstructionDownButton.addActionListener(new ActionListener() {
                                            public void actionPerformed(ActionEvent evt) {
                                                jInstructionDownButtonActionPerformed(evt);
                                            }
                                        });
                                    }
                                    {
                                        jDiskButton = new JButton();
                                        jInstructionControlPanel.add(jDiskButton);
                                        jDiskButton.setIcon(new ImageIcon(getClass().getClassLoader()
                                                .getResource("com/peterbochs/icons/famfam_icons/disk.png")));
                                        jDiskButton.addActionListener(new ActionListener() {
                                            public void actionPerformed(ActionEvent evt) {
                                                jButton3ActionPerformed(evt);
                                            }
                                        });
                                    }
                                    {
                                        jExcelButton = new JButton();
                                        jInstructionControlPanel.add(jExcelButton);
                                        jInstructionControlPanel.add(getJSearchTextField());
                                        jExcelButton.setIcon(new ImageIcon(getClass().getClassLoader()
                                                .getResource("com/peterbochs/icons/famfam_icons/excel.gif")));
                                        {
                                            btnSearch = new JButton("Search");
                                            jInstructionControlPanel.add(btnSearch);
                                            btnSearch.addActionListener(new ActionListener() {
                                                public void actionPerformed(ActionEvent evt) {
                                                    btnSearchActionPerformed(evt);
                                                }
                                            });
                                        }
                                        {
                                            onOffButton = new OnOffButton();
                                            onOffButton.setSelected(true);
                                            onOffButton.addItemListener(new ItemListener() {
                                                public void itemStateChanged(ItemEvent e) {
                                                    InstructionTableModel model = (InstructionTableModel) PeterBochsDebugger.instructionTable
                                                            .getModel();
                                                    if (e.getStateChange() == ItemEvent.SELECTED) {
                                                        model.showAsmLevel = true;
                                                    } else {
                                                        model.showAsmLevel = false;
                                                    }
                                                    model.fireTableDataChanged();
                                                }
                                            });
                                            onOffButton.setPreferredSize(new Dimension(53, 18));
                                            jInstructionControlPanel.add(onOffButton);
                                        }
                                        jExcelButton.addActionListener(new ActionListener() {
                                            public void actionPerformed(ActionEvent evt) {
                                                jButton12ActionPerformed(evt);
                                            }
                                        });
                                    }
                                }
                            }
                        }
                    }
                }
            }
            {
                jPanel1 = new JPanel();
                jMainSplitPane.add(jPanel1, JSplitPane.LEFT);
                BorderLayout jPanel1Layout = new BorderLayout();
                jPanel1.setLayout(jPanel1Layout);
                {
                    jTabbedPane1 = new JMaximizableTabbedPane();
                    jPanel1.add(jTabbedPane1, BorderLayout.CENTER);
                    jTabbedPane1.addChangeListener(new ChangeListener() {
                        public void stateChanged(ChangeEvent evt) {
                            jTabbedPane1StateChanged(evt);
                        }
                    });
                    {
                        jPanel3 = new JPanel();
                        BorderLayout jPanel3Layout = new BorderLayout();
                        jPanel3.setLayout(jPanel3Layout);
                        jTabbedPane1.addTab("Symbol", null, getSymbolTablePanel(), null);
                        jTabbedPane1.addTab(MyLanguage.getString("Project"), null, jPanel3, null);
                        {
                            jScrollPane1 = new JScrollPane();
                            jPanel3.add(jScrollPane1, BorderLayout.CENTER);
                            jPanel3.add(getJProjectToolBar(), BorderLayout.NORTH);
                            {
                                projectTree = new JTree();
                                jScrollPane1.setViewportView(projectTree);
                                projectTree.setModel(projectFilterTreeModel);
                                projectTree.setShowsRootHandles(true);
                                projectTree.setCellRenderer(new ProjectTreeRenderer());
                                projectTree.addMouseListener(new MouseAdapter() {
                                    public void mouseClicked(MouseEvent evt) {
                                        projectTreeMouseClicked(evt);
                                    }
                                });
                            }
                        }
                    }
                }
            }
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
}

From source file:de.xplib.xdbm.ui.Application.java

/**
 * /*from   w ww . j  a  v  a2 s  .c o m*/
 */
private void initUI() {

    this.getContentPane().setLayout(new DockLayout(this, DockLayout.STACKING_STYLE));

    this.menuBar = new ApplicationMenuBar(this);
    this.toolBars = new ApplicationToolBars(this);
    this.consolePanel = new BottomFrame(this);
    this.treePanel = new LeftFrame(this);
    this.resourceFrame = new CenterFrame(this);

    this.jspContentConsole = new UIFSplitPane();
    this.jspTreeResource = new UIFSplitPane();

    this.add(this.jspContentConsole, DockLayout.center);

    this.jspContentConsole.setBorder(BorderFactory.createEmptyBorder());
    this.jspContentConsole.setOrientation(JSplitPane.VERTICAL_SPLIT);
    this.jspContentConsole.setDividerSize(5);
    this.jspContentConsole.add(this.jspTreeResource, JSplitPane.TOP);
    this.jspContentConsole.add(this.consolePanel, JSplitPane.BOTTOM);

    this.jspTreeResource.setBorder(BorderFactory.createEmptyBorder());
    this.jspTreeResource.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
    this.jspTreeResource.setDividerSize(5);
    this.jspTreeResource.setDividerLocation(200);
    this.jspTreeResource.add(this.treePanel, JSplitPane.TOP);
    this.jspTreeResource.add(this.resourceFrame, JSplitPane.BOTTOM);

    Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();

    this.setSize((int) dim.getWidth(), (int) dim.getHeight() - 30);
    this.setVisible(true);
}

From source file:junk.gui.HazardDataSetCalcCondorApp.java

private void jbInit() throws Exception {
    border1 = new EtchedBorder(EtchedBorder.RAISED, new Color(248, 254, 255), new Color(121, 124, 136));
    this.setSize(new Dimension(564, 834));
    this.getContentPane().setLayout(borderLayout1);
    mainPanel.setBorder(border1);//from   w  w w . ja  va2  s .c  o  m
    mainPanel.setLayout(gridBagLayout);
    mainSplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
    buttonPanel.setLayout(borderLayout3);
    eqkRupPanel.setLayout(gridBagLayout);
    imr_IMTSplit.setOrientation(JSplitPane.VERTICAL_SPLIT);
    imrPanel.setLayout(borderLayout2);
    imtPanel.setLayout(gridBagLayout);
    buttonPanel.setMinimumSize(new Dimension(391, 50));
    gridRegionSitePanel.setLayout(gridBagLayout);
    imrSelectionPanel.setLayout(gridBagLayout);
    //controlComboBox.setBackground(Color.white);
    dataPanel.setLayout(gridBagLayout4);
    imgPanel.setLayout(gridBagLayout7);
    addButton.setBorder(null);
    addButton.setText("Start Calc");
    addButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(ActionEvent e) {
            addButton_actionPerformed(e);
        }
    });
    controlComboBox.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(ActionEvent e) {
            controlComboBox_actionPerformed(e);
        }
    });
    emailLabel.setText("Email:");
    datasetLabel.setText("Dataset Id:");
    emailText.setText("");
    dataPanel.setMinimumSize(new Dimension(548, 150));
    dataPanel.setPreferredSize(new Dimension(549, 150));
    this.getContentPane().add(mainPanel, BorderLayout.CENTER);
    mainPanel.add(mainSplitPane, new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER,
            GridBagConstraints.BOTH, new Insets(1, 1, 2, 3), 0, 431));
    mainSplitPane.add(buttonPanel, JSplitPane.BOTTOM);
    buttonPanel.add(dataPanel, BorderLayout.CENTER);
    dataPanel.add(datasetIdText, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0, GridBagConstraints.WEST,
            GridBagConstraints.HORIZONTAL, new Insets(34, 19, 81, 0), 162, 7));
    dataPanel.add(datasetLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST,
            GridBagConstraints.NONE, new Insets(34, 7, 81, 0), 28, 10));
    dataPanel.add(emailText, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST,
            GridBagConstraints.HORIZONTAL, new Insets(43, 19, 0, 0), 162, 7));
    dataPanel.add(controlComboBox, new GridBagConstraints(2, 0, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL, new Insets(43, 48, 0, 24), 35, 2));
    dataPanel.add(emailLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST,
            GridBagConstraints.NONE, new Insets(43, 7, 0, 15), 43, 12));
    dataPanel.add(addButton, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
            GridBagConstraints.NONE, new Insets(27, 51, 81, 24), 79, 12));
    buttonPanel.add(imgPanel, BorderLayout.SOUTH);
    imgPanel.add(imgLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST,
            GridBagConstraints.NONE, new Insets(15, 235, 3, 246), 57, 28));
    mainSplitPane.add(parameterTabbedPanel, JSplitPane.TOP);
    imr_IMTSplit.add(imtPanel, JSplitPane.BOTTOM);
    imr_IMTSplit.add(imrSelectionPanel, JSplitPane.TOP);
    imrPanel.add(imr_IMTSplit, BorderLayout.CENTER);
    parameterTabbedPanel.addTab("Intensity-Measure Relationship", imrPanel);
    parameterTabbedPanel.addTab("Region & Site Params", gridRegionSitePanel);
    parameterTabbedPanel.addTab("Earthquake Rupture Forecast", eqkRupPanel);
    mainSplitPane.setDividerLocation(550);
    imr_IMTSplit.setDividerLocation(300);
    imgLabel.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(MouseEvent e) {
            imgLabel_mouseClicked(e);
        }
    });

}

From source file:com.zigabyte.stock.stratplot.StrategyPlotter.java

private void initLayout() {
    Container content = this.getContentPane();
    JComponent controls = Box.createVerticalBox();
    {/*from w w w  .  j  a v a  2  s .co  m*/
        JPanel filePanel = new JPanel(new BorderLayout());
        {
            filePanel.setBorder(BorderFactory.createTitledBorder("Stock Market Trading Data"));
            JPanel dataButtons = new JPanel(new GridLayout(2, 1));
            {
                dataButtons.add(this.loadFileButton);
                dataButtons.add(this.viewDataButton);
            }
            filePanel.add(dataButtons, BorderLayout.EAST);
            JPanel fileControls = new JPanel(new FlowLayout());
            {
                fileControls.add(new JLabel("Stock data File:"));
                fileControls.add(this.fileField);
                fileControls.add(this.fileBrowseButton);
                fileControls.add(new JLabel("  Stock data format:"));
                fileControls.add(this.fileFormatCombo);
            }
            filePanel.add(fileControls, BorderLayout.CENTER);
        }
        controls.add(filePanel);
        JComponent simPanel = new JPanel(new BorderLayout());
        {
            simPanel.setBorder(BorderFactory.createTitledBorder("Simulation Run"));
            simPanel.add(this.runButton, BorderLayout.EAST);
            JComponent simControlsPanel = Box.createVerticalBox();
            {
                JPanel accountControls = new JPanel(new FlowLayout());
                {
                    accountControls.add(new JLabel("Initial Cash:"));
                    accountControls.add(this.initialCashField);
                    accountControls.add(new JLabel("  Per Trade Fee:"));
                    accountControls.add(this.perTradeFeeField);
                    accountControls.add(new JLabel("  Per Share Trade Commission:"));
                    accountControls.add(this.perShareTradeCommissionField);
                    accountControls.add(new JLabel("  Compare:"));
                    accountControls.add(this.compareIndexSymbolField);
                }
                simControlsPanel.add(accountControls);
                JPanel runControls = new JPanel(new FlowLayout());
                {
                    runControls.add(this.strategyField);
                    runControls.add(new JLabel("Start Date:"));
                    runControls.add(this.startDateField);
                    runControls.add(new JLabel("  End Date:"));
                    runControls.add(this.endDateField);
                    runControls.add(new JLabel("  Strategy:"));
                    runControls.add(this.strategyField);
                    runControls.add(this.editButton);
                    runControls.add(this.compileButton);
                }
                simControlsPanel.add(runControls);
            }
            simPanel.add(simControlsPanel, BorderLayout.CENTER);
        }
        controls.add(simPanel);
    }
    content.add(controls, BorderLayout.NORTH);
    JSplitPane vSplit = this.vSplit;
    {
        vSplit.setResizeWeight(0.5);
        vSplit.add(this.chartPanel, JSplitPane.TOP);
        JSplitPane hSplit = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
        {
            hSplit.setResizeWeight(0.5); // enough for no hscrollbar in 1024 width
            JSplitPane reportSplit = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
            {
                reportSplit.setResizeWeight(0.5);
                JScrollPane reportScroll = new JScrollPane(this.reportArea);
                {
                    reportScroll.setBorder(BorderFactory.createTitledBorder("Report"));
                }
                reportSplit.add(reportScroll, JSplitPane.TOP);
                JScrollPane monthScroll = new JScrollPane(this.monthlyLogArea);
                {
                    monthScroll.setBorder(BorderFactory.createTitledBorder("Monthly Log"));
                }
                reportSplit.add(monthScroll, JSplitPane.BOTTOM);
            }
            hSplit.add(reportSplit, JSplitPane.LEFT);
            JScrollPane tradeScroll = new JScrollPane(this.tradeLogArea);
            {
                tradeScroll.setBorder(BorderFactory.createTitledBorder("Trade Log"));
            }
            hSplit.add(tradeScroll, JSplitPane.RIGHT);
        }
        vSplit.add(hSplit, JSplitPane.BOTTOM);
    }
    content.add(vSplit, BorderLayout.CENTER);
}

From source file:junk.gui.HazardSpectrumApplication.java

private void jbInit() throws Exception {
    border1 = BorderFactory.createLineBorder(SystemColor.controlText, 1);
    border2 = BorderFactory.createLineBorder(SystemColor.controlText, 1);
    border3 = BorderFactory.createEmptyBorder();
    border4 = BorderFactory.createLineBorder(SystemColor.controlText, 1);
    border5 = BorderFactory.createLineBorder(SystemColor.controlText, 1);
    border6 = BorderFactory.createBevelBorder(BevelBorder.RAISED, Color.white, Color.white,
            new Color(98, 98, 112), new Color(140, 140, 161));
    border7 = BorderFactory.createBevelBorder(BevelBorder.RAISED, Color.white, Color.white,
            new Color(98, 98, 112), new Color(140, 140, 161));
    border8 = BorderFactory.createBevelBorder(BevelBorder.RAISED, Color.white, Color.white,
            new Color(98, 98, 112), new Color(140, 140, 161));
    //this.getContentPane().setBackground(Color.white);
    this.setSize(new Dimension(1100, 670));
    this.getContentPane().setLayout(borderLayout1);

    jPanel1.setLayout(gridBagLayout10);//from  ww  w.  jav  a2s. c  om
    //creating the Object the GraphPaenl class
    graphPanel = new GraphPanel(this);

    jPanel1.setBackground(Color.white);
    jPanel1.setBorder(border4);
    jPanel1.setMinimumSize(new Dimension(959, 600));
    jPanel1.setPreferredSize(new Dimension(959, 600));

    //loading the OpenSHA Logo

    topSplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
    clearButton.setText("Clear Plot");
    clearButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(ActionEvent e) {
            clearButton_actionPerformed(e);
        }
    });
    imgLabel.setText("");
    imgLabel.setIcon(new ImageIcon(FileUtils.loadImage(this.POWERED_BY_IMAGE)));
    imgLabel.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(MouseEvent e) {
            imgLabel_mouseClicked(e);
        }
    });
    //jCheckylog.setBackground(Color.white);
    //jCheckylog.setForeground(new Color(80, 80, 133));
    //buttonPanel.setBackground(Color.white);
    buttonPanel.setMinimumSize(new Dimension(568, 20));
    buttonPanel.setLayout(flowLayout1);
    //progressCheckBox.setBackground(Color.white);
    progressCheckBox.setFont(new java.awt.Font("Dialog", 1, 12));
    //progressCheckBox.setForeground(new Color(80, 80, 133));
    progressCheckBox.setSelected(true);
    progressCheckBox.setText("Show Progress Bar");
    addButton.setText("Compute");
    addButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(ActionEvent e) {
            addButton_actionPerformed(e);
        }
    });
    // jCheckxlog.setBackground(Color.white);
    //jCheckxlog.setForeground(new Color(80, 80, 133));
    //controlComboBox.setBackground(new Color(200, 200, 230));
    //controlComboBox.setForeground(new Color(80, 80, 133));
    controlComboBox.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(ActionEvent e) {
            controlComboBox_actionPerformed(e);
        }
    });
    panel.setLayout(gridBagLayout9);
    panel.setBackground(Color.white);
    panel.setBorder(border5);
    panel.setMinimumSize(new Dimension(0, 0));
    imrSplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
    imrSplitPane.setBottomComponent(imtPanel);
    imrSplitPane.setTopComponent(imrPanel);
    erfSplitPane.setTopComponent(erfPanel);
    sitePanel.setLayout(gridBagLayout13);
    sitePanel.setBackground(Color.white);
    imtPanel.setLayout(gridBagLayout8);
    imtPanel.setBackground(Color.white);
    controlsSplit.setDividerSize(5);
    erfPanel.setLayout(gridBagLayout5);
    erfPanel.setBackground(Color.white);
    erfPanel.setBorder(border2);
    erfPanel.setMaximumSize(new Dimension(2147483647, 10000));
    erfPanel.setMinimumSize(new Dimension(2, 300));
    erfPanel.setPreferredSize(new Dimension(2, 300));
    imrPanel.setLayout(gridBagLayout15);
    imrPanel.setBackground(Color.white);
    chartSplit.setLeftComponent(panel);
    chartSplit.setRightComponent(paramsTabbedPane);
    probDeterSelection.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(ActionEvent e) {
            probDeterSelection_actionPerformed(e);
        }
    });
    peelOffButton.setText("Peel Off");
    peelOffButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(ActionEvent e) {
            peelOffButton_actionPerformed(e);
        }
    });
    this.getContentPane().add(jPanel1, BorderLayout.CENTER);
    jPanel1.add(topSplitPane, new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER,
            GridBagConstraints.BOTH, new Insets(11, 4, 5, 6), 243, 231));
    buttonPanel.add(probDeterSelection, null);
    buttonPanel.add(controlComboBox, null);
    buttonPanel.add(addButton, null);
    buttonPanel.add(clearButton, null);
    buttonPanel.add(peelOffButton, null);
    buttonPanel.add(progressCheckBox, null);
    buttonPanel.add(imgLabel, null);
    topSplitPane.add(chartSplit, JSplitPane.TOP);
    chartSplit.add(panel, JSplitPane.LEFT);
    chartSplit.add(paramsTabbedPane, JSplitPane.RIGHT);
    imrSplitPane.add(imrPanel, JSplitPane.TOP);
    imrSplitPane.add(imtPanel, JSplitPane.BOTTOM);
    controlsSplit.add(imrSplitPane, JSplitPane.LEFT);
    paramsTabbedPane.add(controlsSplit, "IMR, IML/Prob, & Site");
    controlsSplit.add(sitePanel, JSplitPane.RIGHT);
    paramsTabbedPane.add(erfSplitPane, "ERF & Time Span");
    erfSplitPane.add(erfPanel, JSplitPane.LEFT);
    topSplitPane.add(buttonPanel, JSplitPane.BOTTOM);
    topSplitPane.setDividerLocation(600);
    imrSplitPane.setDividerLocation(300);
    erfSplitPane.setDividerLocation(260);
    controlsSplit.setDividerLocation(260);
    erfPanel.validate();
    erfPanel.repaint();
    chartSplit.setDividerLocation(600);

}

From source file:com.peterbochs.instrument.InstrumentPanel.java

private JSplitPane getJCallGraphSplitPane() {
    if (jCallGraphSplitPane == null) {
        jCallGraphSplitPane = new JSplitPane();
        jCallGraphSplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
        jCallGraphSplitPane.setDividerLocation(300);
        jCallGraphSplitPane.add(getJPanel3(), JSplitPane.TOP);
        jCallGraphSplitPane.add(getJCallGraphDetailPanel(), JSplitPane.BOTTOM);
    }/*from  w w w  .  j  a va2  s. c om*/
    return jCallGraphSplitPane;
}

From source file:com.peterbochs.instrument.InstrumentPanel.java

private JSplitPane getJSplitPane1() {
    if (jSplitPane1 == null) {
        jSplitPane1 = new JSplitPane();
        jSplitPane1.setOrientation(JSplitPane.VERTICAL_SPLIT);
        jSplitPane1.setDividerLocation(400);
        jSplitPane1.add(getJInterruptTableScrollPane(), JSplitPane.BOTTOM);
        jSplitPane1.add(getJInterruptChartPanel(), JSplitPane.TOP);
    }/*from www  . ja  v a 2 s . c o m*/
    return jSplitPane1;
}