Example #1
0
  public static Image getResourceOutIcon(String icon) throws MalformedURLException {
    File iconFile = new File(ICON_OUT_FOLDER + File.separator + icon);
    if (!iconFile.exists()) {
      return getResourceIcon("user_m.png");
    }

    return new Image(iconFile.toURI().toURL().toString());
  }
Example #2
0
 public static boolean fileExists(File file) {
   if (file != null) {
     if (file.exists() && file.isFile()) {
       return true;
     }
   }
   return false;
 }
Example #3
0
 public static boolean fileCanBeSaved(File file) {
   return !fileExists(file) && file.canWrite();
 }
Example #4
0
 public static boolean fileCanBeLoad(File file) {
   return fileExists(file) && file.canRead();
 }