Search in sources :

Example 81 with FlowLayout

use of java.awt.FlowLayout in project jmeter by apache.

the class RespTimeGraphVisualizer method createGraphSettingsPane.

private JPanel createGraphSettingsPane() {
    JPanel settingsPane = new JPanel(new BorderLayout());
    settingsPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), // $NON-NLS-1$
    JMeterUtils.getResString("graph_resp_time_settings_pane")));
    JPanel intervalPane = new JPanel();
    intervalPane.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
    intervalField.setText(String.valueOf(DEFAULT_INTERVAL));
    intervalPane.add(intervalField);
    // Button
    intervalButton.setFont(FONT_SMALL);
    intervalButton.addActionListener(this);
    intervalPane.add(intervalButton);
    settingsPane.add(intervalPane, BorderLayout.NORTH);
    settingsPane.add(createGraphSelectionSubPane(), BorderLayout.SOUTH);
    return settingsPane;
}
Also used : JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout) BorderLayout(java.awt.BorderLayout)

Example 82 with FlowLayout

use of java.awt.FlowLayout in project jmeter by apache.

the class RespTimeGraphVisualizer method createGraphXAxisPane.

/**
     * Create pane for X Axis options
     * @return X Axis pane
     */
private JPanel createGraphXAxisPane() {
    JPanel xAxisPane = new JPanel();
    xAxisPane.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
    xAxisPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), // $NON-NLS-1$
    JMeterUtils.getResString("aggregate_graph_xaxis_group")));
    // $NON-NLS-1$
    xAxisTimeFormat.setText(DEFAULT_XAXIS_TIME_FORMAT);
    xAxisPane.add(xAxisTimeFormat);
    return xAxisPane;
}
Also used : JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout)

Example 83 with FlowLayout

use of java.awt.FlowLayout in project jmeter by apache.

the class RespTimeGraphVisualizer method createGraphYAxisPane.

/**
     * Create pane for Y Axis options
     * @return Y Axis pane
     */
private JPanel createGraphYAxisPane() {
    JPanel yAxisPane = new JPanel();
    yAxisPane.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
    yAxisPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), // $NON-NLS-1$
    JMeterUtils.getResString("aggregate_graph_yaxis_group")));
    yAxisPane.add(maxValueYAxisLabel);
    yAxisPane.add(incrScaleYAxis);
    yAxisPane.add(numberShowGrouping);
    return yAxisPane;
}
Also used : JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout)

Example 84 with FlowLayout

use of java.awt.FlowLayout in project jmeter by apache.

the class RespTimeGraphVisualizer method createGraphDimensionPane.

private JPanel createGraphDimensionPane() {
    JPanel dimensionPane = new JPanel();
    dimensionPane.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
    dimensionPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), // $NON-NLS-1$
    JMeterUtils.getResString("aggregate_graph_dimension")));
    dimensionPane.add(dynamicGraphSize);
    dynamicGraphSize.setSelected(DEFAULT_DYNAMIC_GRAPH_SIZE);
    graphWidth.setEnabled(false);
    graphHeight.setEnabled(false);
    dynamicGraphSize.addActionListener(this);
    dimensionPane.add(Box.createRigidArea(new Dimension(10, 0)));
    dimensionPane.add(graphWidth);
    dimensionPane.add(Box.createRigidArea(new Dimension(5, 0)));
    dimensionPane.add(graphHeight);
    return dimensionPane;
}
Also used : JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout) Dimension(java.awt.Dimension)

Example 85 with FlowLayout

use of java.awt.FlowLayout in project lombok by rzwitserloot.

the class InstallerGUI method doUninstall.

private void doUninstall() {
    JPanel spinner = new JPanel();
    spinner.setOpaque(true);
    spinner.setLayout(new FlowLayout());
    spinner.add(new JLabel(new ImageIcon(Installer.class.getResource("/lombok/installer/loading.gif"))));
    final Container originalContentPane = appWindow.getContentPane();
    appWindow.setContentPane(spinner);
    final AtomicInteger successes = new AtomicInteger();
    new Thread(new Runnable() {

        @Override
        public void run() {
            for (IdeLocation loc : toUninstall) {
                try {
                    loc.uninstall();
                    successes.incrementAndGet();
                } catch (final UninstallException e) {
                    if (e.isWarning()) {
                        try {
                            SwingUtilities.invokeAndWait(new Runnable() {

                                @Override
                                public void run() {
                                    JOptionPane.showMessageDialog(appWindow, e.getMessage(), "Uninstall Problem", JOptionPane.WARNING_MESSAGE);
                                }
                            });
                        } catch (Exception e2) {
                            e2.printStackTrace();
                            //Shouldn't happen.
                            throw new RuntimeException(e2);
                        }
                    } else {
                        try {
                            SwingUtilities.invokeAndWait(new Runnable() {

                                @Override
                                public void run() {
                                    JOptionPane.showMessageDialog(appWindow, e.getMessage(), "Uninstall Problem", JOptionPane.ERROR_MESSAGE);
                                }
                            });
                        } catch (Exception e2) {
                            e2.printStackTrace();
                            //Shouldn't happen.
                            throw new RuntimeException(e2);
                        }
                    }
                }
            }
            SwingUtilities.invokeLater(new Runnable() {

                @Override
                public void run() {
                    if (successes.get() > 0) {
                        JOptionPane.showMessageDialog(appWindow, "Lombok has been removed from the selected IDE installations.", "Uninstall successful", JOptionPane.INFORMATION_MESSAGE);
                        appWindow.setVisible(false);
                        System.exit(0);
                        return;
                    }
                    appWindow.setContentPane(originalContentPane);
                }
            });
        }
    }).start();
}
Also used : JPanel(javax.swing.JPanel) ImageIcon(javax.swing.ImageIcon) FlowLayout(java.awt.FlowLayout) JLabel(javax.swing.JLabel) Container(java.awt.Container) AtomicInteger(java.util.concurrent.atomic.AtomicInteger)

Aggregations

FlowLayout (java.awt.FlowLayout)400 JPanel (javax.swing.JPanel)338 JLabel (javax.swing.JLabel)189 JButton (javax.swing.JButton)161 ActionEvent (java.awt.event.ActionEvent)134 BoxLayout (javax.swing.BoxLayout)129 BorderLayout (java.awt.BorderLayout)118 ActionListener (java.awt.event.ActionListener)113 Dimension (java.awt.Dimension)95 JScrollPane (javax.swing.JScrollPane)94 Container (java.awt.Container)49 GridBagLayout (java.awt.GridBagLayout)42 JTextField (javax.swing.JTextField)41 Insets (java.awt.Insets)39 GridBagConstraints (java.awt.GridBagConstraints)38 ButtonGroup (javax.swing.ButtonGroup)38 JCheckBox (javax.swing.JCheckBox)35 JTable (javax.swing.JTable)32 JmriJFrame (jmri.util.JmriJFrame)30 JSeparator (javax.swing.JSeparator)24