Ejemplo n.º 1
0
  static void init() {
    dbf = DocumentBuilderFactory.newInstance();
    try {
      db = dbf.newDocumentBuilder();
    } catch (ParserConfigurationException e) {
      MiscUI.user_fatal("Error initializing XML parser.", e);
      System.err.println(e);
    }

    trf = TransformerFactory.newInstance();
    try {
      optimus_prime = trf.newTransformer();
    } catch (TransformerConfigurationException e) {
      MiscUI.user_fatal("Error initializing XML transformer.", e);
      System.err.println(e);
    }
  }
Ejemplo n.º 2
0
  static void load(URL u) {
    base = u;

    try {
      loadSystems();
    } catch (Exception e) {
      MiscUI.user_fatal("Error loading systems.", e);
    }
    try {
      loadJumps();
    } catch (Exception e) {
      MiscUI.user_fatal("Error loading jumps.", e);
    }
    try {
      loadConstellations();
    } catch (Exception e) {
      MiscUI.user_error("Error loading constellations.", e);
    }
    try {
      loadRegions();
    } catch (Exception e) {
      MiscUI.user_error("Error loading regions.", e);
    }
    try {
      loadStations();
    } catch (Exception e) {
      MiscUI.user_error("Error loading stations.", e);
    }
    try {
      loadIcons();
    } catch (Exception e) {
      MiscUI.user_error("Error loading icons.", e);
    }
    try {
      loadHelp();
    } catch (Exception e) {
      MiscUI.user_error("Error loading help.", e);
    }
    try {
      loadBuildNumber();
    } catch (Exception e) {
      MiscUI.user_error("Error loading build number.", e);
    }
    if (buildNumber == -1) MiscUI.user_error("Error loading build number.", null);

    Visibility.updateVisibles();
  }