< prev index next >
core/JemmyCore/src/org/jemmy/input/ClickFocus.java
Print this page
*** 28,49 ****
import org.jemmy.control.Wrap;
import org.jemmy.interfaces.Focus;
/**
* Simple Focus implementation which clicks on a control to give focus.
* @author shura
*/
public class ClickFocus<CONTROL> implements Focus {
Wrap<? extends CONTROL> topControl;
Point clickPoint;
/**
- *
* @param topControl a control to click on. Node that this could be
* a control itself (the one we're giving the focus to) or a subcontrol
* of it.
*/
public ClickFocus(Wrap<? extends CONTROL> topControl, Point clickPoint) {
this.topControl = topControl;
this.clickPoint = clickPoint;
}
--- 28,51 ----
import org.jemmy.control.Wrap;
import org.jemmy.interfaces.Focus;
/**
* Simple Focus implementation which clicks on a control to give focus.
+ * @param <CONTROL> the control type
+ *
* @author shura
*/
public class ClickFocus<CONTROL> implements Focus {
Wrap<? extends CONTROL> topControl;
Point clickPoint;
/**
* @param topControl a control to click on. Node that this could be
* a control itself (the one we're giving the focus to) or a subcontrol
* of it.
+ * @param clickPoint the point to click
*/
public ClickFocus(Wrap<? extends CONTROL> topControl, Point clickPoint) {
this.topControl = topControl;
this.clickPoint = clickPoint;
}
*** 55,65 ****
protected Wrap<? extends CONTROL> getTopControl() {
return topControl;
}
/**
! * @{@inheritDoc}
*/
public void focus() {
if (clickPoint == null) {
topControl.mouse().click();
} else {
--- 57,67 ----
protected Wrap<? extends CONTROL> getTopControl() {
return topControl;
}
/**
! * {@inheritDoc}
*/
public void focus() {
if (clickPoint == null) {
topControl.mouse().click();
} else {
< prev index next >