[Polycasso-commit] SF.net SVN: polycasso:[115] trunk/polycasso/src/com/mebigfatguy/polycasso/ Setti
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2009-11-29 03:09:50
|
Revision: 115
http://polycasso.svn.sourceforge.net/polycasso/?rev=115&view=rev
Author: dbrosius
Date: 2009-11-29 03:09:43 +0000 (Sun, 29 Nov 2009)
Log Message:
-----------
javadoc
Modified Paths:
--------------
trunk/polycasso/src/com/mebigfatguy/polycasso/Settings.java
Modified: trunk/polycasso/src/com/mebigfatguy/polycasso/Settings.java
===================================================================
--- trunk/polycasso/src/com/mebigfatguy/polycasso/Settings.java 2009-11-29 03:05:47 UTC (rev 114)
+++ trunk/polycasso/src/com/mebigfatguy/polycasso/Settings.java 2009-11-29 03:09:43 UTC (rev 115)
@@ -20,6 +20,10 @@
import java.awt.Dimension;
+/**
+ * a simple java bean holding settings that are used to control how
+ * Polycasso runs
+ */
public class Settings implements Cloneable {
private Dimension maxImageSize;
@@ -27,6 +31,9 @@
private int maxPoints;
private int maxPtMovement;
+ /**
+ * constructs a settings object with rational defaults
+ */
public Settings() {
maxImageSize = new Dimension(800, 600);
maxPolygons = 50;
@@ -34,6 +41,11 @@
maxPtMovement = 20;
}
+ /**
+ * clones the Settings object
+ *
+ * @returns a new copy of the settings object
+ */
@Override
public Object clone() {
try {
@@ -43,34 +55,76 @@
}
}
+ /**
+ * sets the maximum image size
+ *
+ * @param imageSize the image size
+ */
public void setMaxImageSize(Dimension imageSize) {
maxImageSize = imageSize;
}
+ /**
+ * gets the maximum image size
+ *
+ * @return the image size
+ */
public Dimension getMaxImageSize() {
return maxImageSize;
}
+ /**
+ * sets the maximum polygons that can be used to image the picture
+ *
+ * @param maxPolys the maximum number of polygons
+ */
public void setMaxPolygons(int maxPolys) {
maxPolygons = maxPolys;
}
+ /**
+ * gets the maximum polygons that can be used to image the picture
+ *
+ * @return the maximum number of polygons
+ */
public int getMaxPolygons() {
return maxPolygons;
}
+ /**
+ * sets the maximum number of points per polygon
+ *
+ * @param maxPts the maximum polygon points
+ */
public void setMaxPoints(int maxPts) {
maxPoints = maxPts;
}
+ /**
+ * gets the maximum number of points per polygon
+ *
+ * @return the maximum polygon points
+ */
public int getMaxPoints() {
return maxPoints;
}
+ /**
+ * sets the largest movement that any polygon point can make in one
+ * improvement attempt
+ *
+ * @param maxPointMovement the maximum allowed movement
+ */
public void setMaxPtMovement(int maxPointMovement) {
maxPtMovement = maxPointMovement;
}
+ /**
+ * gets the largest movement that any polygon point can make in one
+ * improvement attempt
+ *
+ * @return the maximum allowed movement
+ */
public int getMaxPtMovement() {
return maxPtMovement;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|