|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.opengl.gui.Component
com.threerings.opengl.gui.TextComponent
com.threerings.opengl.gui.EditableTextComponent
public abstract class EditableTextComponent
Extends TextComponent with mechanisms shared by editable text Components.
| Field Summary |
|---|
| Fields inherited from class com.threerings.opengl.gui.Component |
|---|
DEFAULT, DISABLED, HOVER |
| Fields inherited from interface com.threerings.opengl.gui.text.EditCommands |
|---|
ACTION, BACKSPACE, CLEAR, COPY, CURSOR_DOWN, CURSOR_LEFT, CURSOR_RIGHT, CURSOR_UP, CUT, DELETE, END_OF_LINE, PASTE, REDO, RELEASE_FOCUS, START_OF_LINE, UNDO, WORD_LEFT, WORD_RIGHT |
| Method Summary | |
|---|---|
boolean |
acceptsFocus()
Returns whether or not this component accepts the keyboard focus. |
boolean |
dispatchEvent(Event event)
Instructs this component to process the supplied event. |
Document |
getDocument()
Returns the underlying document used by this text field to maintain its state. |
Background |
getSelectionBackground()
Returns the selection background configured for this component. |
String |
getText()
Returns the text currently being displayed by this component. |
void |
setDocument(Document document)
Configures this text field with a custom document. |
void |
setMaxLength(int maxLength)
Configures the maximum length of this text field. |
void |
setPlaceholder(String placeholder)
Set the placeholder text; shown when the field is unfocused and empty. |
void |
setPreferredWidth(int width)
Configures the preferred width of this text field (the preferred height will be calculated from the font). |
void |
setText(String text)
Configures this text field with the specified text for display and editing. |
void |
textInserted(Document document,
int offset,
int length)
Called when text is inserted into a document. |
void |
textRemoved(Document document,
int offset,
int length)
Called when text is removed from a document. |
| Methods inherited from class com.threerings.opengl.gui.TextComponent |
|---|
getEffectColor, getEffectSize, getHorizontalAlignment, getLineSpacing, getTextEffect, getTextFactory, getVerticalAlignment |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void setPlaceholder(String placeholder)
public void setText(String text)
setText in class TextComponentpublic String getText()
TextComponent
getText in class TextComponentpublic void setMaxLength(int maxLength)
public void setDocument(Document document)
public Document getDocument()
public void setPreferredWidth(int width)
public Background getSelectionBackground()
public void textInserted(Document document,
int offset,
int length)
Document.Listener
textInserted in interface Document.Listenerdocument - the document into which text was inserted.offset - the offset into the document of the inserted text.length - the length of the inserted text.
public void textRemoved(Document document,
int offset,
int length)
Document.Listener
textRemoved in interface Document.Listenerdocument - the document from which text was removed.offset - the offset into the document of the removed text.length - the length of the removed text.public boolean acceptsFocus()
Component
acceptsFocus in class Componentpublic boolean dispatchEvent(Event event)
Componentsuper.dispatchEvent for events that they did not "consume".
dispatchEvent in class Component
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||