Search in sources :

Example 1 with ComponentDragAndDrop

use of org.fest.swing.core.ComponentDragAndDrop in project ats-framework by Axway.

the class SwingComponent method drag.

/**
     * Simulates a user dragging of this component
     *
     */
@PublicAtsApi
public void drag() {
    new SwingElementState(this).waitToBecomeExisting();
    ComponentFixture<? extends Component> componentFixture = SwingElementLocator.findFixture(this);
    ComponentDragAndDrop componentDragAndDrop = new ComponentDragAndDrop(componentFixture.robot);
    componentDragAndDrop.drag(componentFixture.target, getComponentCenterLocation(componentFixture.target));
}
Also used : ComponentDragAndDrop(org.fest.swing.core.ComponentDragAndDrop) SwingElementState(com.axway.ats.uiengine.utilities.swing.SwingElementState) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 2 with ComponentDragAndDrop

use of org.fest.swing.core.ComponentDragAndDrop in project ats-framework by Axway.

the class SwingComponent method drop.

/**
     * Simulates a user dropping to this component
     *
     */
@PublicAtsApi
public void drop() {
    new SwingElementState(this).waitToBecomeExisting();
    ComponentFixture<? extends Component> componentFixture = SwingElementLocator.findFixture(this);
    ComponentDragAndDrop componentDragAndDrop = new ComponentDragAndDrop(componentFixture.robot);
    componentDragAndDrop.drop(componentFixture.target, getComponentCenterLocation(componentFixture.target));
}
Also used : ComponentDragAndDrop(org.fest.swing.core.ComponentDragAndDrop) SwingElementState(com.axway.ats.uiengine.utilities.swing.SwingElementState) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Aggregations

PublicAtsApi (com.axway.ats.common.PublicAtsApi)2 SwingElementState (com.axway.ats.uiengine.utilities.swing.SwingElementState)2 ComponentDragAndDrop (org.fest.swing.core.ComponentDragAndDrop)2