Class AbstractServerBasedImportHandler
java.lang.Object
com.levigo.jadice.web.demo.enterprise.client.AbstractServerBasedImportHandler
- All Implemented Interfaces:
ImportHandler
- Direct Known Subclasses:
DOCPVImportHandler
,JWTImportHandler
Abstract class to handle common server based import actions.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
adjustDropEffect
(DnDParameter parameter) Mainly used to make fix adjustments to theDataTransfer.DropEffect
of the event.boolean
canImport
(DnDParameter parameter) This method is called right before either an import is dispatched (DropEvent
), or when aDragOverEvent
takes place.void
dropDone
(DnDParameter parameter, ImportHandler usedHandler) This method is used to cleanup data after a drop was completed.void
importDrop
(DnDParameter parameter, ServerBasedDnDSource source) Invoke a read action of the given source and apply it to the pageView contained in the parameters.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.levigo.jadice.web.client.tools.dnd.ImportHandler
importDrop
-
Constructor Details
-
AbstractServerBasedImportHandler
public AbstractServerBasedImportHandler()
-
-
Method Details
-
adjustDropEffect
Description copied from interface:ImportHandler
Mainly used to make fix adjustments to theDataTransfer.DropEffect
of the event. Normally the dropEffect is controlled by pressing the ctrl or shift key. But maybe some handler require a fix setting of the effect. It is called on everyDragOverEvent
if this handler can import the given event. The dropEffect is used to control the feedback to the origin of the drag/drop-event- Specified by:
adjustDropEffect
in interfaceImportHandler
- Parameters:
parameter
- The parameter containing the event.
-
canImport
Description copied from interface:ImportHandler
This method is called right before either an import is dispatched (DropEvent
), or when aDragOverEvent
takes place. Here can the in the parameters contained values be used to check if this handler can successfully handle a drop. From the registered ImportHandler only one should return true.- Specified by:
canImport
in interfaceImportHandler
- Parameters:
parameter
- The parameter containing the event.- Returns:
- Return true if this handler can handle the given event and contained types, false otherwise.
-
dropDone
Description copied from interface:ImportHandler
This method is used to cleanup data after a drop was completed.- Specified by:
dropDone
in interfaceImportHandler
- Parameters:
parameter
- The parameter containing the event. In this case the event is still theDropEvent
usedHandler
- The handler that was used to import the given drop.
-