org.sikuli.guide.TimeoutTransition Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sikulixapi Show documentation
Show all versions of sikulixapi Show documentation
... for visual testing and automation
/*
* Copyright (c) 2010-2016, Sikuli.org, sikulix.com
* Released under the MIT License.
*
*/
package org.sikuli.guide;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.Timer;
public class TimeoutTransition implements Transition, ActionListener {
Timer timer;
TransitionListener listener;
public TimeoutTransition(int timeout){
timer = new Timer(timeout,this);
}
public String waitForTransition(final TransitionListener listener){
this.listener = listener;
timer.start();
return "Next";
}
@Override
public void actionPerformed(ActionEvent arg0) {
listener.transitionOccurred(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy