Class JDPMaskEdit
java.lang.Object
|
+----JDPMaskEdit
- public class JDPMaskEdit
- extends Object
Class JDPMaskEdit represents a class for formatting text using a supplied mask.
-
JDPMaskEdit()
-
-
formatFloat(double, String)
- Given a float value and a mask return the new value in
the format of the mask as a String.
-
formatFloat(float, String)
- Given a float value and a mask return the new value in
the format of the mask as a String.
-
formatFloat(JDPSpinner, String)
- Given a float value and a mask return the new value in
the format of the mask as a String.
-
formatFloat(JDPTextGrid, int, int, String)
- Given a TextGrid value and a mask return the new value in
the format of the mask.
-
formatFloat(JDPTextGrid, String)
- Given a TextGrid value and a mask return the new value in
the format of the mask.
-
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.
-
formatString(JDPTextGrid, int, int, String)
- Given a TextGrid value and a mask return the new value in
the format of the mask.
-
formatString(JDPTextGrid, 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.
-
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(JDPSpinner)
- Given a float value strip any formatting characters ready for inserting into
the database.
-
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.
JDPMaskEdit
public JDPMaskEdit()
formatString
public 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 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 String formatString(JDPTextGrid 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 String formatString(JDPTextGrid 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 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 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 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 String formatFloat(JDPSpinner 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 JDPSpinner to be formatted.
- mask - the mask to use to format the string.
- Returns:
- the newly formatted string.
formatFloat
public 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 String formatFloat(double 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 String formatFloat(JDPTextGrid 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 String formatFloat(JDPTextGrid 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 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 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.
stripFloat
public String stripFloat(JDPSpinner formatValue)
- Given a float value strip any formatting characters ready for inserting into
the database.
- Parameters:
- text - the JDPSpinner to be stripped.
- Returns:
- the newly stripped string.
getDecimalChar
public 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 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 '.').