import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
+import java.util.function.Consumer;
import org.apache.commons.csv.CSVRecord;
import org.eclipse.jface.dialogs.IPageChangeProvider;
private DynamicComboFieldEditor endYCoordSelector;
private DynamicComboFieldEditor endZValueSelector;
private DynamicComboFieldEditor detailedGeometrySelector;
+ private DynamicComboFieldEditor pipeCodeSelector;
+ private DynamicComboFieldEditor installationYearSelector;
+ private DynamicComboFieldEditor wallThicknessSelector;
+ private DynamicComboFieldEditor insulationConductivitySelector;
+ private DynamicComboFieldEditor pipeSizeDNSelector;
+ private DynamicComboFieldEditor roughnessSelector;
+ private DynamicComboFieldEditor structureSelector;
private Text edgeConnectionPadding;
private void createCommonIndexMappingField(Group parent) {
- componentMappingSelector = new DynamicComboFieldEditor("componentMapping", "Apros component mapping", parent);
- componentMappingSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setComponentMappingIndex(Integer.parseInt(componentMappingSelector.getValue()));
- validatePageComplete();
- }
- });
+ componentMappingSelector = createComboField("componentMapping", "Apros component mapping", model::setComponentMappingIndex, parent);
- idSelector = new DynamicComboFieldEditor("id", "ID", parent);
- idSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setIdIndex(Integer.parseInt(idSelector.getValue()));
- validatePageComplete();
- }
- });
- regionSelector = new DynamicComboFieldEditor("regionValue", "Region", parent);
- regionSelector.addComboListener(new SelectionListener() {
+ idSelector = createComboField("id", "ID", model::setIdIndex, parent);
+ regionSelector = createComboField("regionValue", "Region", model::setRegionIndex, parent);
+ }
+ private DynamicComboFieldEditor createComboField(String name, String label, Consumer<Integer> setter, Group parent) {
+ DynamicComboFieldEditor selector = new DynamicComboFieldEditor(name, label, parent);
+ createSelectionListener(selector, setter);
+ return selector;
+ }
+
+ private void createSelectionListener(DynamicComboFieldEditor editor, Consumer<Integer> setter) {
+ editor.addComboListener(new SelectionListener() {
+
@Override
public void widgetSelected(SelectionEvent e) {
widgetDefaultSelected(e);
}
-
+
@Override
public void widgetDefaultSelected(SelectionEvent e) {
- model.setRegionIndex(Integer.parseInt(regionSelector.getValue()));
+ setter.accept(Integer.parseInt(editor.getValue()));
validatePageComplete();
}
});
}
private void createVertexIndexMappingField(Group parent) {
- xCoordSelector = new DynamicComboFieldEditor("xCoord", "X Coordinate", parent);
- xCoordSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setXCoordIndex(Integer.parseInt(xCoordSelector.getValue()));
- validatePageComplete();
- }
- });
-
- yCoordSelector = new DynamicComboFieldEditor("yCoord", "Y Coordinate", parent);
- yCoordSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setYCoordIndex(Integer.parseInt(yCoordSelector.getValue()));
- validatePageComplete();
- }
- });
- zValueSelector = new DynamicComboFieldEditor("zValue", "Z Value", parent);
- zValueSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setZCoordIndex(Integer.parseInt(zValueSelector.getValue()));
- validatePageComplete();
- }
- });
+ xCoordSelector = createComboField("xCoord", "X Coordinate", model::setXCoordIndex, parent);
- altElevationValueSelector = new DynamicComboFieldEditor("altElevation", "Alternative Elevation", parent);
- altElevationValueSelector.addComboListener(new SelectionListener() {
+ yCoordSelector = createComboField("yCoord", "Y Coordinate", model::setYCoordIndex, parent);
+ zValueSelector = createComboField("zValue", "Z Value", model::setZCoordIndex, parent);
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setAltElevationIndex(Integer.parseInt(altElevationValueSelector.getValue()));
- validatePageComplete();
- }
- });
+ altElevationValueSelector = createComboField("altElevation", "Alternative Elevation", model::setAltElevationIndex, parent);
- supplyTempValueSelector = new DynamicComboFieldEditor("tempValue", "Supply Temperature value", parent);
- supplyTempValueSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setSupplyTempIndex(Integer.parseInt(supplyTempValueSelector.getValue()));
- validatePageComplete();
- }
- });
- returnTempValueSelector = new DynamicComboFieldEditor("returnTempValue", "Return Temperature value", parent);
- returnTempValueSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setReturnTempIndex(Integer.parseInt(returnTempValueSelector.getValue()));
- validatePageComplete();
- }
- });
- supplyPressureValueSelector = new DynamicComboFieldEditor("pressureValue", "Supply Pressure value", parent);
- supplyPressureValueSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setSupplyPressureIndex(Integer.parseInt(supplyPressureValueSelector.getValue()));
- validatePageComplete();
- }
- });
- returnPressureValueSelector = new DynamicComboFieldEditor("returnPressureValue", "Return Pressure value", parent);
- returnPressureValueSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setReturnPressureIndex(Integer.parseInt(returnPressureValueSelector.getValue()));
- validatePageComplete();
- }
- });
- dpSelector = new DynamicComboFieldEditor("dpValue", "Delta pressure ", parent);
- dpSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setDeltaPressureIndex(Integer.parseInt(dpSelector.getValue()));
- validatePageComplete();
- }
- });
- dtSelector = new DynamicComboFieldEditor("dtValue", "Delta temperature ", parent);
- dtSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setDeltaTemperatureIndex(Integer.parseInt(dtSelector.getValue()));
- validatePageComplete();
- }
- });
- heatPowerSelector = new DynamicComboFieldEditor("heatPowerValue", "Heat Power", parent);
- heatPowerSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setHeatPowerIndex(Integer.parseInt(heatPowerSelector.getValue()));
- validatePageComplete();
- }
- });
- peakPowerSelector = new DynamicComboFieldEditor("peakPowerValue", "Peak Power", parent);
- peakPowerSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setPeakPowerIndex(Integer.parseInt(peakPowerSelector.getValue()));
- validatePageComplete();
- }
- });
+ supplyTempValueSelector = createComboField("tempValue", "Supply Temperature value", model::setSupplyTempIndex, parent);
+ returnTempValueSelector = createComboField("returnTempValue", "Return Temperature value", model::setReturnTempIndex, parent);
+ supplyPressureValueSelector = createComboField("pressureValue", "Supply Pressure value", model::setSupplyPressureIndex, parent);
+ returnPressureValueSelector = createComboField("returnPressureValue", "Return Pressure value", model::setReturnPressureIndex, parent);
+ dpSelector = createComboField("dpValue", "Delta pressure ", model::setDeltaPressureIndex, parent);
+ dtSelector = createComboField("dtValue", "Delta temperature ", model::setDeltaTemperatureIndex, parent);
+ heatPowerSelector = createComboField("heatPowerValue", "Heat Power", model::setHeatPowerIndex, parent);
+ peakPowerSelector = createComboField("peakPowerValue", "Peak Power", model::setPeakPowerIndex, parent);
- nominalHeadMSelector = new DynamicComboFieldEditor("nominalHeadMValue", "nominalHeadM", parent);
- nominalHeadMSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setNominalHeadMIndex(Integer.parseInt(nominalHeadMSelector.getValue()));
- validatePageComplete();
- }
- });
- nominalHeadBSelector = new DynamicComboFieldEditor("nominalHeadBValue", "nominalHeadB", parent);
- nominalHeadBSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setNominalHeadBIndex(Integer.parseInt(nominalHeadBSelector.getValue()));
- validatePageComplete();
- }
- });
- nominalFlowSelector = new DynamicComboFieldEditor("nominalFlowValue", "nominalFlow", parent);
- nominalFlowSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setNominalFlowIndex(Integer.parseInt(nominalFlowSelector.getValue()));
- validatePageComplete();
- }
- });
-
- maximumHeadMSelector = new DynamicComboFieldEditor("maximumHeadMValue", "maximumHeadM", parent);
- maximumHeadMSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setMaximumHeadMIndex(Integer.parseInt(maximumHeadMSelector.getValue()));
- validatePageComplete();
- }
- });
- heatLoadDsSelector = new DynamicComboFieldEditor("heatLoadDsValue", "heatLoadDs", parent);
- heatLoadDsSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setHeatLoadDsIndex(Integer.parseInt(heatLoadDsSelector.getValue()));
- validatePageComplete();
- }
- });
- massFlowSelector = new DynamicComboFieldEditor("massFlowValue", "massFlow", parent);
- massFlowSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setMassFlowIndex(Integer.parseInt(massFlowSelector.getValue()));
- validatePageComplete();
- }
- });
- volFlowSelector = new DynamicComboFieldEditor("volFlowValue", "volFlow", parent);
- volFlowSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setVolFlowIndex(Integer.parseInt(volFlowSelector.getValue()));
- validatePageComplete();
- }
- });
- velocitySelector = new DynamicComboFieldEditor("velocityValue", "velocity", parent);
- velocitySelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setVelocityIndex(Integer.parseInt(velocitySelector.getValue()));
- validatePageComplete();
- }
- });
- flowAreaSelector = new DynamicComboFieldEditor("flowAreaValue", "flowArea", parent);
- flowAreaSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setFlowAreaIndex(Integer.parseInt(flowAreaSelector.getValue()));
- validatePageComplete();
- }
- });
- nominalPressureLossSelector = new DynamicComboFieldEditor("nominalPressureLossValue", "nominalPressureLoss", parent);
- nominalPressureLossSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setNominalPressureLossIndex(Integer.parseInt(nominalPressureLossSelector.getValue()));
- validatePageComplete();
- }
- });
- valvePositionSelector = new DynamicComboFieldEditor("valvePositionSelectorValue", "valvePositionSelector", parent);
- valvePositionSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setValvePositionIndex(Integer.parseInt(valvePositionSelector.getValue()));
- validatePageComplete();
- }
- });
- addressSelector = new DynamicComboFieldEditor("addressValue", "addressSelector", parent);
- addressSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setAddressIndex(Integer.parseInt(addressSelector.getValue()));
- validatePageComplete();
- }
- });
+ nominalHeadMSelector = createComboField("nominalHeadMValue", "nominalHeadM", model::setNominalHeadMIndex, parent);
+ nominalHeadBSelector = createComboField("nominalHeadBValue", "nominalHeadB", model::setNominalHeadBIndex, parent);
+ nominalFlowSelector = createComboField("nominalFlowValue", "nominalFlow", model::setNominalFlowIndex, parent);
+
+ maximumHeadMSelector = createComboField("maximumHeadMValue", "maximumHeadM", model::setMaximumHeadMIndex, parent);
+ heatLoadDsSelector = createComboField("heatLoadDsValue", "heatLoadDs", model::setHeatLoadDsIndex, parent);
+ massFlowSelector = createComboField("massFlowValue", "massFlow", model::setMassFlowIndex, parent);
+ volFlowSelector = createComboField("volFlowValue", "volFlow", model::setVolFlowIndex, parent);
+ velocitySelector = createComboField("velocityValue", "velocity", model::setVelocityIndex, parent);
+ flowAreaSelector = createComboField("flowAreaValue", "flowArea", model::setFlowAreaIndex, parent);
+ nominalPressureLossSelector = createComboField("nominalPressureLossValue", "nominalPressureLoss", model::setNominalPressureLossIndex, parent);
+ valvePositionSelector = createComboField("valvePositionSelectorValue", "valvePositionSelector", model::setValvePositionIndex, parent);
+ addressSelector = createComboField("addressValue", "addressSelector", model::setAddressIndex, parent);
}
-
+
private void createEdgeIndexMappingField(Group parent) {
// Composite paddingComposite = new Composite(parent, SWT.NONE);
// GridLayoutFactory.fillDefaults().numColumns(2).applyTo(paddingComposite);
+ startXCoordSelector = createComboField("startxCoord", "Start X Coordinate", model::setStartXCoordIndex, parent);
+ startYCoordSelector = createComboField("startyCoord", "Start Y Coordinate", model::setStartYCoordIndex, parent);
+ startZValueSelector = createComboField("startzValue", "Start Z Value", model::setStartZCoordIndex, parent);
- startXCoordSelector = new DynamicComboFieldEditor("startxCoord", "Start X Coordinate", parent);
- startXCoordSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setStartXCoordIndex(Integer.parseInt(startXCoordSelector.getValue()));
- validatePageComplete();
- }
- });
-
- startYCoordSelector = new DynamicComboFieldEditor("startyCoord", "Start Y Coordinate", parent);
- startYCoordSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setStartYCoordIndex(Integer.parseInt(startYCoordSelector.getValue()));
- validatePageComplete();
- }
- });
- startZValueSelector = new DynamicComboFieldEditor("startzValue", "Start Z Value", parent);
- startZValueSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setStartZCoordIndex(Integer.parseInt(startZValueSelector.getValue()));
- validatePageComplete();
- }
- });
+ endXCoordSelector = createComboField("endxCoord", "End X Coordinate", model::setEndXCoordIndex, parent);
+ endYCoordSelector = createComboField("endyCoord", "End Y Coordinate", model::setEndYCoordIndex, parent);
+ endZValueSelector = createComboField("endzValue", "End Z Value", model::setEndZCoordIndex, parent);
- endXCoordSelector = new DynamicComboFieldEditor("endxCoord", "End X Coordinate", parent);
- endXCoordSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setEndXCoordIndex(Integer.parseInt(endXCoordSelector.getValue()));
- validatePageComplete();
- }
- });
-
- endYCoordSelector = new DynamicComboFieldEditor("endyCoord", "End Y Coordinate", parent);
- endYCoordSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setEndYCoordIndex(Integer.parseInt(endYCoordSelector.getValue()));
- validatePageComplete();
- }
- });
- endZValueSelector = new DynamicComboFieldEditor("endzValue", "End Z Value", parent);
- endZValueSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setEndZCoordIndex(Integer.parseInt(endZValueSelector.getValue()));
- validatePageComplete();
- }
- });
- detailedGeometrySelector = new DynamicComboFieldEditor("detailedGeometryValue", "Geometry", parent);
- detailedGeometrySelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.detailedGeometryIndex(Integer.parseInt(detailedGeometrySelector.getValue()));
- validatePageComplete();
- }
- });
- diameterSelector = new DynamicComboFieldEditor("diameterValue", "Diameter value", parent);
- diameterSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setDiameterIndex(Integer.parseInt(diameterSelector.getValue()));
- validatePageComplete();
- }
- });
- outerDiameterSelector = new DynamicComboFieldEditor("outerDiameterValue", "Outer Diameter value", parent);
- outerDiameterSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setOuterDiameterIndex(Integer.parseInt(outerDiameterSelector.getValue()));
- validatePageComplete();
- }
- });
- nominalMassFlowSelector = new DynamicComboFieldEditor("nominalMassFlowValue", "Nominal Mass Flow", parent);
- nominalMassFlowSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setNominalMassFlowIndex(Integer.parseInt(nominalMassFlowSelector.getValue()));
- validatePageComplete();
- }
- });
- edgeFlowAreaSelector = new DynamicComboFieldEditor("edgeFlowAreaValue", "Flow Area", parent);
- edgeFlowAreaSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setEdgeFlowAreaIndex(Integer.parseInt(edgeFlowAreaSelector.getValue()));
- validatePageComplete();
- }
- });
- kReturnSelector = new DynamicComboFieldEditor("kReturnValue", "K Return", parent);
- kReturnSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setKReturnIndex(Integer.parseInt(kReturnSelector.getValue()));
- validatePageComplete();
- }
- });
- kSupplySelector = new DynamicComboFieldEditor("kSupplyValue", "K Supply", parent);
- kSupplySelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setKSupplyIndex(Integer.parseInt(kSupplySelector.getValue()));
- validatePageComplete();
- }
- });
- tGroundSelector = new DynamicComboFieldEditor("tGroundValue", "Temperature Ground", parent);
- tGroundSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setTGroundIndex(Integer.parseInt(tGroundSelector.getValue()));
- validatePageComplete();
- }
- });
- lengthSelector = new DynamicComboFieldEditor("lengthValue", "lengthSelector", parent);
- lengthSelector.addComboListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- model.setLengthIndex(Integer.parseInt(lengthSelector.getValue()));
- validatePageComplete();
- }
- });
+ pipeCodeSelector = createComboField("pipeCodeValue", "Pipe Code", model::setPipeCodeIndex, parent);
+
+ detailedGeometrySelector = createComboField("detailedGeometryValue", "Geometry", model::detailedGeometryIndex, parent);
+ diameterSelector = createComboField("diameterValue", "Diameter value", model::setDiameterIndex, parent);
+ outerDiameterSelector = createComboField("outerDiameterValue", "Outer Diameter value", model::setOuterDiameterIndex, parent);
+ nominalMassFlowSelector = createComboField("nominalMassFlowValue", "Nominal Mass Flow", model::setNominalMassFlowIndex, parent);
+ edgeFlowAreaSelector = createComboField("edgeFlowAreaValue", "Flow Area", model::setEdgeFlowAreaIndex, parent);
+ kReturnSelector = createComboField("kReturnValue", "K Return", model::setKReturnIndex, parent);
+ kSupplySelector = createComboField("kSupplyValue", "K Supply", model::setKSupplyIndex, parent);
+ tGroundSelector = createComboField("tGroundValue", "Temperature Ground", model::setTGroundIndex, parent);
+ lengthSelector = createComboField("lengthValue", "lengthSelector", model::setLengthIndex, parent);
+
+ pipeSizeDNSelector = createComboField("pipeSizeDNValue", "Pipe Size DN", model::setPipeSizeDNIndex, parent);
+ structureSelector = createComboField("structureValue", "Structure", model::setStructureIndex, parent);
+ installationYearSelector = createComboField("installationYearValue", "Installation Year", model::setInstallationYearIndex, parent);
+ wallThicknessSelector = createComboField("wallThicknessValue", "Wall Thickness", model::setWallThicknessIndex, parent);
+ insulationConductivitySelector = createComboField("insulationConductivityValue", "Insulation Conductivity", model::setInsulationConductivityIndex, parent);
+ roughnessSelector = createComboField("roughnessValue", "Roughness", model::setRoughnessIndex, parent);
}
private void updateCombos() {
endYCoordSelector.updateCombo(namesAndValues);
startZValueSelector.updateCombo(namesAndValues);
endZValueSelector.updateCombo(namesAndValues);
+ pipeCodeSelector.updateCombo(namesAndValues);
detailedGeometrySelector.updateCombo(namesAndValues);
diameterSelector.updateCombo(namesAndValues);
outerDiameterSelector.updateCombo(namesAndValues);
kSupplySelector.updateCombo(namesAndValues);
tGroundSelector.updateCombo(namesAndValues);
lengthSelector.updateCombo(namesAndValues);
+ pipeSizeDNSelector.updateCombo(namesAndValues);
+ structureSelector.updateCombo(namesAndValues);
+ installationYearSelector.updateCombo(namesAndValues);
+ wallThicknessSelector.updateCombo(namesAndValues);
+ insulationConductivitySelector.updateCombo(namesAndValues);
+ roughnessSelector.updateCombo(namesAndValues);
}
private void updateVertexCombos(String[][] namesAndValues) {