@Test public void testConfigure() { System.out.println("configure"); VariableThroughputTimer tg = new VariableThroughputTimer(); CollectionProperty rows = JMeterPluginsUtils.tableModelRowsToCollectionProperty(dataModel, VariableThroughputTimer.DATA_PROPERTY); tg.setData(rows); VariableThroughputTimerGui instance = new VariableThroughputTimerGui(); instance.configure(tg); Assert.assertEquals(4, instance.tableModel.getRowCount()); Assert.assertEquals(4, instance.grid.getRowCount()); }
@Override public void configure(TestElement tg) { 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(); }
VariableThroughputTimerGui extends AbstractTimerGui implements TableModelListener,
        CellEditorListener { @Override public void configure(TestElement tg) { 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(); } }
VariableThroughputTimerGui extends AbstractTimerGui implements TableModelListener,
        CellEditorListener { @Override public void configure(TestElement tg) { 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(); } VariableThroughputTimerGui(); }
VariableThroughputTimerGui extends AbstractTimerGui implements TableModelListener,
        CellEditorListener { @Override public void configure(TestElement tg) { 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(); } VariableThroughputTimerGui(); @Override String getLabelResource(); @Override String getStaticLabel(); @Override TestElement createTestElement(); @Override void modifyTestElement(TestElement tg); @Override void configure(TestElement tg); @Override void updateUI(); @Override void editingStopped(ChangeEvent e); @Override void editingCanceled(ChangeEvent e); @Override void clearGui(); @Override void tableChanged(TableModelEvent e); }
VariableThroughputTimerGui extends AbstractTimerGui implements TableModelListener,
        CellEditorListener { @Override public void configure(TestElement tg) { 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(); } VariableThroughputTimerGui(); @Override String getLabelResource(); @Override String getStaticLabel(); @Override TestElement createTestElement(); @Override void modifyTestElement(TestElement tg); @Override void configure(TestElement tg); @Override void updateUI(); @Override void editingStopped(ChangeEvent e); @Override void editingCanceled(ChangeEvent e); @Override void clearGui(); @Override void tableChanged(TableModelEvent e); static final String WIKIPAGE; }