コード例 #1
0
ファイル: AboutBox.java プロジェクト: hinxx/org.csstudio.sns
  /**
   * 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
ファイル: AboutBox.java プロジェクト: hinxx/org.csstudio.sns
 /** Creates a new instance of AboutBox */
 public AboutBox(final String infoSource) {
   _title = "About " + Application.getAdaptor().applicationName();
   _message = generateMessage(infoSource);
 }
コード例 #3
0
ファイル: AboutBox.java プロジェクト: hinxx/org.csstudio.sns
 /**
  * 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();
 }