devisor2.grid.options
Class Options

java.lang.Object
  extended bydevisor2.grid.options.Options

public class Options
extends java.lang.Object

This class represents the central storage and management class for all Options the user can set throughout the whole application, and some additional settings for the GUI.

I chose an instance of java.util.Properties to hold the options, which basically provides a container to store key-value-pairs, both of type String. As keys, only the ones declared as constants below in this class are allowed.

This class also provides access to the default options, which are hard-coded in the initdefaults() method. So every time other developers intend to add further options to the application, all they have to do is:
(1) add a new unique key to the constants below (by convention, separate keys into option groups such as accelerators, view management, paths etc)
(2) add a new line to the initDefaults method using the key you just declared to provide a default initial value for the option

Note on accerelators: the prefix "accelerator" of the keys is used to determine which keys represent accelerators in the OptionsDialog's corresponding tab sheet. As accelerators are only assigned to functions available through the MainMenu, see there how to create a new menu item including mnemonic and accelerator.

Note on draw options: For easier access, use the DrawControl instance in the Control Center, which is updated automatically.

Note on dialog positions: For the three dockable dialogs, the last position the user dragged the dialog to is stored, as well as the initial position. These screen coordinates are stored as integers representing the relative position of the dialog's upper left corner to the MainFrame's upper left corner. As the initial value depends on the MainFrame's size, it is set on startup and is therefore not hard-coded.

This class is made globally accessible via the ControlCenter instance (see there for details), so all you have to do to extract an option at runtime is to call the "get (key)" method which will return the requested option as String.

Additional features are persistence, you can load and save your options as plain-text-key-value files, see the OptionsDialog class (or better its action listener OptionsActionListener) for details. To obtain further information about the file structure, browse the java language and API documentation, class Properties in package java.util, which you can browse online at the SUN web site.

See Also:
devisor2.GUI.base.dialog.OptionsDialog, devisor2.GUI.foundation.MainMenu

Field Summary
static java.lang.String accelerator_about
          key for the accelerator assigned to ABOUT
static java.lang.String accelerator_acceleratoroptions
          key for accelerator options
static java.lang.String accelerator_adjustboundaries
          key for the accelerator assigned to ADJUSTBOUNDARIES
static java.lang.String accelerator_coloroptions
          key for color options
static java.lang.String accelerator_copy
          key for the accelerator assigned to COPY
static java.lang.String accelerator_copymode
          key for the accelerator assigned to COPYMODE
static java.lang.String accelerator_cut
          key for the accelerator assigned to CUT
static java.lang.String accelerator_delete
          key for the accelerator assigned to DELETE
static java.lang.String accelerator_deleteworkingboundary
          key for the accelerator assigned to DELETEWB
static java.lang.String accelerator_directinput
          key for the accelerator assigned to DIRECTINPUT
static java.lang.String accelerator_domainperimeter
          key for the accelerator assigned to DOMAINPERIMETER
static java.lang.String accelerator_domainstatistics
          key for the accelerator assigned to DOMAINSTATISTICS
static java.lang.String accelerator_drawoptions
          key for draw options
static java.lang.String accelerator_edgestatus
          key for the accelerator assigned to EDGESTATUS
static java.lang.String accelerator_exit
          key for the accelerator assigned to EXIT
static java.lang.String accelerator_faq
          key for the accelerator assigned to FAQ
static java.lang.String accelerator_fromtri2prm
          key for the accelerator assigned to FROMTRI2PRM
static java.lang.String accelerator_generaloptions
          key for general options
static java.lang.String accelerator_linkboundaries
          key for the accelerator assigned to LINKBOUNDARIES
static java.lang.String accelerator_loadbalancing
          key for the accelerator assigned to LOADBALANCING
static java.lang.String accelerator_manual
          key for the accelerator assigned to MANUAL
static java.lang.String accelerator_merge
          key for the accelerator assigned to MERGE
static java.lang.String accelerator_mergeboundaries
          key for the accelerator assigned to MERGEBOUNDARIES
static java.lang.String accelerator_mirror
          key for the accelerator assigned to MIRROR
static java.lang.String accelerator_miscoptions
          key for misc options
static java.lang.String accelerator_multipleboundarynodes
          key for the accelerator assigned to MULTIPLEBOUNDARYNODES
static java.lang.String accelerator_new
          key for the accelerator assigned to NEW
static java.lang.String accelerator_newanalytic
          key for the accelerator assigned to NEWANALYTIC
static java.lang.String accelerator_newboundary
          key for the accelerator assigned to NEWBOUNDARY
static java.lang.String accelerator_newcirclem
          key for the accelerator assigned to NEWCIRCLEM
static java.lang.String accelerator_newcirclep
          key for the accelerator assigned to NEWCIRCLEP
