TextFieldUtil

Kind of class:public class
Package:org.casalib.util
Inherits from:none
Version:04/27/08
Author:Aaron Clinger, Mike Creighton
Classpath:org.casalib.util.TextFieldUtil
File last modified:Wednesday, 31 December 2008, 20:18:28
Utilities for working with TextFields.

Summary


Class methods
  • hasOverFlow (field:TextField) : Boolean
    • Determines if textfield has more text than can be displayed at once.
  • removeOverFlow (field:TextField, omissionIndicator:String = "") : String
    • Removes text overflow on a plain text textfield with the option of an ommission indicator.

Class methods

hasOverFlow

public static function hasOverFlow (
field:TextField) : Boolean

Determines if textfield has more text than can be displayed at once.
Parameters:
field:
Textfield to check for text overflow.
Returns:
  • Returns (@code true} if textfield has text overflow; otherwise false.

removeOverFlow

public static function removeOverFlow (
field:TextField, omissionIndicator:String = "") : String

Removes text overflow on a plain text textfield with the option of an ommission indicator.
Parameters:
field :
Textfield to remove overflow.
omissionIndicator:
Text indication that an omission has occured; normally "..."; defaults to no indication.
Returns:
  • Returns the omitted text; if there was no text ommitted function returns a empty String ("").