backend
Class SettingsFileReader

java.lang.Object
  extended by backend.SettingsFileReader

public class SettingsFileReader
extends java.lang.Object

SettingsFileReader is meant to read in data files containing information about the program


Method Summary
 javax.vecmath.Color3f getColor3fFromTuple(java.lang.String name)
          getColor3fFromTuple returns a color3f made from the Tuple3d matching the key provided
 double getDouble(java.lang.String name)
          getDouble returns a double from the file reader given a key
 javax.vecmath.Point3d getPoint3dFromTuple(java.lang.String name)
          This function turns a Tuple3d in the data file to a Point3d
 java.lang.String getString(java.lang.String name)
          getString returns a string from the file reader given a key
 java.awt.Color getSwingColorFromTuple(java.lang.String name)
          getSwingColorFromTuple returns a swing Color object using a tuple
static SettingsFileReader instance()
          instance returns the instance of this SettingsFileReader
 void readInNewFile(java.lang.String filename)
          readInNewFile reads a new file into the SettingsFileReader
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDouble

public double getDouble(java.lang.String name)
getDouble returns a double from the file reader given a key

Parameters:
name - the key to search for
Returns:
The double for that key if one exists

getString

public java.lang.String getString(java.lang.String name)
getString returns a string from the file reader given a key

Parameters:
name - the key to search for
Returns:
a string for the key if one exists

instance

public static SettingsFileReader instance()
instance returns the instance of this SettingsFileReader

Returns:
The current instance of the SettingsFileReader

readInNewFile

public void readInNewFile(java.lang.String filename)
readInNewFile reads a new file into the SettingsFileReader

Parameters:
filename - the name of the file to read

getColor3fFromTuple

public javax.vecmath.Color3f getColor3fFromTuple(java.lang.String name)
getColor3fFromTuple returns a color3f made from the Tuple3d matching the key provided

Parameters:
name - the string key for the color3f
Returns:
The color3f for the key

getPoint3dFromTuple

public javax.vecmath.Point3d getPoint3dFromTuple(java.lang.String name)
This function turns a Tuple3d in the data file to a Point3d

Parameters:
name - the key to grab from the data file
Returns:
The Point3d constructed from the tuple

getSwingColorFromTuple

public java.awt.Color getSwingColorFromTuple(java.lang.String name)
getSwingColorFromTuple returns a swing Color object using a tuple

Parameters:
name - the name of the string to get the color from
Returns:
The color from the tuple