Class TextAreaOperator

All Implemented Interfaces:
Outputable, Timeoutable

public class TextAreaOperator extends TextComponentOperator implements Timeoutable, Outputable
This operator type covers java.awt.textArea component.
Author:
Alexandre Iline (alexandre.iline@sun.com)
See Also:
  • Field Details

  • Constructor Details

    • TextAreaOperator

      public TextAreaOperator(TextArea b)
      Constructor.
      Parameters:
      b - The java.awt.TextArea managed by this instance.
    • TextAreaOperator

      public TextAreaOperator(ContainerOperator cont, ComponentChooser chooser, int index)
      Constructs a TextAreaOperator object.
      Parameters:
      cont - a container
      chooser - a component chooser specifying searching criteria.
      index - an index between appropriate ones.
    • TextAreaOperator

      public TextAreaOperator(ContainerOperator cont, ComponentChooser chooser)
      Constructs a TextAreaOperator object.
      Parameters:
      cont - a container
      chooser - a component chooser specifying searching criteria.
    • TextAreaOperator

      public TextAreaOperator(ContainerOperator cont, String text, int index)
      Constructor. Waits for a component in a container to show. The component is identified as the index+1'th java.awt.TextArea that shows, lies below the container in the display containment hierarchy, and that has the desired text. Uses cont's timeout and output for waiting and to init this operator.
      Parameters:
      cont - The operator for a container containing the sought for textArea.
      text - TextArea text.
      index - Ordinal component index. The first component has index 0.
      See Also:
    • TextAreaOperator

      public TextAreaOperator(ContainerOperator cont, String text)
      Constructor. Waits for a component in a container to show. The component is identified as the first java.awt.TextArea that shows, lies below the container in the display containment hierarchy, and that has the desired text. Uses cont's timeout and output for waiting and to init this operator.
      Parameters:
      cont - The operator for a container containing the sought for textArea.
      text - TextArea text.
      See Also:
    • TextAreaOperator

      public TextAreaOperator(ContainerOperator cont, int index)
      Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.
      Parameters:
      cont - The operator for a container containing the sought for textArea.
      index - Ordinal component index.
      See Also:
    • TextAreaOperator

      public TextAreaOperator(ContainerOperator cont)
      Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.
      Parameters:
      cont - The operator for a container containing the sought for textArea.
      See Also:
  • Method Details

    • findTextArea

      public static TextArea findTextArea(Container cont, ComponentChooser chooser, int index)
      Searches TextArea in a container.
      Parameters:
      cont - Container in which to search for the component. The container lies above the component in the display containment hierarchy. The containment need not be direct.
      chooser - org.netbeans.jemmy.ComponentChooser implementation, defining and applying search criteria.
      index - Ordinal component index. The first index is 0.
      Returns:
      TextArea instance or null if component was not found.
    • findTextArea

      public static TextArea findTextArea(Container cont, ComponentChooser chooser)
      Searches for the first TextArea in a container.
      Parameters:
      cont - Container in which to search for the component. The container lies above the component in the display containment hierarchy. The containment need not be direct.
      chooser - org.netbeans.jemmy.ComponentChooser implementation, defining and applying search criteria.
      Returns:
      TextArea instance or null if component was not found.
    • findTextArea

      public static TextArea findTextArea(Container cont, String text, boolean ce, boolean ccs, int index)
      Searches TextArea by text.
      Parameters:
      cont - Container to search component in.
      text - TextArea text. If null, contents is not checked.
      ce - Compare text exactly.
      ccs - Compare text case sensitively.
      index - Ordinal component index.
      Returns:
      TextArea instance or null if component was not found.
      See Also:
    • findTextArea

      public static TextArea findTextArea(Container cont, String text, boolean ce, boolean ccs)
      Searches TextArea by text.
      Parameters:
      cont - Container to search component in.
      text - TextArea text. If null, contents is not checked.
      ce - Compare text exactly.
      ccs - Compare text case sensitively.
      Returns:
      TextArea instance or null if component was not found.
      See Also:
    • waitTextArea

      public static TextArea waitTextArea(Container cont, ComponentChooser chooser, int index)
      Waits TextArea in container.
      Parameters:
      cont - Container to search component in.
      chooser - org.netbeans.jemmy.ComponentChooser implementation.
      index - Ordinal component index.
      Returns:
      TextArea instance.
    • waitTextArea

      public static TextArea waitTextArea(Container cont, ComponentChooser chooser)
      Waits 0'th TextArea in container.
      Parameters:
      cont - Container to search component in.
      chooser - org.netbeans.jemmy.ComponentChooser implementation.
      Returns:
      TextArea instance.
    • waitTextArea

      public static TextArea waitTextArea(Container cont, String text, boolean ce, boolean ccs, int index)
      Waits TextArea by text.
      Parameters:
      cont - Container to search component in.
      text - TextArea text. If null, contents is not checked.
      ce - Compare text exactly.
      ccs - Compare text case sensitively.
      index - Ordinal component index.
      Returns:
      TextArea instance.
      See Also:
    • waitTextArea

      public static TextArea waitTextArea(Container cont, String text, boolean ce, boolean ccs)
      Waits TextArea by text.
      Parameters:
      cont - Container to search component in.
      text - TextArea text. If null, contents is not checked.
      ce - Compare text exactly.
      ccs - Compare text case sensitively.
      Returns:
      TextArea instance.
      See Also:
    • setTimeouts

      public void setTimeouts(Timeouts timeouts)
      Description copied from interface: Timeoutable
      Defines current timeouts.
      Specified by:
      setTimeouts in interface Timeoutable
      Overrides:
      setTimeouts in class TextComponentOperator
      Parameters:
      timeouts - A collection of timeout assignments.
      See Also:
    • getTimeouts

      public Timeouts getTimeouts()
      Description copied from interface: Timeoutable
      Return current timeouts.
      Specified by:
      getTimeouts in interface Timeoutable
      Overrides:
      getTimeouts in class TextComponentOperator
      Returns:
      the collection of current timeout assignments.
      See Also:
    • setOutput

      public void setOutput(TestOut out)
      Description copied from interface: Outputable
      Defines print output streams or writers.
      Specified by:
      setOutput in interface Outputable
      Overrides:
      setOutput in class TextComponentOperator
      Parameters:
      out - Identify the streams or writers used for print output.
      See Also:
    • getOutput

      public TestOut getOutput()
      Description copied from interface: Outputable
      Returns print output streams or writers.
      Specified by:
      getOutput in interface Outputable
      Overrides:
      getOutput in class TextComponentOperator
      Returns:
      an object that contains references to objects for printing to output and err streams.
      See Also:
    • getDump

      public Hashtable getDump()
      Description copied from class: ComponentOperator
      Returns information about component.
      Overrides:
      getDump in class TextComponentOperator
      Returns:
      a Hashtable containing name-value pairs.
    • getColumns

      public int getColumns()
      Maps TextArea.getColumns() through queue
    • getMinimumSize

      public Dimension getMinimumSize(int i, int i1)
      Maps TextArea.getMinimumSize(int, int) through queue
    • getPreferredSize

      public Dimension getPreferredSize(int i, int i1)
      Maps TextArea.getPreferredSize(int, int) through queue
    • getRows

      public int getRows()
      Maps TextArea.getRows() through queue
    • getScrollbarVisibility

      public int getScrollbarVisibility()
      Maps TextArea.getScrollbarVisibility() through queue
    • replaceRange

      public void replaceRange(String string, int i, int i1)
      Maps TextArea.replaceRange(String, int, int) through queue
    • setColumns

      public void setColumns(int i)
      Maps TextArea.setColumns(int) through queue
    • setRows

      public void setRows(int i)
      Maps TextArea.setRows(int) through queue