예제 #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());
  }
예제 #2
0
 public static boolean fileExists(File file) {
   if (file != null) {
     if (file.exists() && file.isFile()) {
       return true;
     }
   }
   return false;
 }
예제 #3
0
 public static boolean fileCanBeSaved(File file) {
   return !fileExists(file) && file.canWrite();
 }
예제 #4
0
 public static boolean fileCanBeLoad(File file) {
   return fileExists(file) && file.canRead();
 }