Hi,
why is it not possible to add a filter to a DraggableControl so that one can be notified on starting drag
i need to know when it starts
so far i can only add an accept filter
Code:
dropable.addFilter(new DroppableDropFilter() {
public boolean accept(Droppable drpbl, Draggable drgbl, Droppable drpbl1) {
// drgbl.getElement().findElementByName("image").setVisible(false);
box.setCullHint(Spatial.CullHint.Always);
currentDraggedObject=false;
return true;
}
thx
I’m not sure what you mean by “filter” to be notified when a drag operation starts.
Start drag operation will be published as a DraggableStartDragEvent on the EventBus as explained in the Nifty wiki: <a href=‘http://sourceforge.net/apps/mediawiki/nifty-gui/index.php?title=Standard_Controls_Drag’n’Drop#EventBus_Notification’>http://sourceforge.net/apps/mediawiki/nifty-gui/index.php?title=Standard_Controls_Drag’n’Drop#EventBus_Notification
Hope that helps,
void
@void256 said:
I'm not sure what you mean by "filter" to be notified when a drag operation starts.
Start drag operation will be published as a DraggableStartDragEvent on the EventBus as explained in the Nifty wiki: http://sourceforge.net/apps/mediawiki/nifty-gui/index.php?title=Standard_Controls_Drag'n'Drop#EventBus_Notification
Hope that helps,
void
yes, i have seen that, but how do i get a listener on that one
i don't understand, i must have missed something ...
can you enlight me ? thx
@void256 said:
EventBus Notifications explained in the Nifty Wiki should help, I think?
It is working but there is no way to have a callback while the mouse is dragging
i tried to add onMouseOver but it is not called during a dragdrop operation :(