I would like to be able to populate a Droppable in Java. For example, I want to do something like:
[java]DroppableControl drop = screen.findElementByName(“thedroppable”).getNiftyControl(DroppableControl.class);
Draggable drag = new Draggable();
drop.drop(drag);[/java]
However, DroppableControl.drop() is a private function. It seems the only way around this is to actually drag the Draggable and drop it on the Droppable:
[java]int x = drop.getElement().getX();
int y = drop.getElement().getY();
drag.drag(x, y);
drag.dragStop();[/java]
This isn’t working though. I think it’s because my mouse isn’t at [x,y]. Any thoughts/suggestions? I would like to avoid the extra overhead of actual dragging and dropping since I know which Droppable I want to drop into, so there’s no need to search for it at [x,y].