[Polycasso-commit] SF.net SVN: polycasso:[178] trunk/polycasso/src/com/mebigfatguy/polycasso/ FileT
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2009-12-10 14:06:48
|
Revision: 178
http://polycasso.svn.sourceforge.net/polycasso/?rev=178&view=rev
Author: dbrosius
Date: 2009-12-10 14:06:40 +0000 (Thu, 10 Dec 2009)
Log Message:
-----------
javadoc
Modified Paths:
--------------
trunk/polycasso/src/com/mebigfatguy/polycasso/FileType.java
Modified: trunk/polycasso/src/com/mebigfatguy/polycasso/FileType.java
===================================================================
--- trunk/polycasso/src/com/mebigfatguy/polycasso/FileType.java 2009-12-10 12:38:41 UTC (rev 177)
+++ trunk/polycasso/src/com/mebigfatguy/polycasso/FileType.java 2009-12-10 14:06:40 UTC (rev 178)
@@ -18,18 +18,30 @@
*/
package com.mebigfatguy.polycasso;
+/**
+ * an enum that represents possible save-as types
+ */
public enum FileType {
+ /**
+ * A portable network graphics file
+ */
PNG(".png", PolycassoBundle.Key.PNGDescription) {
public Saver getSaver() {
return new PNGSaver();
}
},
+ /**
+ * a scalable vector graphics file
+ */
SVG(".svg", PolycassoBundle.Key.SVGDescription) {
public Saver getSaver() {
return new SVGSaver();
}
},
+ /**
+ * a java file
+ */
Java(".java", PolycassoBundle.Key.JAVADescription) {
public Saver getSaver() {
return new JavaSaver();
@@ -39,18 +51,39 @@
private String extension;
private PolycassoBundle.Key descriptionKey;
+ /**
+ * internal constructor for setting the extension and description bundle key
+ *
+ * @param ext the extension for this file type
+ * @param descKey the bundle description key for this type
+ */
FileType(String ext, PolycassoBundle.Key descKey) {
extension = ext;
descriptionKey = descKey;
}
+ /**
+ * returns the extension for this type
+ *
+ * @return the file name extension
+ */
public String getExtension() {
return extension;
}
+ /**
+ * returns the description for this file type
+ *
+ * @return the file type description for the save dialog
+ */
public String getDescription() {
return PolycassoBundle.getString(descriptionKey);
}
+ /**
+ * the action to save the file
+ *
+ * @return a saver object that will save the object in the appropriate foramt
+ */
public abstract Saver getSaver();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|