996 * @throws UnsupportedOperationException if the current platform 997 * does not support the {@link Desktop.Action#BROWSE_FILE_DIR} action 998 * @throws NullPointerException if {@code file} is {@code null} 999 * @throws IllegalArgumentException if the specified file doesn't 1000 * exist 1001 * @since 9 1002 */ 1003 public void browseFileDirectory(File file) { 1004 checkRead(); 1005 checkActionSupport(Action.BROWSE_FILE_DIR); 1006 checkFileValidation(file); 1007 peer.browseFileDirectory(file); 1008 } 1009 1010 /** 1011 * Moves the specified file to the trash. 1012 * 1013 * @param file the file 1014 * @return returns true if successfully moved the file to the trash. 1015 * @throws SecurityException If a security manager exists and its 1016 * {@link SecurityManager#checkWrite(java.lang.String)} method 1017 * denies write access to the file 1018 * @throws UnsupportedOperationException if the current platform 1019 * does not support the {@link Desktop.Action#MOVE_TO_TRASH} action 1020 * @throws NullPointerException if {@code file} is {@code null} 1021 * @throws IllegalArgumentException if the specified file doesn't 1022 * exist 1023 * 1024 * @since 9 1025 */ 1026 public boolean moveToTrash(final File file) { 1027 checkDelete(); 1028 checkActionSupport(Action.MOVE_TO_TRASH); 1029 checkFileValidation(file); 1030 return peer.moveToTrash(file); 1031 } 1032 } | 996 * @throws UnsupportedOperationException if the current platform 997 * does not support the {@link Desktop.Action#BROWSE_FILE_DIR} action 998 * @throws NullPointerException if {@code file} is {@code null} 999 * @throws IllegalArgumentException if the specified file doesn't 1000 * exist 1001 * @since 9 1002 */ 1003 public void browseFileDirectory(File file) { 1004 checkRead(); 1005 checkActionSupport(Action.BROWSE_FILE_DIR); 1006 checkFileValidation(file); 1007 peer.browseFileDirectory(file); 1008 } 1009 1010 /** 1011 * Moves the specified file to the trash. 1012 * 1013 * @param file the file 1014 * @return returns true if successfully moved the file to the trash. 1015 * @throws SecurityException If a security manager exists and its 1016 * {@link SecurityManager#checkDelete(java.lang.String)} method 1017 * denies deletion of the file 1018 * @throws UnsupportedOperationException if the current platform 1019 * does not support the {@link Desktop.Action#MOVE_TO_TRASH} action 1020 * @throws NullPointerException if {@code file} is {@code null} 1021 * @throws IllegalArgumentException if the specified file doesn't 1022 * exist 1023 * 1024 * @since 9 1025 */ 1026 public boolean moveToTrash(final File file) { 1027 checkDelete(); 1028 checkActionSupport(Action.MOVE_TO_TRASH); 1029 checkFileValidation(file); 1030 return peer.moveToTrash(file); 1031 } 1032 } |