static java.lang.String accelerator_newedge
          key for the accelerator assigned to NEWEDGE
static java.lang.String accelerator_newline
          key for the accelerator assigned to NEWLINE
static java.lang.String accelerator_newmacro
          key for the accelerator assigned to NEWMACRO
static java.lang.String accelerator_newmultiline
          key for the accelerator assigned to NEWMULTILINE
static java.lang.String accelerator_newnode
          key for the accelerator assigned to NEWNODE
static java.lang.String accelerator_newquad
          key for the accelerator assigned to NEWQUAD
static java.lang.String accelerator_newtri
          key for the accelerator assigned to NEWTRI
static java.lang.String accelerator_open
          key for the accelerator assigned to OPEN
static java.lang.String accelerator_parallelblock
          key for the accelerator assigned to PARALLELBLOCK
static java.lang.String accelerator_paste
          key for the accelerator assigned to PASTE
static java.lang.String accelerator_print
          key for the accelerator assigned to PRINT
static java.lang.String accelerator_printls
          key for the accelerator assigned to PRINT LANDSCAPE
static java.lang.String accelerator_readme
          key for the accelerator assigned to README
static java.lang.String accelerator_rectifyelement
          key for the accelerator assigned to RECTIFYELEMENT
static java.lang.String accelerator_redo
          key for the accelerator assigned to REDO
static java.lang.String accelerator_refine
          key for the accelerator assigned to REFINE
static java.lang.String accelerator_rotate
          key for the accelerator assigned to ROTATE
static java.lang.String accelerator_save
          key for the accelerator assigned to SAVE
static java.lang.String accelerator_saveas_feast
          key for the accelerator assigned to SAVEAS_FEAST
static java.lang.String accelerator_saveas_feat
          key for the accelerator assigned to SAVEAS_FEAT
static java.lang.String accelerator_saveas_ucd
          key for the accelerator assigned to SAVEAS_UCD
static java.lang.String accelerator_scale
          key for the accelerator assigned to SCALE
static java.lang.String accelerator_selectboundary
          key for the accelerator assigned to SELECTBOUNDARY
static java.lang.String accelerator_selectedges
          key for the accelerator assigned to SELECTEDGES
static java.lang.String accelerator_selectelements
          key for the accelerator assigned to SELECTELEMENTS
static java.lang.String accelerator_selectnodes
          key for the accelerator assigned to SELECTNODES
static java.lang.String accelerator_selectsegments
          key for the accelerator assigned to SELECTSEGMENTS
static java.lang.String accelerator_spellchecker
          key for the accelerator assigned to SPELLCHECKER
static java.lang.String accelerator_swapboundaryorientation
          key for the accelerator assigned to SWAPBOUNDARYORIENTATION
static java.lang.String accelerator_undo
          key for the accelerator assigned to UNDO
static java.lang.String accelerator_viewproperties
          key for the accelerator assigned to VIEWPROPERTIES
static java.lang.String accelerator_zoom_resetzoom
          key for the accelerator assigned to RESETZOOM
static java.lang.String accelerator_zoom_setzoom
          key for the accelerator assigned to SETZOOM
static java.lang.String accelerator_zoom_zoomminus
          key for the accelerator assigned to ZOOMMINUS
static java.lang.String accelerator_zoom_zoomplus
          key for the accelerator assigned to ZOOMPLUS
static java.lang.String click_tolerance
          key for the click tolerance
static java.lang.String color_background
          key for the color of the background
static java.lang.String color_boundary0
          key for the pallette color 0 for boundaries
static java.lang.String color_boundary1
          key for the pallette color 1 for boundaries
static java.lang.String color_boundary10
          key for the pallette color 10 for boundaries
static java.lang.String color_boundary11
          key for the pallette color 11 for boundaries
static java.lang.String color_boundary12
          key for the pallette color 12 for boundaries
static java.lang.String color_boundary13
          key for the pallette color 13 for boundaries
static java.lang.String color_boundary14
          key for the pallette color 14 for boundaries
static java.lang.String color_boundary15
          key for the pallette color 15 for boundaries
static java.lang.String color_boundary2
          key for the pallette color 2 for boundaries
static java.lang.String color_boundary3
          key for the pallette color 3 for boundaries
static java.lang.String color_boundary4
          key for the pallette color 4 for boundaries
static java.lang.String color_boundary5
          key for the pallette color 5 for boundaries
static java.lang.String color_boundary6
          key for the pallette color 6 for boundaries
static java.lang.String color_boundary7
          key for the pallette color 7 for boundaries
static java.lang.String color_boundary8
          key for the pallette color 8 for boundaries
static java.lang.String color_boundary9
          key for the pallette color 9 for boundaries
