X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.plant3d%2Fsrc%2Forg%2Fsimantics%2Fplant3d%2Fscenegraph%2FNozzle.java;h=cbdecc1c09ea2250c4464c003220d3825e3097ea;hb=ba83a8b8c95b94a035d20e458880beec68b9c450;hp=9c4ad6f6ce280d46df3ce31d0b1c383f31e39841;hpb=a460e609147d064dd3da464bcf1626845e0f93b4;p=simantics%2F3d.git diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/Nozzle.java b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/Nozzle.java index 9c4ad6f6..cbdecc1c 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/Nozzle.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/Nozzle.java @@ -53,15 +53,31 @@ public class Nozzle extends PipelineComponent { firePropertyChanged(Plant3D.URIs.HasNozzleId); } + private boolean fixed = false; + + @RelatedGetValue(Plant3D.URIs.IsFixedNozzle) + @GetPropertyValue(name="Fixed", value=Plant3D.URIs.IsFixedNozzle, tabId="Default") + public boolean isFixed() { + return fixed; + } + + @RelatedSetValue(Plant3D.URIs.IsFixedNozzle) + public void setFixed(boolean fixed) { + if (fixed == this.fixed) + return; + this.fixed = fixed; + firePropertyChanged(Plant3D.URIs.IsFixedNozzle); + } + private void _createCP() throws Exception{ if (controlPoint != null) return; - if (getPipeRun() != null) { - controlPoint = ControlPointFactory.create(this); - // TODO : these should not be needed. - controlPoint.setDeletable(false); - controlPoint.setFixed(true); - } + controlPoint = ControlPointFactory.create(this); + // TODO : these should not be needed. + controlPoint.setDeletable(false); + controlPoint.setFixed(true); + syncNext(); + syncPrevious(); } @RelatedSetObj(Plant3D.URIs.HasPipeRun) @@ -118,7 +134,7 @@ public class Nozzle extends PipelineComponent { PipeRun pipeRun = getPipeRun(); if (pipeRun != null) { - map.put("length", pipeRun.getPipeDiameter() * 2.0); + //map.put("length", pipeRun.getPipeDiameter() * 2.0); map.put("radius", pipeRun.getPipeDiameter() * 0.5); } return map;