]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/PipelineComponent.java
Showing error messages when components overlap each other
[simantics/3d.git] / org.simantics.plant3d / src / org / simantics / plant3d / scenegraph / PipelineComponent.java
index 7726b203005611c05b89a739b634617018f79295..e1a24f10369024c61a29a1b3d1e8e525039cac3f 100644 (file)
@@ -675,4 +675,32 @@ public abstract class PipelineComponent extends GeometryNode {
                        throw new IllegalStateException("No centroid defined");
                }
        }
+       
+       
+       private String error;
+       
+       /**
+        * Returns possible pipe modelling error, or null;
+        * @return
+        */
+       @GetPropertyValue(name="Error", value="error", tabId = "Default")
+       public String getError() {
+           return error;
+       }
+       
+       /**
+        * Sets pipe modelling error. 
+        * 
+        * Error is usually set by PipingRules.
+        * @param error
+        */
+       public void setError(String error) {
+           if (this.error == null) {
+               if (error == null)
+                   return;
+           } else if (this.error.equals(error))
+               return;
+           this.error = error;         
+           firePropertyChanged("error");
+       }
 }