Search in sources :

Example 6 with PowerTableModel

use of org.apache.jmeter.gui.util.PowerTableModel 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;
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) PowerTableModel(org.apache.jmeter.gui.util.PowerTableModel) JTable(javax.swing.JTable) HeaderAsPropertyRenderer(org.apache.jmeter.gui.util.HeaderAsPropertyRenderer) Dimension(java.awt.Dimension)

Example 7 with PowerTableModel

use of org.apache.jmeter.gui.util.PowerTableModel 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;
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) PowerTableModel(org.apache.jmeter.gui.util.PowerTableModel) JTable(javax.swing.JTable) HeaderAsPropertyRenderer(org.apache.jmeter.gui.util.HeaderAsPropertyRenderer) Dimension(java.awt.Dimension)

Example 8 with PowerTableModel

use of org.apache.jmeter.gui.util.PowerTableModel in project jmeter by apache.

the class DNSCachePanel method init.

private void init() {
    // WARNING: called from ctor so must not be overridden (i.e. must be private or final)
    dnsServersTableModel = new PowerTableModel(COLUMN_RESOURCE_NAMES, columnClasses);
    dnsHostsTableModel = new PowerTableModel(HOSTS_COLUMN_RESOURCE_NAMES, HOSTS_COLUMN_CLASSES);
    //$NON-NLS-1$
    clearEachIteration = new JCheckBox(JMeterUtils.getResString("clear_cache_each_iteration"), true);
    setLayout(new BorderLayout());
    setBorder(makeBorder());
    JPanel northPanel = new JPanel();
    northPanel.setLayout(new VerticalLayout(5, VerticalLayout.BOTH));
    northPanel.add(makeTitlePanel());
    JPanel optionsPane = new JPanel();
    // $NON-NLS-1$
    optionsPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), OPTIONS));
    optionsPane.setLayout(new VerticalLayout(5, VerticalLayout.BOTH));
    optionsPane.add(clearEachIteration, BorderLayout.WEST);
    optionsPane.add(createChooseResPanel(), BorderLayout.SOUTH);
    northPanel.add(optionsPane);
    add(northPanel, BorderLayout.NORTH);
    JPanel tables = new JPanel();
    tables.setLayout(new VerticalLayout(2, VerticalLayout.BOTH));
    dnsServersPanel = createDnsServersTablePanel();
    dnsHostsPanel = createDnsHostsTablePanel();
    tables.add(dnsServersPanel);
    tables.add(dnsHostsPanel);
    add(tables, BorderLayout.CENTER);
}
Also used : JCheckBox(javax.swing.JCheckBox) JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) PowerTableModel(org.apache.jmeter.gui.util.PowerTableModel) VerticalLayout(org.apache.jorphan.gui.layout.VerticalLayout)

Aggregations

PowerTableModel (org.apache.jmeter.gui.util.PowerTableModel)8 BorderLayout (java.awt.BorderLayout)5 JPanel (javax.swing.JPanel)5 JTable (javax.swing.JTable)4 HeaderAsPropertyRenderer (org.apache.jmeter.gui.util.HeaderAsPropertyRenderer)4 Dimension (java.awt.Dimension)3 JScrollPane (javax.swing.JScrollPane)3 JCheckBox (javax.swing.JCheckBox)2 VerticalLayout (org.apache.jorphan.gui.layout.VerticalLayout)2 FlowLayout (java.awt.FlowLayout)1 UnsupportedFlavorException (java.awt.datatransfer.UnsupportedFlavorException)1 IOException (java.io.IOException)1 TextAreaCellRenderer (org.apache.jmeter.gui.util.TextAreaCellRenderer)1 TextAreaTableCellEditor (org.apache.jmeter.gui.util.TextAreaTableCellEditor)1 HC4CookieHandler (org.apache.jmeter.protocol.http.control.HC4CookieHandler)1 JLabeledChoice (org.apache.jorphan.gui.JLabeledChoice)1