1
내 위젯을 드래그 가능하게 만들고 싶습니다. A GWT를 사용하고 d & d. 그것은 내 코드,하지만 그것이 작동하지 않습니다 ..GWT dnd에서 드래그 가능한 위젯을 만드는 방법
@SuppressWarnings("deprecation")
public class StickWidget extends Composite implements SourcesMouseEvents {
private static StickWidgetUiBinder uiBinder = GWT
.create(StickWidgetUiBinder.class);
@UiField Label title;
@UiField HTML content;
interface StickWidgetUiBinder extends UiBinder<Widget, StickWidget> {
}
public StickWidget(String title, String content, String width, String height) {
super();
initWidget(uiBinder.createAndBindUi(this));
this.content.setText(content);
this.title.setText(title);
this.setWidth(width);
this.setHeight(height);
}
public StickWidget(String title, String content) {
initWidget(uiBinder.createAndBindUi(this));
this.content.setText(content);
this.title.setText(title);
}
@Override
public void addMouseListener(MouseListener listener) {
// TODO Auto-generated method stub
}
@Override
public void removeMouseListener(MouseListener listener) {
// TODO Auto-generated method stub
}
}
내 EntryPoint를 조각 ..
StickWidget a = new StickWidget("gg", "gg", "20px", "200px");
DropTargetStick dropT = new DropTargetStick(new Label("fdgf"));
PickupDragController dragController = new PickupDragController (RootPanel.get(), false);
dragController.registerDropController(dropT);
dragController.makeDraggable(a);
은 내가 나를 & 내 위젯을 드래그 앤 드롭 할 수 있도록 모든 단계를 완료 생각하지만, 작동하지 않습니다 ..