static java.lang.String color_boundarynumber
          key for the color boundarynumbers are painted with
static java.lang.String color_edge
          key for the color edges are painted with
static java.lang.String color_edgebase
          key for the base color edges are painted with
static java.lang.String color_edgenumber
          key for the color edgenumbers are painted with
static java.lang.String color_element
          key for the color elements are painted with
static java.lang.String color_elementnumber
          key for the color elementnumbers are painted with
static java.lang.String color_fill0
          key for 1st fill palette color
static java.lang.String color_fill1
          key for 2nd fill palette color
static java.lang.String color_fill10
          key for 11th fill palette color
static java.lang.String color_fill11
          key for 12th fill palette color
static java.lang.String color_fill12
          key for 13th fill palette color
static java.lang.String color_fill13
          key for 14th fill palette color
static java.lang.String color_fill14
          key for 15th fill palette color
static java.lang.String color_fill15
          key for 16th fill palette color
static java.lang.String color_fill2
          key for 3rd fill palette color
static java.lang.String color_fill3
          key for 4th fill palette color
static java.lang.String color_fill4
          key for 5th fill palette color
static java.lang.String color_fill5
          key for 6th fill palette color
static java.lang.String color_fill6
          key for 7th fill palette color
static java.lang.String color_fill7
          key for 8th fill palette color
static java.lang.String color_fill8
          key for 9th fill palette color
static java.lang.String color_fill9
          key for 10th fill palette color
static java.lang.String color_grid
          key for the color of the grid
static java.lang.String color_lasso
          key for the color of the lasso
static java.lang.String color_node
          key for the color nodes are painted with
static java.lang.String color_nodenumber
          key for the color nodenumbers are painted with
static java.lang.String color_rect
          key for the highlight color for rectangular status
static java.lang.String color_selection
          key for the highlight color for selections
static java.lang.String draw_crosselement
          key for flag if elements are crossed
static java.lang.String draw_drawboundary
          key for flag if boundaries are painted
static java.lang.String draw_drawedge
          key for flag if edges are painted
static java.lang.String draw_drawelement
          key for flag if elements are painted
static java.lang.String draw_drawgrid
          key for flag if the grid is painted
static java.lang.String draw_drawnode
          key for flag if nodes are painted
static java.lang.String draw_drawperimeter
          key for flag if the perimeter is painted
static java.lang.String draw_drawrect
          key for flag if rectangular elements are highlighted
static java.lang.String draw_fillelement
          key for flag if elements are filled
static java.lang.String draw_numberboundary
          key for flag if boundary numbers are painted
static java.lang.String draw_numberedge
          key for flag if edge numbers are painted
static java.lang.String draw_numberelement
          key for flag if element numbers are painted
static java.lang.String draw_numbernode
          key for flag if node numbers are painted
static java.lang.String draw_orientationmarkers
          key for flag if orientation markers are drawn
static java.lang.String draw_usercoords
          key for flag if user coords are displayed
static java.lang.String epsilon
          key for global epsilon
static java.lang.String font_numbering
          font used for numbering
static java.lang.String font_numbering_size
          size of that font
static java.lang.String font_numbering_style
          style
static java.lang.String general_devisorhome
          key for the DEVISORHOME path
static java.lang.String general_faqfile
          key for the faqfile path+name
static java.lang.String general_featlib
          key for the feat path
static java.lang.String general_helpfile
          key for the helpfile path+name
static java.lang.String general_path
          key for the general path used for load-save-dialogs
static java.lang.String general_trigen
          key for the trigen path
static java.lang.String mainframe_height
          key for the MainFrame's height
static java.lang.String mainframe_width
          key for the MainFrame's width
static java.lang.String mainframe_x
          key for the MainFrame's origin (horizontal)
static java.lang.String mainframe_y
          key for the MainFrame's origin (vertical)
static java.lang.String metis_command
          key for the metis mesher used for partioning
static java.lang.String other_locale_country
          key for the country code for the locale used
static java.lang.String other_locale_language
          key for the the language code for the locale used
static java.lang.String other_lookandfeel
          key for the Look&Feel used
static java.lang.String other_ResourceBundleName
          key for the name of the resource bundle backing the locale
static java.lang.String other_undosteps
          key for the maximum number of undoable steps
static java.lang.String screenx
          key for the width of the main frame
static java.lang.String screeny
          key for the height of the main frame
static java.lang.String snap_enabled
          key for snap enabling
static java.lang.String snap_x
          key for snap value in x direction
static java.lang.String snap_y
          key for snap value in y direction
 
Constructor Summary
Options()
          the Constructor just creates a new Options object and initializes the factory default settings
 
