Search in sources :

Example 1 with DragEvent

use of com.android.tools.adtui.workbench.AttachedToolWindow.DragEvent in project android by JetBrains.

the class WorkBenchTest method fireButtonDragged.

private void fireButtonDragged(@NotNull JComponent dragImage, int xStart, int yStart, int x, int y) {
    AbstractButton button = myToolWindow1.getMinimizedButton();
    MouseEvent mouseEvent = new MouseEvent(button, MouseEvent.MOUSE_DRAGGED, 1, InputEvent.BUTTON1_MASK, x, y, 1, false);
    DragEvent event = new DragEvent(mouseEvent, dragImage, new Point(xStart, yStart));
    myToolWindow1.fireButtonDragged(event);
}
Also used : DragEvent(com.android.tools.adtui.workbench.AttachedToolWindow.DragEvent) MouseEvent(java.awt.event.MouseEvent)

Example 2 with DragEvent

use of com.android.tools.adtui.workbench.AttachedToolWindow.DragEvent in project android by JetBrains.

the class WorkBenchTest method fireButtonDropped.

private void fireButtonDropped(@NotNull JComponent dragImage, int xStart, int yStart, int x, int y) {
    AbstractButton button = myToolWindow1.getMinimizedButton();
    MouseEvent mouseEvent = new MouseEvent(button, MouseEvent.MOUSE_RELEASED, 1, InputEvent.BUTTON1_MASK, x, y, 1, false);
    DragEvent event = new DragEvent(mouseEvent, dragImage, new Point(xStart, yStart));
    myToolWindow1.fireButtonDropped(event);
}
Also used : DragEvent(com.android.tools.adtui.workbench.AttachedToolWindow.DragEvent) MouseEvent(java.awt.event.MouseEvent)

Aggregations

DragEvent (com.android.tools.adtui.workbench.AttachedToolWindow.DragEvent)2 MouseEvent (java.awt.event.MouseEvent)2