[archstudio-commits] svn commit: r7130 - in /calico/branches/mitchnick3: ./ .settings/ ics/uci/edu/Calico/Structures/ ics/uci/edu/Calico/UI/

archstudio-commits-owner at uci.edu archstudio-commits-owner at uci.edu
Wed May 21 13:28:07 PDT 2008


Author: nmangano
Date: Wed May 21 13:28:07 2008
New Revision: 7130

Log:
Made BGElementPainter a polygon based class

Modified:
    calico/branches/mitchnick3/.classpath
    calico/branches/mitchnick3/.settings/org.eclipse.jdt.core.prefs
    calico/branches/mitchnick3/config.cfg
    calico/branches/mitchnick3/ics/uci/edu/Calico/Structures/BGElementContr=
oller.java
    calico/branches/mitchnick3/ics/uci/edu/Calico/UI/BGElementPainter.java
    calico/branches/mitchnick3/ics/uci/edu/Calico/UI/CalicoCanvas.java
    calico/branches/mitchnick3/ics/uci/edu/Calico/UI/MouseInputHandler.java

Modified: calico/branches/mitchnick3/.classpath
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- calico/branches/mitchnick3/.classpath (original)
+++ calico/branches/mitchnick3/.classpath Wed May 21 13:28:07 2008
@@ -2,8 +2,6 @@
 <classpath>
 	<classpathentry kind=3D"src" path=3D""/>
 	<classpathentry kind=3D"con" path=3D"org.eclipse.jdt.launching.JRE_CONTAI=
NER"/>
-	<classpathentry kind=3D"lib" path=3D"lib/ant.jar"/>
-	<classpathentry kind=3D"lib" path=3D"lib/junit.jar"/>
 	<classpathentry kind=3D"lib" path=3D"examples.jar"/>
 	<classpathentry kind=3D"lib" path=3D"tests.jar"/>
 	<classpathentry kind=3D"output" path=3D""/>

Modified: calico/branches/mitchnick3/.settings/org.eclipse.jdt.core.prefs
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- calico/branches/mitchnick3/.settings/org.eclipse.jdt.core.prefs (origin=
al)
+++ calico/branches/mitchnick3/.settings/org.eclipse.jdt.core.prefs Wed May=
 21 13:28:07 2008
@@ -1,66 +1,66 @@
-#Tue Apr 29 14:46:32 PDT 2008
-eclipse.preferences.version=3D1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=3Denabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=3D1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=3Dpreserve
-org.eclipse.jdt.core.compiler.compliance=3D1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=3Dgenerate
-org.eclipse.jdt.core.compiler.debug.localVariable=3Dgenerate
-org.eclipse.jdt.core.compiler.debug.sourceFile=3Dgenerate
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=3Dwarning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=3Derror
-org.eclipse.jdt.core.compiler.problem.autoboxing=3Dignore
-org.eclipse.jdt.core.compiler.problem.deprecation=3Dwarning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=3Ddisabl=
ed
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedM=
ethod=3Ddisabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=3Dwarning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=3Dignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=3Derror
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=3Dignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=3Denabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=3Dignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=3Dwarning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=3D=
warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=3Derror
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=3Dwarning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMet=
hod=3Dwarning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=3Dignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=3Dignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=3Dignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=3Dwarning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=3Dignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=3Dignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=3Dwarning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=3Dwarning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=3Dwarning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=3Dignore
-org.eclipse.jdt.core.compiler.problem.nullReference=3Dignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=3Dwar=
ning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=3Dignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=
=3Dignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=3Dignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=3Dwarning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=3Dignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=3Ddisabl=
ed
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=3Dwarning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=3Denabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=3Dignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=3Dwarning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=3Dwarning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=3Dignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=3Dwarning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=3Dignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=3Dignore
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=3Dignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=3Digno=
re
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOve=
rriding=3Ddisabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=3Dignore
-org.eclipse.jdt.core.compiler.problem.unusedLabel=3Dwarning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=3Dwarning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=3Dignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentRefe=
rence=3Denabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstr=
act=3Ddisabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcret=
e=3Ddisabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=3Dwarning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=3Dwarning
-org.eclipse.jdt.core.compiler.source=3D1.5
+#Wed May 21 13:08:16 PDT 2008
+eclipse.preferences.version=3D1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=3Denabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=3D1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=3Dpreserve
+org.eclipse.jdt.core.compiler.compliance=3D1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=3Dgenerate
+org.eclipse.jdt.core.compiler.debug.localVariable=3Dgenerate
+org.eclipse.jdt.core.compiler.debug.sourceFile=3Dgenerate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=3Dwarning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=3Derror
+org.eclipse.jdt.core.compiler.problem.autoboxing=3Dignore
+org.eclipse.jdt.core.compiler.problem.deprecation=3Dwarning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=3Ddisabl=
ed
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedM=
ethod=3Ddisabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=3Dwarning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=3Dignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=3Derror
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=3Dignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=3Denabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=3Dignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=3Dwarning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=3D=
warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=3Derror
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=3Dwarning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMet=
hod=3Dwarning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=3Dignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=3Dignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=3Dignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=3Dwarning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=3Dignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=3Dignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=3Dwarning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=3Dwarning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=3Dwarning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=3Dignore
+org.eclipse.jdt.core.compiler.problem.nullReference=3Dignore
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=3Dwar=
ning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=3Dignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=
=3Dignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=3Dignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=3Dwarning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=3Dignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=3Ddisabl=
ed
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=3Dwarning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=3Denabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=3Dignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=3Dwarning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=3Dwarning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=3Dignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=3Dwarning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=3Dignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=3Dignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=3Dignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=3Digno=
re
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOve=
rriding=3Ddisabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=3Dignore
+org.eclipse.jdt.core.compiler.problem.unusedLabel=3Dwarning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=3Dwarning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=3Dignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentRefe=
rence=3Denabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstr=
act=3Ddisabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcret=
e=3Ddisabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=3Dwarning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=3Dwarning
+org.eclipse.jdt.core.compiler.source=3D1.5