Method Summary
 java.lang.String get(java.lang.String key)
          Returns the String value saved under the given key.
 java.lang.String getDefault(java.lang.String key)
          returns the default object saved under the given key
 java.lang.String getHeader()
          returns the current header for config files
 boolean isAlreadyAccelerator(java.lang.String accelerator)
          This method just checks if the given accelerator is already in use in the application
 java.util.Enumeration keys()
          returns an enumeration of all the keys in the options file
 void load(java.lang.String filename)
          loads user settings from a file
 void resetToDefaults()
          Resets all user-modified options to factory defaults
 void save(java.lang.String filename)
          saves the user settings to a file
 void set(java.lang.String key, java.lang.String newObject)
          sets the value saved under the given key to the new Object
 void setHeader(java.lang.String header)
          sets the config file header text to a specific user-defined value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mainframe_width

public static final java.lang.String mainframe_width
key for the MainFrame's width

See Also:
Constant Field Values

mainframe_height

public static final java.lang.String mainframe_height
key for the MainFrame's height

See Also:
Constant Field Values

mainframe_x

public static final java.lang.String mainframe_x
key for the MainFrame's origin (horizontal)

See Also:
Constant Field Values

mainframe_y

public static final java.lang.String mainframe_y
key for the MainFrame's origin (vertical)

See Also:
Constant Field Values

metis_command

public static final java.lang.String metis_command
key for the metis mesher used for partioning

See Also:
Constant Field Values

general_path

public static final java.lang.String general_path
key for the general path used for load-save-dialogs

See Also:
Constant Field Values

screenx

public static final java.lang.String screenx
key for the width of the main frame

See Also:
Constant Field Values

screeny

public static final java.lang.String screeny
key for the height of the main frame

See Also:
Constant Field Values

general_devisorhome

public static final java.lang.String general_devisorhome
key for the DEVISORHOME path

See Also:
Constant Field Values

general_helpfile

public static final java.lang.String general_helpfile
key for the helpfile path+name

See Also:
Constant Field Values

general_faqfile

public static final java.lang.String general_faqfile
key for the faqfile path+name

See Also:
Constant Field Values

general_trigen

public static final java.lang.String general_trigen
key for the trigen path

See Also:
Constant Field Values

general_featlib

public static final java.lang.String general_featlib
key for the feat path

See Also:
Constant Field Values

other_lookandfeel

public static final java.lang.String other_lookandfeel
key for the Look&Feel used

See Also:
Constant Field Values

other_locale_country

public static final java.lang.String other_locale_country
key for the country code for the locale used

See Also:
Constant Field Values

other_locale_language

public static final java.lang.String other_locale_language
key for the the language code for the locale used

See Also:
Constant Field Values

other_ResourceBundleName

public static final java.lang.String other_ResourceBundleName
key for the name of the resource bundle backing the locale

See Also:
Constant Field Values

other_undosteps

public static final java.lang.String other_undosteps
key for the maximum number of undoable steps

See Also:
Constant Field Values

draw_usercoords

public static final java.lang.String draw_usercoords
key for flag if user coords are displayed

See Also:
Constant Field Values

draw_orientationmarkers

public static final java.lang.String draw_orientationmarkers
key for flag if orientation markers are drawn

See Also:
Constant Field Values

draw_drawboundary

public static final java.lang.String draw_drawboundary
key for flag if boundaries are painted

See Also:
Constant Field Values

draw_numberboundary

public static final java.lang.String draw_numberboundary
key for flag if boundary numbers are painted

See Also:
Constant Field Values

draw_drawnode

public static final java.lang.String draw_drawnode
key for flag if nodes are painted

See Also:
Constant Field Values

draw_numbernode

public static final java.lang.String draw_numbernode
key for flag if node numbers are painted

See Also:
Constant Field Values

draw_drawedge

public static final java.lang.String draw_drawedge
key for flag if edges are painted

See Also:
Constant Field Values

draw_numberedge

public static final java.lang.String draw_numberedge
key for flag if edge numbers are painted

See Also:
Constant Field Values

draw_drawelement

public static final java.lang.String draw_drawelement
key for flag if elements are painted

See Also:
Constant Field Values

draw_numberelement

public static final java.lang.String draw_numberelement
key for flag if element numbers are painted

See Also:
Constant Field Values

draw_crosselement

public static final java.lang.String draw_crosselement
key for flag if elements are crossed

See Also:
Constant Field Values

draw_fillelement

public static final java.lang.String draw_fillelement
key for flag if elements are filled

See Also:
Constant Field Values

draw_drawgrid

public static final java.lang.String draw_drawgrid
key for flag if the grid is painted

See Also:
Constant Field Values

draw_drawperimeter

public static final java.lang.String draw_drawperimeter
key for flag if the perimeter is painted

