de.lessvoid.nifty.controls
Interface TextField

All Superinterfaces:
NiftyControl
All Known Implementing Classes:
TextFieldControl, TextFieldNull

public interface TextField
extends NiftyControl


Method Summary
 void disablePasswordChar()
          Disable the password character which displays the text again,
 void enablePasswordChar(char passwordChar)
          Enable a password character that is displayed instead of the actual text.
 String getText()
          Get the current TextField text.
 boolean isPasswordCharEnabled()
          Checks if a password character is currently enabled.
 void setCursorPosition(int position)
          Set the cursorposition to the given index.
 void setMaxLength(int maxLength)
          Change the max. input length to a new length.
 void setText(String text)
          Set the Text of the TextField.
 
Methods inherited from interface de.lessvoid.nifty.controls.NiftyControl
disable, enable, getElement, getHeight, getId, getStyle, getWidth, hasFocus, isBound, isEnabled, layoutCallback, setEnabled, setFocus, setFocusable, setHeight, setId, setStyle, setWidth
 

Method Detail

getText

String getText()
Get the current TextField text.

Returns:
text

setText

void setText(String text)
Set the Text of the TextField.

Parameters:
text - new text

setMaxLength

void setMaxLength(int maxLength)
Change the max. input length to a new length.

Parameters:
maxLength - max length

setCursorPosition

void setCursorPosition(int position)
Set the cursorposition to the given index.

Parameters:
position - new cursor position

enablePasswordChar

void enablePasswordChar(char passwordChar)
Enable a password character that is displayed instead of the actual text.

Parameters:
passwordChar - charcter to use, like '*'

disablePasswordChar

void disablePasswordChar()
Disable the password character which displays the text again,


isPasswordCharEnabled

boolean isPasswordCharEnabled()
Checks if a password character is currently enabled.

Returns:
true if password character is enabled and false if not.


Copyright © 2011. All Rights Reserved.