예제 #1
0
  /**
   * Returns a stylesheet for suggestions dialog.
   *
   * @return stylesheet.
   */
  public static synchronized IStylesheet getSuggestionsStylesheet() {
    RemoteStylesheet rs = suggestionsStylesheet;

    if (rs == null) {
      rs = getStylesheet(SUGGESTIONS_CSS);
      if (rs.isInitialized()) suggestionsStylesheet = rs;
    }

    return rs;
  }
예제 #2
0
  /** Updates all registered stylesheets. Flushes caches etc. */
  public static synchronized void update() {
    // Remove all caches
    FileUtils.rmdir(cacheDir);

    if (suggestionsStylesheet != null) {
      suggestionsStylesheet.resetIconsCache();

      // Forget about the stylesheet
      suggestionsStylesheet = null;
    }
  }