Example usage for java.awt BorderLayout WEST

List of usage examples for java.awt BorderLayout WEST

Introduction

In this page you can find the example usage for java.awt BorderLayout WEST.

Prototype

String WEST

To view the source code for java.awt BorderLayout WEST.

Click Source Link

Document

The west layout constraint (left side of container).

Usage

From source file:op.controlling.PnlControlling.java

private JPanel createContentPanel4Drugs() {
    JPanel pnlContent = new JPanel(new VerticalLayout());

    /***/* w w w  . ja v a  2  s . c  o m*/
     *      ____                      ____            _             _   _     _     _
     *     |  _ \ _ __ _   _  __ _   / ___|___  _ __ | |_ _ __ ___ | | | |   (_)___| |_
     *     | | | | '__| | | |/ _` | | |   / _ \| '_ \| __| '__/ _ \| | | |   | / __| __|
     *     | |_| | |  | |_| | (_| | | |__| (_) | | | | |_| | | (_) | | | |___| \__ \ |_
     *     |____/|_|   \__,_|\__, |  \____\___/|_| |_|\__|_|  \___/|_| |_____|_|___/\__|
     *                       |___/
     */
    JPanel pnlDrugControl = new JPanel(new BorderLayout());
    final JButton btnDrugControl = GUITools.createHyperlinkButton("opde.controlling.drugs.controllist", null,
            null);
    final JComboBox cmbStation = new JComboBox(StationTools.getAll4Combobox(false));
    btnDrugControl.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            OPDE.getMainframe().setBlocked(true);
            SwingWorker worker = new SwingWorker() {
                @Override
                protected Object doInBackground() throws Exception {
                    return MedStockTools.getListForMedControl((Station) cmbStation.getSelectedItem(),
                            progressClosure);
                }

                @Override
                protected void done() {
                    try {
                        SYSFilesTools.print(get().toString(), true);
                    } catch (ExecutionException ee) {
                        OPDE.fatal(ee);
                    } catch (InterruptedException ie) {
                        // nop
                    }

                    OPDE.getDisplayManager().setProgressBarMessage(null);
                    OPDE.getMainframe().setBlocked(false);
                }
            };
            worker.execute();
        }
    });
    pnlDrugControl.add(btnDrugControl, BorderLayout.WEST);
    pnlDrugControl.add(cmbStation, BorderLayout.EAST);
    pnlContent.add(pnlDrugControl);

    /***
     *     __        __   _       _     _    ____            _             _   _   _                     _   _
     *     \ \      / /__(_) __ _| |__ | |_ / ___|___  _ __ | |_ _ __ ___ | | | \ | | __ _ _ __ ___ ___ | |_(_) ___ ___
     *      \ \ /\ / / _ \ |/ _` | '_ \| __| |   / _ \| '_ \| __| '__/ _ \| | |  \| |/ _` | '__/ __/ _ \| __| |/ __/ __|
     *       \ V  V /  __/ | (_| | | | | |_| |__| (_) | | | | |_| | | (_) | | | |\  | (_| | | | (_| (_) | |_| | (__\__ \
     *        \_/\_/ \___|_|\__, |_| |_|\__|\____\___/|_| |_|\__|_|  \___/|_| |_| \_|\__,_|_|  \___\___/ \__|_|\___|___/
     *                      |___/
     */
    JPanel pnlWeightControllNarcotics = new JPanel(new BorderLayout());
    final JButton btnWeightControl = GUITools
            .createHyperlinkButton("opde.controlling.prescription.narcotics.weightcontrol", null, null);

    //               final JComboBox cmbStation = new JComboBox(StationTools.getAll4Combobox(false));
    btnWeightControl.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            OPDE.getMainframe().setBlocked(true);
            SwingWorker worker = new SwingWorker() {
                @Override
                protected Object doInBackground() throws Exception {

                    return MedStockTools.getNarcoticsWeightList(new LocalDate().minusMonths(1),
                            new LocalDate());
                }

                @Override
                protected void done() {

                    try {
                        SYSFilesTools.print(get().toString(), true);
                    } catch (ExecutionException ee) {
                        OPDE.fatal(ee);
                    } catch (InterruptedException ie) {
                        // nop
                    }

                    OPDE.getDisplayManager().setProgressBarMessage(null);
                    OPDE.getMainframe().setBlocked(false);
                }
            };
            worker.execute();
        }
    });

    final JToggleButton btnNotify = new JToggleButton(SYSConst.icon22mailOFF);
    btnNotify.setSelectedIcon(SYSConst.icon22mailON);
    btnNotify.setSelected(NotificationTools.find(OPDE.getLogin().getUser(),
            NotificationTools.NKEY_DRUG_WEIGHT_CONTROL) != null);
    btnNotify.setToolTipText(SYSTools.xx("opde.notification.enable.for.this.topic"));

    btnNotify.addItemListener(new ItemListener() {
        @Override
        public void itemStateChanged(ItemEvent e) {

            EntityManager em = OPDE.createEM();
            try {
                em.getTransaction().begin();
                Users user = em.merge(OPDE.getLogin().getUser());
                em.lock(user, LockModeType.OPTIMISTIC_FORCE_INCREMENT);

                if (e.getStateChange() == ItemEvent.SELECTED) {
                    Notification myNotification = em
                            .merge(new Notification(NotificationTools.NKEY_DRUG_WEIGHT_CONTROL, user));
                    user.getNotifications().add(myNotification);
                } else {
                    Notification myNotification = em.merge(NotificationTools.find(OPDE.getLogin().getUser(),
                            NotificationTools.NKEY_DRUG_WEIGHT_CONTROL));
                    user.getNotifications().remove(myNotification);
                    em.remove(myNotification);
                }

                em.getTransaction().commit();
                OPDE.getLogin().setUser(user);
            } catch (OptimisticLockException ole) {
                OPDE.warn(ole);
                if (em.getTransaction().isActive()) {
                    em.getTransaction().rollback();
                }
                if (ole.getMessage().indexOf("Class> entity.info.Resident") > -1) {
                    OPDE.getMainframe().emptyFrame();
                    OPDE.getMainframe().afterLogin();
                }
                OPDE.getDisplayManager().addSubMessage(DisplayManager.getLockMessage());
            } catch (Exception ex) {
                if (em.getTransaction().isActive()) {
                    em.getTransaction().rollback();
                }
                OPDE.fatal(ex);
            } finally {
                em.close();
            }

        }
    });

    pnlWeightControllNarcotics.add(btnWeightControl, BorderLayout.WEST);
    pnlWeightControllNarcotics.add(btnNotify, BorderLayout.EAST);
    pnlContent.add(pnlWeightControllNarcotics);

    return pnlContent;
}

