Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jgSettings
Class JgSettings

    java.lang.Object
      jgSettings.JgSettings

public class JgSettings
extends java.lang.Object

JgSettings maintains the settings for the program, such as catagory and selected glyphs. TODO: allow multiple catagory selections and include dirs.

Field Summary
`protected java.lang.String` | `catagory` A string representing the catagory to start with
`protected boolean` | `catagoryWasSet` Set to true if the catagory was specified on the command line
`protected GlyphSet` | `glyphs` An array of Strings representing Characters or sequences for the game
`protected boolean` | `glyphsWereSet` Set to true if glyphs were specified on the command line.
`protected java.io.File` | `includeDir` An extra directory to search for catagory folders in

Constructor Summary
`JgSettings()` Constructor that sets default setings
`JgSettings(java.lang.String[] args)` Constructor that sets settings according to the passed command line

Method Summary
`java.lang.String` | `getCatagory()` Retrieves the catagory name.
`GlyphSet` | `getGlyphSet()` Retrieves the GlyphSet instance
`java.io.File` | `getIncludeDir()` Retireves the user-specified include dir.
`protected void` | `init()` Sets the defaults
`void` | `setCatagory(java.lang.String cat, java.lang.Object src)` Sets the catagory to the supplied string, or null to indicate 'all available catagories'.
`void` | `setGlyphSet(GlyphSet gs)` Sets the glyphs used for play.
`boolean` | `shouldDrawUI()` Checks to see if the UI should be drawn to select options.
`java.lang.String` | `toString()` Returns the string representation of this class

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### glyphs

    protected GlyphSet glyphs

  An array of Strings representing Characters or sequences for the game

### glyphsWereSet

    protected boolean glyphsWereSet

  Set to true if glyphs were specified on the command line. This includes a specification of "use all glyphs"

### catagory

    protected java.lang.String catagory

  A string representing the catagory to start with

### catagoryWasSet

    protected boolean catagoryWasSet

  Set to true if the catagory was specified on the command line

### includeDir

    protected java.io.File includeDir

  An extra directory to search for catagory folders in

Constructor Detail

### JgSettings

    public JgSettings()

  Constructor that sets default setings

### JgSettings

    public JgSettings(java.lang.String[] args)

  Constructor that sets settings according to the passed command line

Method Detail

### toString

    public java.lang.String toString()

  Returns the string representation of this class

### init

    protected void init()

  Sets the defaults

### getCatagory

    public java.lang.String getCatagory()

  Retrieves the catagory name. A value of null means 'all available catagories'.

  Returns:
    the catagory name, or null if all available catagories are to be used.

### getGlyphSet

    public GlyphSet getGlyphSet()

  Retrieves the GlyphSet instance

  Returns:
    the GlyphSet instance

### getIncludeDir

    public java.io.File getIncludeDir()

  Retireves the user-specified include dir.

  Returns:
    the user-specified include dir.

### setCatagory

    public void setCatagory(java.lang.String cat,
                            java.lang.Object src)

  Sets the catagory to the supplied string, or null to indicate 'all available catagories'. If the supplied string is different from the original, fires a CatagoryChangeEvent. NOTE: This code smells.

  Parameters:
    `cat` - the catagory to set to. Use null for 'all available catagories'.
    `src` - the Object that has requested the catagory change.

### setGlyphSet

    public void setGlyphSet(GlyphSet gs)

  Sets the glyphs used for play.

  Parameters:
    `gs` - the GlyphSet to use

### shouldDrawUI

    public boolean shouldDrawUI()

  Checks to see if the UI should be drawn to select options.

  Returns:
    true if the UI needs to be drawn; false otherwise.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD