Java 无法在gxt中的flowlayoutcontainer中拖放文本框
我想从垂直布局容器中拖动一个文本框,然后将其放入流布局容器中。放置时,它应显示为一个富文本区域。请在下面查找代码。我试着调试代码,但它只在拖动中输入。调试未进入droptarget内部。你能帮帮我吗Java 无法在gxt中的flowlayoutcontainer中拖放文本框,java,gwt,drag-and-drop,gxt,Java,Gwt,Drag And Drop,Gxt,我想从垂直布局容器中拖动一个文本框,然后将其放入流布局容器中。放置时,它应显示为一个富文本区域。请在下面查找代码。我试着调试代码,但它只在拖动中输入。调试未进入droptarget内部。你能帮帮我吗 final TextButton textButton = new TextButton(); textButton.setText("Text Box"); DragSource source = new DragSource(textButton) { @Over
final TextButton textButton = new TextButton();
textButton.setText("Text Box");
DragSource source = new DragSource(textButton) {
@Override
protected void onDragStart(DndDragStartEvent event) {
super.onDragStart(event);
}
};
DropTarget dropTarget = new DropTarget(flowLayoutContainer);
dropTarget.setOperation(Operation.COPY);
dropTarget.addDropHandler(new DndDropHandler() {
@Override
public void onDrop(DndDropEvent event) {
final RichTextArea textBox1 = new RichTextArea();
flowLayoutContainer.add(textBox1);
}
});