charvax.swing.text
Class JTextComponent
java.lang.Object
charva.awt.Component
charvax.swing.JComponent
charvax.swing.text.JTextComponent
- Direct Known Subclasses:
- JTextArea, JTextField
- public abstract class JTextComponent
- extends JComponent
JTextComponent is a much-simplified version of the Swing
java.swing.text.JTextComponent class, and is the base class
for JTextArea.
Field Summary |
protected int |
_caretPosition
Index (from the start of the string) where next character will
be inserted. |
protected java.lang.StringBuffer |
_document
|
protected boolean |
_editable
|
Fields inherited from class charva.awt.Component |
_alignmentX, _alignmentY, _background, _cursesColor, _enabled, _focusListeners, _foreground, _keyListeners, _origin, _parent, _visible, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Methods inherited from class charva.awt.Component |
addFocusListener, addKeyListener, contains, contains, debug, getAlignmentX, getAlignmentY, getAncestorWindow, getBackground, getBounds, getCursesColor, getForeground, getHeight, getLocation, getLocationOnScreen, getName, getParent, getSize, getWidth, hasFocus, hide, invalidate, isDisplayed, isEnabled, isFocusTraversable, isTotallyObscured, isValid, isVisible, minimumSize, processEvent, processFocusEvent, processKeyEvent, processMouseEvent, repaint, requestFocus, requestSync, setBackground, setBounds, setBounds, setBounds, setEnabled, setForeground, setLocation, setLocation, setName, setParent, setVisible, show, validate, validateCursesColor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_caretPosition
protected int _caretPosition
- Index (from the start of the string) where next character will
be inserted.
_document
protected java.lang.StringBuffer _document
_editable
protected boolean _editable
JTextComponent
public JTextComponent()
getDocument
public java.lang.String getDocument()
setDocument
public void setDocument(java.lang.String document_)
getText
public java.lang.String getText()
setText
public void setText(java.lang.String text_)
getCaretPosition
public int getCaretPosition()
setCaretPosition
public void setCaretPosition(int caret_)
isEditable
public boolean isEditable()
- Returns the boolean flag indicating whether this TextComponent
is editable or not.
setEditable
public void setEditable(boolean editable_)
- Sets the boolean that indicates whether this TextComponent should be
editable or not.