Esempio n. 1
0
  /**
   * Save the preferences at a given location
   *
   * @param path
   */
  public void saveToPath(String path) {
    // Get the xml string
    String xmlString = XMLUtility.toHardXML(xelem);

    // Save the file
    XMLUtility.XMLsave(path, xmlString);
  }
Esempio n. 2
0
  /** Save the preferences at the preset location */
  public void save() {
    // If the path is null
    if (path == null) {
      JEXStatics.logManager.log("Path not set for saving preferences", 0, this);
      return;
    }

    // Get the xml string
    String xmlString = XMLUtility.toHardXML(xelem);

    // Save the file
    XMLUtility.XMLsave(path, xmlString);
  }
Esempio n. 3
0
  /**
   * Load the preferences from a given path
   *
   * @param path
   */
  public void loadFromPath(String path) {
    JEXStatics.logManager.log("Loading preference file " + path, 1, this);
    XMLPreferences_XElement element =
        (XMLPreferences_XElement) XMLUtility.XMLload(path, new XMLPreferences_ObjectFactory());
    // Get the file return if it doesn't exist
    if (element == null) return;

    xelem = element;

    // Set the path
    this.path = path;
  }