1 package devisor2.grid.options;
2 
3 import java.util.*;
4 import java.io.*;
5 import javax.swing.*;
6 import java.awt.*;
7 import java.awt.event.*;
8 
9 /**
10  *  This class represents the central storage and management class for
11  *  all Options the user can set throughout the whole application, and some
12  *  additional settings for the GUI. <br>
13  *  <br>
14  *  I chose an instance of java.util.Properties to hold the options,
15  *  which basically provides a container to store key-value-pairs, both
16  *  of type String.
17  *  As keys, only the ones declared as constants below in this class are
18  *  allowed. <br>
19  *  <br>
20  *  This class also provides access to the default options, which are
21  *  hard-coded in the initdefaults() method. So every time other
22  *  developers intend to add further options to the application, all they
23  *  have to do is: <br>
24  *  (1) add a new unique key to the constants below (by convention, separate
25  *      keys into option groups such as accelerators, view management, paths
26  *      etc) <br>
27  *  (2) add a new line to the initDefaults method using the key you just
28  *      declared to provide a default initial value for the option <br>
29  *  <br>
30  *  Note on accerelators: the prefix "accelerator" of the keys is used to
31  *  determine which keys represent accelerators in the OptionsDialog's
32  *  corresponding tab sheet. As accelerators are only assigned to functions
33  *  available through the MainMenu, see there how to create a new
34  *  menu item including mnemonic and accelerator. <br>
35  *  <br>
36  *  Note on draw options: For easier access, use the DrawControl instance in
37  *  the Control Center, which is updated automatically.<br>
38  *  <br>
39  *  Note on dialog positions: For the three dockable dialogs, the last
40  *  position the user dragged the dialog to is stored, as well as the initial
41  *  position. These screen coordinates are stored as integers representing
42  *  the relative position of the dialog's upper left corner to the MainFrame's
43  *  upper left corner. As the initial value depends on the MainFrame's size,
44  *  it is set on startup and is therefore not hard-coded.<br>
45  *  <br>
46  *  This class is made globally accessible via the ControlCenter instance
47  *  (see there for details), so all you have to do to extract an option
48  *  at runtime is to call the "get (key)" method which will return the
49  *  requested option as String. <br>
50  *  <br>
51  *  Additional features are persistence, you can load and save your options
52  *  as plain-text-key-value files, see the OptionsDialog class
53  *  (or better its action listener OptionsActionListener) for details.
54  *  To obtain further information about the file structure, browse the
55  *  java language and API documentation, class Properties in package
56  *  java.util, which you can browse online at the SUN web site. <br>
57  *
58  *
59  *  @author Dominik Goeddeke
60  *  @see devisor2.GUI.base.dialog.OptionsDialog
61  *  @see devisor2.GUI.foundation.MainMenu
62  *  @version 0.9 (fully tested, but still further Options being added)
63  *
64  */
65 
66 
67 public class Options
68 {
69 
70     private Properties optiontable;
71     private static Properties defaults;
72     private String header = "DeViSoRGrid2 Options file, please do not modify";
73 
74 
75     /**
76      *  the Constructor just creates a new Options object and initializes the
77      *  factory default settings
78      */
Options()79     public Options ()
80     {
81 	optiontable = new Properties ();
82 	initDefaults ();
83     }
84 
85     /**
86      *  fills the defaults hashtable
87      */
initDefaults()88     private void initDefaults ()
89     {
90 	defaults = new Properties ();
91 
92 	defaults.setProperty (other_locale_country,"US");
93 	defaults.setProperty (other_locale_language,"en");
94 	defaults.setProperty (other_ResourceBundleName, "devisor2.grid.options.Locale");
95 	defaults.setProperty (other_undosteps, "20");
96 	defaults.setProperty (general_path, System.getProperty("user.dir"));
97 	defaults.setProperty (screenx, "1024");
98 	defaults.setProperty (screeny, "768");
99 	defaults.setProperty (metis_command, "/usr/local/metis/partnmesh");
100 	defaults.setProperty (general_devisorhome, System.getProperty("devisorgrid.home"));
101 	defaults.setProperty (general_trigen, System.getProperty("user.dir")+System.getProperty("file.separator")+"trigen2d");
102 	defaults.setProperty (general_featlib, "/home/people/featflow/");
103 	defaults.setProperty (other_lookandfeel, "javax.swing.plaf.metal.MetalLookAndFeel");
104 	// FOR SOME REASON, THE CONSTRUCTOR FOR THE URLTEXTAREA DOES
105 	// NOT ACCEPT THE ~ SYSTEM PROPERTY :-(
106 	defaults.setProperty (general_helpfile, "file://"+defaults.getProperty(general_devisorhome)+System.getProperty("file.separator")+"manual"+System.getProperty("file.separator")+"html"+System.getProperty("file.separator")+"DeViSoRGrid2_Manual.html");
107 	defaults.setProperty (general_faqfile, "file://"+defaults.getProperty(general_devisorhome)+System.getProperty("file.separator")+"manual"+System.getProperty("file.separator")+"html"+System.getProperty("file.separator")+"FAQ.html");
108 	// default draw options
109 	defaults.setProperty (draw_usercoords, "true");
110 	defaults.setProperty (draw_orientationmarkers, "true");
111 	defaults.setProperty (draw_drawboundary,"true");
112 	defaults.setProperty (draw_numberboundary,"true");
113 	defaults.setProperty (draw_drawnode,"true");
114 	defaults.setProperty (draw_numbernode,"true");
115 	defaults.setProperty (draw_drawedge,"true");
116 	defaults.setProperty (draw_numberedge,"true");
117 	defaults.setProperty (draw_drawelement,"true");
118 	defaults.setProperty (draw_numberelement,"true");
119 	defaults.setProperty (draw_crosselement,"false");
120 	defaults.setProperty (draw_fillelement,"false");
121 	defaults.setProperty (draw_drawgrid,"true");
122 	defaults.setProperty (draw_drawperimeter,"true");
123 	defaults.setProperty (draw_drawrect,"true");
124 	defaults.setProperty (click_tolerance, Integer.toString(5));
125 	defaults.setProperty (snap_enabled, "true");
126 	defaults.setProperty (snap_x, Integer.toString (10));
127 	defaults.setProperty (snap_y, Integer.toString (10));
128 	defaults.setProperty (epsilon, Integer.toString (40));
129 	// default colors
130 	defaults.setProperty (color_node, Integer.toString((Color.black).getRGB()));
131 	defaults.setProperty (color_edge, Integer.toString((Color.gray).getRGB()));
132 	defaults.setProperty (color_edgebase, Integer.toString((Color.black).getRGB()));
133 	defaults.setProperty (color_element, Integer.toString((Color.green).getRGB()));
134 	defaults.setProperty (color_boundarynumber, Integer.toString((Color.red).getRGB()));
135 	defaults.setProperty (color_nodenumber, Integer.toString((Color.red).getRGB()));
136 	defaults.setProperty (color_edgenumber, Integer.toString((Color.red).getRGB()));
137 	defaults.setProperty (color_elementnumber, Integer.toString((Color.black).getRGB()));
138 	defaults.setProperty (color_fill0, Integer.toString((Color.blue).getRGB()));
139 	defaults.setProperty (color_fill1, Integer.toString((Color.green).getRGB()));
140 	defaults.setProperty (color_fill2, Integer.toString((Color.cyan).getRGB()));
141 	defaults.setProperty (color_fill3, Integer.toString((Color.darkGray).getRGB()));
142 	defaults.setProperty (color_fill4, Integer.toString((Color.magenta).getRGB()));
143 	defaults.setProperty (color_fill5, Integer.toString((Color.orange).getRGB()));
144 	defaults.setProperty (color_fill6, Integer.toString((Color.pink).getRGB()));
145 	defaults.setProperty (color_fill7, Integer.toString((Color.red).getRGB()));
146 	defaults.setProperty (color_fill8, Integer.toString((Color.blue).getRGB()));
147 	defaults.setProperty (color_fill9, Integer.toString((Color.green).getRGB()));
148 	defaults.setProperty (color_fill10, Integer.toString((Color.darkGray).getRGB()));
149 	defaults.setProperty (color_fill11, Integer.toString((Color.cyan).getRGB()));
150 	defaults.setProperty (color_fill12, Integer.toString((Color.magenta).getRGB()));
151 	defaults.setProperty (color_fill13, Integer.toString((Color.orange).getRGB()));
152 	defaults.setProperty (color_fill14, Integer.toString((Color.pink).getRGB()));
153 	defaults.setProperty (color_fill15, Integer.toString((Color.red).getRGB()));
154 	defaults.setProperty (color_selection, Integer.toString((Color.blue).getRGB()));
155 	defaults.setProperty (color_rect, Integer.toString((Color.red).getRGB()));
156 	defaults.setProperty (color_grid, Integer.toString((Color.black).getRGB()));
157 	defaults.setProperty (color_background, Integer.toString((Color.white).getRGB()));
158 	defaults.setProperty (color_lasso, Integer.toString((Color.red).getRGB()));
159 	defaults.setProperty (color_boundary0, Integer.toString((Color.red).getRGB()));
160 	defaults.setProperty (color_boundary1, Integer.toString((Color.blue).getRGB()));
161 	defaults.setProperty (color_boundary2, Integer.toString((Color.yellow).getRGB()));
162 	defaults.setProperty (color_boundary3, Integer.toString((Color.cyan).getRGB()));
163 	defaults.setProperty (color_boundary4, Integer.toString((Color.magenta).getRGB()));
164 	defaults.setProperty (color_boundary5, Integer.toString((Color.red).getRGB()));
165 	defaults.setProperty (color_boundary6, Integer.toString((Color.blue).getRGB()));
166 	defaults.setProperty (color_boundary7, Integer.toString((Color.yellow).getRGB()));
167 	defaults.setProperty (color_boundary8, Integer.toString((Color.cyan).getRGB()));
168 	defaults.setProperty (color_boundary9, Integer.toString((Color.magenta).getRGB()));
169 	defaults.setProperty (color_boundary10, Integer.toString((Color.red).getRGB()));
170 	defaults.setProperty (color_boundary11, Integer.toString((Color.blue).getRGB()));
171 	defaults.setProperty (color_boundary12, Integer.toString((Color.yellow).getRGB()));
172 	defaults.setProperty (color_boundary13, Integer.toString((Color.cyan).getRGB()));
173 	defaults.setProperty (color_boundary14, Integer.toString((Color.magenta).getRGB()));
174 	defaults.setProperty (color_boundary15, Integer.toString((Color.red).getRGB()));
175 
176 	// default fonts
177 	defaults.setProperty(font_numbering, "TimesRoman");
178 	defaults.setProperty(font_numbering_size, "12");
179 	defaults.setProperty(font_numbering_style, Integer.toString(Font.PLAIN));
180 	// default accelerator mappings
181 	defaults.setProperty (accelerator_new, "NONE");
182 	defaults.setProperty (accelerator_open, "F3");
183 	defaults.setProperty (accelerator_save, "CTRL+S");
184 	defaults.setProperty (accelerator_saveas_ucd, "NONE");
185 	defaults.setProperty (accelerator_saveas_feat, "NONE");
186 	defaults.setProperty (accelerator_saveas_feast, "NONE");
187 	defaults.setProperty (accelerator_merge, "NONE");
188 	defaults.setProperty (accelerator_print, "NONE");
189 	defaults.setProperty (accelerator_printls, "NONE");
190 	defaults.setProperty (accelerator_exit, "ALT+F4");
191 	defaults.setProperty (accelerator_undo, "CTRL+Z");
192 	defaults.setProperty (accelerator_redo, "NONE");
193 	defaults.setProperty (accelerator_cut, "CTRL+X");
194 	defaults.setProperty (accelerator_copy, "CTRL+C");
195 	defaults.setProperty (accelerator_paste, "CTRL+V");
196 	defaults.setProperty (accelerator_copymode, "NONE");
197 	defaults.setProperty (accelerator_delete, "CTRL-D");
198 	defaults.setProperty (accelerator_deleteworkingboundary, "NONE");
199 	defaults.setProperty (accelerator_scale, "NONE");
200 	defaults.setProperty (accelerator_rotate, "NONE");
201 	defaults.setProperty (accelerator_mirror, "NONE");
202 	defaults.setProperty (accelerator_selectboundary, "NONE");
203 	defaults.setProperty (accelerator_zoom_setzoom, "NONE");
204 	defaults.setProperty (accelerator_zoom_resetzoom, "NONE");
205 	defaults.setProperty (accelerator_zoom_zoomplus, "NONE");
206 	defaults.setProperty (accelerator_zoom_zoomminus, "NONE");
207 	defaults.setProperty (accelerator_selectnodes, "NONE");
208 	defaults.setProperty (accelerator_selectelements, "NONE");
209 	defaults.setProperty (accelerator_selectsegments, "NONE");
210 	defaults.setProperty (accelerator_selectedges, "NONE");
211 	defaults.setProperty (accelerator_viewproperties, "NONE");
212 	defaults.setProperty (accelerator_newboundary, "NONE");
213 	defaults.setProperty (accelerator_directinput, "NONE");
214 	defaults.setProperty (accelerator_newline, "NONE");
215 	defaults.setProperty (accelerator_newmultiline, "NONE");
216 	defaults.setProperty (accelerator_newcirclep, "NONE");
217 	defaults.setProperty (accelerator_newcirclem, "NONE");
218 	defaults.setProperty (accelerator_newanalytic, "NONE");
219 	defaults.setProperty (accelerator_newedge, "NONE");
220 	defaults.setProperty (accelerator_newtri, "NONE");
221 	defaults.setProperty (accelerator_newquad, "NONE");
222 	defaults.setProperty (accelerator_newmacro, "NONE");
223 	defaults.setProperty (accelerator_newnode, "NONE");
224 	defaults.setProperty (accelerator_adjustboundaries, "NONE");
225 	defaults.setProperty (accelerator_linkboundaries, "NONE");
226 	defaults.setProperty (accelerator_fromtri2prm, "NONE");
227 	defaults.setProperty (accelerator_swapboundaryorientation, "NONE");
228 	defaults.setProperty (accelerator_domainperimeter, "NONE");
229 	defaults.setProperty (accelerator_domainstatistics, "NONE");
230 	defaults.setProperty (accelerator_multipleboundarynodes, "NONE");
231 	defaults.setProperty (accelerator_edgestatus, "NONE");
232 	defaults.setProperty (accelerator_parallelblock, "NONE");
233 	defaults.setProperty (accelerator_loadbalancing, "NONE");
234 	defaults.setProperty (accelerator_rectifyelement, "NONE");
235 	defaults.setProperty (accelerator_refine, "NONE");
236 	defaults.setProperty (accelerator_spellchecker, "NONE");
237 	defaults.setProperty (accelerator_mergeboundaries, "NONE");
238 	defaults.setProperty (accelerator_generaloptions, "CTRL+O");
239 	defaults.setProperty (accelerator_drawoptions, "NONE");
240 	defaults.setProperty (accelerator_coloroptions, "NONE");
241 	defaults.setProperty (accelerator_acceleratoroptions, "NONE");
242 	defaults.setProperty (accelerator_miscoptions, "NONE");
243 	defaults.setProperty (accelerator_manual, "F1");
244 	defaults.setProperty (accelerator_faq, "NONE");
245 	defaults.setProperty (accelerator_readme, "NONE");
246 	defaults.setProperty (accelerator_about, "NONE");
247 
248     }
249 
250     /**
251      *  saves the user settings to a file
252      *
253      *  @param filename the filename (full path) where to save to
254      *  @throws java.io.IOException  - if an IOexception occurred during
255      *  writing
256      *  @throws java.lang.ClassCastException - if the keys in the file could
257      *   not be casted to Strings
258      *  @throws java.io.FileNotFoundException  - if the file could not be
259      *   opened for writing
260      */
save(String filename)261     public void save (String filename)
262 	throws IOException, ClassCastException, FileNotFoundException
263     {
264 	FileOutputStream outstream = new FileOutputStream (filename);
265 	try
266 	    {
267 		optiontable.store (outstream,header);
268 	    }
269 	catch (IOException ex)
270 	    {
271 		outstream.close();
272 		throw ex;
273 	    }
274 	catch (ClassCastException ex)
275 	    {
276 		outstream.close();
277 		throw ex;
278 	    }
279 	outstream.close();
280     }
281 
282     /**
283      *  loads user settings from a file
284      *
285      *  @param filename the filename (full path) where to load from
286      *  @throws java.io.IOException  - if an IOexception occurred during
287      *   reading
288      *  @throws java.lang.ClassCastException - if the keys in the file
289      *   could not be casted to Strings
290      *  @throws java.io.FileNotFoundException if the file could not be found
291      */
load(String filename)292     public void load (String filename)
293 	throws IOException, ClassCastException, FileNotFoundException
294     {
295 	FileInputStream instream = new FileInputStream (filename);
296 	try
297 	    {
298 		optiontable.load (instream);
299 	    }
300 	catch (IOException ex)
301 	    {
302 		instream.close();
303 		throw ex;
304 	    }
305 	catch (ClassCastException ex)
306 	    {
307 		instream.close();
308 		throw ex;
309 	    }
310 	instream.close();
311     }
312 
313 
314     /**
315      *  returns an enumeration of all the keys in the options file
316      *
317      *  @returns an enumeration of all keys
318      */
keys()319     public Enumeration keys ()
320     {
321 	return optiontable.propertyNames ();
322     }
323 
324     /**
325      *  sets the config file header text to a specific user-defined value
326      *
327      *  @param header - a String containing the new header
328      */
setHeader(String header)329     public void setHeader (String header)
330     {
331 	this.header = header;
332     }
333 
334     /**
335      *  returns the current header for config files
336      *
337      *  @return the current header as a String
338      */
getHeader()339     public String getHeader ()
340     {
341 	return header;
342     }
343 
344     /**
345      *  Resets all user-modified options to factory defaults
346      */
resetToDefaults()347     public void resetToDefaults ()
348     {
349 	Enumeration defaultsEnum = defaults.propertyNames ();
350 	while (defaultsEnum.hasMoreElements())
351 	    {
352 		String defaultkey = (String)defaultsEnum.nextElement();
353 		optiontable.setProperty (defaultkey,defaults.getProperty(defaultkey));
354 	    }
355     }
356 
357     /**
358      *  Returns the String value saved under the given key. If no such value
359      *  is found, returns the corresponding default value.
360      *  if no key can be found, an empty String is returned.
361      *
362      *  @param key - one of the constants declared in this class
363      *  @return the corresponding value as a String
364      */
get(String key)365     public String get (String key)
366     {
367 	return optiontable.getProperty (key,"");
368     }
369 
370 
371     /**
372      *  returns the default object saved under the given key
373      *
374      *  @param key - the key to the option you want the default for
375      *  @return the default option for the given key
376      */
getDefault(String key)377     public String getDefault (String key)
378     {
379 	return defaults.getProperty (key);
380     }
381 
382     /**
383      *  sets the value saved under the given key to the new Object
384      *  @param key the key for the new value
385      *  @param newObject the new value itself
386      */
set(String key, String newObject)387     public void set (String key, String newObject)
388     {
389 	optiontable.setProperty (key,newObject);
390     }
391 
392 
393     /**
394      *  This method just checks if the given accelerator is already in use
395      *  in the application
396      *
397      *  @param accelerator - a String representation of an accelerator
398      *  @return true if the accelerator is already in use, false otherwise
399      */
isAlreadyAccelerator(String accelerator)400     public boolean isAlreadyAccelerator (String accelerator)
401     {
402 	// a little ugly code here, but it was late and i didn't feel
403 	// like writing something really good-looking
404 	// anyway, this is faster... :-)
405 	if (accelerator.equals("NONE")) return false;
406 	if (get (accelerator_new).equals(accelerator)) return true;
407 	if (get (accelerator_open).equals(accelerator)) return true;
408 	if (get (accelerator_save).equals(accelerator)) return true;
409 	if (get (accelerator_saveas_ucd).equals(accelerator)) return true;
410 	if (get (accelerator_saveas_feat).equals(accelerator)) return true;
411 	if (get (accelerator_saveas_feast).equals(accelerator)) return true;
412 	if (get (accelerator_merge).equals(accelerator)) return true;
413 	if (get (accelerator_print).equals(accelerator)) return true;
414 	if (get (accelerator_printls).equals(accelerator)) return true;
415 	if (get (accelerator_exit).equals(accelerator)) return true;
416 	if (get (accelerator_undo).equals(accelerator)) return true;
417 	if (get (accelerator_redo).equals(accelerator)) return true;
418 	if (get (accelerator_cut).equals(accelerator)) return true;
419 	if (get (accelerator_copy).equals(accelerator)) return true;
420 	if (get (accelerator_paste).equals(accelerator)) return true;
421 	if (get (accelerator_copymode).equals(accelerator)) return true;
422 	if (get (accelerator_delete).equals(accelerator)) return true;
423 	if (get (accelerator_deleteworkingboundary).equals(accelerator)) return true;
424 	if (get (accelerator_scale).equals(accelerator)) return true;
425 	if (get (accelerator_rotate).equals(accelerator)) return true;
426 	if (get (accelerator_mirror).equals(accelerator)) return true;
427 	if (get (accelerator_selectboundary).equals(accelerator)) return true;
428 	if (get (accelerator_zoom_setzoom).equals(accelerator)) return true;
429 	if (get (accelerator_zoom_resetzoom).equals(accelerator)) return true;
430 	if (get (accelerator_zoom_zoomplus).equals(accelerator)) return true;
431 	if (get (accelerator_zoom_zoomminus).equals(accelerator)) return true;
432 	if (get (accelerator_selectnodes).equals(accelerator)) return true;
433 	if (get (accelerator_selectelements).equals(accelerator)) return true;
434 	if (get (accelerator_selectsegments).equals(accelerator)) return true;
435 	if (get (accelerator_selectedges).equals(accelerator)) return true;
436 	if (get (accelerator_viewproperties).equals(accelerator)) return true;
437 	if (get (accelerator_newboundary).equals(accelerator)) return true;
438 	if (get (accelerator_directinput).equals(accelerator)) return true;
439 	if (get (accelerator_newline).equals(accelerator)) return true;
440 	if (get (accelerator_newmultiline).equals(accelerator)) return true;
441 	if (get (accelerator_newcirclep).equals(accelerator)) return true;
442 	if (get (accelerator_newcirclem).equals(accelerator)) return true;
443 	if (get (accelerator_newanalytic).equals(accelerator)) return true;
444 	if (get (accelerator_newedge).equals(accelerator)) return true;
445 	if (get (accelerator_newtri).equals(accelerator)) return true;
446 	if (get (accelerator_newquad).equals(accelerator)) return true;
447 	if (get (accelerator_newmacro).equals(accelerator)) return true;
448 	if (get (accelerator_newnode).equals(accelerator)) return true;
449 	if (get (accelerator_adjustboundaries).equals(accelerator)) return true;
450 	if (get (accelerator_linkboundaries).equals(accelerator)) return true;
451 	if (get (accelerator_fromtri2prm).equals(accelerator)) return true;
452 	if (get (accelerator_swapboundaryorientation).equals(accelerator)) return true;
453 	if (get (accelerator_domainperimeter).equals(accelerator)) return true;
454 	if (get (accelerator_domainstatistics).equals(accelerator)) return true;
455 	if (get (accelerator_multipleboundarynodes).equals(accelerator)) return true;
456 	if (get (accelerator_edgestatus).equals(accelerator)) return true;
457 	if (get (accelerator_parallelblock).equals(accelerator)) return true;
458 	if (get (accelerator_loadbalancing).equals(accelerator)) return true;
459 	if (get (accelerator_rectifyelement).equals(accelerator)) return true;
460 	if (get (accelerator_refine).equals(accelerator)) return true;
461 	if (get (accelerator_spellchecker).equals(accelerator)) return true;
462 	if (get (accelerator_mergeboundaries).equals(accelerator)) return true;
463 	if (get (accelerator_generaloptions).equals(accelerator)) return true;
464 	if (get (accelerator_drawoptions).equals(accelerator)) return true;
465 	if (get (accelerator_coloroptions).equals(accelerator)) return true;
466 	if (get (accelerator_acceleratoroptions).equals(accelerator)) return true;
467 	if (get (accelerator_miscoptions).equals(accelerator)) return true;
468 	if (get (accelerator_manual).equals(accelerator)) return true;
469 	if (get (accelerator_faq).equals(accelerator)) return true;
470 	if (get (accelerator_readme).equals(accelerator)) return true;
471 	if (get (accelerator_about).equals(accelerator)) return true;
472 	return false;
473     }
474 
475     // general options
476 
477     /**
478      *  key for the MainFrame's width
479      */
480     public static final String mainframe_width = "mainframe_width";
481     /**
482      *  key for the MainFrame's height
483      */
484     public static final String mainframe_height = "mainframe_height";
485     /**
486      *  key for the MainFrame's origin (horizontal)
487      */
488     public static final String mainframe_x = "mainframe_x";
489     /**
490      *  key for the MainFrame's origin (vertical)
491      */
492     public static final String mainframe_y = "mainframe_y";
493 
494 
495     /**
496      *  key for the metis mesher used for partioning
497      */
498     public static final String metis_command = "metis_command";
499     /**
500      *  key for the general path used for load-save-dialogs
501      */
502     public static final String general_path = "general_path";
503     /**
504      *  key for the width of the main frame
505      */
506     public static final String screenx = "screenx";
507     /**
508      *  key for the height of the main frame
509      */
510     public static final String screeny = "screeny";
511     /**
512      *  key for the DEVISORHOME path
513      */
514     public static final String general_devisorhome = "general_devisorhome";
515     /**
516      *  key for the helpfile path+name
517      */
518     public static final String general_helpfile = "general_helpfile";
519     /**
520      *  key for the faqfile path+name
521      */
522     public static final String general_faqfile = "general_faqfile";
523     /**
524      *  key for the trigen path
525      */
526     public static final String general_trigen = "general_trigen";
527     /**
528      *  key for the feat path
529      */
530     public static final String general_featlib = "general_featlib";
531 
532 
533     // misc options
534     /**
535      *  key for the Look&Feel used
536      */
537     public static final String other_lookandfeel = "other_lookandfeel";
538     /**
539      *  key for the country code for the locale used
540      */
541     public static final String other_locale_country = "other_locale_country";
542     /**
543      *  key for the the language code for the locale used
544      */
545     public static final String other_locale_language = "other_locale_language";
546     /**
547      *  key for the name of the resource bundle backing the locale
548      */
549     public static final String other_ResourceBundleName = "other_ResourceBundlename";
550     /**
551      *  key for the maximum number of undoable steps
552      */
553     public static final String other_undosteps = "other_undosteps";
554 
555 
556     // draw options
557 
558     /**
559      *  key for flag if user coords are displayed
560      */
561     public static final String draw_usercoords = "draw_usercoords";
562     /**
563      *  key for flag if orientation markers are drawn
564      */
565     public static final String draw_orientationmarkers = "draw_orientationmarkers";
566     /**
567      *  key for flag if boundaries are painted
568      */
569     public static final String draw_drawboundary = "draw_drawboundary";
570     /**
571      *  key for flag if boundary numbers are painted
572      */
573     public static final String draw_numberboundary = "draw_numberboundary";
574     /**
575      *  key for flag if nodes are painted
576      */
577     public static final String draw_drawnode = "draw_drawnode";
578     /**
579      *  key for flag if node numbers are painted
580      */
581     public static final String draw_numbernode = "draw_numbernode";
582     /**
583      *  key for flag if edges are painted
584      */
585     public static final String draw_drawedge = "draw_drawedge";
586     /**
587      *  key for flag if edge numbers are painted
588      */
589     public static final String draw_numberedge = "draw_numberedge";
590     /**
591      *  key for flag if elements are painted
592      */
593     public static final String draw_drawelement = "draw_drawelement";
594     /**
595      *  key for flag if element numbers are painted
596      */
597     public static final String draw_numberelement = "draw_numberelement";
598     /**
599      *  key for flag if elements are crossed
600      */
601     public static final String draw_crosselement = "draw_crosselement";
602     /**
603      *  key for flag if elements are filled
604      */
605     public static final String draw_fillelement = "draw_fillelement";
606     /**
607      *  key for flag if the grid is painted
608      */
609     public static final String draw_drawgrid = "draw_drawgrid";
610     /**
611      *  key for flag if the perimeter is painted
612      */
613     public static final String draw_drawperimeter = "draw_drawperimeter";
614     /**
615      *  key for flag if rectangular elements are highlighted
616      */
617     public static final String draw_drawrect = "draw_drawrect";
618     /**
619      * key for the click tolerance
620      */
621     public static final String click_tolerance = "click_tolerance";
622     /**
623      *  key for snap enabling
624      */
625     public static final String snap_enabled = "snap_enabled";
626     /**
627      *  key for snap value in x direction
628      */
629     public static final String snap_x = "snap_x";
630     /**
631      *  key for snap value in y direction
632      */
633     public static final String snap_y = "snap_y";
634     /**
635      *  key for global epsilon
636      */
637     public static final String epsilon = "epsilon";
638 
639     /**
640      *  key for the color nodes are painted with
641      */
642     public static final String color_node = "color_node";
643     /**
644      *  key for the base color edges are painted with
645      */
646     public static final String color_edgebase = "color_edgebase";
647     /**
648      *  key for the color edges are painted with
649      */
650     public static final String color_edge = "color_edge";
651     /**
652      *  key for the color elements are painted with
653      */
654     public static final String color_element = "color_element";
655     /**
656      *  key for the color boundarynumbers are painted with
657      */
658     public static final String color_boundarynumber = "color_boundarynumber";
659     /**
660      *  key for the color nodenumbers are painted with
661      */
662     public static final String color_nodenumber = "color_nodenumber";
663     /**
664      *  key for the color edgenumbers are painted with
665      */
666     public static final String color_edgenumber = "color_edgenumber";
667     /**
668      *  key for the color elementnumbers are painted with
669      */
670     public static final String color_elementnumber = "color_elementnumber";
671     /**
672      *  key for 1st fill palette color
673      */
674     public static final String color_fill0 = "color_fill0";
675     /**
676      *  key for 2nd fill palette color
677      */
678     public static final String color_fill1 = "color_fill1";
679     /**
680      *  key for 3rd fill palette color
681      */
682     public static final String color_fill2 = "color_fill2";
683     /**
684      *  key for 4th fill palette color
685      */
686     public static final String color_fill3 = "color_fill3";
687     /**
688      *  key for 5th fill palette color
689      */
690     public static final String color_fill4 = "color_fill4";
691     /**
692      *  key for 6th fill palette color
693      */
694     public static final String color_fill5 = "color_fill5";
695     /**
696      *  key for 7th fill palette color
697      */
698     public static final String color_fill6 = "color_fill6";
699     /**
700      *  key for 8th fill palette color
701      */
702     public static final String color_fill7 = "color_fill7";
703     /**
704      *  key for 9th fill palette color
705      */
706     public static final String color_fill8 = "color_fill8";
707     /**
708      *  key for 10th fill palette color
709      */
710     public static final String color_fill9 = "color_fill9";
711     /**
712      *  key for 11th fill palette color
713      */
714     public static final String color_fill10 = "color_fill10";
715     /**
716      *  key for 12th fill palette color
717      */
718     public static final String color_fill11 = "color_fill11";
719     /**
720      *  key for 13th fill palette color
721      */
722     public static final String color_fill12 = "color_fill12";
723     /**
724      *  key for 14th fill palette color
725      */
726     public static final String color_fill13 = "color_fill13";
727     /**
728      *  key for 15th fill palette color
729      */
730     public static final String color_fill14 = "color_fill14";
731     /**
732      *  key for 16th fill palette color
733      */
734     public static final String color_fill15 = "color_fill15";
735     /**
736      *  key for the highlight color for selections
737      */
738     public static final String color_selection = "color_selection";
739     /**
740      *  key for the highlight color for rectangular status
741      */
742     public static final String color_rect = "color_rect";
743     /**
744      *  key for the color of the grid
745      */
746     public static final String color_grid = "color_grid";
747     /**
748      *  key for the color of the background
749      */
750     public static final String color_background = "color_background";
751     /**
752      *  key for the color of the lasso
753      */
754     public static final String color_lasso = "color_lasso";
755     /**
756      *  key for the pallette color 0 for boundaries
757      */
758     public static final String color_boundary0 = "color_boundary0";
759     /**
760      *  key for the pallette color 1 for boundaries
761      */
762     public static final String color_boundary1 = "color_boundary1";
763     /**
764      *  key for the pallette color 2 for boundaries
765      */
766     public static final String color_boundary2 = "color_boundary2";
767     /**
768      *  key for the pallette color 3 for boundaries
769      */
770     public static final String color_boundary3 = "color_boundary3";
771     /**
772      *  key for the pallette color 4 for boundaries
773      */
774     public static final String color_boundary4 = "color_boundary4";
775     /**
776      *  key for the pallette color 5 for boundaries
777      */
778     public static final String color_boundary5 = "color_boundary5";
779     /**
780      *  key for the pallette color 6 for boundaries
781      */
782     public static final String color_boundary6 = "color_boundary6";
783     /**
784      *  key for the pallette color 7 for boundaries
785      */
786     public static final String color_boundary7 = "color_boundary7";
787     /**
788      *  key for the pallette color 8 for boundaries
789      */
790     public static final String color_boundary8 = "color_boundary8";
791     /**
792      *  key for the pallette color 9 for boundaries
793      */
794     public static final String color_boundary9 = "color_boundary9";
795     /**
796      *  key for the pallette color 10 for boundaries
797      */
798     public static final String color_boundary10 = "color_boundary10";
799     /**
800      *  key for the pallette color 11 for boundaries
801      */
802     public static final String color_boundary11 = "color_boundary11";
803     /**
804      *  key for the pallette color 12 for boundaries
805      */
806     public static final String color_boundary12 = "color_boundary12";
807     /**
808      *  key for the pallette color 13 for boundaries
809      */
810     public static final String color_boundary13 = "color_boundary13";
811     /**
812      *  key for the pallette color 14 for boundaries
813      */
814     public static final String color_boundary14 = "color_boundary14";
815     /**
816      *  key for the pallette color 15 for boundaries
817      */
818     public static final String color_boundary15 = "color_boundary15";
819 
820 
821     // fonts
822     /** font used for numbering */
823     public static final String font_numbering = "font_numbering";
824     /** size of that font */
825     public static final String font_numbering_size = "font_numbering_size";
826     /** style*/
827     public static final String font_numbering_style = "font_numbering_style";
828 
829 
830 
831 
832     // accelerators
833 
834 
835     /**
836      *  key for the accelerator assigned to NEW
837      */
838     public static final String accelerator_new = "accelerator_new";
839     /**
840      *  key for the accelerator assigned to OPEN
841      */
842     public static final String accelerator_open = "accelerator_open";
843     /**
844      *  key for the accelerator assigned to SAVE
845      */
846     public static final String accelerator_save = "accelerator_save";
847 
848     /**
849      *  key for the accelerator assigned to SAVEAS_UCD
850      */
851     public static final String accelerator_saveas_ucd = "accelerator_saveas_ucd";
852     /**
853      *  key for the accelerator assigned to SAVEAS_FEAT
854      */
855     public static final String accelerator_saveas_feat = "accelerator_saveas_feat";
856     /**
857      *  key for the accelerator assigned to SAVEAS_FEAST
858      */
859     public static final String accelerator_saveas_feast = "accelerator_saveas_feast";
860     /**
861      *  key for the accelerator assigned to MERGE
862      */
863     public static final String accelerator_merge = "accelerator_merge";
864     /**
865      *  key for the accelerator assigned to PRINT
866      */
867     public static final String accelerator_print = "accelerator_print";
868     /**
869      *  key for the accelerator assigned to PRINT LANDSCAPE
870      */
871     public static final String accelerator_printls = "accelerator_printls";
872     /**
873      *  key for the accelerator assigned to EXIT
874      */
875     public static final String accelerator_exit = "accelerator_exit";
876     /**
877      *  key for the accelerator assigned to UNDO
878      */
879     public static final String accelerator_undo = "accelerator_undo";
880     /**
881      *  key for the accelerator assigned to REDO
882      */
883     public static final String accelerator_redo = "accelerator_redo";
884     /**
885      *  key for the accelerator assigned to CUT
886      */
887     public static final String accelerator_cut = "accelerator_cut";
888     /**
889      *  key for the accelerator assigned to COPY
890      */
891     public static final String accelerator_copy = "accelerator_copy";
892     /**
893      *  key for the accelerator assigned to PASTE
894      */
895     public static final String accelerator_paste = "accelerator_paste";
896     /**
897      *  key for the accelerator assigned to COPYMODE
898      */
899     public static final String accelerator_copymode = "accelerator_copymode";
900     /**
901      *  key for the accelerator assigned to DELETE
902      */
903     public static final String accelerator_delete = "accelerator_delete";
904     /**
905      *  key for the accelerator assigned to DELETEWB
906      */
907     public static final String accelerator_deleteworkingboundary = "accelerator_deleteworkingboundary";
908     /**
909      *  key for the accelerator assigned to SCALE
910      */
911     public static final String accelerator_scale = "accelerator_scale";
912     /**
913      *  key for the accelerator assigned to ROTATE
914      */
915     public static final String accelerator_rotate = "accelerator_rotate";
916     /**
917      *  key for the accelerator assigned to MIRROR
918      */
919     public static final String accelerator_mirror = "accelerator_mirror";
920     /**
921      *  key for the accelerator assigned to SELECTBOUNDARY
922      */
923     public static final String accelerator_selectboundary = "accelerator_selectboundary";
924     /**
925      *  key for the accelerator assigned to SETZOOM
926      */
927     public static final String accelerator_zoom_setzoom = "accelerator_zoom_setzoom";
928     /**
929      *  key for the accelerator assigned to RESETZOOM
930      */
931     public static final String accelerator_zoom_resetzoom = "accelerator_zoom_resetzoom";
932     /**
933      *  key for the accelerator assigned to ZOOMPLUS
934      */
935     public static final String accelerator_zoom_zoomplus = "accelerator_zoom_zoomplus";
936     /**
937      *  key for the accelerator assigned to ZOOMMINUS
938      */
939     public static final String accelerator_zoom_zoomminus = "accelerator_zoom_zoomminus";
940     /**
941      *  key for the accelerator assigned to SELECTNODES
942      */
943     public static final String accelerator_selectnodes = "accelerator_selectnodes";
944     /**
945      *  key for the accelerator assigned to SELECTELEMENTS
946      */
947     public static final String accelerator_selectelements = "accelerator_selectelements";
948     /**
949      *  key for the accelerator assigned to SELECTSEGMENTS
950      */
951     public static final String accelerator_selectsegments = "accelerator_selectsegments";
952     /**
953      *  key for the accelerator assigned to SELECTEDGES
954      */
955     public static final String accelerator_selectedges = "accelerator_selectedges";
956   /**
957      *  key for the accelerator assigned to VIEWPROPERTIES
958      */
959     public static final String accelerator_viewproperties = "accelerator_viewproperties";
960 
961 
962     /**
963      *  key for the accelerator assigned to NEWBOUNDARY
964      */
965     public static final String accelerator_newboundary = "accelerator_newboundary";
966     /**
967      *  key for the accelerator assigned to DIRECTINPUT
968      */
969     public static final String accelerator_directinput = "accelerator_directinput";
970     /**
971      *  key for the accelerator assigned to NEWLINE
972      */
973     public static final String accelerator_newline = "accelerator_newline";
974   /**
975      *  key for the accelerator assigned to NEWMULTILINE
976      */
977     public static final String accelerator_newmultiline = "accelerator_newmultiline";
978   /**
979      *  key for the accelerator assigned to NEWCIRCLEP
980      */
981     public static final String accelerator_newcirclep = "accelerator_newcirclep";
982   /**
983      *  key for the accelerator assigned to NEWCIRCLEM
984      */
985     public static final String accelerator_newcirclem = "accelerator_newcirclem";
986   /**
987      *  key for the accelerator assigned to NEWANALYTIC
988      */
989     public static final String accelerator_newanalytic = "accelerator_newanalytic";
990     /**
991      *  key for the accelerator assigned to NEWEDGE
992      */
993     public static final String accelerator_newedge = "accelerator_newedge";
994     /**
995      *  key for the accelerator assigned to NEWTRI
996      */
997     public static final String accelerator_newtri = "accelerator_newtri";
998     /**
999      *  key for the accelerator assigned to NEWQUAD
1000      */
1001     public static final String accelerator_newquad = "accelerator_newquad";
1002     /**
1003      *  key for the accelerator assigned to NEWMACRO
1004      */
1005     public static final String accelerator_newmacro = "accelerator_newmacro";
1006     /**
1007      *  key for the accelerator assigned to NEWNODE
1008      */
1009     public static final String accelerator_newnode = "accelerator_newnode";
1010     /**
1011      *  key for the accelerator assigned to ADJUSTBOUNDARIES
1012      */
1013     public static final String accelerator_adjustboundaries = "accelerator_adjustboundaries";
1014     /**
1015      *  key for the accelerator assigned to LINKBOUNDARIES
1016      */
1017     public static final String accelerator_linkboundaries = "accelerator_linkboundaries";
1018 
1019     /**
1020      *  key for the accelerator assigned to FROMTRI2PRM
1021      */
1022     public static final String accelerator_fromtri2prm = "accelerator_fromtri2prm";
1023 
1024     /**
1025      *  key for the accelerator assigned to SWAPBOUNDARYORIENTATION
1026      */
1027     public static final String accelerator_swapboundaryorientation = "accelerator_swapboundaryorientation";
1028     /**
1029      *  key for the accelerator assigned to DOMAINPERIMETER
1030      */
1031     public static final String accelerator_domainperimeter = "accelerator_domainperimeter";
1032     /**
1033      *  key for the accelerator assigned to DOMAINSTATISTICS
1034      */
1035     public static final String accelerator_domainstatistics = "accelerator_domainstatistics";
1036     /**
1037      *  key for the accelerator assigned to MULTIPLEBOUNDARYNODES
1038      */
1039     public static final String accelerator_multipleboundarynodes = "accelerator_multipleboundarynodes";
1040     /**
1041      *  key for the accelerator assigned to EDGESTATUS
1042      */
1043     public static final String accelerator_edgestatus = "accelerator_edgestatus";
1044     /**
1045      *  key for the accelerator assigned to PARALLELBLOCK
1046      */
1047     public static final String accelerator_parallelblock = "accelerator_parallelblock";
1048     /**
1049      *  key for the accelerator assigned to LOADBALANCING
1050      */
1051     public static final String accelerator_loadbalancing = "accelerator_loadbalancing";
1052     /**
1053      *  key for the accelerator assigned to RECTIFYELEMENT
1054      */
1055     public static final String accelerator_rectifyelement = "accelerator_rectifyelement";
1056     /**
1057      *  key for the accelerator assigned to REFINE
1058      */
1059     public static final String accelerator_refine = "accelerator_refine";
1060     /**
1061      *  key for the accelerator assigned to SPELLCHECKER
1062      */
1063     public static final String accelerator_spellchecker = "accelerator_spellchecker";
1064     /**
1065      *  key for the accelerator assigned to MERGEBOUNDARIES
1066      */
1067     public static final String accelerator_mergeboundaries = "accelerator_mergeboundaries";
1068     /**
1069      *  key for general options
1070      */
1071     public static final String accelerator_generaloptions = "accelerator_generaloptions";
1072     /**
1073      *  key for draw options
1074      */
1075     public static final String accelerator_drawoptions = "accelerator_drawoptions";
1076     /**
1077      *  key for color options
1078      */
1079     public static final String accelerator_coloroptions = "accelerator_coloroptions";
1080     /**
1081      *  key for accelerator options
1082      */
1083     public static final String accelerator_acceleratoroptions = "accelerator_acceleratoroptions";
1084     /**
1085      *  key for misc options
1086      */
1087     public static final String accelerator_miscoptions = "accelerator_miscoptions";
1088     /**
1089      *  key for the accelerator assigned to MANUAL
1090      */
1091     public static final String accelerator_manual = "accelerator_manual";
1092     /**
1093      *  key for the accelerator assigned to FAQ
1094      */
1095     public static final String accelerator_faq = "accelerator_faq";
1096     /**
1097      *  key for the accelerator assigned to README
1098      */
1099     public static final String accelerator_readme = "accelerator_readme";
1100     /**
1101      *  key for the accelerator assigned to ABOUT
1102      */
1103     public static final String accelerator_about = "accelerator_about";
1104 
1105 
1106 }
1107 
1108 
1109 
1110 
1111