public class JTextComponent extends JComponent
Modifier | Constructor and Description |
---|---|
protected |
JTextComponent(JtfObjectHandle handle,
Desktop desktop)
Creates a new JTextComponent with a JtfObjectHandle.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all the text from text component.
|
int |
getCaretPosition()
Gets the position of the text insertion caret for the text component.
|
String |
getSelectedText()
Gets the current selected text.
|
int |
getSelectionEnd()
Gets the end position of the selection.
|
int |
getSelectionStart()
Gets the start position of the selection.
|
String |
getText()
Gets the text of the text component.
|
boolean |
isEditable()
Gets whether the text of the text component can be changed by the user.
|
void |
selectAll()
Selects all the content in the text component.
|
void |
setCaretPosition(int index)
Sets the position of the text insertion caret for this text component.
|
void |
setSelectionRange(int selectionStart,
int selectionEnd)
Selects the text within the specified range.
|
void |
setText(String text)
Sets the text content to the specified text.
|
getToolTipText
click, click, click, click, doubleClick, doubleClick, doubleClick, doubleClick, getAccessibleName, getAccessibleRole, getBackground, getCursor, getFont, getForeground, getHeight, getName, getNativeHandle, getWidth, isEnabled, isFocusable, isFocused, mouseMove, mouseMove, openContextMenu, openContextMenu, pressKeys, pressKeys, pressMouse, pressMouse, pressMouse, pressMouse, releaseKeys, releaseKeys, releaseMouse, releaseMouse, releaseMouse, releaseMouse, scrollIntoView, setFocus, typeKeys, typeKeys, typeKeys, typePasswordKeys, typePasswordKeys, typePasswordKeys
captureBitmap, captureBitmap, exists, exists, generateLocator, getChildren, getDynamicMethodList, getParent, getPropertyList, getRect, getRect, getValue, highlightObject, highlightObject, highlightObject, invokeMethods, textCapture, textCapture, textClick, textClick, textClick, textClick, textClick, textClick, textExists, textExists, textExists, textExists, textExists, textRectangle, textRectangle, textRectangle, textRectangle, textRectangle, waitForChildDisappearance, waitForChildDisappearance, waitForDisappearance, waitForDisappearance, waitForObject, waitForObject, waitForProperty, waitForProperty
equals, exists, find, find, findAll, findAll, getCustomTypeName, getDesktop, getHandle, getLocator, getProperty, getTypeName, hashCode, imageClick, imageClick, imageClick, imageClick, imageClick, imageClick, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageExists, imageExists, imageExists, imageExistsFile, imageExistsFile, imageExistsFile, imageRectangle, imageRectangle, imageRectangle, imageRectangleFile, imageRectangleFile, imageRectangleFile, invoke, preventFinalLocator, setProperty, toString
protected JTextComponent(JtfObjectHandle handle, Desktop desktop)
handle
- the handle that identifies the JTextComponentdesktop
- the desktop on which this object livespublic void clear()
public void selectAll()
public void setCaretPosition(int index)
index
- the position of the text caret. The value is zero-based.public void setSelectionRange(int selectionStart, int selectionEnd)
selectionStart
- the start index of the selection. The value is zero-based.selectionEnd
- the end index of the selection. The value is zero-based.public void setText(String text)
text
- the new text contentpublic int getCaretPosition()
public boolean isEditable()
public String getSelectedText()
public int getSelectionEnd()
public int getSelectionStart()
public String getText()
getText
in class TestObject
Copyright 2009-2012 Micro Focus. All Rights Reserved.