Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Runtime

org.eclipse.gmf.runtime.common.ui.services.dnd.core
Class SelectionTransfer

java.lang.Object
  extended by 

org.eclipse.swt.dnd.Transfer
      extended by 

org.eclipse.swt.dnd.ByteArrayTransfer
          extended by 
org.eclipse.gmf.runtime.common.ui.services.dnd.core.SelectionTransfer

public final class SelectionTransfer
extends ByteArrayTransfer

This class can be used to transfer a ISelection between two parts in a workbench in a drag and drop operation. This class does not marshall the data.


Method Summary
static  SelectionTransfer getInstance ()
          Return the singleton.
  ISelection getSelection ()
          Returns the selection.
protected  int[] getTypeIds ()
          Returns the type ids supported by this agent
protected  java.lang.String[] getTypeNames ()
          Returns the type names supported by this agent
 void javaToNative (java.lang.Object object, TransferData transferData)
          Converts the TYPE_NAME into a byte[]
 java.lang.Object nativeToJava ( TransferData transferData)
          Retrieves the byte[] associated with TYPE_NAME.
 void setSelection ( ISelection aSelection)
          Sets the selection.
 
Methods inherited from class org.eclipse.swt.dnd. ByteArrayTransfer
getSupportedTypes, isSupportedType
 
Methods inherited from class org.eclipse.swt.dnd. Transfer
registerType, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static 
SelectionTransfer getInstance()
Return the singleton.

Returns:
the singleton instance of the SelectionTransfer class

javaToNative

public void javaToNative(java.lang.Object object,
                         
TransferData transferData)
Converts the TYPE_NAME into a byte[]

Overrides:
javaToNative in class ByteArrayTransfer
See Also:
Transfer.javaToNative(java.lang.Object, org.eclipse.swt.dnd.TransferData)

nativeToJava

public java.lang.Object nativeToJava(
TransferData transferData)
Retrieves the byte[] associated with TYPE_NAME. Verifies it is the same as the TYPE_NAME and then returns the selection.

Overrides:
nativeToJava in class ByteArrayTransfer
Returns:
Object
See Also:
Transfer.nativeToJava(org.eclipse.swt.dnd.TransferData)

getTypeIds

protected int[] getTypeIds()
Returns the type ids supported by this agent

Specified by:
getTypeIds in class Transfer
Returns:
int[]
See Also:
Transfer.getTypeIds()

getTypeNames

protected java.lang.String[] getTypeNames()
Returns the type names supported by this agent

Specified by:
getTypeNames in class Transfer
Returns:
String[]
See Also:
Transfer.getTypeNames()

getSelection

public 
ISelection getSelection()
Returns the selection.

Returns:
selection

setSelection

public void setSelection(
ISelection aSelection)
Sets the selection.

Parameters:
aSelection - The selection to set

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire