| Package | net.guttershark.util |
| Class | public final class TextFieldUtils |
| Method | Defined by | ||
|---|---|---|---|
|
create(name:String, x:Number, y:Number, w:Number, h:Number, selectable:Boolean = false, multiline:Boolean = false, border:Boolean = false, embedFonts:Boolean = false, autoSize:String = "left"):TextField
Create a TextField.
| TextFieldUtils | ||
|
deselect(tf:TextField):void
Deselect a text field.
| TextFieldUtils | ||
|
focusAndSelectAll(stage:Stage, tf:TextField):void
Set the stage focus to the target text field and select all text in it.
| TextFieldUtils | ||
|
[static]
Singleton access.
| TextFieldUtils | ||
|
restrictLettersAndNumbers(tf:TextField):void
Restrict a text field to letters (lower/upper) and numbers only.
| TextFieldUtils | ||
|
restrictToClassPaths(tf:TextField):void
Restrict a text field to class path characters only (a-zA-Z0-9_.).
| TextFieldUtils | ||
|
restrictToEmail(tf:TextField):void
Restrict a text field to email only characters.
| TextFieldUtils | ||
|
selectAll(tf:TextField):void
Select all the text in a text field.
| TextFieldUtils | ||
|
setLeading(tf:TextField, space:Number = 0):void
Sets the
TextField leading formatting. | TextFieldUtils | ||
| create | () | method |
public function create(name:String, x:Number, y:Number, w:Number, h:Number, selectable:Boolean = false, multiline:Boolean = false, border:Boolean = false, embedFonts:Boolean = false, autoSize:String = "left"):TextFieldCreate a TextField.
Parametersname:String — The textfield's name.
|
|
x:Number — The x position.
|
|
y:Number — The y position.
|
|
w:Number — The width.
|
|
h:Number — The height.
|
|
selectable:Boolean (default = false) — Whether or not the new text field should be selectable.
|
|
multiline:Boolean (default = false) — Whether or not the new text field is multiline.
|
|
border:Boolean (default = false) — Whether or not to show the 1 px black border around the new textfield.
|
|
embedFonts:Boolean (default = false) — Whether or not to embed fonts.
|
|
autoSize:String (default = "left") — The autosize value.
|
TextField |
| deselect | () | method |
public function deselect(tf:TextField):voidDeselect a text field.
Parameterstf:TextField — The TextField to deselect.
|
| focusAndSelectAll | () | method |
public function focusAndSelectAll(stage:Stage, tf:TextField):voidSet the stage focus to the target text field and select all text in it.
Parametersstage:Stage — The stage instance.
|
|
tf:TextField — The text field.
|
| gi | () | method |
| restrictLettersAndNumbers | () | method |
public function restrictLettersAndNumbers(tf:TextField):voidRestrict a text field to letters (lower/upper) and numbers only.
Parameterstf:TextField — The text field to restrict.
|
| restrictToClassPaths | () | method |
public function restrictToClassPaths(tf:TextField):voidRestrict a text field to class path characters only (a-zA-Z0-9_.).
Parameterstf:TextField — The text field to restrict.
|
| restrictToEmail | () | method |
public function restrictToEmail(tf:TextField):voidRestrict a text field to email only characters.
Parameterstf:TextField — The text field to restrict.
|
| selectAll | () | method |
public function selectAll(tf:TextField):voidSelect all the text in a text field.
Parameterstf:TextField — The TextField to select all in.
|
| setLeading | () | method |
public function setLeading(tf:TextField, space:Number = 0):void
Sets the TextField leading formatting.
tf:TextField — The textfield.
|
|
space:Number (default = 0) — The leading space.
|