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);
}
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();
}
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;
}
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;
}
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;
}
Aggregations