com.mucommander.ui.dnd
Class ClipboardSupport

java.lang.Object
  extended by com.mucommander.ui.dnd.ClipboardSupport

public class ClipboardSupport
extends java.lang.Object

This class provides methods to more easily interact with the system clipboard.

Author:
Maxence Bernard

Constructor Summary
ClipboardSupport()
           
 
Method Summary
static java.awt.datatransfer.Clipboard getClipboard()
          Returns an instance of the system clipboard.
static java.awt.datatransfer.Transferable getClipboardContents()
          Returns the system clipboard's contents as a Transferable, null if it currently has no contents.
static FileSet getClipboardFiles()
          Returns the files contained by the system clipboard as a FileSet, null if it currently has no contents or if the item(s) contained are not files.
static void setClipboardContents(java.awt.datatransfer.Transferable transferable)
          Sets the contents of the system clipboard.
static void setClipboardFiles(FileSet fileSet)
          Transfers the files contained in the specified FileSet to the system clipboard.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClipboardSupport

public ClipboardSupport()
Method Detail

getClipboardContents

public static java.awt.datatransfer.Transferable getClipboardContents()
Returns the system clipboard's contents as a Transferable, null if it currently has no contents.


setClipboardContents

public static void setClipboardContents(java.awt.datatransfer.Transferable transferable)
Sets the contents of the system clipboard.

Parameters:
transferable - the data to transfer to the clipboard

getClipboardFiles

public static FileSet getClipboardFiles()
Returns the files contained by the system clipboard as a FileSet, null if it currently has no contents or if the item(s) contained are not files.


setClipboardFiles

public static void setClipboardFiles(FileSet fileSet)
Transfers the files contained in the specified FileSet to the system clipboard. The data will be transferred as a TransferableFileSet.

Parameters:
fileSet - the files to transfer to the system clipboard.

getClipboard

public static java.awt.datatransfer.Clipboard getClipboard()
Returns an instance of the system clipboard.



This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard