org.openbp.jaspira.gui.interaction
Class Importer

java.lang.Object
  extended by org.openbp.jaspira.gui.interaction.Importer

public class Importer
extends java.lang.Object

Container class that stores information about a drop opportunity into a particular region of a drop client.

Author:
Jens Ferchland

Field Summary
protected  java.lang.Object regionId
          Name to identify this drop region to the drop client
 
Constructor Summary
Importer(java.lang.Object regionId, InteractionClient client, java.awt.datatransfer.DataFlavor[] flavors)
          Constructor.
 
Method Summary
 java.awt.datatransfer.DataFlavor[] getFlavors()
          Gets the data flavors supported by this importer.
 boolean importData(java.awt.datatransfer.Transferable data, java.awt.Point p)
          Imports the given transferable into the drop client at the given location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

regionId

protected java.lang.Object regionId
Name to identify this drop region to the drop client

Constructor Detail

Importer

public Importer(java.lang.Object regionId,
                InteractionClient client,
                java.awt.datatransfer.DataFlavor[] flavors)
Constructor.

Parameters:
regionId - Name to identify this drop region to the drop client
client - Drop client that owns the region
flavors - Data flavors supported by this importer
Method Detail

getFlavors

public java.awt.datatransfer.DataFlavor[] getFlavors()
Gets the data flavors supported by this importer.


importData

public boolean importData(java.awt.datatransfer.Transferable data,
                          java.awt.Point p)
Imports the given transferable into the drop client at the given location.

Parameters:
data - Transferable to import
p - Import position in glass coordinates
Returns:
true The data was successfully imported.
false An error occured while importing the data.


Copyright © 2011. All Rights Reserved.