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