use of org.apache.jmeter.gui.util.HeaderAsPropertyRenderer in project jmeter by apache.
the class RequestViewHTTP method createRequestPane.
/**
* Create a pane with three tables (request, params, headers)
*
* @return Pane to display request data
*/
private Component createRequestPane() {
// Set up the 1st table Result with empty headers
tableRequest = new JTable(requestModel);
JMeterUtils.applyHiDPI(tableRequest);
// $NON-NLS-1$
tableRequest.setToolTipText(JMeterUtils.getResString("textbox_tooltip_cell"));
tableRequest.addMouseListener(new TextBoxDoubleClick(tableRequest));
setFirstColumnPreferredAndMaxWidth(tableRequest);
RendererUtils.applyRenderers(tableRequest, RENDERERS_REQUEST);
// Set up the 2nd table
tableParams = new JTable(paramsModel);
JMeterUtils.applyHiDPI(tableParams);
// $NON-NLS-1$
tableParams.setToolTipText(JMeterUtils.getResString("textbox_tooltip_cell"));
tableParams.addMouseListener(new TextBoxDoubleClick(tableParams));
TableColumn column = tableParams.getColumnModel().getColumn(0);
column.setPreferredWidth(160);
tableParams.getTableHeader().setDefaultRenderer(new HeaderAsPropertyRenderer());
RendererUtils.applyRenderers(tableParams, RENDERERS_PARAMS);
// Set up the 3rd table
tableHeaders = new JTable(headersModel);
JMeterUtils.applyHiDPI(tableHeaders);
// $NON-NLS-1$
tableHeaders.setToolTipText(JMeterUtils.getResString("textbox_tooltip_cell"));
tableHeaders.addMouseListener(new TextBoxDoubleClick(tableHeaders));
setFirstColumnPreferredAndMaxWidth(tableHeaders);
tableHeaders.getTableHeader().setDefaultRenderer(new HeaderAsPropertyRenderer());
RendererUtils.applyRenderers(tableHeaders, RENDERERS_HEADERS);
// Create the split pane
JSplitPane topSplit = new JSplitPane(JSplitPane.VERTICAL_SPLIT, GuiUtils.makeScrollPane(tableParams), GuiUtils.makeScrollPane(tableHeaders));
topSplit.setOneTouchExpandable(true);
// set split ratio
topSplit.setResizeWeight(0.50);
// see bug jdk 4131528
topSplit.setBorder(null);
JSplitPane paneParsed = new JSplitPane(JSplitPane.VERTICAL_SPLIT, GuiUtils.makeScrollPane(tableRequest), topSplit);
paneParsed.setOneTouchExpandable(true);
// set split ratio (only 5 lines to display)
paneParsed.setResizeWeight(0.25);
// see bug jdk 4131528
paneParsed.setBorder(null);
// Hint to background color on bottom tabs (grey, not blue)
JPanel panel = new JPanel(new BorderLayout());
panel.add(paneParsed);
return panel;
}
use of org.apache.jmeter.gui.util.HeaderAsPropertyRenderer in project jmeter by apache.
the class ProxyControlGui method createExcludePanel.
private JPanel createExcludePanel() {
excludeModel = new PowerTableModel(new String[] { EXCLUDE_COL }, new Class[] { String.class });
excludeTable = new JTable(excludeModel);
JMeterUtils.applyHiDPI(excludeTable);
excludeTable.getTableHeader().setDefaultRenderer(new HeaderAsPropertyRenderer());
excludeTable.setPreferredScrollableViewportSize(new Dimension(80, 80));
JPanel panel = new JPanel(new BorderLayout());
panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString(// $NON-NLS-1$
"patterns_to_exclude")));
panel.add(new JScrollPane(excludeTable), BorderLayout.CENTER);
panel.add(createTableButtonPanel(ADD_EXCLUDE, DELETE_EXCLUDE, ADD_TO_EXCLUDE_FROM_CLIPBOARD, ADD_SUGGESTED_EXCLUDES), BorderLayout.SOUTH);
return panel;
}
use of org.apache.jmeter.gui.util.HeaderAsPropertyRenderer in project jmeter by apache.
the class HTTPFileArgsPanel method makeMainPanel.
/**
* Create the main GUI panel which contains the file table.
*
* @return the main GUI panel
*/
private Component makeMainPanel() {
initializeTableModel();
table = new JTable(tableModel);
JMeterUtils.applyHiDPI(table);
table.getTableHeader().setDefaultRenderer(new HeaderAsPropertyRenderer());
table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
return makeScrollPane(table);
}
use of org.apache.jmeter.gui.util.HeaderAsPropertyRenderer in project jmeter by apache.
the class JMSPropertiesPanel method createPropertiesPanel.
public JPanel createPropertiesPanel() {
// create the JTable that holds JMSProperty per row
jmsPropertiesTable = new JTable(tableModel);
JMeterUtils.applyHiDPI(jmsPropertiesTable);
jmsPropertiesTable.getTableHeader().setDefaultRenderer(new HeaderAsPropertyRenderer());
jmsPropertiesTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
jmsPropertiesTable.setPreferredScrollableViewportSize(new Dimension(100, 70));
TableColumn mechanismColumn = jmsPropertiesTable.getColumnModel().getColumn(COL_TYPE);
mechanismColumn.setCellEditor(new TypeCellEditor());
JPanel panel = new JPanel(new BorderLayout(0, 5));
panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), //$NON-NLS-1$
JMeterUtils.getResString("jms_props")));
panel.add(new JScrollPane(jmsPropertiesTable));
panel.add(createButtonPanel(), BorderLayout.SOUTH);
return panel;
}
use of org.apache.jmeter.gui.util.HeaderAsPropertyRenderer in project jmeter by apache.
the class ProxyControlGui method createIncludePanel.
private JPanel createIncludePanel() {
includeModel = new PowerTableModel(new String[] { INCLUDE_COL }, new Class[] { String.class });
includeTable = new JTable(includeModel);
JMeterUtils.applyHiDPI(includeTable);
includeTable.getTableHeader().setDefaultRenderer(new HeaderAsPropertyRenderer());
includeTable.setPreferredScrollableViewportSize(new Dimension(80, 80));
JPanel panel = new JPanel(new BorderLayout());
panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString(// $NON-NLS-1$
"patterns_to_include")));
panel.add(new JScrollPane(includeTable), BorderLayout.CENTER);
panel.add(createTableButtonPanel(ADD_INCLUDE, DELETE_INCLUDE, ADD_TO_INCLUDE_FROM_CLIPBOARD, null), BorderLayout.SOUTH);
return panel;
}
Aggregations