Classes extended from PTextComponent: PLabel, PTextArea, PTextFieldPComponent | --PTextComponent
JTextComponent is the base class for swing text
components. It tries to be compatible with the
java.awt.TextComponent class
where it can reasonably do so. Also provided are other services
for additional flexibility (beyond the pluggable UI and bean
support).
You can find information on how to use the functionality
this class provides in
General Rules for Using Text Components,
a section in The Java Tutorial.
CaretListener
interface that have been registered with the text component.
The UI will install a default caret unless a customized caret
has been set.
Action interface,
using the TextAction implementation.
The set of commands supported by the text component can be
found with the <A HREF="../../../javax/swing/text/JTextComponent.html#getActions()"><CODE>getActions()</CODE></A> method. These actions
can be bound to key events, fired from buttons, etc.
A <A HREF="../../../javax/swing/text/Keymap.html"><CODE>Keymap</CODE></A> lets an application bind key
strokes to actions.
In order to allow keymaps to be shared across multiple text components, they
can use actions that extend TextAction.
TextAction can determine which JTextComponent
most recently has or had focus and therefore is the subject of
the action (In the case that the ActionEvent
sent to the action doesn't contain the target text component as its source).
The input method framework
lets text components interact with input methods, separate software
components that preprocess events to let users enter thousands of
different characters using keyboards with far fewer keys.
JTextComponent is an active client of
the framework, so it implements the preferred user interface for interacting
with input methods. As a consequence, some key events do not reach the text
component because they are handled by an input method, and some text input
reaches the text component as committed text within an <A HREF="../../../java/awt/event/InputMethodEvent.html"><CODE>InputMethodEvent</CODE></A> instead of as a key event.
The complete text input is the combination of the characters in
keyTyped key events and committed text in input method events.
The AWT listener model lets applications attach event listeners to components in order to bind events to actions. Swing encourages the use of keymaps instead of listeners, but maintains compatibility with listeners by giving the listeners a chance to steal an event by consuming it.
swingJapha 1.0Ryan Gantt
@boolean getEnabled()
String getText()
String getToolTipText()
void setEnabled()
void setText()
void setToolTipText()
void __construct()
Returns whether or not the current textComponent is editable
true if the current Component is enabled
public
Returns the current text value of the current component
the current label of the componet
public
Returns the toolTip (alt) text for the current component
the current tooltip text
public
Mutates whether or not the current textComponent is editable
public
Sets the text value of the current component
public
Sets the toolTip (alt) text for the current component
public
Creates a new instance of this class.. of course
public