Class AWTTextAPIDriver

All Implemented Interfaces:
LightDriver, TextDriver

public class AWTTextAPIDriver extends TextAPIDriver
TextDriver for AWT component types. Uses API calls.
Author:
Alexandre Iline(alexandre.iline@sun.com)
  • Constructor Details

    • AWTTextAPIDriver

      public AWTTextAPIDriver()
      Constructs a AWTTextAPIDriver.
  • Method Details

    • getText

      public String getText(ComponentOperator oper)
      Description copied from class: TextAPIDriver
      Returns operator's text.
      Specified by:
      getText in class TextAPIDriver
      Parameters:
      oper - an operator.
      Returns:
      string representing component text.
    • getCaretPosition

      public int getCaretPosition(ComponentOperator oper)
      Description copied from class: TextAPIDriver
      Returns current caret position.
      Specified by:
      getCaretPosition in class TextAPIDriver
      Parameters:
      oper - an operator.
      Returns:
      int represnting current operator's caret position.
    • getSelectionStart

      public int getSelectionStart(ComponentOperator oper)
      Description copied from class: TextAPIDriver
      Returns a caret position of selection start.
      Specified by:
      getSelectionStart in class TextAPIDriver
      Parameters:
      oper - an operator.
      Returns:
      int represnting index of operator's selection start.
    • getSelectionEnd

      public int getSelectionEnd(ComponentOperator oper)
      Description copied from class: TextAPIDriver
      Returns a caret position of selection end.
      Specified by:
      getSelectionEnd in class TextAPIDriver
      Parameters:
      oper - an operator.
      Returns:
      int represnting index of operator's selection end.