Examples of PowerTableModel


Examples of org.apache.jmeter.gui.util.PowerTableModel

  {
    JPanel panel = new JPanel(new BorderLayout());
    panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),
        JMeterUtils.getResString("patterns_to_exclude")));
    excludeTable = new JTable();
    excludeModel = new PowerTableModel(new String[]{EXCLUDE_COL},
          new Class[]{String.class});
    JScrollPane scroller = new JScrollPane(excludeTable);
    scroller.setBackground(panel.getBackground());
    excludeTable.setModel(excludeModel);
    addExclude = new JButton(JMeterUtils.getResString("add"));
View Full Code Here

Examples of org.apache.jmeter.gui.util.PowerTableModel

        paramPanel.add(makeButtonPanel(), BorderLayout.SOUTH);
        return paramPanel;
    }

    protected void initTableModel() {
        tableModel = new PowerTableModel(new String[] { NAME_COL_RESOURCE, // $NON-NLS-1$
                getUserColName(numUserColumns) }, new Class[] { String.class, String.class });
    }
View Full Code Here

Examples of org.apache.jmeter.gui.util.PowerTableModel

     * Create a GUI panel containing the table of configuration parameters.
     *
     * @return a GUI panel containing the parameter table
     */
    private Component createTablePanel() {
        tableModel = new PowerTableModel(
                new String[] { COLUMN_NAMES_0, COLUMN_NAMES_1 },
                new Class[] { String.class, String.class });

        table = new JTable(tableModel);
        table.getTableHeader().setDefaultRenderer(new HeaderAsPropertyRenderer());
View Full Code Here

Examples of org.apache.jmeter.gui.util.PowerTableModel

    /**
     * Shows the main cookie configuration panel.
     */
    private void init() {
        tableModel = new PowerTableModel(COLUMN_RESOURCE_NAMES, columnClasses);
        clearEachIteration =
            new JCheckBox(JMeterUtils.getResString("clear_cookies_per_iter"), false); //$NON-NLS-1$
        policy = new JLabeledChoice(
                JMeterUtils.getResString("cookie_manager_policy"), //$NON-NLS-1$
                policies);
View Full Code Here

Examples of org.apache.jmeter.gui.util.PowerTableModel

     * @param table {@link JTable}
     */
    protected void addSuggestedExcludes(JTable table) {
        GuiUtils.stopTableEditing(table);
        int rowCount = table.getRowCount();
        PowerTableModel model = null;
        String[] exclusions = SUGGESTED_EXCLUSIONS.split(";"); // $NON-NLS-1$
        if (exclusions.length>0) {
            model = (PowerTableModel) table.getModel();
            if(model != null) {
                for (String clipboardLine : exclusions) {
                    model.addRow(new Object[] {clipboardLine});
                }
                if (table.getRowCount() > rowCount) {
                    // Highlight (select) the appropriate rows.
                    int rowToSelect = model.getRowCount() - 1;
                    table.setRowSelectionInterval(rowCount, rowToSelect);
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.jmeter.gui.util.PowerTableModel

     * @param table {@link JTable}
     */
    protected void addFromClipboard(JTable table) {
        GuiUtils.stopTableEditing(table);
        int rowCount = table.getRowCount();
        PowerTableModel model = null;
        try {
            String clipboardContent = GuiUtils.getPastedText();
            if (clipboardContent != null) {
                String[] clipboardLines = clipboardContent.split(NEW_LINE);
                for (String clipboardLine : clipboardLines) {
                    model = (PowerTableModel) table.getModel();
                    model.addRow(new Object[] {clipboardLine});
                }
                if (table.getRowCount() > rowCount) {
                    if(model != null) {
                        // Highlight (select) the appropriate rows.
                        int rowToSelect = model.getRowCount() - 1;
                        table.setRowSelectionInterval(rowCount, rowToSelect);
                    }
                }
            }
        } catch (IOException ioe) {
View Full Code Here

Examples of org.apache.jmeter.gui.util.PowerTableModel

        return panel;
    }

    private JPanel createIncludePanel() {
        includeModel = new PowerTableModel(new String[] { INCLUDE_COL }, new Class[] { String.class });
        includeTable = new JTable(includeModel);
        includeTable.getTableHeader().setDefaultRenderer(new HeaderAsPropertyRenderer());
        includeTable.setPreferredScrollableViewportSize(new Dimension(100, 30));

        JPanel panel = new JPanel(new BorderLayout());
View Full Code Here

Examples of org.apache.jmeter.gui.util.PowerTableModel

        return panel;
    }

    private JPanel createExcludePanel() {
        excludeModel = new PowerTableModel(new String[] { EXCLUDE_COL }, new Class[] { String.class });
        excludeTable = new JTable(excludeModel);
        excludeTable.getTableHeader().setDefaultRenderer(new HeaderAsPropertyRenderer());
        excludeTable.setPreferredScrollableViewportSize(new Dimension(100, 30));

        JPanel panel = new JPanel(new BorderLayout());
View Full Code Here

Examples of org.apache.jmeter.gui.util.PowerTableModel

     * test against.
     *
     * @return a new panel for adding string patterns
     */
    private JPanel createStringPanel() {
        tableModel = new PowerTableModel(new String[] { COL_RESOURCE_NAME }, new Class[] { String.class });
        stringTable = new JTable(tableModel);
        stringTable.getTableHeader().setDefaultRenderer(new HeaderAsPropertyRenderer());

        TextAreaCellRenderer renderer = new TextAreaCellRenderer();
        stringTable.setRowHeight(renderer.getPreferredHeight());
View Full Code Here

Examples of org.apache.jmeter.gui.util.PowerTableModel

  /**
   * Shows the main cookie configuration panel.
   */
  private void init() {
        tableModel = new PowerTableModel(columnNames, columnClasses);
        clearEachIteration = new JCheckBox(JMeterUtils.getResString(clearEachIterationLabel), false);
        policy = new JLabeledChoice(
                JMeterUtils.getResString("cookie_manager_policy"), //$NON-NLS-1$
                policies);
        policy.setText(CookieManager.DEFAULT_POLICY);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.