import org.simantics.plant3d.scenegraph.EndComponent;
import org.simantics.plant3d.scenegraph.InlineComponent;
import org.simantics.plant3d.scenegraph.Nozzle;
+import org.simantics.plant3d.scenegraph.PipeRun;
import org.simantics.plant3d.scenegraph.PipelineComponent;
import org.simantics.plant3d.scenegraph.TurnComponent;
import org.simantics.plant3d.scenegraph.controlpoint.PipeControlPoint.PositionType;
insertPosition = PositionType.PREVIOUS;
}
+ private void copyPipeRunParameters() {
+ PipeRun run = component.getPipeRun();
+ if (component.getNext() == null && component.getAlternativePipeRun() != null)
+ run = component.getAlternativePipeRun();
+
+ if (run == null)
+ return;
+
+ diameter = run.getPipeDiameter();
+ thickness = run.getPipeThickness();
+ turnRadius = run.getTurnRadius();
+
+ diameterText.setText(Double.toString(diameter * lengthFactor));
+ thicknessText.setText(Double.toString(thickness * lengthFactor));
+ turnRadiusText.setText(Double.toString(turnRadius * lengthFactor));
+ }
+
public void setLengthFactor(double lengthFactor) {
this.lengthFactor = lengthFactor;
}
diameterText.setEnabled(false);
thicknessText.setEnabled(false);
+ copyPipeRunParameters();
+
nameText.addKeyListener(new KeyAdapter() {
@Override
public void keyReleased(KeyEvent e) {