Class SwingTextAPIDriver

All Implemented Interfaces:
LightDriver, TextDriver

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

    • SwingTextAPIDriver

      public SwingTextAPIDriver()
      Constructs a SwingTextAPIDriver.
  • 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.