use of edu.uah.rsesc.aadlsimulator.ui.dialogs.ChartHelper.ChartPoint in project AGREE by loonwerks.
the class SimulatePossibilitiesChartDialog method createPoints.
private List<ChartPoint> createPoints(final Object xElementData, final Object yElementData, final Object zElementData, final Color color) {
final List<ChartPoint> chartPoints = new ArrayList<>();
for (final SimulationEngineState state : simulationEngineStates) {
final Object xElementValue = state.getElementValue(state.getNumberOfFrames() - 1, xElementData);
final Object yElementValue = state.getElementValue(state.getNumberOfFrames() - 1, yElementData);
if (xElementValue != null && yElementValue != null) {
Object zElementValue = null;
if (zElementData != null) {
zElementValue = state.getElementValue(state.getNumberOfFrames() - 1, zElementData);
}
final ChartPoint chartPoint = chartHelper.createChartPoint(simulationEngineStates.indexOf(state), color);
if (!chartHelper.setChartPointInfo(chartPoint, xElementValue, yElementValue, zElementValue)) {
chartPoints.add(chartPoint);
}
}
}
return chartPoints;
}
use of edu.uah.rsesc.aadlsimulator.ui.dialogs.ChartHelper.ChartPoint in project AGREE by loonwerks.
the class VariablesChartDialog method createPoints.
private List<ChartPoint> createPoints(final Object yElementData, final Object zElementData, final Color color) {
final List<ChartPoint> chartPoints = new ArrayList<>();
for (int i = 0; i < engineState.getNumberOfFrames(); i++) {
final Object xElementValue = currentSimulationSteps.get(i);
final Object yElementValue = engineState.getElementValue(i, yElementData);
if (xElementValue != null && yElementValue != null) {
Object zElementValue = null;
if (zElementData != null) {
zElementValue = engineState.getElementValue(i, zElementData);
}
final ChartPoint chartPoint = chartHelper.createChartPoint(i, color);
if (!chartHelper.setChartPointInfo(chartPoint, xElementValue, yElementValue, zElementValue)) {
chartPoints.add(chartPoint);
}
}
}
return chartPoints;
}
Aggregations