Search in sources :

Example 66 with FlowLayout

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

the class SearchTreeDialog method init.

private void init() {
    // WARNING: called from ctor so must not be overridden (i.e. must be private or final)
    this.getContentPane().setLayout(new BorderLayout(10, 10));
    //$NON-NLS-1$
    searchTF = new JLabeledTextField(JMeterUtils.getResString("search_text_field"), 20);
    if (!StringUtils.isEmpty(lastSearch)) {
        searchTF.setText(lastSearch);
    }
    //$NON-NLS-1$
    replaceTF = new JLabeledTextField(JMeterUtils.getResString("search_text_replace"), 20);
    statusLabel = new JLabel(" ");
    statusLabel.setPreferredSize(new Dimension(100, 20));
    statusLabel.setMinimumSize(new Dimension(100, 20));
    //$NON-NLS-1$
    isRegexpCB = new JCheckBox(JMeterUtils.getResString("search_text_chkbox_regexp"), false);
    //$NON-NLS-1$
    isCaseSensitiveCB = new JCheckBox(JMeterUtils.getResString("search_text_chkbox_case"), true);
    isRegexpCB.setFont(FONT_SMALL);
    isCaseSensitiveCB.setFont(FONT_SMALL);
    JPanel searchCriterionPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
    searchCriterionPanel.add(isCaseSensitiveCB);
    searchCriterionPanel.add(isRegexpCB);
    JPanel searchPanel = new JPanel();
    searchPanel.setLayout(new BoxLayout(searchPanel, BoxLayout.Y_AXIS));
    searchPanel.setBorder(BorderFactory.createEmptyBorder(7, 3, 3, 3));
    searchPanel.add(searchTF);
    searchPanel.add(replaceTF);
    searchPanel.add(statusLabel);
    JPanel buttonsPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
    //$NON-NLS-1$
    searchButton = new JButton(JMeterUtils.getResString("search"));
    searchButton.addActionListener(this);
    //$NON-NLS-1$
    searchAndExpandButton = new JButton(JMeterUtils.getResString("search_expand"));
    searchAndExpandButton.addActionListener(this);
    //$NON-NLS-1$
    replaceButton = new JButton(JMeterUtils.getResString("search_replace_all"));
    replaceButton.addActionListener(this);
    //$NON-NLS-1$
    cancelButton = new JButton(JMeterUtils.getResString("cancel"));
    cancelButton.addActionListener(this);
    buttonsPanel.add(searchButton);
    buttonsPanel.add(searchAndExpandButton);
    buttonsPanel.add(replaceButton);
    buttonsPanel.add(cancelButton);
    JPanel searchAndReplacePanel = new JPanel();
    searchAndReplacePanel.setLayout(new VerticalLayout());
    searchAndReplacePanel.add(searchPanel);
    searchAndReplacePanel.add(searchCriterionPanel);
    searchAndReplacePanel.add(buttonsPanel);
    this.getContentPane().add(searchAndReplacePanel);
    searchTF.requestFocusInWindow();
    this.pack();
    ComponentUtil.centerComponentInWindow(this);
}
Also used : JCheckBox(javax.swing.JCheckBox) JLabeledTextField(org.apache.jorphan.gui.JLabeledTextField) JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout) BorderLayout(java.awt.BorderLayout) BoxLayout(javax.swing.BoxLayout) JButton(javax.swing.JButton) JLabel(javax.swing.JLabel) VerticalLayout(org.apache.jorphan.gui.layout.VerticalLayout) Dimension(java.awt.Dimension)

Example 67 with FlowLayout

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

the class SelectTemplatesDialog method init.

private void init() {
    // WARNING: called from ctor so must not be overridden (i.e. must be private or final)
    templateList.setValues(TemplateManager.getInstance().getTemplateNames());
    templateList.addChangeListener(this);
    reloadTemplateButton.addActionListener(this);
    reloadTemplateButton.setFont(FONT_SMALL);
    this.getContentPane().setLayout(new BorderLayout(10, 0));
    JPanel templateBar = new JPanel(new BorderLayout());
    templateBar.add(templateList, BorderLayout.CENTER);
    JPanel reloadBtnBar = new JPanel();
    reloadBtnBar.add(reloadTemplateButton);
    templateBar.add(reloadBtnBar, BorderLayout.EAST);
    this.getContentPane().add(templateBar, BorderLayout.NORTH);
    //$NON-NLS-1$
    helpDoc.setContentType("text/html");
    helpDoc.setEditable(false);
    helpDoc.addHyperlinkListener(this);
    this.getContentPane().add(scroller, BorderLayout.CENTER);
    applyTemplateButton.addActionListener(this);
    cancelButton.addActionListener(this);
    // Bottom buttons bar
    JPanel actionBtnBar = new JPanel(new FlowLayout());
    actionBtnBar.add(applyTemplateButton);
    actionBtnBar.add(cancelButton);
    this.getContentPane().add(actionBtnBar, BorderLayout.SOUTH);
    this.pack();
    this.setMinimumSize(new Dimension(MINIMAL_BOX_WIDTH, MINIMAL_BOX_HEIGHT));
    // center position and 50% of screen size
    ComponentUtil.centerComponentInWindow(this, 50);
    populateTemplatePage();
}
Also used : JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout) BorderLayout(java.awt.BorderLayout) Dimension(java.awt.Dimension)

Example 68 with FlowLayout

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

the class StatGraphVisualizer 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);
    return yAxisPane;
}
Also used : JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout)

Example 69 with FlowLayout

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

the class StatGraphVisualizer method createGraphFontValuePane.

private JPanel createGraphFontValuePane() {
    JPanel fontValueStylePane = new JPanel();
    fontValueStylePane.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
    fontValueStylePane.add(//$NON-NLS-1$
    GuiUtils.createLabelCombo(//$NON-NLS-1$
    JMeterUtils.getResString("aggregate_graph_value_font"), valueFontNameList));
    // default: sans serif
    valueFontNameList.setSelectedIndex(0);
    fontValueStylePane.add(//$NON-NLS-1$
    GuiUtils.createLabelCombo(//$NON-NLS-1$
    JMeterUtils.getResString("aggregate_graph_size"), valueFontSizeList));
    // default: 10
    valueFontSizeList.setSelectedItem(StatGraphProperties.getFontSize()[2]);
    fontValueStylePane.add(//$NON-NLS-1$
    GuiUtils.createLabelCombo(//$NON-NLS-1$
    JMeterUtils.getResString("aggregate_graph_style"), valueFontStyleList));
    // default: normal //$NON-NLS-1$
    valueFontStyleList.setSelectedItem(JMeterUtils.getResString("fontstyle.normal"));
    return fontValueStylePane;
}
Also used : JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout)

Example 70 with FlowLayout

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

the class StatGraphVisualizer 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")));
    xAxisPane.add(maxLengthXAxisLabel);
    return xAxisPane;
}
Also used : JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout)

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