|
@@ -28,11 +28,15 @@ public class Model extends Observable
|
|
curThingy = new Thingy(curColour, curThiccness);
|
|
curThingy = new Thingy(curColour, curThiccness);
|
|
thingies.add(curThingy);
|
|
thingies.add(curThingy);
|
|
curThingy.addPoint(x, y);
|
|
curThingy.addPoint(x, y);
|
|
|
|
+ setChanged();
|
|
|
|
+ notifyObservers();
|
|
}
|
|
}
|
|
|
|
|
|
public void addPoint(int x, int y)
|
|
public void addPoint(int x, int y)
|
|
{
|
|
{
|
|
curThingy.addPoint(x, y);
|
|
curThingy.addPoint(x, y);
|
|
|
|
+ setChanged();
|
|
|
|
+ notifyObservers();
|
|
}
|
|
}
|
|
|
|
|
|
public ArrayList<Thingy> getThingies()
|
|
public ArrayList<Thingy> getThingies()
|
|
@@ -44,21 +48,21 @@ public class Model extends Observable
|
|
{
|
|
{
|
|
menuColour = c;
|
|
menuColour = c;
|
|
setChanged();
|
|
setChanged();
|
|
- notifyObservers();
|
|
|
|
|
|
+ notifyObservers();
|
|
}
|
|
}
|
|
|
|
|
|
public void setSideColour(Color c)
|
|
public void setSideColour(Color c)
|
|
{
|
|
{
|
|
sideColour = c;
|
|
sideColour = c;
|
|
setChanged();
|
|
setChanged();
|
|
- notifyObservers();
|
|
|
|
|
|
+ notifyObservers();
|
|
}
|
|
}
|
|
|
|
|
|
public void setControlColour(Color c)
|
|
public void setControlColour(Color c)
|
|
{
|
|
{
|
|
controlColour = c;
|
|
controlColour = c;
|
|
setChanged();
|
|
setChanged();
|
|
- notifyObservers();
|
|
|
|
|
|
+ notifyObservers();
|
|
}
|
|
}
|
|
|
|
|
|
// Add observer to be notified on change
|
|
// Add observer to be notified on change
|
|
@@ -92,8 +96,10 @@ class Thingy
|
|
public Thingy(Color c, int x)
|
|
public Thingy(Color c, int x)
|
|
{
|
|
{
|
|
points = new ArrayList();
|
|
points = new ArrayList();
|
|
- this.colour = c;
|
|
|
|
- this.thiccness = x;
|
|
|
|
|
|
+ //this.colour = c;
|
|
|
|
+ this.colour = Color.black;
|
|
|
|
+ //this.thiccness = x;
|
|
|
|
+ this.thiccness = 5;
|
|
}
|
|
}
|
|
|
|
|
|
public void addPoint(int x, int y)
|
|
public void addPoint(int x, int y)
|