Modified: calico/branches/mitchnick3/config.cfg
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- calico/branches/mitchnick3/config.cfg (original)
+++ calico/branches/mitchnick3/config.cfg Wed May 21 13:28:07 2008
@@ -48,8 +48,8 @@
 calico_test_dbl_arr [5.0,6.0,7.2,3.0]
 calico_test_str_arr ["the black,fat","cat","ran","to,the","store"]
 =

-grid_rows 14
-grid_cols 14
+grid_rows 7
+grid_cols 7
 =

 network_port 6112
 =


Modified: calico/branches/mitchnick3/ics/uci/edu/Calico/Structures/BGElemen=
tController.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- calico/branches/mitchnick3/ics/uci/edu/Calico/Structures/BGElementContr=
oller.java (original)
+++ calico/branches/mitchnick3/ics/uci/edu/Calico/Structures/BGElementContr=
oller.java Wed May 21 13:28:07 2008
@@ -12,16 +12,6 @@
 =

 public class BGElementController {
 =

-	public static BGElementModel getModel(BGElementPainter painter) {
-		Polygon p =3D new Polygon(); =

-		LineShape line =3D painter.getLineReference(); =

-		for (int i =3D 0; i < line.getPointCount(); i++) { =

-			p.addPoint(new Double(line.getX(i)).intValue(),  =

-					new Double(line.getY(i)).intValue()); =

-		} =

-		return new BGElementModel(p, painter.getColor(), painter.getId()); =

-	}
-	=

 	public static BGElementModel copy(BGElementModel bge) {
 		Polygon p =3D new Polygon();
 		for (int i =3D 0; i < bge.poly.npoints; i++)

Modified: calico/branches/mitchnick3/ics/uci/edu/Calico/UI/BGElementPainter=
.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- calico/branches/mitchnick3/ics/uci/edu/Calico/UI/BGElementPainter.java =
(original)
+++ calico/branches/mitchnick3/ics/uci/edu/Calico/UI/BGElementPainter.java =
Wed May 21 13:28:07 2008
@@ -14,54 +14,50 @@
 import ics.uci.edu.Calico.Structures.PLine;
 import ics.uci.edu.Calico.models.BGElementModel;
 =

-public class BGElementPainter extends PLine {
+public class BGElementPainter extends PNode {
 =

-	Color color;
-	int id;
+	BGElementModel model;
 	Stroke stroke;
 =

 	private static final long serialVersionUID =3D 1L;
 	=

 	public BGElementPainter() {
-		color =3D Color.black;
-		id =3D -1;
+		model =3D new BGElementModel(new Polygon(), Color.black, -1);
 		stroke =3D new BasicStroke(1.0f);
 	}
 	=

-	public BGElementPainter(BGElementModel model) {
-		for (int i =3D 0; i < model.poly.npoints; i++) =

-			this.addPoint(i, model.poly.xpoints[i], model.poly.ypoints[i]); =

-		id =3D model.id;
-		setColor(model.color);
+	public BGElementPainter(BGElementModel m) {
+		model =3D m;
 		stroke =3D new BasicStroke(1.0f);
 	}
 	=

-	/*
+	=

 	public void clear() {
-		line.reset();
-	}*/
+		model.poly.reset();
+	}
+	=

 	=

-	/*
 	public void removePoints(int a, int b) {
 		Polygon n =3D new Polygon();
-		for (int i =3D 0; i < line.npoints; i++) {
+		for (int i =3D 0; i < model.poly.npoints; i++) {
 			if (i < a || i > b)
-				n.addPoint(line.xpoints[i], line.ypoints[i]);
+				n.addPoint(model.poly.xpoints[i], model.poly.ypoints[i]);
 		}
-		line =3D n;
-	}*/
+		model.poly =3D n;
+	}
+	=

 	=

-	/*
 	public void addPoint(int x, int y) {
-		line.addPoint(x, y);
-		setBounds(line.getBounds2D());
-	}*/
+		model.poly.addPoint(x, y);
+		setBounds(model.poly.getBounds2D());
+	}
+	=

 	=

-	/*
 	public Polygon getPoly() {
-		return line;
-	}*/
+		return model.poly;
+	}
 	=

+	/*
 	public Polygon getPoly() {
 		Polygon ret =3D new Polygon();
 		for (int i =3D 0; i < this.getPointCount(); i++) {
@@ -69,10 +65,10 @@
 					new Double(getLineReference().getY(i)).intValue());
 		}
 		return ret;
-	}
+	}*/
 	=

 	public void setColor(Color c) {
-		color =3D c;
+		model.color =3D c;
 	}
 	=

 	public void setStroke(Stroke s) {
@@ -85,37 +81,40 @@
 	}*/
 	=

 	public Color getColor() {
-		return color;
+		return model.color;
 	}
 	=

 	public int getId() {
-		return id;
+		return model.id;
 	}
 	=

 	public BGElementModel getModel() {
-		return BGElementController.getModel(this);
+		return model;
+	}
+	=

+	public int getPointCount() {
+		return model.poly.npoints;
 	}
 	=

 	public void paint(PPaintContext c) {
 		Graphics2D g =3D c.getGraphics();
-		g.setColor(color);
+		g.setColor(model.color);
 		g.setStroke(stroke);
 		g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                 RenderingHints.VALUE_ANTIALIAS_ON);
-		//g.drawPolyline(line.xpoints, line.ypoints, line.npoints);
-		g.draw(super.getLineReference());
+		g.drawPolyline(model.poly.xpoints, model.poly.ypoints, model.poly.npoint=
s);
+		//g.draw(super.getLineReference());
 	}
 	=

 	public boolean equals(BGElementPainter painter) {
-		if (getPointCount() !=3D painter.getPointCount()) =

+		if (painter.model.poly.npoints !=3D model.poly.npoints)
 			return false;
 		=

-		for (int i =3D 0; i < this.getPointCount(); i++) { =

-			if (getX(i) !=3D painter.getX(i) || getY(i) !=3D painter.getY(i)) { =

+		for (int i =3D 0; i < painter.model.poly.npoints; i++) {
+			if (painter.model.poly.xpoints[i] !=3D model.poly.xpoints[i] &&
+					painter.model.poly.ypoints[i] !=3D model.poly.ypoints[i])
 				return false;
-			}
 		}
-		=

 		return true;
 	}
 	=


Modified: calico/branches/mitchnick3/ics/uci/edu/Calico/UI/CalicoCanvas.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- calico/branches/mitchnick3/ics/uci/edu/Calico/UI/CalicoCanvas.java (ori=
ginal)
+++ calico/branches/mitchnick3/ics/uci/edu/Calico/UI/CalicoCanvas.java Wed =
May 21 13:28:07 2008
@@ -125,7 +125,7 @@
 			else if (node instanceof RelationshipPainter)
 				m.relationships.add(RelationshipController.copy(((RelationshipPainter)=
node).getModel()));
 			else if (node instanceof BGElementPainter &&
-					((BGElementPainter)node).id > -1)
+					((BGElementPainter)node).getId() > -1)
 				m.bgElements.add(BGElementController.copy(((BGElementPainter)node).get=
Model()));
 		}
 		m.objectIdTicker =3D objectIdTicker;
