com.threerings.opengl.gui
Class TextField

java.lang.Object
  extended by com.threerings.opengl.gui.Component
      extended by com.threerings.opengl.gui.TextComponent
          extended by com.threerings.opengl.gui.EditableTextComponent
              extended by com.threerings.opengl.gui.TextField
All Implemented Interfaces:
ConfigUpdateListener<ManagedConfig>, Document.Listener, EditCommands
Direct Known Subclasses:
PasswordField

public class TextField
extends EditableTextComponent

Displays and allows for the editing of a single line of text.


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
 
Constructor Summary
TextField(GlContext ctx)
          Creates a blank text field.
TextField(GlContext ctx, int maxLength)
          Creates a blank text field with maximum input length.
TextField(GlContext ctx, String text)
          Creates a text field with the specified starting text.
TextField(GlContext ctx, String text, int maxLength)
          Creates a text field with the specified starting text and max length.
 
Method Summary
 
Methods inherited from class com.threerings.opengl.gui.EditableTextComponent
acceptsFocus, dispatchEvent, getDocument, getSelectionBackground, getText, setDocument, setMaxLength, setPlaceholder, setPreferredWidth, setText, textInserted, textRemoved
 
Methods inherited from class com.threerings.opengl.gui.TextComponent
getEffectColor, getEffectSize, getHorizontalAlignment, getLineSpacing, getTextEffect, getTextFactory, getVerticalAlignment
 
Methods inherited from class com.threerings.opengl.gui.Component
addListener, boundsToString, configUpdated, contains, createDefaultTooltipComponent, createDefaultTooltipComponent, getAbsoluteX, getAbsoluteY, getAlpha, getBackground, getBorder, getBounds, getColor, getContext, getCursor, getFocusTarget, getHeight, getHitComponent, getInsets, getParent, getPreferredSize, getProperty, getState, getStyleConfigs, getTooltipText, getTooltipTimeout, getTooltipWindowStyle, getTransferHandler, getWidth, getX, getY, hasFocus, invalidate, isAdded, isEnabled, isHoverable, isShowing, isTooltipRelativeToMouse, isValid, isVisible, removeAllListeners, removeAllListeners, removeListener, render, requestFocus, scrollRectToVisible, setAlpha, setBackground, setBounds, setCursor, setEnabled, setHoverable, setLocation, setParent, setPreferredSize, setPreferredSize, setProperty, setSize, setStyleConfig, setStyleConfig, setStyleConfig, setStyleConfigs, setTooltipRelativeToMouse, setTooltipText, setTransferHandler, setVisible, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextField

public TextField(GlContext ctx)
Creates a blank text field.


TextField

public TextField(GlContext ctx,
                 int maxLength)
Creates a blank text field with maximum input length. The maximum input length is controlled by a LengthLimitedDocument, changing the document will remove the length control.


TextField

public TextField(GlContext ctx,
                 String text)
Creates a text field with the specified starting text.


TextField

public TextField(GlContext ctx,
                 String text,
                 int maxLength)
Creates a text field with the specified starting text and max length. The maximum input length is controlled by a LengthLimitedDocument, changing the document will remove the length control.



Copyright © 2011. All Rights Reserved.