com.mebigfatguy.polycasso
Enum FileType

java.lang.Object
  extended by java.lang.Enum<FileType>
      extended by com.mebigfatguy.polycasso.FileType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<FileType>

public enum FileType
extends java.lang.Enum<FileType>

an enum that represents possible save-as types


Enum Constant Summary
Java
          a java file
PNG
          A portable network graphics file
SVG
          a scalable vector graphics file
 
Method Summary
 java.lang.String getDescription()
          returns the description for this file type
 java.lang.String getExtension()
          returns the extension for this type
abstract  Saver getSaver()
          the action to save the file
static FileType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static FileType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

PNG

public static final FileType PNG
A portable network graphics file


SVG

public static final FileType SVG
a scalable vector graphics file


Java

public static final FileType Java
a java file

Method Detail

values

public static FileType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (FileType c : FileType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static FileType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getExtension

public java.lang.String getExtension()
returns the extension for this type

Returns:
the file name extension

getDescription

public java.lang.String getDescription()
returns the description for this file type

Returns:
the file type description for the save dialog

getSaver

public abstract Saver getSaver()
the action to save the file

Returns:
a saver object that will save the object in the appropriate foramt


Copyright © 2009-2010 MeBigFatGuy.com. All Rights Reserved.