@@ -366,7 +366,7 @@
 	private void createBGElem(CreateBackgroundElement action) {
 		BGElementModel bge =3D new BGElementModel(action.poly, penColor, objectI=
dTicker++);
 		BGElementPainter painter =3D new BGElementPainter(bge);
-		//painter.setBounds(painter.getPoly().getBounds2D());
+		painter.setBounds(painter.getPoly().getBounds2D());
 		getLayer().addChild(0, painter);
 	}
 	=

@@ -396,7 +396,7 @@
 			lowPainter.moveToBack();	=

 		}
 		if (intersectionHigh > model.poly.npoints - 3) {
-			bge.removeAllPoints();
+			bge.clear();
 			bge.getParent().removeChild(bge);
 		}
 		else {
@@ -525,7 +525,7 @@
 		int highestBGElem =3D -1;
 		for (int i =3D 0; i < getLayer().getChildrenCount(); i++)
 			if (getLayer().getChild(i) instanceof BGElementPainter &&
-				((BGElementPainter)getLayer().getChild(i)).id > -1)
+				((BGElementPainter)getLayer().getChild(i)).getId() > -1)
 				if (i > highestBGElem)
 					highestBGElem =3D i;
 		=


Modified: calico/branches/mitchnick3/ics/uci/edu/Calico/UI/MouseInputHandle=
r.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- calico/branches/mitchnick3/ics/uci/edu/Calico/UI/MouseInputHandler.java=
 (original)
+++ calico/branches/mitchnick3/ics/uci/edu/Calico/UI/MouseInputHandler.java=
 Wed May 21 13:28:07 2008
@@ -805,7 +805,7 @@
 	public void updatePoly(Point2D p) {
 		if (pathLines.size() > 0) {
 			BGElementPainter path =3D pathLines.get(pathLines.size()-1);
-			path.addPoint(path.getPointCount(), p.getX(), p.getY());
+			path.addPoint(new Double(p.getX()).intValue(), new Double(p.getY()).int=
Value());
 		}
 		hist.add(p);
 	}




More information about the archstudio-commits mailing list