Beispiel #1
0
 private void checkGeometry(TriangleGeometry geometry) {
   if (geometry == null) throw new NullPointerException("Geometry can not be null!");
   if (!isTriangle && geometry.getDevelopmentPeriods() > 1) {
     String msg = "Can not set geometry with more than 1 development periods (%d) to a vector!";
     throw new IllegalArgumentException(String.format(msg, geometry.getDevelopmentPeriods()));
   }
 }
Beispiel #2
0
 public void setGeometry(TriangleGeometry geometry) {
   checkGeometry(geometry);
   this.geometry = geometry.copy();
   fireGeometryChanged();
 }
Beispiel #3
0
 public TriangleGeometry getGeometry() {
   return geometry == null ? null : geometry.copy();
 }