void | addCaretListener(CaretListener listener)- Adds a
CaretListener object to this text component.
|
void | addInputMethodListener(InputMethodListener listener)- Adds an
InputListener object to this text component.
|
static Keymap | addKeymap(String n, Keymap parent)- Create a new Keymap with a specific name and parent, and add the new
Keymap to the global keymap table.
|
void | copy()
|
void | cut()
|
protected void | fireCaretUpdate(CaretEvent event)- Notifies all registered
CaretListener objects that the caret
was updated.
|
AccessibleContext | getAccessibleContext()- Get the
AccessibleContext of this object.
|
Action[] | getActions()- Returns the set of available Actions this component's associated
editor can run.
|
Caret | getCaret()- The
Caret object used in this text component.
|
Color | getCaretColor()
|
CaretListener[] | getCaretListeners()- Returns all added
CaretListener objects.
|
int | getCaretPosition()- Retrisves the current caret position.
|
Color | getDisabledTextColor()
|
Document | getDocument()
|
boolean | getDragEnabled()
|
char | getFocusAccelerator()
|
Highlighter | getHighlighter()
|
InputMethodListener[] | getInputMethodListeners()- Returns all added
InputMethodListener objects.
|
Keymap | getKeymap()- Get the current Keymap of this component.
|
static Keymap | getKeymap(String n)- Get a Keymap from the global keymap table, by name.
|
Insets | getMargin()
|
NavigationFilter | getNavigationFilter()
|
Dimension | getPreferredScrollableViewportSize()
|
int | getScrollableBlockIncrement(Rectangle visible, int orientation, int direction)- Return the preferred scrolling amount (in pixels) for the given
scrolling direction and orientation when scrolling in large amounts
(pages).
|
boolean | getScrollableTracksViewportHeight()- Return true if the height of the scrollable is always equal to the view,
where it is displayed, height.In such case, the vertical scrolling should
not be performed.
|
boolean | getScrollableTracksViewportWidth()- Return true if the width of the scrollable is always equal to the
view, where it is displayed, width (for instance, the text area with
the word wrap).
|
int | getScrollableUnitIncrement(Rectangle visible, int orientation, int direction)- Return the preferred scrolling amount (in pixels) for the given
scrolling direction and orientation when scrolling in small amounts
like table lines.
|
String | getSelectedText()- Retrieves the currently selected text in this text document.
|
Color | getSelectedTextColor()
|
Color | getSelectionColor()
|
int | getSelectionEnd()- Returns the end postion of the currently selected text.
|
int | getSelectionStart()- Returns the start postion of the currently selected text.
|
String | getText()- Retrieves the current text in this text document.
|
String | getText(int offset, int length)- Retrieves a part of the current text in this document.
|
String | getToolTipText(MouseEvent ev)- Returns the tooltip text for this text component for the given mouse
event.
|
TextUI | getUI()- This method returns the label's UI delegate.
|
String | getUIClassID()- Returns a string that specifies the name of the Look and Feel class
that renders this component.
|
boolean | isEditable()- Checks whether this text component it editable.
|
static void | loadKeymap(Keymap map, JTextComponent.KeyBinding[] bindings, Action[] actions)- Resolves a set of bindings against a set of actions and inserts the
results into a
Keymap.
|
Rectangle | modelToView(int position)
|
void | moveCaretPosition(int position)- Moves the caret to a given position.
|
protected String | paramString()- Returns a string representation of this JTextComponent.
|
void | paste()
|
void | read(Reader input, Object streamDescription)- Read and set the content this component.
|
void | removeCaretListener(CaretListener listener)- Removed a
CaretListener object from this text component.
|
void | removeInputMethodListener(InputMethodListener listener)- Removes an
InputListener object from this text component.
|
static Keymap | removeKeymap(String n)- Remove a Keymap from the global Keymap table, by name.
|
void | replaceSelection(String content)
|
void | select(int start, int end)- Selects a part of the content of the text component.
|
void | selectAll()- Selects the whole content of the text component.
|
void | setCaret(Caret newCaret)- Sets a new
Caret for this text component.
|
void | setCaretColor(Color newColor)
|
void | setCaretPosition(int position)- Sets the caret to a new position.
|
void | setDisabledTextColor(Color newColor)
|
void | setDocument(Document newDoc)
|
void | setDragEnabled(boolean enabled)
|
void | setEditable(boolean newValue)- Enables/disabled this text component's editability.
|
void | setFocusAccelerator(char newKey)
|
void | setHighlighter(Highlighter newHighlighter)
|
void | setKeymap(Keymap k)- Set the current Keymap of this component, installing appropriate
KeymapWrapper and KeymapActionMap objects in the
InputMap and ActionMap parent chains, respectively,
and fire a property change event with name "keymap".
|
void | setMargin(Insets m)
|
void | setNavigationFilter(NavigationFilter filter)
|
void | setSelectedTextColor(Color newColor)
|
void | setSelectionColor(Color newColor)
|
void | setSelectionEnd(int end)- Selects the text from the selection start postion to the given position.
|
void | setSelectionStart(int start)- Selects the text from the given postion to the selection end position.
|
void | setText(String text)
|
void | setUI(TextUI newUI)- This method sets the label's UI delegate.
|
void | updateUI()- This method resets the label's UI delegate to the default UI for the
current look and feel.
|
int | viewToModel(Point pt)
|
void | write(Writer output)- Write the content of this component to the given stream.
|