diff options
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/URLTransfer.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/URLTransfer.java | 70 |
1 files changed, 36 insertions, 34 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/URLTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/URLTransfer.java index 857900aab8..40ed0699a5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/URLTransfer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/URLTransfer.java @@ -13,19 +13,21 @@ package org.eclipse.swt.dnd; import org.eclipse.swt.internal.motif.*; /** -* The class <code>URLTransfer</code> provides a platform specific mechanism -* for converting text in URL format represented as a java <code>String[]</code> -* to a platform specific representation of the data and vice versa. See -* <code>Transfer</code> for additional information. The string in the -* is mandatory and must contain the fully specified url. -* -* <p>An example of a java <code>String</code> containing a URL is shown -* below:</p> -* -* <code><pre> -* String urlData = "http://www.eclipse.org"; -* </code></pre> -*/ + * The class <code>URLTransfer</code> provides a platform specific mechanism + * for converting text in URL format represented as a java <code>String</code> + * to a platform specific representation of the data and vice versa. See + * <code>Transfer</code> for additional information. The string + * must contain a fully specified url. + * + * <p>An example of a java <code>String</code> containing a URL is shown + * below:</p> + * + * <code><pre> + * String url = "http://www.eclipse.org"; + * </code></pre> + * + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> + */ public class URLTransfer extends ByteArrayTransfer { static URLTransfer _instance = new URLTransfer(); @@ -38,23 +40,23 @@ public class URLTransfer extends ByteArrayTransfer { private URLTransfer() {} /** -* Returns the singleton instance of the URLTransfer class. -* -* @return the singleton instance of the URLTransfer class -*/ + * Returns the singleton instance of the URLTransfer class. + * + * @return the singleton instance of the URLTransfer class + */ public static URLTransfer getInstance () { return _instance; } /** -* This implementation of <code>javaToNative</code> converts a URL -* represented by a java <code>String</code> to a platform specific representation. -* For additional information see <code>Transfer#javaToNative</code>. -* -* @param object a java <code>String</code> containing a URL -* @param transferData an empty <code>TransferData</code> object; this -* object will be filled in on return with the platform specific format of the data -*/ + * This implementation of <code>javaToNative</code> converts a URL + * represented by a java <code>String</code> to a platform specific representation. + * For additional information see <code>Transfer#javaToNative</code>. + * + * @param object a java <code>String</code> containing a URL + * @param transferData an empty <code>TransferData</code> object; this + * object will be filled in on return with the platform specific format of the data + */ public void javaToNative (Object object, TransferData transferData){ transferData.result = 0; if (!checkURL(object) || !isSupportedType(transferData)) { @@ -75,15 +77,15 @@ public void javaToNative (Object object, TransferData transferData){ } /** -* This implementation of <code>nativeToJava</code> converts a platform specific -* representation of a URL to a java <code>String</code>. -* For additional information see <code>Transfer#nativeToJava</code>. -* -* @param transferData the platform specific representation of the data to be -* converted -* @return a java <code>String</code> containing a URL if the -* conversion was successful; otherwise null -*/ + * This implementation of <code>nativeToJava</code> converts a platform specific + * representation of a URL to a java <code>String</code>. + * For additional information see <code>Transfer#nativeToJava</code>. + * + * @param transferData the platform specific representation of the data to be + * converted + * @return a java <code>String</code> containing a URL if the + * conversion was successful; otherwise null + */ public Object nativeToJava(TransferData transferData){ if ( !isSupportedType(transferData) || transferData.pValue == 0 ) return null; /* Ensure byteCount is a multiple of 2 bytes */ |