Java Code Examples for kg.apc.jmeter.JMeterPluginsUtils#collectionPropertyToTableModelRows()

The following examples show how to use kg.apc.jmeter.JMeterPluginsUtils#collectionPropertyToTableModelRows() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FirefoxDriverConfigGui.java    From jmeter-plugins-webdriver with Apache License 2.0 6 votes vote down vote up
@Override
public void configure(TestElement element) {
    super.configure(element);
    if (element instanceof FirefoxDriverConfig) {
        FirefoxDriverConfig config = (FirefoxDriverConfig) element;
        userAgentOverrideCheckbox.setSelected(config.isUserAgentOverridden());
        userAgentOverrideText.setText(config.getUserAgentOverride());
        userAgentOverrideText.setEnabled(config.isUserAgentOverridden());

        JMeterProperty ext = config.getExtensions();
        if (!(ext instanceof NullProperty)) {
            JMeterPluginsUtils.collectionPropertyToTableModelRows((CollectionProperty) ext, extensions.getModel());
        }

        JMeterProperty pref = config.getPreferences();
        if (!(ext instanceof NullProperty)) {
            JMeterPluginsUtils.collectionPropertyToTableModelRows((CollectionProperty) pref, preferences.getModel());
        }
    }
}
 
Example 2
Source File: ParallelHTTPSamplerGui.java    From jmeter-bzm-plugins with Apache License 2.0 6 votes vote down vote up
@Override
public void configure(TestElement tg) {
    super.configure(tg);
    ParallelHTTPSampler utg = (ParallelHTTPSampler) tg;
    JMeterProperty threadValues = utg.getData();
    if (threadValues instanceof NullProperty) {
        log.warn("Received null property instead of collection");
        return;
    }

    CollectionProperty columns = (CollectionProperty) threadValues;

    tableModel.removeTableModelListener(this);
    JMeterPluginsUtils.collectionPropertyToTableModelRows(columns, tableModel);
    tableModel.addTableModelListener(this);
    buttons.checkDeleteButtonStatus();
    updateUI();
}
 
Example 3
Source File: WeightedSwitchControllerGui.java    From jmeter-bzm-plugins with Apache License 2.0 6 votes vote down vote up
@Override
public void configure(TestElement element) {
    // from model to GUI
    super.configure(element);
    log.debug("Props: " + this.isShowing() + " " + isVisible() + " " + isEnabled() + " " + isFocusOwner());
    GuiPackage gp = GuiPackage.getInstance();

    if (gp != null && element instanceof WeightedSwitchController) {
        WeightedSwitchController wsc = (WeightedSwitchController) element;
        CollectionProperty oldData = wsc.getData();

        grid.getModel().clearData();
        isRandomChoiceCheckBox.setSelected(wsc.isRandomChoice());
        if (isShowing()) {
            fillGridFromTree(wsc, oldData);
        } else {
            JMeterPluginsUtils.collectionPropertyToTableModelRows(oldData, grid.getModel());
        }
    }
}
 
Example 4
Source File: MergeResultsGui.java    From jmeter-plugins with Apache License 2.0 6 votes vote down vote up
@Override
public void configure(TestElement el) {
    super.configure(el);
    setFile(el.getPropertyAsString(CorrectedResultCollector.FILENAME));
    JMeterProperty fileValues = el.getProperty(DATA_PROPERTY);

    if (!(fileValues instanceof NullProperty)) {
        CollectionProperty columns = (CollectionProperty) fileValues;

        tableModel.removeTableModelListener(this);
        JMeterPluginsUtils.collectionPropertyToTableModelRows(columns,
                tableModel, columnClasses);
        tableModel.addTableModelListener(this);
        updateUI();
    } else {
        log.warn("Received null property instead of collection");
    }
    checkDeleteButtonStatus();
    checkMergeButtonStatus();

    startTimeRef = 0;
}
 
Example 5
Source File: UltimateThreadGroupGui.java    From jmeter-plugins with Apache License 2.0 6 votes vote down vote up
@Override
public void configure(TestElement tg) {
    super.configure(tg);
    UltimateThreadGroup utg = (UltimateThreadGroup) tg;
    JMeterProperty threadValues = utg.getData();
    if (!(threadValues instanceof NullProperty)) {
        CollectionProperty columns = (CollectionProperty) threadValues;

        tableModel.removeTableModelListener(this);
        JMeterPluginsUtils.collectionPropertyToTableModelRows(columns, tableModel);
        tableModel.addTableModelListener(this);
        updateUI();
    } else {
        log.warn("Received null property instead of collection");
    }

    TestElement te = (TestElement) tg.getProperty(AbstractThreadGroup.MAIN_CONTROLLER).getObjectValue();
    if (te != null) {
        loopPanel.configure(te);
    }
    buttons.checkDeleteButtonStatus();
}
 
