java.lang.Object | |
↳ | vars.shared.ui.StringTransferable |
This class represents the "transferable" object that is used in a drag and drop operation in the VARS annotation application. It currently only contains a string as the data being transferred, but it has the structure to do more than that in the future.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DataFlavor | LOCAL_STRING_FLAVOR | ||||||||||
DataFlavor[] | flavors |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
The default constructor that simply initializes the instance
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This is the method that is used to get the transferred data object.
| |||||||||||
A method to return the data flavors that are being transferred with this
transferable class
| |||||||||||
A method to use to determine if this class supports a certain data flavor for
transfer.
| |||||||||||
Simply overriding the toString() method
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
java.awt.datatransfer.Transferable
|
The default constructor that simply initializes the instance
string | is the String that will be transferred as data in the operation |
---|
This is the method that is used to get the transferred data object. Once the object is retrieved, it should be cast into it appropriate class and then it can be used
flavor | This is the flavor of data that is being requested from the
operation. Usually the caller will call isDataFlavorSupported
first to see if the data can be retrieved in that flavor. If it is supported,
the user can then call this method with that DataFlavor, get the returned object
and cast it into what they were expecting |
---|
Object
that contains the data that is transferredUnsupportedFlavorException | Description of the Exception |
---|
A method to return the data flavors that are being transferred with this transferable class
A method to use to determine if this class supports a certain data flavor for transfer.
flavor | Is the DataFlavor that is checked for transferrability |
---|
Simply overriding the toString() method