+ // "graphical" operations
+
+ /**
+ * Sets the factor by which the submodel is scaled when rendering and calls redrawListeners. Note that the submodel interface pins will
+ * stay at their position relative to the supermodel, which means they will move relative to the submodel.
+ *
+ * @author Daniel Kirschten
+ */
+ protected void setSubmodelScale(double submodelScale)
+ {
+ this.submodelScale = submodelScale;
+
+ for (Entry<String, MovablePin> e : supermodelPins.entrySet())
+ getSubmodelMovablePin(e.getKey()).setRelPos(e.getValue().getRelX() * submodelScale, e.getValue().getRelY() * submodelScale);
+
+ requestRedraw();// needed if there is no submodel interface pin
+ }
+
+ /**
+ * Returns the current factor by which the submodel is scaled when rendering.
+ *
+ * @author Daniel Kirschten
+ */
+ protected double getSubmodelScale()
+ {
+ return submodelScale;
+ }
+