public class GUIWire
{
+ private final ViewModel model;
private Pin pin1;
private Pin pin2;
private double[] path;
public GUIWire(ViewModel model, Pin pin1, Pin pin2, Point... path)
{
+ this.model = model;
this.path = new double[path.length * 2 + 4];
for (int srcI = 0, dstI = 2; srcI < path.length; srcI++, dstI += 2)
{
model.wireCreated(this);
}
+ public void destroy()
+ {
+ model.wireDestroyed(this);
+ }
+
public void render(GeneralGC gc)
{
Color oldFG = gc.getForeground();