com.transmote.nest.ui
Class NestTextInput

java.lang.Object
  extended by java.util.Observable
      extended by com.transmote.nest.events.EventDispatcher
          extended by com.transmote.nest.NestSprite
              extended by com.transmote.nest.ui.NestTextInput
All Implemented Interfaces:
Observer

public class NestTextInput
extends NestSprite


Field Summary
 String allowedChars
          If specified, only the characters in this String can be entered into the textfield.
 String defaultText
          Text that appears in textfield when no text has yet been entered.
 int fillColor_focused
          ARGB color of textfield background when focused.
 int fillColor_unfocused
          ARGB color of textfield background when not focused.
 PFont font
          PFont used in textfield.
 int maxNumChars
          Maximum number of characters that can be entered into the textfield.
 NestTextInput nextTabGroupInput
          The specified NestTextInput will gain focus when TAB is typed into this NestTextInput.
 NestTextInput prevTabGroupInput
          The specified NestTextInput will gain focus when SHIFT+TAB is typed into this NestTextInput.
 int strokeColor_focused
          ARGB color of textfield border when focused.
 int strokeColor_unfocused
          ARGB color of textfield border when not focused.
 int strokeWeight_focused
          Stroke weight of textfield border when focused.
 int strokeWeight_unfocused
          Stroke weight of textfield border not focused.
 NestButton submitButton
          The specified NestButton will be programmatically clicked when ENTER is typed into this NestTextInput.
 int textColor_defaultText
          ARGB color of default text in textfield.
 int textColor_focused
          ARGB color of text when textfield is focused.
 int textColor_unfocused
          ARGB color of text when textfield is not focused.
 
Fields inherited from class com.transmote.nest.NestSprite
blendMode, boundsLeft, boundsTop, handleCaptureEvents, height, inFront, inputChildren, inputEnabled, NO_BLEND_MODE, rotationX, rotationY, rotationZ, scaleX, scaleY, scaleZ, visible, width, x, y, z
 
Constructor Summary
NestTextInput(float width, float height, PFont font, String defaultText)
           
 
Method Summary
static void chainTabInputs(List<NestTextInput> textInputs)
          Pass a List of NestTextInputs in order through which they can be tabbed.
 void gainFocus()
          Programmatically give focus to this NestTextInput instance.
 String inputString()
          Set the string entered into the textfield.
 void inputString(String val)
          Get the string entered into the textfield.
 void loseFocus()
          Programmatically remove focus to this NestTextInput instance.
 String toString()
           
 
Methods inherited from class com.transmote.nest.NestSprite
addChild, addChild, bounds, dispatchEvent, dispose, dispose, getChildAt, getChildIndex, globalToLocal, hitTest, hitTest, isDisposed, localToGlobal, mousePt, mouseX, mouseY, numChildren, pApplet, parent, removeChild, removeChild, renderer, screenPt, screenX, screenY, setBounds, setBounds, setChildIndex, setDraw, setDraw, setRenderer, setRenderer, setUpdate, setUpdate, swapChildren, swapChildren
 
Methods inherited from class com.transmote.nest.events.EventDispatcher
addObserver, deleteObserver, dispatchEvent, owner, update
 
Methods inherited from class java.util.Observable
countObservers, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

textColor_focused

public int textColor_focused
ARGB color of text when textfield is focused.


textColor_unfocused

public int textColor_unfocused
ARGB color of text when textfield is not focused.


textColor_defaultText

public int textColor_defaultText
ARGB color of default text in textfield.


fillColor_focused

public int fillColor_focused
ARGB color of textfield background when focused.


fillColor_unfocused

public int fillColor_unfocused
ARGB color of textfield background when not focused.


strokeColor_focused

public int strokeColor_focused
ARGB color of textfield border when focused.


strokeColor_unfocused

public int strokeColor_unfocused
ARGB color of textfield border when not focused.


strokeWeight_focused

public int strokeWeight_focused
Stroke weight of textfield border when focused.


strokeWeight_unfocused

public int strokeWeight_unfocused
Stroke weight of textfield border not focused.


font

public PFont font
PFont used in textfield.


defaultText

public String defaultText
Text that appears in textfield when no text has yet been entered.


maxNumChars

public int maxNumChars
Maximum number of characters that can be entered into the textfield.


allowedChars

public String allowedChars
If specified, only the characters in this String can be entered into the textfield.


prevTabGroupInput

public NestTextInput prevTabGroupInput
The specified NestTextInput will gain focus when SHIFT+TAB is typed into this NestTextInput.


nextTabGroupInput

public NestTextInput nextTabGroupInput
The specified NestTextInput will gain focus when TAB is typed into this NestTextInput.


submitButton

public NestButton submitButton
The specified NestButton will be programmatically clicked when ENTER is typed into this NestTextInput.

Constructor Detail

NestTextInput

public NestTextInput(float width,
                     float height,
                     PFont font,
                     String defaultText)
Method Detail

chainTabInputs

public static void chainTabInputs(List<NestTextInput> textInputs)
Pass a List of NestTextInputs in order through which they can be tabbed.

Parameters:
textInputs - Next/previous tab inputs will be assigned in this order, also linking the first and last inputs.

inputString

public String inputString()
Set the string entered into the textfield.


inputString

public void inputString(String val)
Get the string entered into the textfield.


gainFocus

public void gainFocus()
Programmatically give focus to this NestTextInput instance.


loseFocus

public void loseFocus()
Programmatically remove focus to this NestTextInput instance.


toString

public String toString()
Overrides:
toString in class Object


Processing library Nest by Eric Socolofsky. (C) Eric Socolofsky 2011-2013