public class SparkTransferManager
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
addTransferListener(FileTransferListener listener)
Adds a new TransferListener to the SparkManager.
|
static java.awt.image.BufferedImage |
getClipboard()
Returns an image if one is found in the clipboard, otherwise null is returned.
|
java.io.File |
getDefaultDirectory()
Returns the current default directory to store files.
|
java.awt.FileDialog |
getFileChooser(java.awt.Frame parent,
java.lang.String title)
Return the File Chooser to user.
|
static SparkTransferManager |
getInstance()
Returns the singleton instance of
SparkTransferManager ,
creating it if necessary. |
void |
removeTransferListener(FileTransferListener listener)
Removes the FileTransferListener.
|
ChatRoom |
sendFile(java.io.File file,
java.lang.String jid)
Send a file to a user.
|
void |
sendFileTo(ContactItem item) |
void |
sendImage(java.awt.image.BufferedImage image,
ChatRoom room)
Send an image to a user.
|
void |
sendScreenshot(ChatRoomButton button,
ChatRoom room) |
void |
setDefaultDirectory(java.io.File directory)
Sets the current default directory to store files.
|
public static SparkTransferManager getInstance()
SparkTransferManager
,
creating it if necessary.
SparkTransferManager
public void sendFileTo(ContactItem item)
public void sendScreenshot(ChatRoomButton button, ChatRoom room)
public ChatRoom sendFile(java.io.File file, java.lang.String jid)
file
- the file to send.jid
- the jid of the user to send the file to.public void sendImage(java.awt.image.BufferedImage image, ChatRoom room)
image
- the image to send.room
- the ChatRoom of the user you wish to send the image to.public static java.awt.image.BufferedImage getClipboard()
public void addTransferListener(FileTransferListener listener)
listener
- the listenerpublic void removeTransferListener(FileTransferListener listener)
listener
- the listenerpublic void setDefaultDirectory(java.io.File directory)
directory
- the default directory.public java.io.File getDefaultDirectory()
public java.awt.FileDialog getFileChooser(java.awt.Frame parent, java.lang.String title)
parent
- the parent component.title
- the title.