From source file:AppearanceExplorer.java

IntChooser(String name, String[] initChoiceNames, int[] initChoiceValues, int initValue) {
    if ((initChoiceValues != null) && (initChoiceNames.length != initChoiceValues.length)) {
        throw new IllegalArgumentException("Name and Value arrays must have the same length");
    }/*ww w. j av a  2  s  .  co  m*/
    choiceNames = new String[initChoiceNames.length];
    choiceValues = new int[initChoiceNames.length];
    System.arraycopy(initChoiceNames, 0, choiceNames, 0, choiceNames.length);
    if (initChoiceValues != null) {
        System.arraycopy(initChoiceValues, 0, choiceValues, 0, choiceNames.length);
    } else {
        for (int i = 0; i < initChoiceNames.length; i++) {
            choiceValues[i] = i;
        }
    }

    // Create the combo box, select the init value
    combo = new JComboBox(choiceNames);
    combo.setSelectedIndex(current);
    combo.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            JComboBox cb = (JComboBox) e.getSource();
            int index = cb.getSelectedIndex();
            setValueIndex(index);
        }
    });

    // set the initial value
    current = 0;
    setValue(initValue);

    // layout to align left
    setLayout(new BorderLayout());
    Box box = new Box(BoxLayout.X_AXIS);
    add(box, BorderLayout.WEST);

    box.add(new JLabel(name));
    box.add(combo);
}

From source file:UI.SecurityDashboard.java

private void performMetric7(MainViewPanel mvp) {
    Metric7 metric7 = new Metric7();

    JPanel graphPanel7 = new JPanel();
    graphPanel7.setLayout(new BorderLayout());
    graphPanel7.add(metric7.run(), BorderLayout.NORTH);

    PortPanel.setLayout(new BorderLayout());
    JTextArea header = new JTextArea(
            "\nOpen ports that are not being used by a secure service on a system may result in a malicious "
                    + "attacker gaining access to the network. By listing all open ports on each device, this can aid in ensuring that ports "
                    + "currently open are know of.\n");
    header.setLineWrap(true);//from w w  w .  j a v  a2 s.com
    header.setWrapStyleWord(true);
    header.setEditable(false);
    PortPanel.add(header, BorderLayout.NORTH);
    PortPanel.add(graphPanel7, BorderLayout.CENTER);

    Metric7Panel.setBackground(Color.WHITE);
    Metric7Panel.setLayout(new BorderLayout());

    Font titleFont = new Font("Calibri", Font.BOLD, 27);
    JLabel portTitleLabel = new JLabel("              Open Ports");
    portTitleLabel.setFont(titleFont);

    Metric7Panel.add(portTitleLabel, BorderLayout.NORTH);
    JPanel p = new JPanel();
    p.setLayout(new BorderLayout());
    JLabel emptyLabel = new JLabel(" ");
    JLabel emptyLabel2 = new JLabel(" ");
    JLabel emptyLabel3 = new JLabel("   ");
    JLabel emptyLabel4 = new JLabel("   ");

    emptyLabel.setBackground(Color.white);
    emptyLabel2.setBackground(Color.white);
    emptyLabel3.setBackground(Color.white);
    emptyLabel4.setBackground(Color.white);

    emptyLabel.setOpaque(true);
    emptyLabel2.setOpaque(true);
    emptyLabel3.setOpaque(true);
    emptyLabel4.setOpaque(true);

    p.add(emptyLabel, BorderLayout.NORTH);
    p.add(emptyLabel3, BorderLayout.WEST);
    p.add(mvp.getPanel7(metric7), BorderLayout.CENTER);
    p.add(emptyLabel4, BorderLayout.EAST);
    p.add(emptyLabel2, BorderLayout.SOUTH);
    Metric7Panel.add(p, BorderLayout.CENTER);
    Metric7Panel.setBackground(Color.white);
}

From source file:op.controlling.PnlControlling.java

private JPanel createContentPanel4Nutrition() {
    JPanel pnlContent = new JPanel(new VerticalLayout());

    /***/*from w  w w .  ja v  a  2  s.c o m*/
     *      _ _             _     _   _           _
     *     | (_) __ _ _   _(_) __| | | |__   __ _| | __ _ _ __   ___ ___
     *     | | |/ _` | | | | |/ _` | | '_ \ / _` | |/ _` | '_ \ / __/ _ \
     *     | | | (_| | |_| | | (_| | | |_) | (_| | | (_| | | | | (_|  __/
     *     |_|_|\__, |\__,_|_|\__,_| |_.__/ \__,_|_|\__,_|_| |_|\___\___|
     *             |_|
     */
    JPanel pnlLiquidBalance = new JPanel(new BorderLayout());
    final JButton btnLiquidBalance = GUITools.createHyperlinkButton("opde.controlling.nutrition.liquidbalance",
            null, null);
    final JComboBox cmbLiquidBalanceMonth = new JComboBox(
            SYSCalendar.createMonthList(new LocalDate().minusYears(1), new LocalDate()));
    btnLiquidBalance.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            OPDE.getMainframe().setBlocked(true);
            SwingWorker worker = new SwingWorker() {
                @Override
                protected Object doInBackground() throws Exception {
                    LocalDate month = (LocalDate) cmbLiquidBalanceMonth.getSelectedItem();
                    SYSFilesTools.print(ResValueTools.getLiquidBalance(month, progressClosure), false);
                    return null;
                }

                @Override
                protected void done() {
                    OPDE.getDisplayManager().setProgressBarMessage(null);
                    OPDE.getMainframe().setBlocked(false);
                }
            };
            worker.execute();
        }
    });
    cmbLiquidBalanceMonth.setRenderer(new ListCellRenderer() {
        @Override
        public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
                boolean cellHasFocus) {
            return new DefaultListCellRenderer().getListCellRendererComponent(list,
                    monthFormatter.format(((LocalDate) value).toDate()), index, isSelected, cellHasFocus);
        }
    });
    cmbLiquidBalanceMonth.setSelectedIndex(cmbLiquidBalanceMonth.getItemCount() - 2);
    pnlLiquidBalance.add(btnLiquidBalance, BorderLayout.WEST);
    pnlLiquidBalance.add(cmbLiquidBalanceMonth, BorderLayout.EAST);
    pnlContent.add(pnlLiquidBalance);

    /***
     *                   _       _     _         _        _   _     _   _
     *     __      _____(_) __ _| |__ | |_   ___| |_ __ _| |_(_)___| |_(_) ___ ___
     *     \ \ /\ / / _ \ |/ _` | '_ \| __| / __| __/ _` | __| / __| __| |/ __/ __|
     *      \ V  V /  __/ | (_| | | | | |_  \__ \ || (_| | |_| \__ \ |_| | (__\__ \
     *       \_/\_/ \___|_|\__, |_| |_|\__| |___/\__\__,_|\__|_|___/\__|_|\___|___/
     *                     |___/
     */
    JPanel pnlWeight = new JPanel(new BorderLayout());
    final JButton btnWeightStats = GUITools.createHyperlinkButton("opde.controlling.nutrition.weightstats",
            null, null);
    int wsMonthsBack;
    try {
        wsMonthsBack = Integer.parseInt(OPDE.getProps().getProperty("opde.controlling::wsMonthsBack"));
    } catch (NumberFormatException nfe) {
        wsMonthsBack = 7;
    }
    final JTextField txtWSMonthsBack = GUITools.createIntegerTextField(1, 24, wsMonthsBack);
    txtWSMonthsBack.setToolTipText(SYSTools.xx("misc.msg.monthsback"));
    btnWeightStats.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            OPDE.getMainframe().setBlocked(true);
            SwingWorker worker = new SwingWorker() {
                @Override
                protected Object doInBackground() throws Exception {
                    SYSPropsTools.storeProp("opde.controlling::wsMonthsBack", txtWSMonthsBack.getText(),
                            OPDE.getLogin().getUser());
                    SYSFilesTools.print(ResValueTools.getWeightStats(
                            Integer.parseInt(txtWSMonthsBack.getText()), progressClosure), false);
                    return null;
                }

                @Override
                protected void done() {
                    OPDE.getDisplayManager().setProgressBarMessage(null);
                    OPDE.getMainframe().setBlocked(false);
                }
            };
            worker.execute();
        }
    });
    pnlWeight.add(btnWeightStats, BorderLayout.WEST);
    pnlWeight.add(txtWSMonthsBack, BorderLayout.EAST);
    pnlContent.add(pnlWeight);

    return pnlContent;
}

From source file:AppearanceExplorer.java

public Color3fEditor(String initName, Color3f initColor) {
    name = initName;/*from  w ww.jav  a 2s .  c om*/
    color.set(initColor);

    JLabel label = new JLabel(name);

    preview = new JPanel();
    preview.setPreferredSize(new Dimension(40, 40));
    preview.setBackground(color.get());
    preview.setBorder(BorderFactory.createRaisedBevelBorder());

    button = new JButton("Set");
    button.addActionListener(this);

    JPanel filler = new JPanel();
    filler.setPreferredSize(new Dimension(100, 20));

    setLayout(new BorderLayout());
    Box box = new Box(BoxLayout.X_AXIS);
    add(box, BorderLayout.WEST);

    box.add(label);
    box.add(preview);
    box.add(button);
    box.add(filler);

}

From source file:com.peterbochs.PeterBochsDebugger.java

private void initGUI() {
    try {//w ww .j av a  2s.co m
        language = Utf8ResourceBundle.getBundle("language_" + Setting.getInstance().getCurrentLanguage());

        // $hide>>$
        if (os == OSType.win) {
            if (!new File("PauseBochs.exe").exists() || !new File("StopBochs.exe").exists()) {
                JOptionPane.showMessageDialog(null, MyLanguage.getString("PauseBochsExe"),
                        MyLanguage.getString("Error"), JOptionPane.ERROR_MESSAGE);
                System.exit(1);
            }
            if (!new File("ndisasm.exe").exists()) {
                JOptionPane.showMessageDialog(null, MyLanguage.getString("NdisasmExe"),
                        MyLanguage.getString("Error"), JOptionPane.ERROR_MESSAGE);
                System.exit(1);
            }
        }
        // $hide<<$
    } catch (Exception e) {
        e.printStackTrace();
    }

    try {
        {
            this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
            if (Global.isBeta) {
                this.setTitle(MyLanguage.getString("Title") + " " + Global.version
                        + " , This is beta version, if you found a bug, please try older official release");
            } else {
                this.setTitle(MyLanguage.getString("Title") + " " + Global.version);
            }

            this.setIconImage(
                    new ImageIcon(getClass().getClassLoader().getResource("com/peterbochs/icons/peter.png"))
                            .getImage());
            this.addWindowListener(new WindowAdapter() {
                public void windowOpened(WindowEvent evt) {
                    thisWindowOpened(evt);
                }

                public void windowActivated(WindowEvent evt) {
                    thisWindowActivated(evt);
                }

                public void windowClosing(WindowEvent evt) {
                    thisWindowClosing(evt);
                }
            });
        }
        {
            jToolBar1 = new JToolBar();
            getContentPane().add(jToolBar1, BorderLayout.NORTH);
            {
                startBochsButton = new JButton();
                jToolBar1.add(startBochsButton);
                startBochsButton.setText(MyLanguage.getString("Start_bochs"));
                startBochsButton.setToolTipText("Launch bochs");
                startBochsButton.setIcon(new ImageIcon(getClass().getClassLoader()
                        .getResource("com/peterbochs/icons/famfam_icons/accept.png")));
                startBochsButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent evt) {
                        startBochsButtonActionPerformed(evt);
                    }
                });
            }
            {
                stopBochsButton = new JButton();
                jToolBar1.add(stopBochsButton);
                stopBochsButton.setText(MyLanguage.getString("Stop_bochs"));
                stopBochsButton.setToolTipText("Quit bochs");
                stopBochsButton.setIcon(new ImageIcon(
                        getClass().getClassLoader().getResource("com/peterbochs/icons/famfam_icons/stop.png")));
                stopBochsButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent evt) {
                        stopBochsButtonActionPerformed(evt);
                    }
                });
            }
            {
                runBochsButton = new JDropDownButton();
                jToolBar1.add(runBochsButton);
                runBochsButton.setText(MyLanguage.getString("Run_bochs"));
                runBochsButton.setToolTipText("Start emulation");
                runBochsButton.setMaximumSize(new java.awt.Dimension(85, 26));
                runBochsButton.add(getJRunBochsAndSkipBreakpointMenuItem());
                runBochsButton.add(getJRunCustomCommandMenuItem());
                runBochsButton.setIcon(new ImageIcon(getClass().getClassLoader()
                        .getResource("com/peterbochs/icons/famfam_icons/resultset_next.png")));
                runBochsButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent evt) {
                        runBochsButtonActionPerformed(evt);
                    }
                });
            }
            {
                stepBochsButton = new JDropDownButton();
                jToolBar1.add(stepBochsButton);
                jToolBar1.add(getJStepOverDropDownButton());
                jToolBar1.add(getJFastStepBochsButton());
                stepBochsButton.setIcon(new ImageIcon(
                        getClass().getClassLoader().getResource("com/peterbochs/icons/famfam_icons/step.png")));
                stepBochsButton.setText(MyLanguage.getString("Step"));
                stepBochsButton.setMaximumSize(new java.awt.Dimension(85, 26));
                stepBochsButton.add(getJStep10MenuItem());
                stepBochsButton.add(getJStep100MenuItem());
                stepBochsButton.add(getJStepNMenuItem());
                stepBochsButton.add(getJStepUntilCallOrJumpMenuItem());
                stepBochsButton.add(getJStepUntilRetMenuItem());
                stepBochsButton.add(getJStepUntilIRetMenuItem());
                stepBochsButton.add(getJStepUntilMovMenuItem());
                stepBochsButton.add(getJStepUntilIPBigChangeMenuItem());
                stepBochsButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent evt) {
                        stepBochsButtonActionPerformed(evt);
                    }
                });
            }
            {
                nextButton = new JButton();
                nextButton.setIcon(new ImageIcon(
                        getClass().getClassLoader().getResource("com/peterbochs/icons/famfam_icons/step.png")));
                nextButton.setText(MyLanguage.getString("Nexti"));
                nextButton.setToolTipText("c/c++ level step-in");
                jToolBar1.add(nextButton);
                jToolBar1.add(getNextOverButton());
                nextButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent evt) {
                        nextButtonActionPerformed(evt);
                    }
                });
            }
            {
                jUpdateBochsButton = new JButton();
                jToolBar1.add(jUpdateBochsButton);
                jToolBar1.add(getJExportToExcelButton());
                jToolBar1.add(getJSettingButton());
                jToolBar1.add(getJRegisterToggleButton());
                jToolBar1.add(getJSourceLevelDebuggerButton());
                jToolBar1.add(getJProfilerToggleButton());
                jToolBar1.add(getJLogToggleButton());
                jToolBar1.add(getJOSLogToggleButton());
                jUpdateBochsButton.setEnabled(true);
                jUpdateBochsButton.setText(MyLanguage.getString("Update"));
                jUpdateBochsButton.setIcon(new ImageIcon(getClass().getClassLoader()
                        .getResource("com/peterbochs/icons/famfam_icons/arrow_refresh.png")));
                jUpdateBochsButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent evt) {
                        jUpdateBochsButtonActionPerformed(evt);
                    }
                });
            }
        }
        {
            jStatusPanel = new JPanel();
            BorderLayout jStatusPanelLayout = new BorderLayout();
            jStatusPanel.setLayout(jStatusPanelLayout);
            getContentPane().add(jStatusPanel, BorderLayout.SOUTH);
            getContentPane().add(getJMainPanel());
            {
                jStatusProgressBar = new JProgressBar();
                jStatusPanel.add(jStatusProgressBar, BorderLayout.WEST);
                jStatusPanel.add(getJPanel25(), BorderLayout.CENTER);
            }
        }
        {
            jMenuBar1 = new JMenuBar();
            setJMenuBar(jMenuBar1);
            {
                jMenu3 = new JMenu();
                jMenuBar1.add(jMenu3);
                jMenu3.setText(MyLanguage.getString("File"));
                {
                    jSeparator2 = new JSeparator();
                    jMenu3.add(jSeparator2);
                }
                {
                    exitMenuItem = new JMenuItem();
                    jMenu3.add(exitMenuItem);
                    exitMenuItem.setText(MyLanguage.getString("Exit"));
                    exitMenuItem.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent evt) {
                            exitMenuItemActionPerformed(evt);
                        }
                    });
                }
            }
            {
                jMenu4 = new JMenu();
                jMenuBar1.add(jMenu4);
                jMenuBar1.add(getJFontMenu());
                jMenuBar1.add(getJMenu6());
                jMenuBar1.add(getJSystemMenu());
                jMenu4.setText(MyLanguage.getString("Bochs"));
                {
                    startBochsMenuItem = new JMenuItem();
                    jMenu4.add(startBochsMenuItem);
                    startBochsMenuItem.setText(MyLanguage.getString("Start_bochs"));
                    startBochsMenuItem.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent evt) {
                            startBochsMenuItemActionPerformed(evt);
                        }
                    });
                }
                {
                    stopBochsMenuItem = new JMenuItem();
                    jMenu4.add(stopBochsMenuItem);
                    stopBochsMenuItem.setText(MyLanguage.getString("Stop_bochs"));
                    stopBochsMenuItem.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent evt) {
                            stopBochsMenuItemActionPerformed(evt);
                        }
                    });
                }
                {
                    jSeparator1 = new JSeparator();
                    jMenu4.add(jSeparator1);
                }
                {
                    runBochsMenuItem = new JMenuItem();
                    jMenu4.add(runBochsMenuItem);
                    runBochsMenuItem.setText(MyLanguage.getString("Run_bochs"));
                    runBochsMenuItem.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent evt) {
                            runBochsMenuItemActionPerformed(evt);
                        }
                    });
                }
                {
                    pauseBochsMenuItem = new JMenuItem();
                    jMenu4.add(pauseBochsMenuItem);
                    pauseBochsMenuItem.setText(MyLanguage.getString("Pause_bochs"));
                    pauseBochsMenuItem.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent evt) {
                            pauseBochsMenuItemActionPerformed(evt);
                        }
                    });
                }
                {
                    jUpdateBochsStatusMenuItem = new JMenuItem();
                    jMenu4.add(jUpdateBochsStatusMenuItem);
                    jUpdateBochsStatusMenuItem.setText(MyLanguage.getString("Update_bochs_status"));
                    jUpdateBochsStatusMenuItem.setBounds(83, 86, 79, 20);
                    jUpdateBochsStatusMenuItem.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent evt) {
                            jUpdateBochsStatusMenuItemActionPerformed(evt);
                        }
                    });
                }
            }
            {
                jMenu5 = new JMenu();
                jMenuBar1.add(jMenu5);
                jMenu5.setText(MyLanguage.getString("Help"));
                {
                    aboutUsMenuItem = new JMenuItem();
                    jMenu5.add(aboutUsMenuItem);
                    jMenu5.add(getJHelpRequestMenuItem());
                    jMenu5.add(getJJVMMenuItem());
                    jMenu5.add(getShortcutHelpMenuItem());
                    jMenu5.add(getJLicenseMenuItem());
                    aboutUsMenuItem.setText(MyLanguage.getString("About_us"));
                    aboutUsMenuItem.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent evt) {
                            aboutUsMenuItemActionPerformed(evt);
                        }
                    });
                }
            }
        }
        if (Setting.getInstance().getWidth() == 0 || Setting.getInstance().getHeight() == 0) {
            Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
            setSize(screenSize.width * 2 / 3, screenSize.height * 4 / 5);
        } else {
            setSize(Setting.getInstance().getWidth(), Setting.getInstance().getHeight());
        }
        int x = Setting.getInstance().getX();
        int y = Setting.getInstance().getY();
        if (x <= 0 || y <= 0) {
            this.setLocationRelativeTo(null);
        } else {
            setLocation(x, y);
        }

        jSplitPane1.setDividerLocation(Setting.getInstance().getDivX());
        jSplitPane2.setDividerLocation(Setting.getInstance().getDivY());

        jOSDebugInformationPanel1.getjMainSplitPane()
                .setDividerLocation(Setting.getInstance().getOsDebugSplitPane_DividerLocation());
        // pack();
        initGlobalFontSetting(new Font(Setting.getInstance().getFontFamily(), Font.PLAIN,
                Setting.getInstance().getFontsize()));
        jInstrumentPanel.setThing(jStatusProgressBar, jStatusLabel);

        // prevent null jmenuitem
        getJInstructionPanelPopupMenu();
        // end prevent null jmenuitem

        KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(new KeyEventDispatcher() {
            public boolean dispatchKeyEvent(KeyEvent e) {
                if (e.getID() == KeyEvent.KEY_RELEASED) {
                    int keycode = e.getKeyCode();
                    if (keycode == 112) {
                        jTabbedPane3.setSelectedIndex(0);
                    } else if (keycode == 113) {
                        jTabbedPane3.setSelectedIndex(1);
                    } else if (keycode == 114) {
                        jTabbedPane3.setSelectedIndex(2);
                    } else if (keycode == 115) {
                        jTabbedPane3.setSelectedIndex(3);
                    } else if (keycode == 116) {
                        if (startBochsButton.isEnabled()) {
                            startBochsButtonActionPerformed(null);
                        }
                    } else if (keycode == 117) {
                        if (stopBochsButton.isEnabled()) {
                            stopBochsButtonActionPerformed(null);
                        }
                    } else if (keycode == 118) {
                        if (runBochsButton.isEnabled()) {
                            runBochsButtonActionPerformed(null);
                        }
                    } else if (keycode == 119) {
                        if (stepBochsButton.isEnabled()) {
                            stepBochsButtonActionPerformed(null);
                        }
                    } else if (keycode == 120) {
                        if (fastStepBochsButton.isEnabled()) {
                            fastStepButtonActionPerformed(null);
                        }
                    }
                }

                // If the key should not be dispatched to the
                // focused component, set discardEvent to true
                boolean discardEvent = false;
                return discardEvent;
            }
        });
    } catch (Exception e) {
        e.printStackTrace();
        System.exit(ERROR);
    }
}

From source file:com.haulmont.cuba.desktop.gui.components.DesktopAbstractTable.java

@Override
public void setButtonsPanel(ButtonsPanel panel) {
    if (buttonsPanel != null) {
        topPanel.remove(DesktopComponentsHelper.unwrap(buttonsPanel));
        buttonsPanel.setParent(null);//  ww w  . jav  a2  s. com
    }
    buttonsPanel = panel;
    if (panel != null) {
        if (panel.getParent() != null && panel.getParent() != this) {
            throw new IllegalStateException("Component already has parent");
        }

        topPanel.add(DesktopComponentsHelper.unwrap(panel), BorderLayout.WEST);
        topPanel.setVisible(true);

        panel.setParent(this);
    }
}

From source file:edu.ku.brc.specify.tools.ireportspecify.MainFrameSpecify.java

/**
 * //from  w  w  w .  j a  v a2 s.  c  o  m
 */
private static void startupContinuing() // needs to be called on the UI Thread
{
    AppPreferences localPrefs = AppPreferences.getLocalPrefs();

    final String iRepPrefDir = localPrefs.getDirPath();
    final int mark = iRepPrefDir.lastIndexOf(UIRegistry.getAppName(), iRepPrefDir.length());
    final String SpPrefDir = iRepPrefDir.substring(0, mark) + "Specify";

    DatabaseLoginPanel.MasterPasswordProviderIFace usrPwdProvider = new DatabaseLoginPanel.MasterPasswordProviderIFace() {
        @Override
        public boolean hasMasterUserAndPwdInfo(final String username, final String password,
                final String dbName) {
            if (StringUtils.isNotEmpty(username) && StringUtils.isNotEmpty(password)) {
                UserAndMasterPasswordMgr.getInstance().set(username, password, dbName);
                boolean result = false;
                try {
                    try {
                        AppPreferences.getLocalPrefs().flush();
                        AppPreferences.getLocalPrefs().setDirPath(SpPrefDir);
                        AppPreferences.getLocalPrefs().setProperties(null);
                        result = UserAndMasterPasswordMgr.getInstance().hasMasterUsernameAndPassword();
                    } finally {
                        AppPreferences.getLocalPrefs().flush();
                        AppPreferences.getLocalPrefs().setDirPath(iRepPrefDir);
                        AppPreferences.getLocalPrefs().setProperties(null);
                    }
                } catch (Exception e) {
                    edu.ku.brc.af.core.UsageTracker.incrHandledUsageCount();
                    edu.ku.brc.exceptions.ExceptionTracker.getInstance().capture(MainFrameSpecify.class, e);
                    result = false;
                }
                return result;
            }
            return false;
        }

        @Override
        public Pair<String, String> getUserNamePassword(final String username, final String password,
                final String dbName) {
            UserAndMasterPasswordMgr.getInstance().set(username, password, dbName);
            Pair<String, String> result = null;
            try {
                try {
                    AppPreferences.getLocalPrefs().flush();
                    AppPreferences.getLocalPrefs().setDirPath(SpPrefDir);
                    AppPreferences.getLocalPrefs().setProperties(null);
                    result = UserAndMasterPasswordMgr.getInstance().getUserNamePasswordForDB();
                } finally {
                    AppPreferences.getLocalPrefs().flush();
                    AppPreferences.getLocalPrefs().setDirPath(iRepPrefDir);
                    AppPreferences.getLocalPrefs().setProperties(null);
                }
            } catch (Exception e) {
                edu.ku.brc.af.core.UsageTracker.incrHandledUsageCount();
                edu.ku.brc.exceptions.ExceptionTracker.getInstance().capture(MainFrameSpecify.class, e);
                result = null;
            }
            return result;
        }

        @Override
        public boolean editMasterInfo(final String username, final String dbName,
                final boolean askFroCredentials) {
            boolean result = false;
            try {
                try {
                    AppPreferences.getLocalPrefs().flush();
                    AppPreferences.getLocalPrefs().setDirPath(SpPrefDir);
                    AppPreferences.getLocalPrefs().setProperties(null);
                    result = UserAndMasterPasswordMgr.getInstance().editMasterInfo(username, dbName,
                            askFroCredentials);
                } finally {
                    AppPreferences.getLocalPrefs().flush();
                    AppPreferences.getLocalPrefs().setDirPath(iRepPrefDir);
                    AppPreferences.getLocalPrefs().setProperties(null);
                }
            } catch (Exception e) {
                edu.ku.brc.af.core.UsageTracker.incrHandledUsageCount();
                edu.ku.brc.exceptions.ExceptionTracker.getInstance().capture(MainFrameSpecify.class, e);
                result = false;
            }
            return result;
        }
    };

    if (UIRegistry.isMobile()) {
        DBConnection.setShutdownUI(new DBConnection.ShutdownUIIFace() {
            CustomDialog processDlg;

            /* (non-Javadoc)
             * @see edu.ku.brc.dbsupport.DBConnection.ShutdownUIIFace#displayInitialDlg()
             */
            @Override
            public void displayInitialDlg() {
                SwingUtilities.invokeLater(new Runnable() {
                    @Override
                    public void run() {
                        UIRegistry.showLocalizedMsg(JOptionPane.INFORMATION_MESSAGE, "MOBILE_INFO",
                                "MOBILE_INTRO");
                    }
                });
            }

            /* (non-Javadoc)
             * @see edu.ku.brc.dbsupport.DBConnection.ShutdownUIIFace#displayFinalShutdownDlg()
             */
            @Override
            public void displayFinalShutdownDlg() {
                processDlg.setVisible(false);
                UIRegistry.showLocalizedMsg(JOptionPane.INFORMATION_MESSAGE, "MOBILE_INFO", "MOBILE_FINI");
            }

            /* (non-Javadoc)
             * @see edu.ku.brc.dbsupport.DBConnection.ShutdownUIIFace#displayShutdownMsgDlg()
             */
            @Override
            public void displayShutdownMsgDlg() {
                JPanel panel = new JPanel(new BorderLayout());
                panel.setBorder(BorderFactory.createEmptyBorder(14, 14, 14, 14));

                panel.add(new JLabel(IconManager.getIcon(Specify.getLargeIconName()), SwingConstants.CENTER),
                        BorderLayout.WEST);
                panel.add(UIHelper.createI18NLabel("MOBILE_SHUTTING_DOWN", SwingConstants.CENTER),
                        BorderLayout.CENTER);
                processDlg = new CustomDialog((Frame) null, "Shutdown", false, CustomDialog.NONE_BTN, panel);
                processDlg.setAlwaysOnTop(true);

                UIHelper.centerAndShow(processDlg);

            }
        });
    }

    String nameAndTitle = "Specify iReport"; // I18N
    UIRegistry.setRelease(true);
    UIHelper.doLogin(usrPwdProvider, true, false, false, new IReportLauncher(),
            IconManager.makeIconName("SPIReports"), nameAndTitle, nameAndTitle,
            IconManager.makeIconName("SpecifyWhite32"), "iReport", false); // true means do auto login if it can, 
    // second bool means use dialog instead of frame

    localPrefs.load();
}

