|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.fhg.igd.semoa.ui.URLSelection
A Transferable
which implements the capability required
to transfer an URL
. This Transferable
supports:
URL_FLAVOR
DataFlavor.stringFlavor
DropZone.DROPZONE_FLAVOR
DataFlavor.stringFlavor
,
DropZone.DROPZONE_FLAVOR
,
URL_FLAVOR
Field Summary | |
private URL |
url_
the URL to transfer |
static DataFlavor |
URL_FLAVOR
The DataFlavor representing a
de.fhg.igd.util.URL class. |
Constructor Summary | |
URLSelection(URL url)
Creates a Transferable capable of transferring the
specified URL . |
Method Summary | |
Object |
getTransferData(DataFlavor flavor)
Returns the Transferable 's data in the requested
DataFlavor if possible. |
DataFlavor[] |
getTransferDataFlavors()
Returns an array of flavors in which this Transferable can
provide the data. |
boolean |
isDataFlavorSupported(DataFlavor flavor)
Returns whether the requested flavor is supported by this Transferable . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final DataFlavor URL_FLAVOR
DataFlavor
representing a
de.fhg.igd.util.URL
class.
private URL url_
URL
to transfer
Constructor Detail |
public URLSelection(URL url)
Transferable
capable of transferring the
specified URL
.
url
- the URL
to transfer
NullPointerException
- if the specified URL
is
null
Method Detail |
public DataFlavor[] getTransferDataFlavors()
Transferable
can
provide the data. URL_FLAVOR
,
DataFlavor.stringFlavor
and
DropZone.DROPZONE_FLAVOR
are supported.
getTransferDataFlavors
in interface Transferable
URL_FLAVOR
, DataFlavor.stringFlavor
and
DropZone.DROPZONE_FLAVOR
public boolean isDataFlavorSupported(DataFlavor flavor)
Transferable
.
isDataFlavorSupported
in interface Transferable
flavor
- the requested flavor for the data
true
if flavor is equal to
URL_FLAVOR
,
DataFlavor.stringFlavor
or
DropZone.DROPZONE_FLAVOR
;
false
if flavor is not one of the above flavorspublic Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException
Transferable
's data in the requested
DataFlavor
if possible. If the desired flavor is
URL_FLAVOR
, an URL
object is returned.
If the desired flavor is DataFlavor.stringFlavor
, the
String
representing the URL selection is returned. If
the desired flavor is DropZone.DROPZONE_FLAVOR
an
InputStream
is returned, that should be used in
conjunction with an ObjectInputStream
to read an
URL
object.
getTransferData
in interface Transferable
flavor
- the requested flavor for the data
UnsupportedFlavorException
- if the requested data flavor is not
equal to URL_FLAVOR
, DataFlavor.stringFlavor
or DropZone.DROPZONE_FLAVOR
.
IOException
- if an IOException occurs while retrieving the data
NullPointerException
- if flavor
is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |