org.netbeans.jemmy.operators
Class JTextPaneOperator

java.lang.Object
  extended by org.netbeans.jemmy.operators.Operator
      extended by org.netbeans.jemmy.operators.ComponentOperator
          extended by org.netbeans.jemmy.operators.ContainerOperator
              extended by org.netbeans.jemmy.operators.JComponentOperator
                  extended by org.netbeans.jemmy.operators.JTextComponentOperator
                      extended by org.netbeans.jemmy.operators.JEditorPaneOperator
                          extended by org.netbeans.jemmy.operators.JTextPaneOperator
All Implemented Interfaces:
Outputable, Timeoutable

public class JTextPaneOperator
extends JEditorPaneOperator



Timeouts used:
JTextComponentOperator.PushKeyTimeout - time between key pressing and releasing during text typing
JTextComponentOperator.BetweenKeysTimeout - time to sleep between two chars typing
JTextComponentOperator.ChangeCaretPositionTimeout - maximum time to chenge caret position
JTextComponentOperator.TypeTextTimeout - maximum time to type text
ComponentOperator.WaitComponentTimeout - time to wait component displayed
ComponentOperator.WaitFocusTimeout - time to wait component focus
JScrollBarOperator.OneScrollClickTimeout - time for one scroll click
JScrollBarOperator.WholeScrollTimeout - time for the whole scrolling
.

Author:
Alexandre Iline (alexandre.iline@sun.com)
See Also:
Timeouts

Nested Class Summary
static class JTextPaneOperator.JTextPaneFinder
          Checks component type.
 
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.JEditorPaneOperator
JEditorPaneOperator.JEditorPaneFinder
 
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.JTextComponentOperator
JTextComponentOperator.JTextComponentByTextFinder, JTextComponentOperator.JTextComponentFinder, JTextComponentOperator.NoSuchTextException, JTextComponentOperator.TextChooser
 
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.JComponentOperator
JComponentOperator.JComponentByTipFinder, JComponentOperator.JComponentFinder
 
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.ContainerOperator
ContainerOperator.ContainerFinder
 
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.Operator
Operator.ComponentVisualizer, Operator.DefaultPathParser, Operator.DefaultStringComparator, Operator.Finder, Operator.MapAction, Operator.MapBooleanAction, Operator.MapByteAction, Operator.MapDoubleAction, Operator.MapFloatAction, Operator.MapCharacterAction, Operator.MapIntegerAction, Operator.MapLongAction, Operator.MapVoidAction, Operator.NoBlockingAction, Operator.PathParser, Operator.StringComparator
 
Field Summary
 
Fields inherited from class org.netbeans.jemmy.operators.JEditorPaneOperator
CONTENT_TYPE_DPROP
 
Fields inherited from class org.netbeans.jemmy.operators.JTextComponentOperator
IS_EDITABLE_DPROP, modifiersPressed, SELECTED_TEXT_DPROP, TEXT_DPROP
 
Fields inherited from class org.netbeans.jemmy.operators.JComponentOperator
A11Y_DATA, A11Y_DESCRIPTION_DPROP, A11Y_NAME_DPROP, TOOLTIP_TEXT_DPROP
 
Fields inherited from class org.netbeans.jemmy.operators.ComponentOperator
HEIGHT_DPROP, IS_SHOWING_DPROP, IS_VISIBLE_DPROP, NAME_DPROP, WIDTH_DPROP, X_DPROP, Y_DPROP
 
Fields inherited from class org.netbeans.jemmy.operators.Operator
CLASS_DPROP, TO_STRING_DPROP
 
Constructor Summary
JTextPaneOperator(ContainerOperator cont)
          Constructor.
JTextPaneOperator(ContainerOperator cont, ComponentChooser chooser)
          Constructs a JTextPaneOperator object.
JTextPaneOperator(ContainerOperator cont, ComponentChooser chooser, int index)
          Constructs a JTextPaneOperator object.
JTextPaneOperator(ContainerOperator cont, int index)
          Constructor.
JTextPaneOperator(ContainerOperator cont, java.lang.String text)
          Constructor.
JTextPaneOperator(ContainerOperator cont, java.lang.String text, int index)
          Constructor.
JTextPaneOperator(javax.swing.JTextPane b)
          Constructor.
 
Method Summary
 javax.swing.text.Style addStyle(java.lang.String string, javax.swing.text.Style style)
          Maps JTextPane.addStyle(String, Style) through queue
static javax.swing.JTextPane findJTextPane(java.awt.Container cont, ComponentChooser chooser)
          Searches JTextPane in container.
static javax.swing.JTextPane findJTextPane(java.awt.Container cont, ComponentChooser chooser, int index)
          Searches JTextPane in container.
static javax.swing.JTextPane findJTextPane(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs)
          Searches JTextPane by text.
static javax.swing.JTextPane findJTextPane(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int index)
          Searches JTextPane by text.
 javax.swing.text.AttributeSet getCharacterAttributes()
          Maps JTextPane.getCharacterAttributes() through queue
 javax.swing.text.MutableAttributeSet getInputAttributes()
          Maps JTextPane.getInputAttributes() through queue
 javax.swing.text.Style getLogicalStyle()
          Maps JTextPane.getLogicalStyle() through queue
 javax.swing.text.AttributeSet getParagraphAttributes()
          Maps JTextPane.getParagraphAttributes() through queue
 javax.swing.text.Style getStyle(java.lang.String string)
          Maps JTextPane.getStyle(String) through queue
 javax.swing.text.StyledDocument getStyledDocument()
          Maps JTextPane.getStyledDocument() through queue
 void insertComponent(java.awt.Component component)
          Maps JTextPane.insertComponent(Component) through queue
 void insertIcon(javax.swing.Icon icon)
          Maps JTextPane.insertIcon(Icon) through queue
 void removeStyle(java.lang.String string)
          Maps JTextPane.removeStyle(String) through queue
 void setCharacterAttributes(javax.swing.text.AttributeSet attributeSet, boolean b)
          Maps JTextPane.setCharacterAttributes(AttributeSet, boolean) through queue
 void setLogicalStyle(javax.swing.text.Style style)
          Maps JTextPane.setLogicalStyle(Style) through queue
 void setParagraphAttributes(javax.swing.text.AttributeSet attributeSet, boolean b)
          Maps JTextPane.setParagraphAttributes(AttributeSet, boolean) through queue
 void setStyledDocument(javax.swing.text.StyledDocument styledDocument)
          Maps JTextPane.setStyledDocument(StyledDocument) through queue
static javax.swing.JTextPane waitJTextPane(java.awt.Container cont, ComponentChooser chooser)
          Waits JTextPane in container.
static javax.swing.JTextPane waitJTextPane(java.awt.Container cont, ComponentChooser chooser, int index)
          Waits JTextPane in container.
static javax.swing.JTextPane waitJTextPane(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs)
          Waits JTextPane by text.
static javax.swing.JTextPane waitJTextPane(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int index)
          Waits JTextPane by text.
 
Methods inherited from class org.netbeans.jemmy.operators.JEditorPaneOperator
addHyperlinkListener, findJEditorPane, findJEditorPane, findJEditorPane, findJEditorPane, fireHyperlinkUpdate, getContentType, getDump, getEditorKit, getEditorKitForContentType, getPage, read, removeHyperlinkListener, setContentType, setEditorKit, setEditorKitForContentType, setPage, setPage, usePageNavigationKeys, waitJEditorPane, waitJEditorPane, waitJEditorPane, waitJEditorPane
 
Methods inherited from class org.netbeans.jemmy.operators.JTextComponentOperator
addCaretListener, clearText, copy, copyEnvironment, cut, enterText, findJTextComponent, findJTextComponent, findJTextComponent, findJTextComponent, getActions, getCaret, getCaretColor, getCaretPosition, getDisabledTextColor, getDisplayedText, getDocument, getFocusAccelerator, getHighlighter, getKeymap, getMargin, getOutput, getPositionByText, getPositionByText, getPositionByText, getPositionByText, getPreferredScrollableViewportSize, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getText, getTimeouts, getUI, changeCaretPosition, changeCaretPosition, changeCaretPosition, isEditable, modelToView, moveCaretPosition, paste, read, removeCaretListener, replaceSelection, scrollToPosition, select, selectAll, selectText, selectText, selectText, setCaret, setCaretColor, setCaretPosition, setDisabledTextColor, setDocument, setEditable, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setOutput, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setText, setTimeouts, setUI, typeText, typeText, viewToModel, waitCaretPosition, waitJTextComponent, waitJTextComponent, waitJTextComponent, waitJTextComponent, waitText, waitText, write
 
Methods inherited from class org.netbeans.jemmy.operators.JComponentOperator
addAncestorListener, addVetoableChangeListener, computeVisibleRect, createToolTip, findJComponent, findJComponent, findJComponent, findJComponent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getAutoscrolls, getBorder, getCenterXForClick, getCenterYForClick, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getInsets, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVisibleRect, getWindowContainerOperator, grabFocus, isFocusCycleRoot, isManagingFocus, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, requestDefaultFocus, resetKeyboardActions, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, showToolTip, unregisterKeyboardAction, updateUI, waitJComponent, waitJComponent, waitJComponent, waitJComponent, waitToolTip
 