From source file:com.jtstand.swing.StatsPanel.java

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor./*from  www.  ja  v a2 s  .co  m*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    buttonGroupType = new javax.swing.ButtonGroup();
    buttonGroupStatusFilter = new javax.swing.ButtonGroup();
    buttonGroupCountFilter = new javax.swing.ButtonGroup();
    jPanel1 = new javax.swing.JPanel();
    jPanelMainStats = new javax.swing.JPanel();
    jPanel3 = new javax.swing.JPanel();
    jLabelLSL = new javax.swing.JLabel();
    jPanel4 = new javax.swing.JPanel();
    jLabelUSL = new javax.swing.JLabel();
    jPanelChartType = new javax.swing.JPanel();
    jPanel5 = new javax.swing.JPanel();
    jRadioButtonStepTime = new javax.swing.JRadioButton();
    jPanel6 = new javax.swing.JPanel();
    jRadioButtonSequenceTime = new javax.swing.JRadioButton();
    jPanel7 = new javax.swing.JPanel();
    jRadioButtonList = new javax.swing.JRadioButton();
    jPanel8 = new javax.swing.JPanel();
    jRadioButtonDistribution = new javax.swing.JRadioButton();
    jPanelSeparate = new javax.swing.JPanel();
    jPanel17 = new javax.swing.JPanel();
    jCheckBoxStation = new javax.swing.JCheckBox();
    jPanel19 = new javax.swing.JPanel();
    jCheckBoxFixture = new javax.swing.JCheckBox();
    jPanel22 = new javax.swing.JPanel();
    jCheckBoxOperator = new javax.swing.JCheckBox();
    jPanel18 = new javax.swing.JPanel();
    jCheckBoxPartNumber = new javax.swing.JCheckBox();
    jPanel23 = new javax.swing.JPanel();
    jCheckBoxPartRevision = new javax.swing.JCheckBox();
    jPanel21 = new javax.swing.JPanel();
    jCheckBoxTestType = new javax.swing.JCheckBox();
    jPanel20 = new javax.swing.JPanel();
    jCheckBoxSerialNumber = new javax.swing.JCheckBox();
    jPanelStatusFilter = new javax.swing.JPanel();
    jPanel9 = new javax.swing.JPanel();
    jRadioButtonAllStatus = new javax.swing.JRadioButton();
    jPanel10 = new javax.swing.JPanel();
    jRadioButtonPassedStep = new javax.swing.JRadioButton();
    jPanel11 = new javax.swing.JPanel();
    jRadioButtonPassedSequence = new javax.swing.JRadioButton();
    jPanelCountFilter = new javax.swing.JPanel();
    jPanel12 = new javax.swing.JPanel();
    jRadioButtonAllCount = new javax.swing.JRadioButton();
    jPanel13 = new javax.swing.JPanel();
    jRadioButtonFirst = new javax.swing.JRadioButton();
    jPanel14 = new javax.swing.JPanel();
    jRadioButtonSecond = new javax.swing.JRadioButton();
    jPanel15 = new javax.swing.JPanel();
    jRadioButtonThird = new javax.swing.JRadioButton();
    jPanel16 = new javax.swing.JPanel();
    jRadioButtonLast = new javax.swing.JRadioButton();
    jPanel2 = new javax.swing.JPanel();
    jSplitPane = new javax.swing.JSplitPane();
    jScrollPaneTop = new javax.swing.JScrollPane();
    jTable = new org.jdesktop.swingx.JXTable();
    jScrollPaneBottom = new javax.swing.JScrollPane();

    setLayout(new java.awt.BorderLayout());

    jPanel1.setLayout(new javax.swing.BoxLayout(jPanel1, javax.swing.BoxLayout.Y_AXIS));

    jPanelMainStats.setBorder(javax.swing.BorderFactory
            .createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Limits"));
    jPanelMainStats.setLayout(new javax.swing.BoxLayout(jPanelMainStats, javax.swing.BoxLayout.Y_AXIS));

    jPanel3.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

    jLabelLSL.setText("LSL:...");
    jPanel3.add(jLabelLSL);

    jPanelMainStats.add(jPanel3);

    jPanel4.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

    jLabelUSL.setText("USL:...");
    jPanel4.add(jLabelUSL);

    jPanelMainStats.add(jPanel4);

    jPanel1.add(jPanelMainStats);

    jPanelChartType.setBorder(javax.swing.BorderFactory
            .createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Chart Type"));
    jPanelChartType.setLayout(new javax.swing.BoxLayout(jPanelChartType, javax.swing.BoxLayout.Y_AXIS));

    jPanel5.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 2));

    buttonGroupType.add(jRadioButtonStepTime);
    jRadioButtonStepTime.setText("Step Started Time");
    jRadioButtonStepTime.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
    jRadioButtonStepTime.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jRadioButtonStepTimeActionPerformed(evt);
        }
    });
    jPanel5.add(jRadioButtonStepTime);

    jPanelChartType.add(jPanel5);

    jPanel6.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 2));

    buttonGroupType.add(jRadioButtonSequenceTime);
    jRadioButtonSequenceTime.setText("Sequence Started Time");
    jRadioButtonSequenceTime.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
    jRadioButtonSequenceTime.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jRadioButtonSequenceTimeActionPerformed(evt);
        }
    });
    jPanel6.add(jRadioButtonSequenceTime);

    jPanelChartType.add(jPanel6);

    jPanel7.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 2));

    buttonGroupType.add(jRadioButtonList);
    jRadioButtonList.setText("As Listed");
    jRadioButtonList.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
    jRadioButtonList.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jRadioButtonListActionPerformed(evt);
        }
    });
    jPanel7.add(jRadioButtonList);

    jPanelChartType.add(jPanel7);

    jPanel8.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 2));

    buttonGroupType.add(jRadioButtonDistribution);
    jRadioButtonDistribution.setSelected(true);
    jRadioButtonDistribution.setText("Distribution");
    jRadioButtonDistribution.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
    jRadioButtonDistribution.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jRadioButtonDistributionActionPerformed(evt);
        }
    });
    jPanel8.add(jRadioButtonDistribution);

    jPanelChartType.add(jPanel8);

    jPanel1.add(jPanelChartType);

    jPanelSeparate.setBorder(javax.swing.BorderFactory
            .createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Categories"));
    jPanelSeparate.setLayout(new javax.swing.BoxLayout(jPanelSeparate, javax.swing.BoxLayout.Y_AXIS));

    jPanel17.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 1, 0));

    jCheckBoxStation.setText("Station");
    jCheckBoxStation.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jCheckBoxStationActionPerformed(evt);
        }
    });
    jPanel17.add(jCheckBoxStation);

    jPanelSeparate.add(jPanel17);

    jPanel19.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 1, 0));

    jCheckBoxFixture.setText("Fixture");
    jCheckBoxFixture.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jCheckBoxFixtureActionPerformed(evt);
        }
    });
    jPanel19.add(jCheckBoxFixture);

    jPanelSeparate.add(jPanel19);

    jPanel22.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 1, 0));

    jCheckBoxOperator.setText("Operator");
    jCheckBoxOperator.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jCheckBoxOperatorActionPerformed(evt);
        }
    });
    jPanel22.add(jCheckBoxOperator);

    jPanelSeparate.add(jPanel22);

    jPanel18.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 1, 0));

    jCheckBoxPartNumber.setText("Part Number");
    jCheckBoxPartNumber.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jCheckBoxPartNumberActionPerformed(evt);
        }
    });
    jPanel18.add(jCheckBoxPartNumber);

    jPanelSeparate.add(jPanel18);

    jPanel23.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 1, 0));

    jCheckBoxPartRevision.setText("Part Revision");
    jCheckBoxPartRevision.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jCheckBoxPartRevisionActionPerformed(evt);
        }
    });
    jPanel23.add(jCheckBoxPartRevision);

    jPanelSeparate.add(jPanel23);

    jPanel21.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 1, 0));

    jCheckBoxTestType.setText("Test Type");
    jCheckBoxTestType.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jCheckBoxTestTypeActionPerformed(evt);
        }
    });
    jPanel21.add(jCheckBoxTestType);

    jPanelSeparate.add(jPanel21);

    jPanel20.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 1, 0));

    jCheckBoxSerialNumber.setText("Serial Number");
    jCheckBoxSerialNumber.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jCheckBoxSerialNumberActionPerformed(evt);
        }
    });
    jPanel20.add(jCheckBoxSerialNumber);

    jPanelSeparate.add(jPanel20);

    jPanel1.add(jPanelSeparate);

    jPanelStatusFilter.setBorder(javax.swing.BorderFactory
            .createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Test Status Filter"));
    jPanelStatusFilter.setLayout(new javax.swing.BoxLayout(jPanelStatusFilter, javax.swing.BoxLayout.Y_AXIS));

    jPanel9.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 2));

    buttonGroupStatusFilter.add(jRadioButtonAllStatus);
    jRadioButtonAllStatus.setSelected(true);
    jRadioButtonAllStatus.setText("All");
    jRadioButtonAllStatus.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
    jRadioButtonAllStatus.setPreferredSize(null);
    jRadioButtonAllStatus.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jRadioButtonAllStatusActionPerformed(evt);
        }
    });
    jPanel9.add(jRadioButtonAllStatus);

    jPanelStatusFilter.add(jPanel9);

    jPanel10.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 2));

    buttonGroupStatusFilter.add(jRadioButtonPassedStep);
    jRadioButtonPassedStep.setText("Passed Step");
    jRadioButtonPassedStep.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
    jRadioButtonPassedStep.setPreferredSize(null);
    jRadioButtonPassedStep.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jRadioButtonPassedStepActionPerformed(evt);
        }
    });
    jPanel10.add(jRadioButtonPassedStep);

    jPanelStatusFilter.add(jPanel10);

    jPanel11.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 2));

    buttonGroupStatusFilter.add(jRadioButtonPassedSequence);
    jRadioButtonPassedSequence.setText("Passed Sequence");
    jRadioButtonPassedSequence.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
    jRadioButtonPassedSequence.setPreferredSize(null);
    jRadioButtonPassedSequence.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jRadioButtonPassedSequenceActionPerformed(evt);
        }
    });
    jPanel11.add(jRadioButtonPassedSequence);

    jPanelStatusFilter.add(jPanel11);

    jPanel1.add(jPanelStatusFilter);

    jPanelCountFilter.setBorder(javax.swing.BorderFactory
            .createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Test Count Filter"));
    jPanelCountFilter.setLayout(new javax.swing.BoxLayout(jPanelCountFilter, javax.swing.BoxLayout.Y_AXIS));

    jPanel12.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 2));

    buttonGroupCountFilter.add(jRadioButtonAllCount);
    jRadioButtonAllCount.setSelected(true);
    jRadioButtonAllCount.setText("All");
    jRadioButtonAllCount.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
    jRadioButtonAllCount.setPreferredSize(null);
    jRadioButtonAllCount.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jRadioButtonAllCountActionPerformed(evt);
        }
    });
    jPanel12.add(jRadioButtonAllCount);

    jPanelCountFilter.add(jPanel12);

    jPanel13.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 2));

    buttonGroupCountFilter.add(jRadioButtonFirst);
    jRadioButtonFirst.setText("First");
    jRadioButtonFirst.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
    jRadioButtonFirst.setPreferredSize(null);
    jRadioButtonFirst.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jRadioButtonFirstActionPerformed(evt);
        }
    });
    jPanel13.add(jRadioButtonFirst);

    jPanelCountFilter.add(jPanel13);

    jPanel14.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 2));

    buttonGroupCountFilter.add(jRadioButtonSecond);
    jRadioButtonSecond.setText("Second");
    jRadioButtonSecond.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
    jRadioButtonSecond.setPreferredSize(null);
    jRadioButtonSecond.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jRadioButtonSecondActionPerformed(evt);
        }
    });
    jPanel14.add(jRadioButtonSecond);

    jPanelCountFilter.add(jPanel14);

    jPanel15.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 2));

    buttonGroupCountFilter.add(jRadioButtonThird);
    jRadioButtonThird.setText("Third");
    jRadioButtonThird.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
    jRadioButtonThird.setPreferredSize(null);
    jRadioButtonThird.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jRadioButtonThirdActionPerformed(evt);
        }
    });
    jPanel15.add(jRadioButtonThird);

    jPanelCountFilter.add(jPanel15);

    jPanel16.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 2));

    buttonGroupCountFilter.add(jRadioButtonLast);
    jRadioButtonLast.setText("Last");
    jRadioButtonLast.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
    jRadioButtonLast.setPreferredSize(null);
    jRadioButtonLast.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jRadioButtonLastActionPerformed(evt);
        }
    });
    jPanel16.add(jRadioButtonLast);

    jPanelCountFilter.add(jPanel16);

    jPanel1.add(jPanelCountFilter);

    jPanel2.setLayout(new java.awt.BorderLayout());
    jPanel1.add(jPanel2);

    add(jPanel1, java.awt.BorderLayout.WEST);

    jSplitPane.setBorder(null);
    jSplitPane.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);

    jScrollPaneTop.setBorder(null);

    jTable.setModel(
            new javax.swing.table.DefaultTableModel(
                    new Object[][] { { null, null, null, null }, { null, null, null, null },
                            { null, null, null, null }, { null, null, null, null } },
                    new String[] { "Title 1", "Title 2", "Title 3", "Title 4" }));
    jTable.setName("Categories"); // NOI18N
    jTable.getTableHeader().setReorderingAllowed(false);
    jScrollPaneTop.setViewportView(jTable);

    jSplitPane.setTopComponent(jScrollPaneTop);

    jScrollPaneBottom.setBorder(null);
    jSplitPane.setBottomComponent(jScrollPaneBottom);

    add(jSplitPane, java.awt.BorderLayout.CENTER);
}

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

private JPanel getJCallGraphDetailPanel() {
    if (jCallGraphDetailPanel == null) {
        jCallGraphDetailPanel = new JPanel();
        BorderLayout jCallGraphDetailPanelLayout = new BorderLayout();
        jCallGraphDetailPanel.setLayout(jCallGraphDetailPanelLayout);
        jCallGraphDetailPanel.setPreferredSize(new java.awt.Dimension(760, 184));
        jCallGraphDetailPanel.add(getJCallGraphPreviewPanel(), BorderLayout.WEST);
        jCallGraphDetailPanel.add(getJTabbedPane4(), BorderLayout.CENTER);
    }//w  w  w.j  a  va2 s.c  o m
    return jCallGraphDetailPanel;
}