List of usage examples for javafx.beans.property SimpleStringProperty getValueSafe
public final String getValueSafe()
From source file:de.ks.idnadrev.information.chart.ChartDataEditor.java
public ChartData getData() { ChartData data = new ChartData(); this.rows.forEach(r -> { data.getCategories().add(r.getCategory().getValueSafe()); });// ww w . j av a 2 s . c om for (int i = 0; i < columnHeaders.size(); i++) { SimpleStringProperty header = columnHeaders.get(i); LinkedList<Double> values = new LinkedList<>(); for (int rowNum = 0; rowNum < rows.size(); rowNum++) { ChartRow row = rows.get(rowNum); if (row.getCategory().getValueSafe().trim().isEmpty()) { continue; } SimpleStringProperty value = row.getValue(i); if (value != null && !value.getValueSafe().trim().isEmpty()) { double val = Double.parseDouble(value.getValueSafe()); values.add(val); } else { values.add(0d); } } data.addSeries(header.getValueSafe(), values); } data.setXAxisTitle(xaxisTitle.getText()); return data; }