Methods inherited from class org.netbeans.jemmy.operators.ContainerOperator
add, add, add, add, add, addContainerListener, createSubOperator, createSubOperator, findComponentAt, findComponentAt, findContainer, findContainer, findContainer, findContainer, findContainerUnder, findContainerUnder, findSubComponent, findSubComponent, getComponent, getComponentCount, getComponents, getInsets, getLayout, isAncestorOf, paintComponents, printComponents, remove, remove, removeAll, removeContainerListener, setLayout, waitContainer, waitContainer, waitContainer, waitContainer, waitSubComponent, waitSubComponent
 
Methods inherited from class org.netbeans.jemmy.operators.ComponentOperator
activateWindow, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, clickForPopup, clickForPopup, clickForPopup, clickForPopup, clickMouse, clickMouse, clickMouse, clickMouse, clickMouse, clickMouse, clickMouse, contains, contains, createImage, createImage, dispatchEvent, doLayout, dragMouse, dragMouse, dragMouse, dragNDrop, dragNDrop, dragNDrop, enableInputMethods, enterMouse, exitMouse, findComponent, findComponent, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getCenterX, getCenterY, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getContainer, getContainers, getCursor, getDropTarget, getEventDispatcher, getFocus, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getSize, getSource, getToolkit, getTreeLock, getWidth, getWindow, getX, getY, hasFocus, checkImage, checkImage, imageUpdate, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, list, list, list, list, list, makeComponentVisible, moveMouse, paint, paintAll, prepareImage, prepareImage, pressKey, pressKey, pressMouse, pressMouse, print, printAll, pushKey, pushKey, releaseKey, releaseKey, releaseMouse, releaseMouse, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, transferFocus, typeKey, typeKey, typeKey, update, validate, waitComponent, waitComponent, waitComponent, waitComponent, waitComponentEnabled, waitComponentShowing, waitComponentVisible, waitHasFocus, wtComponentEnabled
 
Methods inherited from class org.netbeans.jemmy.operators.Operator
addOperatorPackage, addToDump, addToDump, createOperator, getComparator, getDefaultComponentVisualizer, getDefaultMouseButton, getDefaultPathParser, getDefaultStringComparator, getDefaultVerification, getEnvironmentOperator, getCharBindingMap, getCharKey, getCharModifiers, getCharsKeys, getCharsKeys, getCharsModifiers, getCharsModifiers, getParentPath, getParentPath, getPathParser, getPopupMouseButton, getProperties, getQueueTool, getVerification, getVisualizer, isCaptionEqual, isCaptionEqual, isCaptionEqual, lockQueue, parseString, parseString, printDump, produceNoBlocking, produceNoBlocking, produceTimeRestricted, produceTimeRestricted, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, setComparator, setDefaultComponentVisualizer, setDefaultPathParser, setDefaultStringComparator, setDefaultVerification, setCharBindingMap, setPathParser, setProperties, setVerification, setVisualizer, toStringSource, unlockAndThrow, unlockQueue, waitState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JTextPaneOperator

public JTextPaneOperator(javax.swing.JTextPane b)
Constructor.

Parameters:
b - a component

JTextPaneOperator

public JTextPaneOperator(ContainerOperator cont,
                         ComponentChooser chooser,
                         int index)
Constructs a JTextPaneOperator object.

Parameters:
cont - a container
chooser - a component chooser specifying searching criteria.
index - an index between appropriate ones.

JTextPaneOperator

public JTextPaneOperator(ContainerOperator cont,
                         ComponentChooser chooser)
Constructs a JTextPaneOperator object.

Parameters:
cont - a container
chooser - a component chooser specifying searching criteria.

JTextPaneOperator

public JTextPaneOperator(ContainerOperator cont,
                         java.lang.String text,
                         int index)
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.

Parameters:
cont - a container
text - Button text.
index - Ordinal component index.
See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)

JTextPaneOperator

public JTextPaneOperator(ContainerOperator cont,
                         java.lang.String text)
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.

Parameters:
cont - a container
text - Button text.
See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)

JTextPaneOperator

public JTextPaneOperator(ContainerOperator cont,
                         int index)
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.

Parameters:
cont - a container
index - Ordinal component index.

JTextPaneOperator

public JTextPaneOperator(ContainerOperator cont)
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.

Parameters:
cont - a container
Method Detail

findJTextPane

public static javax.swing.JTextPane findJTextPane(java.awt.Container cont,
                                                  ComponentChooser chooser,
                                                  int index)
Searches JTextPane in container.

Parameters:
cont - Container to search component in.
chooser - a component chooser specifying searching criteria.
index - Ordinal component index.
Returns:
JTextPane instance or null if component was not found.

findJTextPane

