protected void initializeTableModel() { tableModel = new ObjectTableModel(new String[] { JMeterUtils.getResString(LABEL_LIBRARY) }, new Functor[0] , new Functor[0] , // i.e. bypass the Functors new Class[] { String.class }); }
void initializeModel() { Object hdrs = descriptor.getValue(HEADERS); if (!(hdrs instanceof String[])) { throw new RuntimeException("attribute HEADERS must be a String array"); } if (clazz == String.class) { model = new ObjectTableModel((String[]) hdrs, new Functor[0], new Functor[0], new Class[]{String.class}); } else { Object value = descriptor.getValue(OBJECT_PROPERTIES); if (!(value instanceof String[])) { throw new RuntimeException("attribute OBJECT_PROPERTIES must be a String array"); } List<String> props = Arrays.stream((String[]) value) .map(StringUtils::capitalize) .collect(Collectors.toList()); Functor[] writers = createWriters(props); Functor[] readers = createReaders(clazz, props); Class<?>[] editors = getArgsForWriter(clazz, props); model = new ObjectTableModel((String[]) hdrs, readers, writers, editors); } model.addTableModelListener(this); table = new JTable(model); JMeterUtils.applyHiDPI(table); table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); table.addFocusListener(this); }
/** * @return JPanel Arguments Panel */ private JPanel makeArgumentsPanel() { argsPanel = new ArgumentsPanel(JMeterUtils.getResString("arguments_panel_title"), null, true, false , // $NON-NLS-1$ new ObjectTableModel(new String[] { ArgumentsPanel.COLUMN_RESOURCE_NAMES_1 }, Argument.class, new Functor[] { new Functor("getValue") }, // $NON-NLS-1$ new Functor[] { new Functor("setValue") }, // $NON-NLS-1$ new Class[] {String.class })); return argsPanel; }
public SamplerResultTab() { // create tables resultModel = new ObjectTableModel(COLUMNS_RESULT, RowResult.class, // The object used for each row new Functor[] { new Functor("getKey"), // $NON-NLS-1$ new Functor("getValue") }, // $NON-NLS-1$ new Functor[] { null, null }, new Class[] { String.class, String.class }, false); resHeadersModel = new ObjectTableModel(COLUMNS_HEADERS, RowResult.class, // The object used for each row new Functor[] { new Functor("getKey"), // $NON-NLS-1$ new Functor("getValue") }, // $NON-NLS-1$ new Functor[] { null, null }, new Class[] { String.class, String.class }, false); resFieldsModel = new ObjectTableModel(COLUMNS_FIELDS, RowResult.class, // The object used for each row new Functor[] { new Functor("getKey"), // $NON-NLS-1$ new Functor("getValue") }, // $NON-NLS-1$ new Functor[] { null, null }, new Class[] { String.class, String.class }, false); }
/** * Pane to view HTTP request sample in view results tree */ public RequestViewHTTP() { requestModel = new ObjectTableModel(COLUMNS_REQUEST, RowResult.class, // The object used for each row new Functor[] { new Functor("getKey"), // $NON-NLS-1$ new Functor("getValue") }, // $NON-NLS-1$ new Functor[] { null, null }, new Class[] { String.class, String.class }, false); paramsModel = new ObjectTableModel(COLUMNS_PARAMS, RowResult.class, // The object used for each row new Functor[] { new Functor("getKey"), // $NON-NLS-1$ new Functor("getValue") }, // $NON-NLS-1$ new Functor[] { null, null }, new Class[] { String.class, String.class }, false); headersModel = new ObjectTableModel(COLUMNS_HEADERS, RowResult.class, // The object used for each row new Functor[] { new Functor("getKey"), // $NON-NLS-1$ new Functor("getValue") }, // $NON-NLS-1$ new Functor[] { null, null }, new Class[] { String.class, String.class }, false); }
private void initializeTableModel() { tableModel = new ObjectTableModel(new String[] { COLUMN_NAMES_0, COLUMN_NAMES_1 }, new Functor[] { new Functor(Map.Entry.class, "getKey"), // $NON-NLS-1$ new Functor(Map.Entry.class, "getValue") // $NON-NLS-1$ }, new Functor[] { null, // $NON-NLS-1$ new Functor(Map.Entry.class,"setValue", new Class[] { Object.class }) // $NON-NLS-1$ }, new Class[] { String.class, String.class }); } }
/** * Initialize the table model used for the arguments table. */ private void initializeTableModel() { tableModel = new ObjectTableModel(new String[] { COLUMN_NAMES[0], COLUMN_NAMES[1], COLUMN_NAMES[2] }, LDAPArgument.class, new Functor[] { new Functor("getName"), new Functor("getValue"), new Functor("getOpcode") }, new Functor[] { new Functor("setName"), new Functor("setValue"), new Functor("setOpcode") }, new Class[] { String.class, String.class, String.class }); }
/** * Initialize the table model used for the http files table. */ private void initializeTableModel() { tableModel = new ObjectTableModel(new String[] { FILEPATH, PARAMNAME, MIMETYPE}, HTTPFileArg.class, new Functor[] { new Functor("getPath"), //$NON-NLS-1$ new Functor("getParamName"), //$NON-NLS-1$ new Functor("getMimeType")}, //$NON-NLS-1$ new Functor[] { new Functor("setPath"), //$NON-NLS-1$ new Functor("setParamName"), //$NON-NLS-1$ new Functor("setMimeType")}, //$NON-NLS-1$ new Class[] {String.class, String.class, String.class}); }
public AggregateReportGui() { super(); statModel = new ObjectTableModel(COLUMNS, SamplingStatCalculator.class, new Functor[]{ new Functor("getLabel"), new Functor("getCount"), new Functor("getMeanAsNumber"), new Functor("getMedian"), new Functor("getPercentPoint", new Object[]{new Float(.900)}), new Functor("getMin"), new Functor("getMax"), new Functor("getErrorPercentage"), new Functor("getRate"), new Functor("getKBPerSecond"), new Functor("getStandardDeviation"),}, new Functor[]{null, null, null, null, null, null, null, null, null, null, null}, new Class[]{String.class, Long.class, Long.class, Long.class, Long.class, Long.class, Long.class, String.class, String.class, String.class, String.class}); clearData(); init(); }
/** * Initialize the table model used for the arguments table. */ protected void initializeTableModel() { if (tableModel == null) { if(standalone) { tableModel = new ObjectTableModel(new String[] { COLUMN_RESOURCE_NAMES_0, COLUMN_RESOURCE_NAMES_1, COLUMN_RESOURCE_NAMES_2 }, Argument.class, new Functor[] { new Functor("getName"), // $NON-NLS-1$ new Functor("getValue"), // $NON-NLS-1$ new Functor("getDescription") }, // $NON-NLS-1$ new Functor[] { new Functor("setName"), // $NON-NLS-1$ new Functor("setValue"), // $NON-NLS-1$ new Functor("setDescription") }, // $NON-NLS-1$ new Class[] { String.class, String.class, String.class }); } else { tableModel = new ObjectTableModel(new String[] { COLUMN_RESOURCE_NAMES_0, COLUMN_RESOURCE_NAMES_1 }, Argument.class, new Functor[] { new Functor("getName"), // $NON-NLS-1$ new Functor("getValue") }, // $NON-NLS-1$ new Functor[] { new Functor("setName"), // $NON-NLS-1$ new Functor("setValue") }, // $NON-NLS-1$ new Class[] { String.class, String.class }); } } }
public SummaryReport() { super(); model = new ObjectTableModel(COLUMNS, Calculator.class,// All rows have this class new Functor[] {
private void initializeTableModel() ObjectTableModel model = new ObjectTableModel(new String[]
private void initializeTableModel() ObjectTableModel model = new ObjectTableModel(new String[]
@Override protected void initializeTableModel() { tableModel = new ObjectTableModel(new String[] { ArgumentsPanel.COLUMN_RESOURCE_NAMES_0, ArgumentsPanel.COLUMN_RESOURCE_NAMES_1, ENCODE_OR_NOT, CONTENT_TYPE, INCLUDE_EQUALS }, HTTPArgument.class, new Functor[] { new Functor("getName"), //$NON-NLS-1$ new Functor("getValue"), //$NON-NLS-1$ new Functor("isAlwaysEncoded"), //$NON-NLS-1$ new Functor("getContentType"), //$NON-NLS-1$ new Functor("isUseEquals") }, //$NON-NLS-1$ new Functor[] { new Functor("setName"), //$NON-NLS-1$ new Functor("setValue"), //$NON-NLS-1$ new Functor("setAlwaysEncoded"), //$NON-NLS-1$ new Functor("setContentType"), new Functor("setUseEquals")}, //$NON-NLS-1$ new Class[] {String.class, String.class, Boolean.class, String.class, Boolean.class }); }
/** * Constructor for the TableVisualizer object. */ public TableVisualizer() { super(); model = new ObjectTableModel(COLUMNS, TableSample.class, // The object used for each row new Functor[] { new Functor("getSampleNumberString"), // $NON-NLS-1$ new Functor("getStartTimeFormatted", // $NON-NLS-1$ new Object[]{format}), new Functor("getThreadName"), // $NON-NLS-1$ new Functor("getLabel"), // $NON-NLS-1$ new Functor("getElapsed"), // $NON-NLS-1$ new SampleSuccessFunctor("isSuccess"), // $NON-NLS-1$ new Functor("getBytes"), // $NON-NLS-1$ new Functor("getSentBytes"), // $NON-NLS-1$ new Functor("getLatency"), // $NON-NLS-1$ new Functor("getConnectTime") }, // $NON-NLS-1$ new Functor[] { null, null, null, null, null, null, null, null, null, null }, new Class[] { String.class, String.class, String.class, String.class, Long.class, ImageIcon.class, Long.class, Long.class, Long.class, Long.class }); init(); }
/** * Creates that Table model * * @return ObjectTableModel */ static ObjectTableModel createObjectTableModel() { return new ObjectTableModel(COLUMNS, SamplingStatCalculator.class, new Functor[]{ new Functor("getLabel"), new Functor("getCount"), new Functor("getMeanAsNumber"), new Functor("getMin"), new Functor("getMax"), new Functor("getPercentPoint", new Object[]{pct1Value}), new Functor("getStandardDeviation"), new Functor("getErrorPercentage"), new Functor("getRate"), new Functor("getKBPerSecond"), new Functor("getAvgPageBytes"), }, new Functor[]{null, null, null, null, null, null, null, null, null, null, null}, new Class[]{String.class, Long.class, Long.class, Long.class, Long.class, Long.class, String.class, String.class, String.class, String.class, String.class}); }
/** * Creates that Table model * * @return ObjectTableModel */ static ObjectTableModel createObjectTableModel() { return new ObjectTableModel(COLUMNS, SamplingStatCalculator.class, new Functor[]{ new Functor("getLabel"), new Functor("getCount"), new Functor("getMeanAsNumber"), new Functor("getMin"), new Functor("getMax"), new Functor("getPercentPoint", new Object[]{pct1Value}), new Functor("getStandardDeviation"), new Functor("getErrorPercentage"), new Functor("getRate"), new Functor("getKBPerSecond"), new Functor("getAvgPageBytes"), }, new Functor[]{null, null, null, null, null, null, null, null, null, null, null}, new Class[]{String.class, Long.class, Long.class, Long.class, Long.class, Long.class, String.class, String.class, String.class, String.class, String.class}); }
/** * Creates that Table model * @return ObjectTableModel */ static ObjectTableModel createObjectTableModel() { return new ObjectTableModel(getLabels(COLUMNS), SamplingStatCalculator.class, new Functor[] { new Functor("getLabel"), //$NON-NLS-1$ new Functor("getCount"), //$NON-NLS-1$ new Functor("getMeanAsNumber"), //$NON-NLS-1$ new Functor("getMedian"), //$NON-NLS-1$ new Functor("getPercentPoint", //$NON-NLS-1$ new Object[] { PCT1_VALUE }), new Functor("getPercentPoint", //$NON-NLS-1$ new Object[] { PCT2_VALUE }), new Functor("getPercentPoint", //$NON-NLS-1$ new Object[] { PCT3_VALUE }), new Functor("getMin"), //$NON-NLS-1$ new Functor("getMax"), //$NON-NLS-1$ new Functor("getErrorPercentage"), //$NON-NLS-1$ new Functor("getRate"), //$NON-NLS-1$ new Functor("getKBPerSecond"), //$NON-NLS-1$ new Functor("getSentKBPerSecond") }, //$NON-NLS-1$ new Functor[] { null, null, null, null, null, null, null, null, null, null, null, null, null }, new Class[] { String.class, Long.class, Long.class, Long.class, Long.class, Long.class, Long.class, Long.class, Long.class, Double.class, Double.class, Double.class, Double.class}); }
public AggregateReportGui() { super(); statModel = new ObjectTableModel(getLabels(COLUMNS), SamplingStatCalculator.class, new Functor[]{ new Functor("getLabel"), new Functor("getCount"), new Functor("getMeanAsNumber"), new Functor("getMedian"), new Functor("getPercentPoint", new Object[]{PCT1_VALUE}), new Functor("getPercentPoint", new Object[]{PCT2_VALUE}), new Functor("getPercentPoint", new Object[]{PCT3_VALUE}), new Functor("getMin"), new Functor("getMax"), new Functor("getErrorPercentage"), new Functor("getRate"), new Functor("getKBPerSecond"), new Functor("getStandardDeviation"),}, new Functor[]{null, null, null, null, null, null, null, null, null, null, null}, new Class[]{String.class, Long.class, Long.class, Long.class, Long.class, Long.class, Long.class, String.class, String.class, String.class, String.class}); clearData(); init(); }