Class PageSortImportHandler
java.lang.Object
com.levigo.jadice.web.client.tools.dnd.PageSortImportHandler
- All Implemented Interfaces:
ImportHandler
ImportHandler used to sort the pages within a thumbnailPageView. This handler doesn't need any
data from the event to perform the import. The data is only used to determine if the drag is in
the same thumbnailView, browser tab and client.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadjustDropEffect(DnDParameter parameter) Mainly used to make fix adjustments to theDataTransfer.DropEffectof the event.booleancanImport(DnDParameter parameter) This method is called right before either an import is dispatched (DropEvent), or when aDragOverEventtakes place.voiddropDone(DnDParameter parameter, ImportHandler usedHandler) This method is used to cleanup data after a drop was completed.voidimportDrop(DnDParameter parameter) The method is responsible for handling the drop and the given data.
-
Constructor Details
-
PageSortImportHandler
public PageSortImportHandler()
-
-
Method Details
-
canImport
Description copied from interface:ImportHandlerThis method is called right before either an import is dispatched (DropEvent), or when aDragOverEventtakes 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:
canImportin interfaceImportHandler- Parameters:
parameter- The parameter containing the event.- Returns:
- Return true if this handler can handle the given event and contained types, false otherwise.
-
importDrop
Description copied from interface:ImportHandlerThe method is responsible for handling the drop and the given data. It is called on aDropEvent.- Specified by:
importDropin interfaceImportHandler- Parameters:
parameter- The parameter containing the event.
-
adjustDropEffect
Description copied from interface:ImportHandlerMainly used to make fix adjustments to theDataTransfer.DropEffectof 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 everyDragOverEventif 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:
adjustDropEffectin interfaceImportHandler- Parameters:
parameter- The parameter containing the event.
-
dropDone
Description copied from interface:ImportHandlerThis method is used to cleanup data after a drop was completed.- Specified by:
dropDonein interfaceImportHandler- Parameters:
parameter- The parameter containing the event. In this case the event is still theDropEventusedHandler- The handler that was used to import the given drop.
-