gps.util
Class Config

java.lang.Object
  extended by gps.util.Config

public class Config
extends java.lang.Object

a global object to deal with configuraiton files

Version:
1.2, 6/20/2005
Author:
Weishuai Yang

Constructor Summary
Config()
           
 
Method Summary
static void loadConfFromFile(java.io.File f, java.util.Properties properties)
          loads configuration from File object
static void loadConfFromFile(java.lang.String path, java.util.Properties properties)
          loads configuration from file at the specified path
static void loadConfFromFileGUI(java.io.File f, java.util.Properties properties, javax.swing.JFrame frame)
          loads configuration from File object, with messagebox if any error exists.
static void loadConfFromFileGUI(java.lang.String path, java.util.Properties properties, javax.swing.JFrame frame)
          loads configuration from file at the specified path, with messagebox if any error exists.
static void saveConfToFile(java.io.File f, java.util.Properties properties)
          saves configuration to File object
static void saveConfToFile(java.lang.String path, java.util.Properties properties)
          saves configuration to file at the specified path
static void saveConfToFileGUI(java.io.File f, java.util.Properties properties, javax.swing.JFrame frame)
          saves configuration to File object, with messagebox if any error exists.
static void saveConfToFileGUI(java.lang.String path, java.util.Properties properties, javax.swing.JFrame frame)
          saves configuration to file at the specified path, with messagebox if any error exists.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Config

public Config()
Method Detail

loadConfFromFile

public static void loadConfFromFile(java.lang.String path,
                                    java.util.Properties properties)
loads configuration from file at the specified path

Parameters:
path - file path
properties - destination properties

loadConfFromFile

public static void loadConfFromFile(java.io.File f,
                                    java.util.Properties properties)
loads configuration from File object

Parameters:
f - File object
properties - destination properties

saveConfToFile

public static void saveConfToFile(java.lang.String path,
                                  java.util.Properties properties)
saves configuration to file at the specified path

Parameters:
path - file path
properties - properties to be saved

saveConfToFile

public static void saveConfToFile(java.io.File f,
                                  java.util.Properties properties)
saves configuration to File object

Parameters:
f - File object
properties - properties to be saved

loadConfFromFileGUI

public static void loadConfFromFileGUI(java.lang.String path,
                                       java.util.Properties properties,
                                       javax.swing.JFrame frame)
loads configuration from file at the specified path, with messagebox if any error exists.

Parameters:
path - file path
properties - destination properties
frame - parent frame

loadConfFromFileGUI

public static void loadConfFromFileGUI(java.io.File f,
                                       java.util.Properties properties,
                                       javax.swing.JFrame frame)
loads configuration from File object, with messagebox if any error exists.

Parameters:
f - File object
properties - destination properties
frame - parent frame

saveConfToFileGUI

public static void saveConfToFileGUI(java.lang.String path,
                                     java.util.Properties properties,
                                     javax.swing.JFrame frame)
saves configuration to file at the specified path, with messagebox if any error exists.

Parameters:
path - file path
properties - properties to be saved
frame - parent frame

saveConfToFileGUI

public static void saveConfToFileGUI(java.io.File f,
                                     java.util.Properties properties,
                                     javax.swing.JFrame frame)
saves configuration to File object, with messagebox if any error exists.

Parameters:
f - File object
properties - properties to be saved
frame - parent frame