public static javax.swing.JTextPane findJTextPane(java.awt.Container cont,
                                                  ComponentChooser chooser)
Searches JTextPane in container.

Parameters:
cont - Container to search component in.
chooser - a component chooser specifying searching criteria.
Returns:
JTextPane instance or null if component was not found.

findJTextPane

public static javax.swing.JTextPane findJTextPane(java.awt.Container cont,
                                                  java.lang.String text,
                                                  boolean ce,
                                                  boolean ccs,
                                                  int index)
Searches JTextPane by text.

Parameters:
cont - Container to search component in.
text - Component text.
ce - Compare text exactly.
ccs - Compare text case sensitively.
index - Ordinal component index.
Returns:
JTextPane instance or null if component was not found.
See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)

findJTextPane

public static javax.swing.JTextPane findJTextPane(java.awt.Container cont,
                                                  java.lang.String text,
                                                  boolean ce,
                                                  boolean ccs)
Searches JTextPane by text.

Parameters:
cont - Container to search component in.
text - Component text.
ce - Compare text exactly.
ccs - Compare text case sensitively.
Returns:
JTextPane instance or null if component was not found.
See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)

waitJTextPane

public static javax.swing.JTextPane waitJTextPane(java.awt.Container cont,
                                                  ComponentChooser chooser,
                                                  int index)
Waits JTextPane in container.

Parameters:
cont - Container to search component in.
chooser - a component chooser specifying searching criteria.
index - Ordinal component index.
Returns:
JTextPane instance.

waitJTextPane

public static javax.swing.JTextPane waitJTextPane(java.awt.Container cont,
                                                  ComponentChooser chooser)
Waits JTextPane in container.

Parameters:
cont - Container to search component in.
chooser - a component chooser specifying searching criteria.
Returns:
JTextPane instance.

waitJTextPane

public static javax.swing.JTextPane waitJTextPane(java.awt.Container cont,
                                                  java.lang.String text,
                                                  boolean ce,
                                                  boolean ccs,
                                                  int index)
Waits JTextPane by text.

Parameters:
cont - Container to search component in.
text - Component text.
ce - Compare text exactly.
ccs - Compare text case sensitively.
index - Ordinal component index.
Returns:
JTextPane instance.
See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)

waitJTextPane

public static javax.swing.JTextPane waitJTextPane(java.awt.Container cont,
                                                  java.lang.String text,
                                                  boolean ce,
                                                  boolean ccs)
Waits JTextPane by text.

Parameters:
cont - Container to search component in.
text - Component text.
ce - Compare text exactly.
ccs - Compare text case sensitively.
Returns:
JTextPane instance.
See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)

addStyle

public javax.swing.text.Style addStyle(java.lang.String string,
                                       javax.swing.text.Style style)
Maps JTextPane.addStyle(String, Style) through queue


getCharacterAttributes

public javax.swing.text.AttributeSet getCharacterAttributes()
Maps JTextPane.getCharacterAttributes() through queue


getInputAttributes

public javax.swing.text.MutableAttributeSet getInputAttributes()
Maps JTextPane.getInputAttributes() through queue


getLogicalStyle

public javax.swing.text.Style getLogicalStyle()
Maps JTextPane.getLogicalStyle() through queue


getParagraphAttributes

public javax.swing.text.AttributeSet getParagraphAttributes()
Maps JTextPane.getParagraphAttributes() through queue


getStyle

public javax.swing.text.Style getStyle(java.lang.String string)
Maps JTextPane.getStyle(String) through queue


getStyledDocument

public javax.swing.text.StyledDocument getStyledDocument()
Maps JTextPane.getStyledDocument() through queue


insertComponent

public void insertComponent(java.awt.Component component)
Maps JTextPane.insertComponent(Component) through queue


insertIcon

public void insertIcon(javax.swing.Icon icon)
Maps JTextPane.insertIcon(Icon) through queue


removeStyle

public void removeStyle(java.lang.String string)
Maps JTextPane.removeStyle(String) through queue


setCharacterAttributes

public void setCharacterAttributes(javax.swing.text.AttributeSet attributeSet,
                                   boolean b)
Maps JTextPane.setCharacterAttributes(AttributeSet, boolean) through queue


setLogicalStyle

public void setLogicalStyle(javax.swing.text.Style style)
Maps JTextPane.setLogicalStyle(Style) through queue


setParagraphAttributes

public void setParagraphAttributes(javax.swing.text.AttributeSet attributeSet,
                                   boolean b)
Maps JTextPane.setParagraphAttributes(AttributeSet, boolean) through queue


setStyledDocument

public void setStyledDocument(javax.swing.text.StyledDocument styledDocument)
Maps JTextPane.setStyledDocument(StyledDocument) through queue