org.fife.ui.rtextfilechooser.extras
Class FileIOExtras

java.lang.Object
  extended byorg.fife.ui.rtextfilechooser.extras.FileIOExtras

public abstract class FileIOExtras
extends java.lang.Object

Base class for host-specific "IO extras" classes used by the file chooser.

Version:
1.0
Author:
Robert Futrell

Constructor Summary
protected FileIOExtras()
          Protected constructor to prevent instantiation.
 
Method Summary
static FileIOExtras getInstance()
          Returns the singleton instance of the "IO extras" for this platform.
static void main(java.lang.String[] args)
          Entry point for a simple debugging application.
 boolean moveToRecycleBin(java.awt.Window parent, java.io.File[] files, boolean confirmation, boolean silent)
          Moves the specified files and/or directories to the recycle bin.
abstract  boolean moveToRecycleBin(java.awt.Window parent, java.lang.String[] files, boolean confirmation, boolean silent)
          Moves the specified file to the recycle bin.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileIOExtras

protected FileIOExtras()
Protected constructor to prevent instantiation.

Method Detail

getInstance

public static FileIOExtras getInstance()
Returns the singleton instance of the "IO extras" for this platform.

Returns:
The instance, or null if this platform does not support this feature.

moveToRecycleBin

public boolean moveToRecycleBin(java.awt.Window parent,
                                java.io.File[] files,
                                boolean confirmation,
                                boolean silent)
Moves the specified files and/or directories to the recycle bin.

Parameters:
parent - The parent window for the dialog. This may be null.
files - An array of files/directories to move.
confirmation - Whether a "Are you sure you want to send XXX to the Trash?" should be displayed to the user.
silent - If this is true, no progress dialog is displayed to the user. If this is false, then a progress bar is displayed as the file(s) are being deleted. On Windows, this parameter appears to only be honored if confirmation is true.
Returns:
Whether the operation was successful. Note that this method returns true even if the user manually aborts the delete operation in the UI. This method only fails if a serious internal error occurs (out of memory, etc.).

moveToRecycleBin

public abstract boolean moveToRecycleBin(java.awt.Window parent,
                                         java.lang.String[] files,
                                         boolean confirmation,
                                         boolean silent)
Moves the specified file to the recycle bin.

Parameters:
parent - The parent window for the dialog. This may be null.
files - The names of the files to move. These should be absolute paths.
confirmation - Whether a "Are you sure you want to send XXX to the Trash?" should be displayed to the user.
silent - If this is true, no progress dialog is displayed to the user. If this is false, then a progress bar is displayed as the file(s) are being deleted. On Windows, this parameter appears to only be honored if confirmation is true.
Returns:
Whether the operation was successful. Note that this method returns true even if the user manually aborts the delete operation in the UI. This method only fails if a serious internal error occurs (out of memory, etc.).

main

public static void main(java.lang.String[] args)
Entry point for a simple debugging application.

Parameters:
args - Command line arguments.