20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 package org.jemmy.swt; 26 27 import org.eclipse.swt.graphics.Point; 28 import org.eclipse.swt.widgets.Text; 29 import org.jemmy.action.GetAction; 30 import org.jemmy.control.ControlType; 31 import org.jemmy.control.Property; 32 import org.jemmy.control.Wrap; 33 import org.jemmy.env.Environment; 34 import org.jemmy.input.SelectionText; 35 import org.jemmy.interfaces.ControlInterface; 36 import org.jemmy.interfaces.Focusable; 37 38 /** 39 * 40 * @author shura, erikgreijus 41 * @param <T> 42 */ 43 @ControlType(Text.class) 44 public class TextWrap<T extends Text> extends ControlWrap<T> implements Focusable { 45 46 class FocusableSelectionText extends SelectionText implements Focusable { 47 protected ClickFocus focuser; 48 private final TextWrap textWrap; 49 50 public FocusableSelectionText(TextWrap textWrap) { 51 super(textWrap); 52 this.textWrap = textWrap; 53 } 54 55 public double position() { 56 return textWrap.position(); 57 } 58 59 public String text() { 60 return textWrap.text(); 61 } | 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 package org.jemmy.swt; 26 27 import org.eclipse.swt.graphics.Point; 28 import org.eclipse.swt.widgets.Text; 29 import org.jemmy.action.GetAction; 30 import org.jemmy.control.ControlType; 31 import org.jemmy.control.Property; 32 import org.jemmy.control.Wrap; 33 import org.jemmy.env.Environment; 34 import org.jemmy.input.SelectionText; 35 import org.jemmy.interfaces.ControlInterface; 36 import org.jemmy.interfaces.Focusable; 37 38 /** 39 * 40 * @author shura 41 * @author erikgreijus 42 */ 43 @ControlType(Text.class) 44 public class TextWrap<T extends Text> extends ControlWrap<T> implements Focusable { 45 46 class FocusableSelectionText extends SelectionText implements Focusable { 47 protected ClickFocus focuser; 48 private final TextWrap textWrap; 49 50 public FocusableSelectionText(TextWrap textWrap) { 51 super(textWrap); 52 this.textWrap = textWrap; 53 } 54 55 public double position() { 56 return textWrap.position(); 57 } 58 59 public String text() { 60 return textWrap.text(); 61 } |