@Test public void testConfigure() { System.out.println("configure"); UltimateThreadGroup tg = new UltimateThreadGroup(); tg.setData(getTestData()); UltimateThreadGroupGui instance = new UltimateThreadGroupGui(); instance.configure(tg); assertEquals(3, instance.tableModel.getRowCount()); assertEquals(3, instance.grid.getRowCount()); }
@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(); }
UltimateThreadGroupGui extends AbstractThreadGroupGui implements TableModelListener,
        CellEditorListener { @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(); } }
UltimateThreadGroupGui extends AbstractThreadGroupGui implements TableModelListener,
        CellEditorListener { @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(); } UltimateThreadGroupGui(); }
UltimateThreadGroupGui extends AbstractThreadGroupGui implements TableModelListener,
        CellEditorListener { @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(); } UltimateThreadGroupGui(); @Override String getLabelResource(); @Override String getStaticLabel(); @Override TestElement createTestElement(); @Override void modifyTestElement(TestElement tg); @Override void configure(TestElement tg); @Override void updateUI(); void tableChanged(TableModelEvent e); void editingStopped(ChangeEvent e); void editingCanceled(ChangeEvent e); @Override void clearGui(); }
UltimateThreadGroupGui extends AbstractThreadGroupGui implements TableModelListener,
        CellEditorListener { @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(); } UltimateThreadGroupGui(); @Override String getLabelResource(); @Override String getStaticLabel(); @Override TestElement createTestElement(); @Override void modifyTestElement(TestElement tg); @Override void configure(TestElement tg); @Override void updateUI(); void tableChanged(TableModelEvent e); void editingStopped(ChangeEvent e); void editingCanceled(ChangeEvent e); @Override void clearGui(); static final String WIKIPAGE; static final String[] columnIdentifiers; static final Class[] columnClasses; static final Integer[] defaultValues; }