Example 6
Source File: VariableThroughputTimerGui.java    From jmeter-plugins with Apache License 2.0 6 votes vote down vote up
@Override
public void configure(TestElement tg) {
    //log.info("Configure");
    super.configure(tg);
    VariableThroughputTimer utg = (VariableThroughputTimer) tg;
    JMeterProperty threadValues = utg.getData();
    if (threadValues instanceof NullProperty) {
        log.warn("Received null property instead of collection");
        return;
    }

    CollectionProperty columns = (CollectionProperty) threadValues;

    tableModel.removeTableModelListener(this);
    JMeterPluginsUtils.collectionPropertyToTableModelRows(columns, tableModel);
    tableModel.addTableModelListener(this);
    buttons.checkDeleteButtonStatus();
    updateUI();
}
 
Example 7
Source File: AbstractMonitoringVisualizer.java    From jmeter-plugins with Apache License 2.0 5 votes vote down vote up
@Override
public void configure(TestElement te) {
    super.configure(te);
    MonitoringResultsCollector mrc = (MonitoringResultsCollector) te;
    JMeterProperty samplerValues = mrc.getSamplerSettings();
    if (!(samplerValues instanceof NullProperty)) {
        JMeterPluginsUtils.collectionPropertyToTableModelRows((CollectionProperty) samplerValues, tableModel, getColumnClasses());
    } else {
        log.warn("Received null property instead of collection");
    }
}
 
Example 8
Source File: PageDataExtractorOverTimeGui.java    From jmeter-plugins with Apache License 2.0 5 votes vote down vote up
@Override
public void configure(TestElement te) {
    super.configure(te);
    CorrectedResultCollector rc = (CorrectedResultCollector) te;
    JMeterProperty regexpValues = rc.getProperty(REGEXPS_PROPERTY);
    if (!(regexpValues instanceof NullProperty)) {
        JMeterPluginsUtils.collectionPropertyToTableModelRows((CollectionProperty) regexpValues, tableModel, columnClasses);
        regExps = (CollectionProperty) regexpValues;
    } else {
        log.warn("Received null property instead of collection");
    }
}
 
Example 9
Source File: PerfMonGui.java    From jmeter-plugins with Apache License 2.0 5 votes vote down vote up
@Override
public void configure(TestElement te) {
    super.configure(te);
    PerfMonCollector pmte = (PerfMonCollector) te;
    JMeterProperty perfmonValues = pmte.getMetricSettings();
    if (!(perfmonValues instanceof NullProperty)) {
        JMeterPluginsUtils.collectionPropertyToTableModelRows((CollectionProperty) perfmonValues, tableModel);
    } else {
        log.warn("Received null property instead of collection");
    }
}
 
Example 10
Source File: JMXMonGui.java    From jmeter-plugins with Apache License 2.0 5 votes vote down vote up
@Override
public void configure(TestElement te) {
    super.configure(te);
    JMXMonCollector dmte = (JMXMonCollector) te;
    JMeterProperty jmxmonValues = dmte.getSamplerSettings();
    if (!(jmxmonValues instanceof NullProperty)) {
        JMeterPluginsUtils.collectionPropertyToTableModelRows((CollectionProperty) jmxmonValues, tableModel, columnClasses);
    } else {
        log.warn("Received null property instead of collection");
    }
}
 
Example 11
Source File: FreeFormLoadPanel.java    From jmeter-plugins with Apache License 2.0 5 votes vote down vote up
@Override
public void modelToUI(AbstractDynamicThreadGroup tg) {
    if (tg instanceof FreeFormArrivalsThreadGroup) {
        FreeFormArrivalsThreadGroup ffatg = (FreeFormArrivalsThreadGroup) tg;
        JMeterPluginsUtils.collectionPropertyToTableModelRows(ffatg.getData(), getModel());
    }
}
 
Example 12
Source File: DbMonGui.java    From jmeter-plugins with Apache License 2.0 5 votes vote down vote up
@Override
public void configure(TestElement te) {
    super.configure(te);
    DbMonCollector dmte = (DbMonCollector) te;
    JMeterProperty dbmonValues = dmte.getSamplerSettings();
    if (!(dbmonValues instanceof NullProperty)) {
        JMeterPluginsUtils.collectionPropertyToTableModelRows((CollectionProperty) dbmonValues, tableModel, columnClasses);
    } else {
        log.warn("Received null property instead of collection");
    }
}