Package org.apache.jmeter.gui.util

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(";");
        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


     * @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("\n");
                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

        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

        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

     * @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.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
View Full Code Here

     * 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

        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

    /**
     * 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

   
    return panel;
  }

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

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

    return panel;
  }

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

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

TOP

Related Classes of org.apache.jmeter.gui.util.PowerTableModel

Copyright © 2018 www.massapicom. 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.