public class JEditTextArea extends javax.swing.JComponent
jEdit's text area component. It is more suited for editing program source code than JEditorPane, because it drops the unnecessary features (images, variable-width lines, and so on) and adds a whole bunch of useful goodies such as:
JEditTextArea ta = new JEditTextArea(); ta.setTokenMarker( new JavaTokenMarker() ); ta.setText( "public class Test {\n" + " public static void main(String[] args) {\n" + " System.out.println(\"Hello World\");\n" + " }\n" + "}" );
Modifiers | Name | Description |
---|---|---|
static java.lang.String |
LEFT_OF_SCROLLBAR |
Adding components with this name to the text area will place them left of the horizontal scroll bar. |
Fields inherited from class | Fields |
---|---|
class javax.swing.JComponent |
WHEN_FOCUSED, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_IN_FOCUSED_WINDOW, UNDEFINED_CONDITION, TOOL_TIP_TEXT_KEY, TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, WIDTH, HEIGHT, PROPERTIES, SOMEBITS, FRAMEBITS, ALLBITS, ERROR, ABORT |
class java.awt.Container |
TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, WIDTH, HEIGHT, PROPERTIES, SOMEBITS, FRAMEBITS, ALLBITS, ERROR, ABORT |
Constructor and description |
---|
JEditTextArea
() Creates a new JEditTextArea with the default settings. |
JEditTextArea
(TextAreaDefaults defaults) Creates a new JEditTextArea with the specified settings. |
Type Params | Return Type | Name and description |
---|---|---|
|
int |
_offsetToX(int line, int offset) Converts an offset in a line into an x co-ordinate. |
|
void |
addCaretListener(javax.swing.event.CaretListener listener) Adds a caret change listener to this text area. |
|
void |
addNotify() |
|
void |
blinkCaret() Blinks the caret. |
|
void |
copy() Places the selected text into the clipboard. |
|
void |
cut() Deletes the selected text from the text area and places it into the clipboard. |
|
int |
getBracketLine() Returns the line of the highlighted bracket (the bracket matching the one before the caret) |
|
int |
getBracketPosition() Returns the position of the highlighted bracket (the bracket matching the one before the caret) |
|
int |
getCaretLine() Returns the caret line. |
|
int |
getCaretPosition() Returns the caret position. |
|
SyntaxDocument |
getDocument() Returns the document this text area is editing. |
|
int |
getDocumentLength() Returns the length of the document. |
|
int |
getFirstLine() Returns the line displayed at the text area's origin. |
|
InputHandler |
getInputHandler() Returns the input handler. |
|
int |
getLineCount() Returns the number of lines in the document. |
|
int |
getLineEndOffset(int line) Returns the end offset of the specified line. |
|
int |
getLineHeight() |
|
int |
getLineLength(int line) Returns the length of the specified line. |
|
int |
getLineOfOffset(int offset) Returns the line containing the specified offset. |
|
int |
getLineStartOffset(int line) Returns the start offset of the specified line. |
|
java.lang.String |
getLineText(int lineIndex) Returns the text on the specified line. |
|
void |
getLineText(int lineIndex, javax.swing.text.Segment segment) Copies the text on the specified line into a segment. |
|
int |
getMagicCaretPosition() Returns the `magic' caret position. |
|
int |
getMarkLine() Returns the mark line. |
|
int |
getMarkPosition() Returns the mark position. |
|
int |
getMaxLineLength() |
|
java.awt.Dimension |
getMaximumSize() |
|
java.awt.Dimension |
getMinimumSize() |
|
TextAreaPainter |
getPainter() Returns the object responsible for painting this text area. |
|
java.awt.Dimension |
getPreferredScrollableViewportSize() |
|
java.awt.Dimension |
getPreferredSize() |
|
javax.swing.JPopupMenu |
getRightClickPopup() Returns the right click popup menu. |
|
int |
getScrollableBlockIncrement(java.awt.Rectangle arg0, int arg1, int arg2) |
|
boolean |
getScrollableTracksViewportHeight() |
|
boolean |
getScrollableTracksViewportWidth() |
|
int |
getScrollableUnitIncrement(java.awt.Rectangle arg0, int arg1, int arg2) |
|
java.lang.String |
getSelectedText() Returns the selected text, or null if no selection is active. |
|
int |
getSelectionEnd() Returns the selection end offset. |
|
int |
getSelectionEnd(int line) Returns the offset where the selection ends on the specified line. |
|
int |
getSelectionEndLine() Returns the selection end line. |
|
int |
getSelectionStart() Returns the selection start offset. |
|
int |
getSelectionStart(int line) Returns the offset where the selection starts on the specified line. |
|
int |
getSelectionStartLine() Returns the selection start line. |
|
int |
getTabExpandedLineLength(int line) Returns the length of the specified line. |
|
java.lang.String |
getText() Returns the entire text of this text area. |
|
java.lang.String |
getText(int start, int len) Returns the specified substring of the document. |
|
void |
getText(int start, int len, javax.swing.text.Segment segment) Copies the specified substring of the document into a segment. |
|
TokenMarker |
getTokenMarker() Returns the document's token marker. |
|
int |
getVisibleLines() Returns the number of lines visible in this text area. |
|
boolean |
isCaretBlinkEnabled() Returns true if the caret is blinking, false otherwise. |
|
boolean |
isCaretVisible() Returns true if the caret is visible, false otherwise. |
|
boolean |
isEditable() Returns true if this text area is editable, false otherwise. |
|
boolean |
isManagingFocus() Returns if this component can be traversed by pressing the Tab key. |
|
boolean |
isOverwriteEnabled() Returns true if overwrite mode is enabled, false otherwise. |
|
boolean |
isSelectionRectangular() Returns true if the selection is rectangular, false otherwise. |
|
int |
lineToY(int line) Converts a line index to a y co-ordinate. |
|
int |
offsetToX(int line, int offset) Converts an offset in a line into an x co-ordinate. |
|
void |
overwriteSetSelectedText(java.lang.String str) Similar to setSelectedText() , but overstrikes the appropriate
number of characters if overwrite mode is enabled. |
|
void |
paste() Inserts the clipboard contents into the text. |
|
int |
pointToOffset(java.awt.Point pt) |
|
void |
processKeyEvent(java.awt.event.KeyEvent evt) Forwards key events directly to the input handler. |
|
void |
recalculateVisibleLines() Recalculates the number of visible lines. |
|
void |
removeCaretListener(javax.swing.event.CaretListener listener) Removes a caret change listener from this text area. |
|
void |
removeNotify() Called by the AWT when this component is removed from it's parent. |
|
void |
scrollTo(int line, int offset) Ensures that the specified line and offset is visible by scrolling the text area if necessary. |
|
void |
scrollToCaret() Returns the horizontal offset of drawn lines. |
|
void |
select(int start, int end) Selects from the start offset to the end offset. |
|
void |
selectAll() Selects all text in the document. |
|
void |
selectNone() Moves the mark to the caret position. |
|
void |
setCaretBlinkEnabled(boolean caretBlinks) Toggles caret blinking. |
|
void |
setCaretPosition(int caret) Sets the caret position. |
|
void |
setCaretVisible(boolean caretVisible) Sets if the caret should be visible. |
|
void |
setDocument(SyntaxDocument document) Sets the document this text area is editing. |
|
void |
setEditable(boolean editable) Sets if this component is editable. |
|
void |
setFirstLine(int firstLine) Sets the line displayed at the text area's origin without updating the scroll bars. |
|
void |
setInputHandler(InputHandler inputHandler) Sets the input handler. |
|
void |
setMagicCaretPosition(int magicCaret) Sets the `magic' caret position. |
|
void |
setOverwriteEnabled(boolean overwrite) Sets if overwrite mode should be enabled. |
|
void |
setRightClickPopup(javax.swing.JPopupMenu popup) Sets the right click popup menu. |
|
void |
setSelectedText(java.lang.String selectedText) Replaces the selection with the specified text. |
|
void |
setSelectionEnd(int selectionEnd) Sets the selection end. |
|
void |
setSelectionRectangular(boolean rectSelect) Sets if the selection should be rectangular. |
|
void |
setSelectionStart(int selectionStart) Sets the selection start. |
|
void |
setText(java.lang.String text) Sets the entire text of this text area. |
|
void |
setTokenMarker(TokenMarker tokenMarker) Sets the document's token marker. |
|
void |
updateScrollBars() Returns the number of lines from the top and button of the text area that are always visible. |
|
int |
xToOffset(int line, int x) Converts an x co-ordinate to an offset within a line. |
|
int |
xyToOffset(int x, int y) Converts a point to an offset, from the start of the text. |
|
int |
yToLine(int y) Converts a y co-ordinate to a line index. |
Methods inherited from class | Name |
---|---|
class javax.swing.JComponent |
javax.swing.JComponent#update(java.awt.Graphics), javax.swing.JComponent#contains(int, int), javax.swing.JComponent#getBounds(java.awt.Rectangle), javax.swing.JComponent#getLocation(java.awt.Point), javax.swing.JComponent#print(java.awt.Graphics), javax.swing.JComponent#getSize(java.awt.Dimension), javax.swing.JComponent#setOpaque(boolean), javax.swing.JComponent#isOpaque(), javax.swing.JComponent#enable(), javax.swing.JComponent#updateUI(), javax.swing.JComponent#getUIClassID(), javax.swing.JComponent#getUI(), javax.swing.JComponent#setEnabled(boolean), javax.swing.JComponent#addAncestorListener(javax.swing.event.AncestorListener), javax.swing.JComponent#firePropertyChange(java.lang.String, boolean, boolean), javax.swing.JComponent#firePropertyChange(java.lang.String, char, char), javax.swing.JComponent#firePropertyChange(java.lang.String, int, int), javax.swing.JComponent#getListeners(java.lang.Class), javax.swing.JComponent#getClientProperty(java.lang.Object), javax.swing.JComponent#setInheritsPopupMenu(boolean), javax.swing.JComponent#getInheritsPopupMenu(), javax.swing.JComponent#setComponentPopupMenu(javax.swing.JPopupMenu), javax.swing.JComponent#getComponentPopupMenu(), javax.swing.JComponent#paint(java.awt.Graphics), javax.swing.JComponent#printAll(java.awt.Graphics), javax.swing.JComponent#isPaintingTile(), javax.swing.JComponent#isPaintingForPrint(), javax.swing.JComponent#isManagingFocus(), javax.swing.JComponent#setNextFocusableComponent(java.awt.Component), javax.swing.JComponent#getNextFocusableComponent(), javax.swing.JComponent#setRequestFocusEnabled(boolean), javax.swing.JComponent#isRequestFocusEnabled(), javax.swing.JComponent#requestFocus(), javax.swing.JComponent#requestFocus(boolean), javax.swing.JComponent#requestFocusInWindow(), javax.swing.JComponent#grabFocus(), javax.swing.JComponent#setVerifyInputWhenFocusTarget(boolean), javax.swing.JComponent#getVerifyInputWhenFocusTarget(), javax.swing.JComponent#getFontMetrics(java.awt.Font), javax.swing.JComponent#setPreferredSize(java.awt.Dimension), javax.swing.JComponent#getPreferredSize(), javax.swing.JComponent#setMaximumSize(java.awt.Dimension), javax.swing.JComponent#getMaximumSize(), javax.swing.JComponent#setMinimumSize(java.awt.Dimension), javax.swing.JComponent#getMinimumSize(), javax.swing.JComponent#setBorder(javax.swing.border.Border), javax.swing.JComponent#getBorder(), javax.swing.JComponent#getInsets(), javax.swing.JComponent#getInsets(java.awt.Insets), javax.swing.JComponent#getAlignmentY(), javax.swing.JComponent#setAlignmentY(float), javax.swing.JComponent#getAlignmentX(), javax.swing.JComponent#setAlignmentX(float), javax.swing.JComponent#setInputVerifier(javax.swing.InputVerifier), javax.swing.JComponent#getInputVerifier(), javax.swing.JComponent#getGraphics(), javax.swing.JComponent#setDebugGraphicsOptions(int), javax.swing.JComponent#getDebugGraphicsOptions(), javax.swing.JComponent#registerKeyboardAction(java.awt.event.ActionListener, javax.swing.KeyStroke, int), javax.swing.JComponent#registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, javax.swing.KeyStroke, int), javax.swing.JComponent#unregisterKeyboardAction(javax.swing.KeyStroke), javax.swing.JComponent#getRegisteredKeyStrokes(), javax.swing.JComponent#getConditionForKeyStroke(javax.swing.KeyStroke), javax.swing.JComponent#getActionForKeyStroke(javax.swing.KeyStroke), javax.swing.JComponent#resetKeyboardActions(), javax.swing.JComponent#setInputMap(int, javax.swing.InputMap), javax.swing.JComponent#getInputMap(int), javax.swing.JComponent#getInputMap(), javax.swing.JComponent#setActionMap(javax.swing.ActionMap), javax.swing.JComponent#getActionMap(), javax.swing.JComponent#getBaseline(int, int), javax.swing.JComponent#getBaselineResizeBehavior(), javax.swing.JComponent#requestDefaultFocus(), javax.swing.JComponent#setVisible(boolean), javax.swing.JComponent#setForeground(java.awt.Color), javax.swing.JComponent#setBackground(java.awt.Color), javax.swing.JComponent#setFont(java.awt.Font), javax.swing.JComponent#getDefaultLocale(), javax.swing.JComponent#setDefaultLocale(java.util.Locale), javax.swing.JComponent#setToolTipText(java.lang.String), javax.swing.JComponent#getToolTipText(), javax.swing.JComponent#getToolTipText(java.awt.event.MouseEvent), javax.swing.JComponent#getToolTipLocation(java.awt.event.MouseEvent), javax.swing.JComponent#getPopupLocation(java.awt.event.MouseEvent), javax.swing.JComponent#createToolTip(), javax.swing.JComponent#scrollRectToVisible(java.awt.Rectangle), javax.swing.JComponent#setAutoscrolls(boolean), javax.swing.JComponent#getAutoscrolls(), javax.swing.JComponent#setTransferHandler(javax.swing.TransferHandler), javax.swing.JComponent#getTransferHandler(), javax.swing.JComponent#disable(), javax.swing.JComponent#putClientProperty(java.lang.Object, java.lang.Object), javax.swing.JComponent#setFocusTraversalKeys(int, java.util.Set), javax.swing.JComponent#isLightweightComponent(java.awt.Component), javax.swing.JComponent#reshape(int, int, int, int), javax.swing.JComponent#getX(), javax.swing.JComponent#getY(), javax.swing.JComponent#getWidth(), javax.swing.JComponent#getHeight(), javax.swing.JComponent#computeVisibleRect(java.awt.Rectangle), javax.swing.JComponent#getVisibleRect(), javax.swing.JComponent#addVetoableChangeListener(java.beans.VetoableChangeListener), javax.swing.JComponent#removeVetoableChangeListener(java.beans.VetoableChangeListener), javax.swing.JComponent#getVetoableChangeListeners(), javax.swing.JComponent#getTopLevelAncestor(), javax.swing.JComponent#removeAncestorListener(javax.swing.event.AncestorListener), javax.swing.JComponent#getAncestorListeners(), javax.swing.JComponent#addNotify(), javax.swing.JComponent#removeNotify(), javax.swing.JComponent#repaint(java.awt.Rectangle), javax.swing.JComponent#repaint(long, int, int, int, int), javax.swing.JComponent#revalidate(), javax.swing.JComponent#isValidateRoot(), javax.swing.JComponent#isOptimizedDrawingEnabled(), javax.swing.JComponent#paintImmediately(java.awt.Rectangle), javax.swing.JComponent#paintImmediately(int, int, int, int), javax.swing.JComponent#setDoubleBuffered(boolean), javax.swing.JComponent#isDoubleBuffered(), javax.swing.JComponent#getRootPane(), javax.swing.JComponent#hide(), javax.swing.JComponent#add(java.awt.Component), javax.swing.JComponent#add(java.lang.String, java.awt.Component), javax.swing.JComponent#add(java.awt.Component, java.lang.Object), javax.swing.JComponent#add(java.awt.Component, int), javax.swing.JComponent#add(java.awt.Component, java.lang.Object, int), javax.swing.JComponent#remove(java.awt.Component), javax.swing.JComponent#remove(int), javax.swing.JComponent#list(java.io.PrintWriter, int), javax.swing.JComponent#list(java.io.PrintStream, int), javax.swing.JComponent#validate(), javax.swing.JComponent#removeAll(), javax.swing.JComponent#getComponentCount(), javax.swing.JComponent#getComponent(int), javax.swing.JComponent#getComponents(), javax.swing.JComponent#getComponentAt(int, int), javax.swing.JComponent#getComponentAt(java.awt.Point), javax.swing.JComponent#invalidate(), javax.swing.JComponent#addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener), javax.swing.JComponent#addPropertyChangeListener(java.beans.PropertyChangeListener), javax.swing.JComponent#preferredSize(), javax.swing.JComponent#minimumSize(), javax.swing.JComponent#insets(), javax.swing.JComponent#isFocusCycleRoot(java.awt.Container), javax.swing.JComponent#isFocusCycleRoot(), javax.swing.JComponent#getFocusTraversalPolicy(), javax.swing.JComponent#setFocusTraversalPolicy(java.awt.FocusTraversalPolicy), javax.swing.JComponent#countComponents(), javax.swing.JComponent#setComponentZOrder(java.awt.Component, int), javax.swing.JComponent#getComponentZOrder(java.awt.Component), javax.swing.JComponent#getLayout(), javax.swing.JComponent#setLayout(java.awt.LayoutManager), javax.swing.JComponent#doLayout(), javax.swing.JComponent#layout(), javax.swing.JComponent#paintComponents(java.awt.Graphics), javax.swing.JComponent#printComponents(java.awt.Graphics), javax.swing.JComponent#addContainerListener(java.awt.event.ContainerListener), javax.swing.JComponent#removeContainerListener(java.awt.event.ContainerListener), javax.swing.JComponent#getContainerListeners(), javax.swing.JComponent#deliverEvent(java.awt.Event), javax.swing.JComponent#locate(int, int), javax.swing.JComponent#getMousePosition(boolean), javax.swing.JComponent#findComponentAt(java.awt.Point), javax.swing.JComponent#findComponentAt(int, int), javax.swing.JComponent#isAncestorOf(java.awt.Component), javax.swing.JComponent#getFocusTraversalKeys(int), javax.swing.JComponent#areFocusTraversalKeysSet(int), javax.swing.JComponent#isFocusTraversalPolicySet(), javax.swing.JComponent#setFocusCycleRoot(boolean), javax.swing.JComponent#setFocusTraversalPolicyProvider(boolean), javax.swing.JComponent#isFocusTraversalPolicyProvider(), javax.swing.JComponent#transferFocusDownCycle(), javax.swing.JComponent#applyComponentOrientation(java.awt.ComponentOrientation), javax.swing.JComponent#add(java.awt.PopupMenu), javax.swing.JComponent#remove(java.awt.MenuComponent), javax.swing.JComponent#toString(), javax.swing.JComponent#getName(), javax.swing.JComponent#contains(java.awt.Point), javax.swing.JComponent#list(), javax.swing.JComponent#list(java.io.PrintStream), javax.swing.JComponent#list(java.io.PrintWriter), javax.swing.JComponent#size(), javax.swing.JComponent#bounds(), javax.swing.JComponent#getBounds(), javax.swing.JComponent#getParent(), javax.swing.JComponent#getLocation(), javax.swing.JComponent#action(java.awt.Event, java.lang.Object), javax.swing.JComponent#setName(java.lang.String), javax.swing.JComponent#location(), javax.swing.JComponent#getSize(), javax.swing.JComponent#resize(int, int), javax.swing.JComponent#resize(java.awt.Dimension), javax.swing.JComponent#setSize(int, int), javax.swing.JComponent#setSize(java.awt.Dimension), javax.swing.JComponent#move(int, int), javax.swing.JComponent#setLocale(java.util.Locale), javax.swing.JComponent#getLocale(), javax.swing.JComponent#isEnabled(), javax.swing.JComponent#enable(boolean), javax.swing.JComponent#isValid(), javax.swing.JComponent#getAccessibleContext(), javax.swing.JComponent#firePropertyChange(java.lang.String, double, double), javax.swing.JComponent#firePropertyChange(java.lang.String, float, float), javax.swing.JComponent#firePropertyChange(java.lang.String, long, long), javax.swing.JComponent#firePropertyChange(java.lang.String, short, short), javax.swing.JComponent#firePropertyChange(java.lang.String, byte, byte), javax.swing.JComponent#removePropertyChangeListener(java.beans.PropertyChangeListener), javax.swing.JComponent#removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener), javax.swing.JComponent#requestFocus(java.awt.event.FocusEvent$Cause), javax.swing.JComponent#requestFocusInWindow(java.awt.event.FocusEvent$Cause), javax.swing.JComponent#repaint(int, int, int, int), javax.swing.JComponent#repaint(long), javax.swing.JComponent#repaint(), javax.swing.JComponent#nextFocus(), javax.swing.JComponent#getForeground(), javax.swing.JComponent#getFont(), javax.swing.JComponent#getTreeLock(), javax.swing.JComponent#isVisible(), javax.swing.JComponent#getFocusCycleRootAncestor(), javax.swing.JComponent#isDisplayable(), javax.swing.JComponent#isPreferredSizeSet(), javax.swing.JComponent#isMaximumSizeSet(), javax.swing.JComponent#isMinimumSizeSet(), javax.swing.JComponent#getBackground(), javax.swing.JComponent#isLightweight(), javax.swing.JComponent#setBounds(java.awt.Rectangle), javax.swing.JComponent#setBounds(int, int, int, int), javax.swing.JComponent#setLocation(int, int), javax.swing.JComponent#setLocation(java.awt.Point), javax.swing.JComponent#getPropertyChangeListeners(java.lang.String), javax.swing.JComponent#getPropertyChangeListeners(), javax.swing.JComponent#isShowing(), javax.swing.JComponent#getMousePosition(), javax.swing.JComponent#getGraphicsConfiguration(), javax.swing.JComponent#dispatchEvent(java.awt.AWTEvent), javax.swing.JComponent#isFocusable(), javax.swing.JComponent#isFocusOwner(), javax.swing.JComponent#transferFocus(), javax.swing.JComponent#handleEvent(java.awt.Event), javax.swing.JComponent#postEvent(java.awt.Event), javax.swing.JComponent#transferFocusBackward(), javax.swing.JComponent#setDropTarget(java.awt.dnd.DropTarget), javax.swing.JComponent#getDropTarget(), javax.swing.JComponent#getToolkit(), javax.swing.JComponent#enableInputMethods(boolean), javax.swing.JComponent#show(boolean), javax.swing.JComponent#show(), javax.swing.JComponent#isForegroundSet(), javax.swing.JComponent#isBackgroundSet(), javax.swing.JComponent#isFontSet(), javax.swing.JComponent#getColorModel(), javax.swing.JComponent#getLocationOnScreen(), javax.swing.JComponent#setCursor(java.awt.Cursor), javax.swing.JComponent#getCursor(), javax.swing.JComponent#isCursorSet(), javax.swing.JComponent#paintAll(java.awt.Graphics), javax.swing.JComponent#imageUpdate(java.awt.Image, int, int, int, int, int), javax.swing.JComponent#createImage(int, int), javax.swing.JComponent#createImage(java.awt.image.ImageProducer), javax.swing.JComponent#createVolatileImage(int, int), javax.swing.JComponent#createVolatileImage(int, int, java.awt.ImageCapabilities), javax.swing.JComponent#prepareImage(java.awt.Image, java.awt.image.ImageObserver), javax.swing.JComponent#prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver), javax.swing.JComponent#checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver), javax.swing.JComponent#checkImage(java.awt.Image, java.awt.image.ImageObserver), javax.swing.JComponent#setIgnoreRepaint(boolean), javax.swing.JComponent#getIgnoreRepaint(), javax.swing.JComponent#inside(int, int), javax.swing.JComponent#addComponentListener(java.awt.event.ComponentListener), javax.swing.JComponent#removeComponentListener(java.awt.event.ComponentListener), javax.swing.JComponent#getComponentListeners(), javax.swing.JComponent#addFocusListener(java.awt.event.FocusListener), javax.swing.JComponent#removeFocusListener(java.awt.event.FocusListener), javax.swing.JComponent#getFocusListeners(), javax.swing.JComponent#addHierarchyListener(java.awt.event.HierarchyListener), javax.swing.JComponent#removeHierarchyListener(java.awt.event.HierarchyListener), javax.swing.JComponent#getHierarchyListeners(), javax.swing.JComponent#addHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener), javax.swing.JComponent#removeHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener), javax.swing.JComponent#getHierarchyBoundsListeners(), javax.swing.JComponent#addKeyListener(java.awt.event.KeyListener), javax.swing.JComponent#removeKeyListener(java.awt.event.KeyListener), javax.swing.JComponent#getKeyListeners(), javax.swing.JComponent#addMouseListener(java.awt.event.MouseListener), javax.swing.JComponent#removeMouseListener(java.awt.event.MouseListener), javax.swing.JComponent#getMouseListeners(), javax.swing.JComponent#addMouseMotionListener(java.awt.event.MouseMotionListener), javax.swing.JComponent#removeMouseMotionListener(java.awt.event.MouseMotionListener), javax.swing.JComponent#getMouseMotionListeners(), javax.swing.JComponent#addMouseWheelListener(java.awt.event.MouseWheelListener), javax.swing.JComponent#removeMouseWheelListener(java.awt.event.MouseWheelListener), javax.swing.JComponent#getMouseWheelListeners(), javax.swing.JComponent#addInputMethodListener(java.awt.event.InputMethodListener), javax.swing.JComponent#removeInputMethodListener(java.awt.event.InputMethodListener), javax.swing.JComponent#getInputMethodListeners(), javax.swing.JComponent#getInputMethodRequests(), javax.swing.JComponent#getInputContext(), javax.swing.JComponent#mouseDown(java.awt.Event, int, int), javax.swing.JComponent#mouseDrag(java.awt.Event, int, int), javax.swing.JComponent#mouseUp(java.awt.Event, int, int), javax.swing.JComponent#mouseMove(java.awt.Event, int, int), javax.swing.JComponent#mouseEnter(java.awt.Event, int, int), javax.swing.JComponent#mouseExit(java.awt.Event, int, int), javax.swing.JComponent#keyDown(java.awt.Event, int), javax.swing.JComponent#keyUp(java.awt.Event, int), javax.swing.JComponent#gotFocus(java.awt.Event, java.lang.Object), javax.swing.JComponent#lostFocus(java.awt.Event, java.lang.Object), javax.swing.JComponent#isFocusTraversable(), javax.swing.JComponent#setFocusable(boolean), javax.swing.JComponent#setFocusTraversalKeysEnabled(boolean), javax.swing.JComponent#getFocusTraversalKeysEnabled(), javax.swing.JComponent#transferFocusUpCycle(), javax.swing.JComponent#hasFocus(), javax.swing.JComponent#setComponentOrientation(java.awt.ComponentOrientation), javax.swing.JComponent#getComponentOrientation(), javax.swing.JComponent#setMixingCutoutShape(java.awt.Shape), javax.swing.JComponent#wait(long), javax.swing.JComponent#wait(long, int), javax.swing.JComponent#wait(), javax.swing.JComponent#equals(java.lang.Object), javax.swing.JComponent#hashCode(), javax.swing.JComponent#getClass(), javax.swing.JComponent#notify(), javax.swing.JComponent#notifyAll() |
class java.awt.Container |
java.awt.Container#add(java.awt.Component), java.awt.Container#add(java.lang.String, java.awt.Component), java.awt.Container#add(java.awt.Component, java.lang.Object), java.awt.Container#add(java.awt.Component, int), java.awt.Container#add(java.awt.Component, java.lang.Object, int), java.awt.Container#remove(java.awt.Component), java.awt.Container#remove(int), java.awt.Container#update(java.awt.Graphics), java.awt.Container#list(java.io.PrintWriter, int), java.awt.Container#list(java.io.PrintStream, int), java.awt.Container#validate(), java.awt.Container#print(java.awt.Graphics), java.awt.Container#removeAll(), java.awt.Container#getComponentCount(), java.awt.Container#getComponent(int), java.awt.Container#getComponents(), java.awt.Container#getComponentAt(int, int), java.awt.Container#getComponentAt(java.awt.Point), java.awt.Container#invalidate(), java.awt.Container#getListeners(java.lang.Class), java.awt.Container#addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener), java.awt.Container#addPropertyChangeListener(java.beans.PropertyChangeListener), java.awt.Container#paint(java.awt.Graphics), java.awt.Container#preferredSize(), java.awt.Container#getPreferredSize(), java.awt.Container#getMaximumSize(), java.awt.Container#minimumSize(), java.awt.Container#getMinimumSize(), java.awt.Container#getInsets(), java.awt.Container#insets(), java.awt.Container#getAlignmentY(), java.awt.Container#getAlignmentX(), java.awt.Container#setFont(java.awt.Font), java.awt.Container#setFocusTraversalKeys(int, java.util.Set), java.awt.Container#addNotify(), java.awt.Container#removeNotify(), java.awt.Container#isValidateRoot(), java.awt.Container#isFocusCycleRoot(java.awt.Container), java.awt.Container#isFocusCycleRoot(), java.awt.Container#getFocusTraversalPolicy(), java.awt.Container#setFocusTraversalPolicy(java.awt.FocusTraversalPolicy), java.awt.Container#countComponents(), java.awt.Container#setComponentZOrder(java.awt.Component, int), java.awt.Container#getComponentZOrder(java.awt.Component), java.awt.Container#getLayout(), java.awt.Container#setLayout(java.awt.LayoutManager), java.awt.Container#doLayout(), java.awt.Container#layout(), java.awt.Container#paintComponents(java.awt.Graphics), java.awt.Container#printComponents(java.awt.Graphics), java.awt.Container#addContainerListener(java.awt.event.ContainerListener), java.awt.Container#removeContainerListener(java.awt.event.ContainerListener), java.awt.Container#getContainerListeners(), java.awt.Container#deliverEvent(java.awt.Event), java.awt.Container#locate(int, int), java.awt.Container#getMousePosition(boolean), java.awt.Container#findComponentAt(java.awt.Point), java.awt.Container#findComponentAt(int, int), java.awt.Container#isAncestorOf(java.awt.Component), java.awt.Container#getFocusTraversalKeys(int), java.awt.Container#areFocusTraversalKeysSet(int), java.awt.Container#isFocusTraversalPolicySet(), java.awt.Container#setFocusCycleRoot(boolean), java.awt.Container#setFocusTraversalPolicyProvider(boolean), java.awt.Container#isFocusTraversalPolicyProvider(), java.awt.Container#transferFocusDownCycle(), java.awt.Container#applyComponentOrientation(java.awt.ComponentOrientation), java.awt.Container#add(java.awt.PopupMenu), java.awt.Container#remove(java.awt.MenuComponent), java.awt.Container#toString(), java.awt.Container#getName(), java.awt.Container#contains(int, int), java.awt.Container#contains(java.awt.Point), java.awt.Container#list(), java.awt.Container#list(java.io.PrintStream), java.awt.Container#list(java.io.PrintWriter), java.awt.Container#size(), java.awt.Container#bounds(), java.awt.Container#getBounds(), java.awt.Container#getBounds(java.awt.Rectangle), java.awt.Container#getParent(), java.awt.Container#getLocation(), java.awt.Container#getLocation(java.awt.Point), java.awt.Container#action(java.awt.Event, java.lang.Object), java.awt.Container#setName(java.lang.String), java.awt.Container#location(), java.awt.Container#getSize(), java.awt.Container#getSize(java.awt.Dimension), java.awt.Container#isOpaque(), java.awt.Container#resize(int, int), java.awt.Container#resize(java.awt.Dimension), java.awt.Container#setSize(int, int), java.awt.Container#setSize(java.awt.Dimension), java.awt.Container#move(int, int), java.awt.Container#setLocale(java.util.Locale), java.awt.Container#getLocale(), java.awt.Container#isEnabled(), java.awt.Container#enable(boolean), java.awt.Container#enable(), java.awt.Container#isValid(), java.awt.Container#setEnabled(boolean), java.awt.Container#getAccessibleContext(), java.awt.Container#firePropertyChange(java.lang.String, double, double), java.awt.Container#firePropertyChange(java.lang.String, float, float), java.awt.Container#firePropertyChange(java.lang.String, long, long), java.awt.Container#firePropertyChange(java.lang.String, short, short), java.awt.Container#firePropertyChange(java.lang.String, char, char), java.awt.Container#firePropertyChange(java.lang.String, byte, byte), java.awt.Container#removePropertyChangeListener(java.beans.PropertyChangeListener), java.awt.Container#removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener), java.awt.Container#printAll(java.awt.Graphics), java.awt.Container#requestFocus(java.awt.event.FocusEvent$Cause), java.awt.Container#requestFocus(), java.awt.Container#requestFocusInWindow(), java.awt.Container#requestFocusInWindow(java.awt.event.FocusEvent$Cause), java.awt.Container#getFontMetrics(java.awt.Font), java.awt.Container#setPreferredSize(java.awt.Dimension), java.awt.Container#setMaximumSize(java.awt.Dimension), java.awt.Container#setMinimumSize(java.awt.Dimension), java.awt.Container#getGraphics(), java.awt.Container#getBaseline(int, int), java.awt.Container#getBaselineResizeBehavior(), java.awt.Container#setVisible(boolean), java.awt.Container#setForeground(java.awt.Color), java.awt.Container#setBackground(java.awt.Color), java.awt.Container#disable(), java.awt.Container#reshape(int, int, int, int), java.awt.Container#getX(), java.awt.Container#getY(), java.awt.Container#getWidth(), java.awt.Container#getHeight(), java.awt.Container#repaint(int, int, int, int), java.awt.Container#repaint(long), java.awt.Container#repaint(), java.awt.Container#repaint(long, int, int, int, int), java.awt.Container#revalidate(), java.awt.Container#isDoubleBuffered(), java.awt.Container#hide(), java.awt.Container#nextFocus(), java.awt.Container#getForeground(), java.awt.Container#getFont(), java.awt.Container#getTreeLock(), java.awt.Container#isVisible(), java.awt.Container#getFocusCycleRootAncestor(), java.awt.Container#isDisplayable(), java.awt.Container#isPreferredSizeSet(), java.awt.Container#isMaximumSizeSet(), java.awt.Container#isMinimumSizeSet(), java.awt.Container#getBackground(), java.awt.Container#isLightweight(), java.awt.Container#setBounds(java.awt.Rectangle), java.awt.Container#setBounds(int, int, int, int), java.awt.Container#setLocation(int, int), java.awt.Container#setLocation(java.awt.Point), java.awt.Container#getPropertyChangeListeners(java.lang.String), java.awt.Container#getPropertyChangeListeners(), java.awt.Container#isShowing(), java.awt.Container#getMousePosition(), java.awt.Container#getGraphicsConfiguration(), java.awt.Container#dispatchEvent(java.awt.AWTEvent), java.awt.Container#isFocusable(), java.awt.Container#isFocusOwner(), java.awt.Container#transferFocus(), java.awt.Container#handleEvent(java.awt.Event), java.awt.Container#postEvent(java.awt.Event), java.awt.Container#transferFocusBackward(), java.awt.Container#setDropTarget(java.awt.dnd.DropTarget), java.awt.Container#getDropTarget(), java.awt.Container#getToolkit(), java.awt.Container#enableInputMethods(boolean), java.awt.Container#show(boolean), java.awt.Container#show(), java.awt.Container#isForegroundSet(), java.awt.Container#isBackgroundSet(), java.awt.Container#isFontSet(), java.awt.Container#getColorModel(), java.awt.Container#getLocationOnScreen(), java.awt.Container#setCursor(java.awt.Cursor), java.awt.Container#getCursor(), java.awt.Container#isCursorSet(), java.awt.Container#paintAll(java.awt.Graphics), java.awt.Container#imageUpdate(java.awt.Image, int, int, int, int, int), java.awt.Container#createImage(int, int), java.awt.Container#createImage(java.awt.image.ImageProducer), java.awt.Container#createVolatileImage(int, int), java.awt.Container#createVolatileImage(int, int, java.awt.ImageCapabilities), java.awt.Container#prepareImage(java.awt.Image, java.awt.image.ImageObserver), java.awt.Container#prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver), java.awt.Container#checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver), java.awt.Container#checkImage(java.awt.Image, java.awt.image.ImageObserver), java.awt.Container#setIgnoreRepaint(boolean), java.awt.Container#getIgnoreRepaint(), java.awt.Container#inside(int, int), java.awt.Container#addComponentListener(java.awt.event.ComponentListener), java.awt.Container#removeComponentListener(java.awt.event.ComponentListener), java.awt.Container#getComponentListeners(), java.awt.Container#addFocusListener(java.awt.event.FocusListener), java.awt.Container#removeFocusListener(java.awt.event.FocusListener), java.awt.Container#getFocusListeners(), java.awt.Container#addHierarchyListener(java.awt.event.HierarchyListener), java.awt.Container#removeHierarchyListener(java.awt.event.HierarchyListener), java.awt.Container#getHierarchyListeners(), java.awt.Container#addHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener), java.awt.Container#removeHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener), java.awt.Container#getHierarchyBoundsListeners(), java.awt.Container#addKeyListener(java.awt.event.KeyListener), java.awt.Container#removeKeyListener(java.awt.event.KeyListener), java.awt.Container#getKeyListeners(), java.awt.Container#addMouseListener(java.awt.event.MouseListener), java.awt.Container#removeMouseListener(java.awt.event.MouseListener), java.awt.Container#getMouseListeners(), java.awt.Container#addMouseMotionListener(java.awt.event.MouseMotionListener), java.awt.Container#removeMouseMotionListener(java.awt.event.MouseMotionListener), java.awt.Container#getMouseMotionListeners(), java.awt.Container#addMouseWheelListener(java.awt.event.MouseWheelListener), java.awt.Container#removeMouseWheelListener(java.awt.event.MouseWheelListener), java.awt.Container#getMouseWheelListeners(), java.awt.Container#addInputMethodListener(java.awt.event.InputMethodListener), java.awt.Container#removeInputMethodListener(java.awt.event.InputMethodListener), java.awt.Container#getInputMethodListeners(), java.awt.Container#getInputMethodRequests(), java.awt.Container#getInputContext(), java.awt.Container#mouseDown(java.awt.Event, int, int), java.awt.Container#mouseDrag(java.awt.Event, int, int), java.awt.Container#mouseUp(java.awt.Event, int, int), java.awt.Container#mouseMove(java.awt.Event, int, int), java.awt.Container#mouseEnter(java.awt.Event, int, int), java.awt.Container#mouseExit(java.awt.Event, int, int), java.awt.Container#keyDown(java.awt.Event, int), java.awt.Container#keyUp(java.awt.Event, int), java.awt.Container#gotFocus(java.awt.Event, java.lang.Object), java.awt.Container#lostFocus(java.awt.Event, java.lang.Object), java.awt.Container#isFocusTraversable(), java.awt.Container#setFocusable(boolean), java.awt.Container#setFocusTraversalKeysEnabled(boolean), java.awt.Container#getFocusTraversalKeysEnabled(), java.awt.Container#transferFocusUpCycle(), java.awt.Container#hasFocus(), java.awt.Container#setComponentOrientation(java.awt.ComponentOrientation), java.awt.Container#getComponentOrientation(), java.awt.Container#setMixingCutoutShape(java.awt.Shape), java.awt.Container#wait(long), java.awt.Container#wait(long, int), java.awt.Container#wait(), java.awt.Container#equals(java.lang.Object), java.awt.Container#hashCode(), java.awt.Container#getClass(), java.awt.Container#notify(), java.awt.Container#notifyAll() |
Adding components with this name to the text area will place them left of the horizontal scroll bar. In jEdit, the status bar is added this way.
Creates a new JEditTextArea with the default settings.
Creates a new JEditTextArea with the specified settings.
defaults
- The default settingsConverts an offset in a line into an x co-ordinate. This is a fast version that should only be used if no changes were made to the text since the last repaint.
line
- The lineoffset
- The offset, from the start of the lineAdds a caret change listener to this text area.
listener
- The listenerBlinks the caret.
Places the selected text into the clipboard.
Deletes the selected text from the text area and places it into the clipboard.
Returns the line of the highlighted bracket (the bracket matching the one before the caret)
Returns the position of the highlighted bracket (the bracket matching the one before the caret)
Returns the caret line.
Returns the caret position. This will either be the selection start or the selection end, depending on which direction the selection was made in.
Returns the document this text area is editing.
Returns the length of the document. Equivalent to calling
getDocument().getLength()
.
Returns the line displayed at the text area's origin.
Returns the input handler.
Returns the number of lines in the document.
Returns the end offset of the specified line.
line
- The lineReturns the length of the specified line.
line
- The lineReturns the line containing the specified offset.
offset
- The offsetReturns the start offset of the specified line.
line
- The lineReturns the text on the specified line.
lineIndex
- The lineCopies the text on the specified line into a segment. If the line is invalid, the segment will contain a null string.
lineIndex
- The lineReturns the `magic' caret position. This can be used to preserve the column position when moving up and down lines.
Returns the mark line.
Returns the mark position. This will be the opposite selection bound to the caret position.
Returns the object responsible for painting this text area.
Returns the right click popup menu.
Returns the selected text, or null if no selection is active.
Returns the selection end offset.
Returns the offset where the selection ends on the specified line.
Returns the selection end line.
Returns the selection start offset.
Returns the offset where the selection starts on the specified line.
Returns the selection start line.
Returns the length of the specified line.
line
- The lineReturns the entire text of this text area.
Returns the specified substring of the document.
start
- The start offsetlen
- The length of the substringCopies the specified substring of the document into a segment. If the offsets are invalid, the segment will contain a null string.
start
- The start offsetlen
- The length of the substringsegment
- The segment Returns the document's token marker. Equivalent to calling
getDocument().getTokenMarker()
.
Returns the number of lines visible in this text area.
Returns true if the caret is blinking, false otherwise.
Returns true if the caret is visible, false otherwise.
Returns true if this text area is editable, false otherwise.
Returns if this component can be traversed by pressing the Tab key. This returns false.
Returns true if overwrite mode is enabled, false otherwise.
Returns true if the selection is rectangular, false otherwise.
Converts a line index to a y co-ordinate.
line
- The lineConverts an offset in a line into an x co-ordinate. This is a slow version that can be used any time.
line
- The lineoffset
- The offset, from the start of the line Similar to setSelectedText()
, but overstrikes the appropriate
number of characters if overwrite mode is enabled.
str
- The stringInserts the clipboard contents into the text.
Forwards key events directly to the input handler. This is slightly faster than using a KeyListener because some Swing overhead is avoided.
Recalculates the number of visible lines. This should not be called directly.
Removes a caret change listener from this text area.
listener
- The listenerCalled by the AWT when this component is removed from it's parent. This stops clears the currently focused component.
Ensures that the specified line and offset is visible by scrolling the text area if necessary.
line
- The line to scroll tooffset
- The offset in the line to scroll toReturns the horizontal offset of drawn lines.
Selects from the start offset to the end offset. This is the general selection method used by all other selecting methods. The caret position will be start if start < end, and end if end > start.
start
- The start offsetend
- The end offsetSelects all text in the document.
Moves the mark to the caret position.
Toggles caret blinking.
caretBlinks
- True if the caret should blink, false otherwiseSets the caret position. The new selection will consist of the caret position only (hence no text will be selected)
caret
- The caret positionSets if the caret should be visible.
caretVisible
- True if the caret should be visible, false otherwiseSets the document this text area is editing.
document
- The documentSets if this component is editable.
editable
- True if this text area should be editable, false otherwiseSets the line displayed at the text area's origin without updating the scroll bars.
Sets the input handler.
inputHandler
- The new input handlerSets the `magic' caret position. This can be used to preserve the column position when moving up and down lines.
magicCaret
- The magic caret positionSets if overwrite mode should be enabled.
overwrite
- True if overwrite mode should be enabled, false otherwise.Sets the right click popup menu.
popup
- The popupReplaces the selection with the specified text.
selectedText
- The replacement text for the selectionSets the selection end. The new selection will be the old selection start and the bew selection end.
selectionEnd
- The selection endSets if the selection should be rectangular.
overwrite
- True if the selection should be rectangular, false otherwise.Sets the selection start. The new selection will be the new selection start and the old selection end.
selectionStart
- The selection startSets the entire text of this text area.
Sets the document's token marker. Equivalent to caling
getDocument().setTokenMarker()
.
tokenMarker
- The token markerReturns the number of lines from the top and button of the text area that are always visible.
Converts an x co-ordinate to an offset within a line.
line
- The linex
- The x co-ordinateConverts a point to an offset, from the start of the text.
x
- The x co-ordinate of the pointy
- The y co-ordinate of the pointConverts a y co-ordinate to a line index.
y
- The y co-ordinateReadyAPI functional (soapui) SDK 3.20.1