See Also:
Constant Field Values

draw_drawrect

public static final java.lang.String draw_drawrect
key for flag if rectangular elements are highlighted

See Also:
Constant Field Values

click_tolerance

public static final java.lang.String click_tolerance
key for the click tolerance

See Also:
Constant Field Values

snap_enabled

public static final java.lang.String snap_enabled
key for snap enabling

See Also:
Constant Field Values

snap_x

public static final java.lang.String snap_x
key for snap value in x direction

See Also:
Constant Field Values

snap_y

public static final java.lang.String snap_y
key for snap value in y direction

See Also:
Constant Field Values

epsilon

public static final java.lang.String epsilon
key for global epsilon

See Also:
Constant Field Values

color_node

public static final java.lang.String color_node
key for the color nodes are painted with

See Also:
Constant Field Values

color_edgebase

public static final java.lang.String color_edgebase
key for the base color edges are painted with

See Also:
Constant Field Values

color_edge

public static final java.lang.String color_edge
key for the color edges are painted with

See Also:
Constant Field Values

color_element

public static final java.lang.String color_element
key for the color elements are painted with

See Also:
Constant Field Values

color_boundarynumber

public static final java.lang.String color_boundarynumber
key for the color boundarynumbers are painted with

See Also:
Constant Field Values

color_nodenumber

public static final java.lang.String color_nodenumber
key for the color nodenumbers are painted with

See Also:
Constant Field Values

color_edgenumber

public static final java.lang.String color_edgenumber
key for the color edgenumbers are painted with

See Also:
Constant Field Values

color_elementnumber

public static final java.lang.String color_elementnumber
key for the color elementnumbers are painted with

See Also:
Constant Field Values

color_fill0

public static final java.lang.String color_fill0
key for 1st fill palette color

See Also:
Constant Field Values

color_fill1

public static final java.lang.String color_fill1
key for 2nd fill palette color

See Also:
Constant Field Values

color_fill2

public static final java.lang.String color_fill2
key for 3rd fill palette color

See Also:
Constant Field Values

color_fill3

public static final java.lang.String color_fill3
key for 4th fill palette color

See Also:
Constant Field Values

color_fill4

public static final java.lang.String color_fill4
key for 5th fill palette color

See Also:
Constant Field Values

color_fill5

public static final java.lang.String color_fill5
key for 6th fill palette color

See Also:
Constant Field Values

color_fill6

public static final java.lang.String color_fill6
key for 7th fill palette color

See Also:
Constant Field Values

color_fill7

public static final java.lang.String color_fill7
key for 8th fill palette color

See Also:
Constant Field Values

color_fill8

public static final java.lang.String color_fill8
key for 9th fill palette color

See Also:
Constant Field Values

color_fill9

public static final java.lang.String color_fill9
key for 10th fill palette color

See Also:
Constant Field Values

color_fill10

public static final java.lang.String color_fill10
key for 11th fill palette color

See Also:
Constant Field Values

color_fill11

public static final java.lang.String color_fill11
key for 12th fill palette color

See Also:
Constant Field Values

color_fill12

public static final java.lang.String color_fill12
key for 13th fill palette color

See Also:
Constant Field Values

color_fill13

public static final java.lang.String color_fill13
key for 14th fill palette color

See Also:
Constant Field Values

color_fill14

public static final java.lang.String color_fill14
key for 15th fill palette color

See Also:
Constant Field Values

color_fill15

public static final java.lang.String color_fill15
key for 16th fill palette color

See Also:
Constant Field Values

color_selection

public static final java.lang.String color_selection
key for the highlight color for selections

See Also:
Constant Field Values

color_rect

public static final java.lang.String color_rect
key for the highlight color for rectangular status

See Also:
Constant Field Values

color_grid

public static final java.lang.String color_grid
key for the color of the grid

See Also:
Constant Field Values

color_background

public static final java.lang.String color_background
key for the color of the background

See Also:
Constant Field Values

color_lasso

public static final java.lang.String color_lasso
key for the color of the lasso

See Also:
Constant Field Values

color_boundary0

public static final java.lang.String color_boundary0
key for the pallette color 0 for boundaries

See Also:
Constant Field Values

color_boundary1

public static final java.lang.String color_boundary1
key for the pallette color 1 for boundaries

See Also:
Constant Field Values

color_boundary2

public static final java.lang.String color_boundary2
key for the pallette color 2 for boundaries

See Also:
Constant Field Values

color_boundary3

public static final java.lang.String color_boundary3
key for the pallette color 3 for boundaries

See Also:
Constant Field Values

color_boundary4

public static final java.lang.String color_boundary4
key for the pallette color 4 for boundaries

See Also:
Constant Field Values

color_boundary5

