Example usage for javax.swing JSplitPane BOTTOM

List of usage examples for javax.swing JSplitPane BOTTOM

Introduction

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

Prototype

String BOTTOM

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

Click Source Link

Document

Used to add a Component below the other Component.

Usage

From source file:Main.java

public static Component getChild(Component parent, String name) {
    parent = getContainer(parent);/*from   ww w .  jav a  2 s  .c  om*/

    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:org.ash.history.MainPreview.java

/**
 * Delete old rows and clear BDB logs//  w w  w . j a  v a 2s  .c o  m
 * 
 * @param start
 * @param end
 * @param isDelAllData
 */
void deleteAndClearBDBLogsRun(final long start, final long end, final String envDir,
        final boolean isDelAllData) {

    JPanel panel = createProgressBar("Clear database logs, please wait...");
    this.splitCalendarPreview.add(panel, JSplitPane.RIGHT);
    this.splitMainPane.add(new JPanel(), JSplitPane.BOTTOM);
    splitMainPane.setDividerLocation(splitMainPaneDivLocation);
    this.validate();
    splitMainPane.setDividerLocation(splitMainPaneDivLocation);

    Thread t = new Thread() {
        @Override
        public void run() {
            // delay
            try {
                Thread.sleep(50L);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            deleteAndClearLogs(start, end, envDir, isDelAllData);
        }
    };
    t.start();
}

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);//w w  w  .  j av a  2  s.  c om

    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//  w  ww .ja v  a2s  .com
 * 
 * @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 {/* w  w  w  . ja 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:org.ash.history.MainPreview.java

/**
 * Load preview stacked chart//from w  w w.ja  v  a  2  s .  com
 * 
 * @param envDir
 */
private void loadPreviewStacked(long start, long end) {
    try {

        TopActivityPreview topActivityPreview = new TopActivityPreview(this.ashDBPrevPeriod);

        // Set Max CPU
        topActivityPreview.setThresholdMaxCpu(getMaxCPUValue(this.ashDBPrevPeriod));

        // Set Title
        topActivityPreview.setTitle(getTitle(this.ashDBPrevPeriod));

        // Init chartPanel
        ChartPanel chartTAPreview = null;
        try {
            chartTAPreview = topActivityPreview.createDemoPanelTopActivity(start, end);
        } catch (DatabaseException e) {
            e.printStackTrace();
        }

        // Set format for x axis
        this.setDateFormatXAxis(start, end);
        topActivityPreview.setFormat(getDateFormatXAxis());
        topActivityPreview.updateTitle(getRangeData());

        TopActivityDetail topActivityDetail = new TopActivityDetail(this.mainFrame, this.ashDBPrevPeriod);
        chartTAPreview.addListenerReleaseMouse(topActivityDetail);

        // add TAPreview
        splitCalendarPreview.add(chartTAPreview, JSplitPane.RIGHT);
        splitMainPane.add(topActivityDetail, JSplitPane.BOTTOM);
        splitMainPane.setDividerLocation(splitMainPaneDivLocation);
        this.validate();
        splitMainPane.setDividerLocation(splitMainPaneDivLocation);

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

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

/**
 * Delete data from BDB and clear logs.//ww  w  . j a v a 2 s. c  o m
 * 
 * @param envDir
 */
private void deleteAndClearLogs(long start, long end, String envDir, boolean isDelAllData) {

    if (isDelAllData) {
        this.ashDBPrevPeriod.close();
        this.ashDBPrevPeriod = null;
        deleteEnvDir(envDir);
        fireDeleteAllAction();
        fireDeleteNodeAction();
    } else {
        if (!Options.getInstance().getEnvDir().trim().equalsIgnoreCase(envDir.trim())) {
            this.ashDBPrevPeriod.deleteData(start, end);
            this.ashDBPrevPeriod.cleanLogs();
            fireDeleteAction();
        } else {
            Options.getInstance().getASHDatabase().deleteData(start, end);
            Options.getInstance().getASHDatabase().cleanLogs();
            fireDeleteAction();
        }
    }
    removeListener();

    // add temp JPanel()
    splitCalendarPreview.add(new JPanel(), JSplitPane.RIGHT);
    splitMainPane.add(new JPanel(), JSplitPane.BOTTOM);
    splitMainPane.setDividerLocation(splitMainPaneDivLocation);
    validate();
    splitMainPane.setDividerLocation(splitMainPaneDivLocation);
    splitCalendarPreview.setDividerLocation(splitCalendarPreviewDivLocation);

}

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 ww  w  . jav a  2s .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:de.xplib.xdbm.ui.Application.java

/**
 * /*from   w w  w  . j av  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:com.zigabyte.stock.stratplot.StrategyPlotter.java

private void initLayout() {
    Container content = this.getContentPane();
    JComponent controls = Box.createVerticalBox();
    {/*from ww w  .  j  a va  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);
}