charvax.swing.text

Class JTextComponent

Known Direct 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 StringBuffer
_document
protected boolean
_editable

Fields inherited from class charvax.swing.JComponent

_border

Fields inherited from class charva.awt.Component

BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT, _alignmentX, _alignmentY, _background, _cursesColor, _enabled, _focusListeners, _foreground, _keyListeners, _origin, _parent, _visible

Constructor Summary

JTextComponent()

Method Summary

int
getCaretPosition()
String
getDocument()
String
getText()
boolean
isEditable()
Returns the boolean flag indicating whether this TextComponent is editable or not.
void
setCaretPosition(int caret_)
void
setDocument(String document_)
void
setEditable(boolean editable_)
Sets the boolean that indicates whether this TextComponent should be editable or not.
void
setText(String text_)

Methods inherited from class charvax.swing.JComponent

draw, getBorder, getInsets, setBorder

Methods inherited from class charva.awt.Component

addFocusListener, addKeyListener, contains, contains, debug, draw, 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, setEnabled, setForeground, setLocation, setLocation, setName, setParent, setVisible, show, validate, validateCursesColor

Field Details

_caretPosition

protected int _caretPosition
Index (from the start of the string) where next character will be inserted.

_document

protected StringBuffer _document

_editable

protected boolean _editable

Constructor Details

JTextComponent

public JTextComponent()

Method Details

getCaretPosition

public int getCaretPosition()

getDocument

public String getDocument()

getText

public String getText()

isEditable

public boolean isEditable()
Returns the boolean flag indicating whether this TextComponent is editable or not.

setCaretPosition

public void setCaretPosition(int caret_)

setDocument

public void setDocument(String document_)

setEditable

public void setEditable(boolean editable_)
Sets the boolean that indicates whether this TextComponent should be editable or not.

setText

public void setText(String text_)