Namespace: Consultingwerk.Util
Class 
FormatHelper Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object

Purpose: Protected default constructor.
Notes: There's no need to create instances of the helper classes



Top Method Summary
Options Name Purpose
- CHARACTER BuildDateMask (character) Returns an Infragistics Date Mask. Invoked by ToInputMask.
- CHARACTER BuildTimeMask (character) Returns an Infragistics Time Mask. Invoked by ToInputMask.
+ CHARACTER DefaultFormat (character) Determines the default format for the given ABL Data-type
+ INTEGER FormatLength (character) Returns the length in characters required for a character format
+ DECIMAL FormatWidthChars (character, character) Returns the default width used for a fill-in with the given format
+ CHARACTER GetFormatFromInputMask (character, character) Returns a display Format to be used in the Grid build from the edit Mask returned from the ToInputMask method.
+ INTEGER GetFormatWidthPixels (character) Returns the width pixels for a given ABL format
+ INTEGER GetNumberOfDecimalDigits (character) Returns the number of decimal digits of the given format
+ CHARACTER IntegerFormatForMax (integer) Returns the required integer format for an upper limit, including leading zero's
+ LOGICAL IsValidFormatString (character, character) Verifies if the format string is a valid format for the given datatype
- CHARACTER ResolveRepeatingChars (character) Returns an interpreted InputMask. "x(4)" -> "xxxx" "!(4)x(8)" -> "!!!!xxxxxxxx"
- SplitDateAndTimeMasks (character, character, character) Returns the Date and the Time part of an InputMask.
+ CHARACTER ToInputMask (character, character) Returns an Infragistics InputMask translated from a Progress Edit Mask.

Top Constructor Summary
Options Name Purpose
# FormatHelper () Protected default constructor.


Method Detail
Top

PRIVATE CHARACTER BuildDateMask (character)

Purpose: Returns an Infragistics Date Mask.
Invoked by ToInputMask.
Notes:

Parameters:
pcDateMask CHARACTER
The ABL DATE FORMAT string
Returns CHARACTER
The matching Infragistics InputMask for the date field
Top

PRIVATE CHARACTER BuildTimeMask (character)

Purpose: Returns an Infragistics Time Mask.
Invoked by ToInputMask.
Notes:

Parameters:
pcTimeMask CHARACTER
The ABL TIME FORMAT string
Returns CHARACTER
The matching Infragistics InputMask for the time field
Top

PUBLIC CHARACTER DefaultFormat (character)

Purpose: Determines the default format for the given ABL Data-type
Notes:

Parameters:
pcDataType CHARACTER
The ABL DataType
Returns CHARACTER
The Default Format
Top

PUBLIC INTEGER FormatLength (character)

Purpose: Returns the length in characters required for a character format
Notes:

Parameters:
pcFormat CHARACTER
The field format
Returns INTEGER
The length
Top

PUBLIC DECIMAL FormatWidthChars (character, character)

Purpose: Returns the default width used for a fill-in with the given format
Notes:

Parameters:
pcFormat CHARACTER
The field format
pcDataType CHARACTER
The field datatype
Returns DECIMAL
The width
Top

PUBLIC CHARACTER GetFormatFromInputMask (character, character)

Purpose: Returns a display Format to be used in the Grid build from the edit
Mask returned from the ToInputMask method.
Notes:

Parameters:
pcDataType CHARACTER
The Progress Data-Type that belongs to the FormatMask
pcIGInputMask CHARACTER
The Infragistics input mask as returned by the ToInputMask method
Returns CHARACTER
The Infragistics format string matching the Infragistics edit mask
Top

PUBLIC INTEGER GetFormatWidthPixels (character)

Purpose: Returns the width pixels for a given ABL format
Notes: Creates a fill-in on the fly and assigns the format. Return value
is dependent on the current font settings

Parameters:
pcFormat CHARACTER
The format to measure
Returns INTEGER
The width in pixels for the given format
Top

PUBLIC INTEGER GetNumberOfDecimalDigits (character)

Purpose: Returns the number of decimal digits of the given format
Notes: Based on the first period (.) in the format string, counting the
following 9's

Parameters:
pcFormat CHARACTER
The format string to return the number of decimal digits for
Returns INTEGER
The number of digits provided by the given format string
Top

PUBLIC CHARACTER IntegerFormatForMax (integer)

Purpose: Returns the required integer format for an upper limit, including
leading zero's
Notes: Useful for sequences of field names (EXTENT field resolution)

Parameters:
piMaxValue INTEGER
The maximum value that should be visualized using the FORMAT
Returns CHARACTER
The FORMAT that can visualize up to the given maximum value
Top

PUBLIC LOGICAL IsValidFormatString (character, character)

Purpose: Verifies if the format string is a valid format for the given datatype
Notes:

Parameters:
pcDataType CHARACTER
The data type
pcFormat CHARACTER
The format string to validate
Returns LOGICAL
Top

PRIVATE CHARACTER ResolveRepeatingChars (character)

Purpose: Returns an interpreted InputMask.
"x(4)" -> "xxxx"
"!(4)x(8)" -> "!!!!xxxxxxxx"
Notes:

Parameters:
cFormat CHARACTER
An ABL CHARACTER FORMAT using the repeat mask syntax, e.g. x(8)
Returns CHARACTER
The ABL CHARACTER FORMAT resolved by the repeating characters
Top

PRIVATE SplitDateAndTimeMasks (character, character, character)

Purpose: Returns the Date and the Time part of an InputMask.
Notes:

Parameters:
pcMask CHARACTER
The ABL FORMAT for a DATETIME or DATETIME-TZ value
pcDateMask CHARACTER
OUTPUT The Date part of the FORMAT
pcTimeMask CHARACTER
OUTPUT The Time part of the FORMAT
Top

PUBLIC CHARACTER ToInputMask (character, character)

Purpose: Returns an Infragistics InputMask translated from a Progress Edit
Mask.
Notes:

Parameters:
pcDataType CHARACTER
The Progress Data-Type that belongs to the FORMAT mask
pcProgressEditMask CHARACTER
The Progress ABL FORMAT mask, e.g. X(8)
Returns CHARACTER
The Infragistics InputMask matching the ABL FORMAT mask


Constructor Detail
Top

PROTECTED FormatHelper ()

Purpose: Protected default constructor.
Notes: There's no need to create instances of the helper classes



©2006-2023 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       08.12.2024 13:23:42