public static final java.lang.String color_boundary5
key for the pallette color 5 for boundaries

See Also:
Constant Field Values

color_boundary6

public static final java.lang.String color_boundary6
key for the pallette color 6 for boundaries

See Also:
Constant Field Values

color_boundary7

public static final java.lang.String color_boundary7
key for the pallette color 7 for boundaries

See Also:
Constant Field Values

color_boundary8

public static final java.lang.String color_boundary8
key for the pallette color 8 for boundaries

See Also:
Constant Field Values

color_boundary9

public static final java.lang.String color_boundary9
key for the pallette color 9 for boundaries

See Also:
Constant Field Values

color_boundary10

public static final java.lang.String color_boundary10
key for the pallette color 10 for boundaries

See Also:
Constant Field Values

color_boundary11

public static final java.lang.String color_boundary11
key for the pallette color 11 for boundaries

See Also:
Constant Field Values

color_boundary12

public static final java.lang.String color_boundary12
key for the pallette color 12 for boundaries

See Also:
Constant Field Values

color_boundary13

public static final java.lang.String color_boundary13
key for the pallette color 13 for boundaries

See Also:
Constant Field Values

color_boundary14

public static final java.lang.String color_boundary14
key for the pallette color 14 for boundaries

See Also:
Constant Field Values

color_boundary15

public static final java.lang.String color_boundary15
key for the pallette color 15 for boundaries

See Also:
Constant Field Values

font_numbering

public static final java.lang.String font_numbering
font used for numbering

See Also:
Constant Field Values

font_numbering_size

public static final java.lang.String font_numbering_size
size of that font

See Also:
Constant Field Values

font_numbering_style

public static final java.lang.String font_numbering_style
style

See Also:
Constant Field Values

accelerator_new

public static final java.lang.String accelerator_new
key for the accelerator assigned to NEW

See Also:
Constant Field Values

accelerator_open

public static final java.lang.String accelerator_open
key for the accelerator assigned to OPEN

See Also:
Constant Field Values

accelerator_save

public static final java.lang.String accelerator_save
key for the accelerator assigned to SAVE

See Also:
Constant Field Values

accelerator_saveas_ucd

public static final java.lang.String accelerator_saveas_ucd
key for the accelerator assigned to SAVEAS_UCD

See Also:
Constant Field Values

accelerator_saveas_feat

public static final java.lang.String accelerator_saveas_feat
key for the accelerator assigned to SAVEAS_FEAT

See Also:
Constant Field Values

accelerator_saveas_feast

public static final java.lang.String accelerator_saveas_feast
key for the accelerator assigned to SAVEAS_FEAST

See Also:
Constant Field Values

accelerator_merge

public static final java.lang.String accelerator_merge
key for the accelerator assigned to MERGE

See Also:
Constant Field Values

accelerator_print

public static final java.lang.String accelerator_print
key for the accelerator assigned to PRINT

See Also:
Constant Field Values

accelerator_printls

public static final java.lang.String accelerator_printls
key for the accelerator assigned to PRINT LANDSCAPE

See Also:
Constant Field Values

accelerator_exit

public static final java.lang.String accelerator_exit
key for the accelerator assigned to EXIT

See Also:
Constant Field Values

accelerator_undo

public static final java.lang.String accelerator_undo
key for the accelerator assigned to UNDO

See Also:
Constant Field Values

accelerator_redo

public static final java.lang.String accelerator_redo
key for the accelerator assigned to REDO

See Also:
Constant Field Values

accelerator_cut

public static final java.lang.String accelerator_cut
key for the accelerator assigned to CUT

See Also:
Constant Field Values

accelerator_copy

public static final java.lang.String accelerator_copy
key for the accelerator assigned to COPY

See Also:
Constant Field Values

accelerator_paste

public static final java.lang.String accelerator_paste
key for the accelerator assigned to PASTE

See Also:
Constant Field Values

accelerator_copymode

public static final java.lang.String accelerator_copymode
key for the accelerator assigned to COPYMODE

See Also:
Constant Field Values

accelerator_delete

public static final java.lang.String accelerator_delete
key for the accelerator assigned to DELETE

See Also:
Constant Field Values

accelerator_deleteworkingboundary

public static final java.lang.String accelerator_deleteworkingboundary
key for the accelerator assigned to DELETEWB

See Also:
Constant Field Values

accelerator_scale

public static final java.lang.String accelerator_scale
key for the accelerator assigned to SCALE

See Also:
Constant Field Values

accelerator_rotate

public static final java.lang.String accelerator_rotate
key for the accelerator assigned to ROTATE

See Also:
Constant Field Values

accelerator_mirror

public static final java.lang.String accelerator_mirror
key for the accelerator assigned to MIRROR

See Also:
Constant Field Values

accelerator_selectboundary

public static final java.lang.String accelerator_selectboundary
key for the accelerator assigned to SELECTBOUNDARY

See Also:
Constant Field Values

accelerator_zoom_setzoom

public static final java.lang.String accelerator_zoom_setzoom
key for the accelerator assigned to SETZOOM

See Also:
Constant Field Values

accelerator_zoom_resetzoom

public static final java.lang.String accelerator_zoom_resetzoom
key for the accelerator assigned to RESETZOOM

See Also:
Constant Field Values

accelerator_zoom_zoomplus

public static final java.lang.String accelerator_zoom_zoomplus
key for the accelerator assigned to ZOOMPLUS

See Also:
Constant Field Values

accelerator_zoom_zoomminus

public static final java.lang.String accelerator_zoom_zoomminus
key for the accelerator assigned to ZOOMMINUS

See Also:
Constant Field Values

accelerator_selectnodes

public static final java.lang.String accelerator_selectnodes
key for the accelerator assigned to SELECTNODES

See Also:
Constant Field Values

accelerator_selectelements

public static final java.lang.String accelerator_selectelements
key for the accelerator assigned to SELECTELEMENTS

See Also:
Constant Field Values

accelerator_selectsegments

public static final java.lang.String accelerator_selectsegments
key for the accelerator assigned to SELECTSEGMENTS

See Also:
Constant Field Values

accelerator_selectedges

public static final java.lang.String accelerator_selectedges
key for the accelerator assigned to SELECTEDGES

See Also:
Constant Field Values

accelerator_viewproperties

public static final java.lang.String accelerator_viewproperties
key for the accelerator assigned to VIEWPROPERTIES

See Also:
Constant Field Values

accelerator_newboundary

public static final java.lang.String accelerator_newboundary
key for the accelerator assigned to NEWBOUNDARY

See Also:
Constant Field Values

accelerator_directinput

public static final java.lang.String accelerator_directinput
key for the accelerator assigned to DIRECTINPUT

See Also:
Constant Field Values

accelerator_newline

public static final java.lang.String accelerator_newline
key for the accelerator assigned to NEWLINE

See Also:
Constant Field Values

accelerator_newmultiline

public static final java.lang.String accelerator_newmultiline
key for the accelerator assigned to NEWMULTILINE

See Also:
Constant Field Values

accelerator_newcirclep

public static final java.lang.String accelerator_newcirclep
key for the accelerator assigned to NEWCIRCLEP

See Also:
Constant Field Values

accelerator_newcirclem

public static final java.lang.String accelerator_newcirclem
key for the accelerator assigned to NEWCIRCLEM

See Also:
Constant Field Values

accelerator_newanalytic

public static final java.lang.String accelerator_newanalytic
key for the accelerator assigned to NEWANALYTIC

See Also:
Constant Field Values

accelerator_newedge

public static final java.lang.String accelerator_newedge
key for the accelerator assigned to NEWEDGE

See Also:
Constant Field Values

accelerator_newtri

public static final java.lang.String accelerator_newtri
key for the accelerator assigned to NEWTRI

See Also:
Constant Field Values

accelerator_newquad

public static final java.lang.String accelerator_newquad
key for the accelerator assigned to NEWQUAD

See Also:
Constant Field Values

accelerator_newmacro

public static final java.lang.String accelerator_newmacro
key for the accelerator assigned to NEWMACRO

See Also:
Constant Field Values

accelerator_newnode

public static final java.lang.String accelerator_newnode
key for the accelerator assigned to NEWNODE

See Also:
Constant Field Values

accelerator_adjustboundaries

public static final java.lang.String accelerator_adjustboundaries
key for the accelerator assigned to ADJUSTBOUNDARIES

See Also:
Constant Field Values

accelerator_linkboundaries

public static final java.lang.String accelerator_linkboundaries
key for the accelerator assigned to LINKBOUNDARIES

See Also:
Constant Field Values

accelerator_fromtri2prm

public static final java.lang.String accelerator_fromtri2prm
key for the accelerator assigned to FROMTRI2PRM

See Also:
Constant Field Values

accelerator_swapboundaryorientation

public static final java.lang.String accelerator_swapboundaryorientation
key for the accelerator assigned to SWAPBOUNDARYORIENTATION

See Also:
Constant Field Values

accelerator_domainperimeter

public static final java.lang.String accelerator_domainperimeter
key for the accelerator assigned to DOMAINPERIMETER

See Also:
Constant Field Values

accelerator_domainstatistics

public static final java.lang.String accelerator_domainstatistics
key for the accelerator assigned to DOMAINSTATISTICS

See Also:
Constant Field Values

accelerator_multipleboundarynodes

public static final java.lang.String accelerator_multipleboundarynodes
key for the accelerator assigned to MULTIPLEBOUNDARYNODES

See Also:
Constant Field Values

accelerator_edgestatus

public static final java.lang.String accelerator_edgestatus
key for the accelerator assigned to EDGESTATUS

See Also:
Constant Field Values

accelerator_parallelblock

public static final java.lang.String accelerator_parallelblock
key for the accelerator assigned to PARALLELBLOCK

See Also:
Constant Field Values

accelerator_loadbalancing

public static final java.lang.String accelerator_loadbalancing
key for the accelerator assigned to LOADBALANCING

See Also:
Constant Field Values

accelerator_rectifyelement

public static final java.lang.String accelerator_rectifyelement
key for the accelerator assigned to RECTIFYELEMENT

See Also:
Constant Field Values

accelerator_refine

public static final java.lang.String accelerator_refine
key for the accelerator assigned to REFINE

See Also:
Constant Field Values

accelerator_spellchecker

public static final java.lang.String accelerator_spellchecker
key for the accelerator assigned to SPELLCHECKER

See Also:
Constant Field Values

accelerator_mergeboundaries

public static final java.lang.String accelerator_mergeboundaries
key for the accelerator assigned to MERGEBOUNDARIES

See Also:
Constant Field Values

accelerator_generaloptions

public static final java.lang.String accelerator_generaloptions
key for general options

See Also:
Constant Field Values

accelerator_drawoptions

public static final java.lang.String accelerator_drawoptions
key for draw options

See Also:
Constant Field Values

accelerator_coloroptions

public static final java.lang.String accelerator_coloroptions
key for color options

See Also:
Constant Field Values

accelerator_acceleratoroptions

public static final java.lang.String accelerator_acceleratoroptions
key for accelerator options

See Also:
Constant Field Values

accelerator_miscoptions

public static final java.lang.String accelerator_miscoptions
key for misc options

See Also:
Constant Field Values

accelerator_manual

public static final java.lang.String accelerator_manual
key for the accelerator assigned to MANUAL

See Also:
Constant Field Values

accelerator_faq

public static final java.lang.String accelerator_faq
key for the accelerator assigned to FAQ

See Also:
Constant Field Values

accelerator_readme

public static final java.lang.String accelerator_readme
key for the accelerator assigned to README

See Also:
Constant Field Values

accelerator_about

public static final java.lang.String accelerator_about
key for the accelerator assigned to ABOUT

See Also:
Constant Field Values
Constructor Detail

Options

public Options()
the Constructor just creates a new Options object and initializes the factory default settings

Method Detail

save

public void save(java.lang.String filename)
          throws java.io.IOException,
                 java.lang.ClassCastException,
                 java.io.FileNotFoundException
saves the user settings to a file

Parameters:
filename - the filename (full path) where to save to
Throws:
java.io.IOException - - if an IOexception occurred during writing
java.lang.ClassCastException - - if the keys in the file could not be casted to Strings
java.io.FileNotFoundException - - if the file could not be opened for writing

load

public void load(java.lang.String filename)
          throws java.io.IOException,
                 java.lang.ClassCastException,
                 java.io.FileNotFoundException
loads user settings from a file

Parameters:
filename - the filename (full path) where to load from
Throws:
java.io.IOException - - if an IOexception occurred during reading
java.lang.ClassCastException - - if the keys in the file could not be casted to Strings
java.io.FileNotFoundException - if the file could not be found

keys

public java.util.Enumeration keys()
returns an enumeration of all the keys in the options file


setHeader

public void setHeader(java.lang.String header)
sets the config file header text to a specific user-defined value

Parameters:
header - - a String containing the new header

getHeader

public java.lang.String getHeader()
returns the current header for config files

Returns:
the current header as a String

resetToDefaults

public void resetToDefaults()
Resets all user-modified options to factory defaults


get

public java.lang.String get(java.lang.String key)
Returns the String value saved under the given key. If no such value is found, returns the corresponding default value. if no key can be found, an empty String is returned.

Parameters:
key - - one of the constants declared in this class
Returns:
the corresponding value as a String

getDefault

public java.lang.String getDefault(java.lang.String key)
returns the default object saved under the given key

Parameters:
key - - the key to the option you want the default for
Returns:
the default option for the given key

set

public void set(java.lang.String key,
                java.lang.String newObject)
sets the value saved under the given key to the new Object

Parameters:
key - the key for the new value
newObject - the new value itself

isAlreadyAccelerator

public boolean isAlreadyAccelerator(java.lang.String accelerator)
This method just checks if the given accelerator is already in use in the application

Parameters:
accelerator - - a String representation of an accelerator
Returns:
true if the accelerator is already in use, false otherwise