All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.bulletproof.gui.MaskEdit

java.lang.Object
   |
   +----com.bulletproof.gui.MaskEdit

public class MaskEdit
extends Object
Class MaskEdit represents a class for formatting text using a supplied mask.


Constructor Index

 o MaskEdit()

Method Index

 o formatFloat(float, String)
Given a float value and a mask return the new value in the format of the mask as a String.
 o formatFloat(String, String)
Given a float value and a mask return the new value in the format of the mask as a String.
 o formatFloat(TextField, String)
Given a float value and a mask return the new value in the format of the mask as a String.
 o formatFloat(TextField, String, int)
Given a float value and a mask return the new value in the format of the mask as a String.
 o formatFloat(TextGrid, int, int, String)
Given a TextGrid value and a mask return the new value in the format of the mask.
 o formatFloat(TextGrid, String)
Given a TextGrid value and a mask return the new value in the format of the mask.
 o formatString(String, String)
Given a String value and a mask return the new value in the format of the mask.
 o formatString(TextField, String)
Given a String value and a mask return the new value in the format of the mask.
 o formatString(TextGrid, int, int, String)
Given a TextGrid value and a mask return the new value in the format of the mask.
 o formatString(TextGrid, String)
Given a TextGrid value and a mask return the new value in the format of the mask.
 o getCommaChar(String)
Given a text value analyze it to determine whether the comma character is a ',' (USA) or '.' (Europe).
 o getDecimalChar(String)
Given a text value analyze it to determine whether the decimal character is a '.' (USA) or ',' (Europe).
 o stripFloat(String)
Given a float value strip any formatting characters ready for inserting into the database.
 o stripFloat(TextField)
Given a float value strip any formatting characters ready for inserting into the database.

Constructors

 o MaskEdit
 public MaskEdit()

Methods

 o formatString
 public static void formatString(TextField text,
                                 String mask)
Given a String value and a mask return the new value in the format of the mask.

Parameters:
formatValue - the String to be formatted.
mask - the mask to use to format the string.
 o formatString
 public static String formatString(String formatValue,
                                   String mask)
Given a String value and a mask return the new value in the format of the mask.

Parameters:
formatValue - the String to be formatted.
mask - the mask to use to format the string.
Returns:
the newly formatted string.
 o formatString
 public static String formatString(TextGrid formatGrid,
                                   String mask)
Given a TextGrid value and a mask return the new value in the format of the mask.

Parameters:
formatGrid - the Grid to be formatted in the current cell.
mask - the mask to use to format the string.
Returns:
the newly formatted string.
 o formatString
 public static String formatString(TextGrid formatGrid,
                                   int column,
                                   int row,
                                   String mask)
Given a TextGrid value and a mask return the new value in the format of the mask.

Parameters:
formatGrid - the Grid to be formatted in the current cell.
mask - the mask to use to format the string.
Returns:
the newly formatted string.
 o formatFloat
 public static void formatFloat(TextField text,
                                String mask)
Given a float value and a mask return the new value in the format of the mask as a String.

Parameters:
formatValue - the TextField to be formatted.
mask - the mask to use to format the string.
 o formatFloat
 public static void formatFloat(TextField text,
                                String mask,
                                int selectionStart)
Given a float value and a mask return the new value in the format of the mask as a String.

Parameters:
formatValue - the TextField to be formatted.
mask - the mask to use to format the string.
selectionStart - the current cursor position in the TextField.
 o formatFloat
 public static String formatFloat(String formatValue,
                                  String mask)
Given a float value and a mask return the new value in the format of the mask as a String.

Parameters:
formatValue - the String to be formatted.
mask - the mask to use to format the string.
Returns:
the newly formatted string.
 o formatFloat
 public static String formatFloat(float formatValue,
                                  String mask)
Given a float value and a mask return the new value in the format of the mask as a String.

Parameters:
formatValue - the String to be formatted.
mask - the mask to use to format the string.
Returns:
the newly formatted string.
 o formatFloat
 public static String formatFloat(TextGrid formatGrid,
                                  String mask)
Given a TextGrid value and a mask return the new value in the format of the mask.

Parameters:
formatGrid - the Grid to be formatted in the current cell.
mask - the mask to use to format the string.
Returns:
the newly formatted string.
 o formatFloat
 public static String formatFloat(TextGrid formatGrid,
                                  int column,
                                  int row,
                                  String mask)
Given a TextGrid value and a mask return the new value in the format of the mask.

Parameters:
formatGrid - the Grid to be formatted in the current cell.
mask - the mask to use to format the string.
Returns:
the newly formatted string.
 o stripFloat
 public static String stripFloat(TextField text)
Given a float value strip any formatting characters ready for inserting into the database.

Parameters:
text - the TextField to be stripped.
Returns:
the newly stripped string.
 o stripFloat
 public static String stripFloat(String formatValue)
Given a float value strip any formatting characters ready for inserting into the database.

Parameters:
text - the String to be stripped.
Returns:
the newly stripped string.
 o getDecimalChar
 public static String getDecimalChar(String textValue)
Given a text value analyze it to determine whether the decimal character is a '.' (USA) or ',' (Europe).

Parameters:
textValue - the text value number or mask to analyze.
Returns:
the appropriate decimal character ('.' or ',').
 o getCommaChar
 public static char getCommaChar(String textValue)
Given a text value analyze it to determine whether the comma character is a ',' (USA) or '.' (Europe).

Parameters:
textValue - the text value number or mask to analyze.
Returns:
the appropriate comma character (',' or '.').

All Packages  Class Hierarchy  This Package  Previous  Next  Index