[Polycasso-commit] SF.net SVN: polycasso:[90] trunk/polycasso/src/com/mebigfatguy/polycasso/ Settin
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2009-11-28 23:19:54
|
Revision: 90
http://polycasso.svn.sourceforge.net/polycasso/?rev=90&view=rev
Author: dbrosius
Date: 2009-11-28 23:19:44 +0000 (Sat, 28 Nov 2009)
Log Message:
-----------
a simple bean for holding configuration settings
Added Paths:
-----------
trunk/polycasso/src/com/mebigfatguy/polycasso/Settings.java
Added: trunk/polycasso/src/com/mebigfatguy/polycasso/Settings.java
===================================================================
--- trunk/polycasso/src/com/mebigfatguy/polycasso/Settings.java (rev 0)
+++ trunk/polycasso/src/com/mebigfatguy/polycasso/Settings.java 2009-11-28 23:19:44 UTC (rev 90)
@@ -0,0 +1,67 @@
+/*
+ * polycasso - Cubism Artwork generator
+ * Copyright 2009 MeBigFatGuy.com
+ * Copyright 2009 Dave Brosius
+ * Inspired by work by Roger Alsing
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and limitations
+ * under the License.
+ */
+package com.mebigfatguy.polycasso;
+
+import java.awt.Dimension;
+
+public class Settings implements Cloneable {
+
+ private Dimension maxImageSize;
+ private int maxPolygons;
+ private int maxPtMovement;
+
+ public Settings() {
+ maxImageSize = new Dimension(800, 600);
+ maxPolygons = 50;
+ maxPtMovement = 20;
+ }
+
+ @Override
+ public Object clone() {
+ try {
+ return super.clone();
+ } catch (CloneNotSupportedException cnse) {
+ return new Settings();
+ }
+ }
+
+ public void setMaxImageSize(Dimension imageSize) {
+ maxImageSize = imageSize;
+ }
+
+ public Dimension getMaxImageSize() {
+ return maxImageSize;
+ }
+
+ public void setMaxPolygons(int maxPolys) {
+ maxPolygons = maxPolys;
+ }
+
+ public int getMaxPolygons() {
+ return maxPolygons;
+ }
+
+ public void setMaxPtMovement(int maxPointMovement) {
+ maxPtMovement = maxPointMovement;
+ }
+
+ public int getMaxPtMovement() {
+ return maxPtMovement;
+ }
+}
Property changes on: trunk/polycasso/src/com/mebigfatguy/polycasso/Settings.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|