Class JDPMaskEdit

java.lang.Object
   |
   +----JDPMaskEdit

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


Constructor Index

 o JDPMaskEdit()

Method Index

 o formatFloat(double, String)
Given a float value and a mask return the new value in the format of the mask as a String.
 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(JDPSpinner, String)
Given a float value and a mask return the new value in the format of the mask as a String.
 o formatFloat(JDPTextGrid, int, int, String)
Given a TextGrid value and a mask return the new value in the format of the mask.
 o formatFloat(JDPTextGrid, String)
Given a TextGrid value and a mask return the new value in the format of the mask.
 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 formatString(JDPTextGrid, int, int, String)
Given a TextGrid value and a mask return the new value in the format of the mask.
 o formatString(JDPTextGrid, 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 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(JDPSpinner)
Given a float value strip any formatting characters ready for inserting into the database.
 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 JDPMaskEdit
 public JDPMaskEdit()

Methods

 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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 ',').
 o 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 '.').