예제 #1
0
  /**
   * Load the application information from the properties file specified by the application adaptor.
   * The resource bundle information is stored in a Map for convenient access.
   *
   * @param path Path to the source information.
   * @return The map containing the application information
   */
  private Map loadApplicationInfo(final String path) {
    Map infoMap;

    try {
      infoMap = Util.loadResourceBundle(path);
    } catch (MissingResourceException exception) {
      final String message = "No application \"About Box\" information resource found at: " + path;
      Logger.getLogger("global").log(Level.WARNING, message, exception);
      System.err.println(message);

      // substitute with default information
      infoMap = new HashMap();
      infoMap.put("name", Application.getAdaptor().getClass().getName());
    }

    return infoMap;
  }
예제 #2
0
 /** Creates a new instance of AboutBox */
 public AboutBox(final String infoSource) {
   _title = "About " + Application.getAdaptor().applicationName();
   _message = generateMessage(infoSource);
 }
예제 #3
0
 /**
  * Get the file path of the information source of the about box.
  *
  * @return the file path of the application about box information
  */
 private static String getInfoSource() {
   return Application.getAdaptor().getApplicationInfoPath();
 }