1 Line
Class Ax.text.Line
Constructor Summary
Method Summary
Constructor Detail
Ax.text.Line.JSLine
-
Ax.text.Line.JSLine( smallint size )
- Info:
-
Creates a new line formatter instance with the defined line size. - Parameters:
- size - the line size
var line = new Ax.text.Line(20) .add(1, 'abc') .add(2,'123') .add(10, (function () { return "XYZ"; })() ) .toString(); // [ a123 XYZ ]
Ax.text.Line.JSLine
-
Ax.text.Line.JSLine( smallint size, object fill )
- Info:
-
Creates a new line formatter instance with the defined line size/length and line filler. Line filler will be used to fill the line positions with that character, by default is ' '. - Parameters:
- size - the line size
- fill - the line positions filler
var line = new Ax.text.Line(10, '@'); // [@@@@@@@@@@]
Method Detail
Ax.text.Line.add
-
object Ax.text.Line.add( smallint cpos, string data )
- Info:
-
Adds data to the line in the defined position. - Parameters:
- cpos - the position to add the data
- data - the content to add
- Returns:
- object
Ax.text.Line.toString
-
string Ax.text.Line.toString()
- Info:
-
Returns the formatted line as a string. - Returns:
- string
2 DateFormat
Class Ax.text.DateFormat
Constructor Summary
Method Summary
Constructor Detail
Ax.text.DateFormat.JSDateFormat
-
Ax.text.DateFormat.JSDateFormat()
Method Detail
Ax.text.DateFormat.format
-
string Ax.text.DateFormat.format( object millis, string format )
- Info:
-
Formats the date represented as milliseconds since January 1, 1970. - Parameters:
- millis - the milliseconds representing the date
- format - the format to use
- Returns:
- string
Ax.text.DateFormat.format
-
string Ax.text.DateFormat.format( date date, string format )
- Info:
-
Formats the given date. - Parameters:
- date - the date to format
- format - the format to use
- Returns:
- string
console.log(Ax.text.Date.format(new Date().getTime(), "dd-mm-yyyy"));
Ax.text.DateFormat.parse
-
date Ax.text.DateFormat.parse( string source, string format )
- Info:
-
Parses the given string and retrieves its date. - Parameters:
- source - the string to parse
- format - the formatter used
- Returns:
- date
3 MessageFormat
Class Ax.text.MessageFormat
Constructor Summary
Method Summary
Constructor Detail
Ax.text.MessageFormat.JSMessageFormat
-
Ax.text.MessageFormat.JSMessageFormat()
Method Detail
Ax.text.MessageFormat.format
-
string Ax.text.MessageFormat.format( string text, object args )
- Info:
-
Formats the given text, adding the given arguments to the appropriate places in the text. - Parameters:
- text - the source text
- args - the arguments to format and add
- Returns:
- string
Ax.text.MessageFormat.format
-
string Ax.text.MessageFormat.format( string text, object[] args )
- Info:
-
Formats the given text, adding the given arguments to the appropriate places in the text. - Parameters:
- text - the source text
- args - the arguments to format and add
- Returns:
- string
Ax.text.MessageFormat.format ( 'At {1,time} on {1,date}, there was {2} on planet {0,number,integer}', 7, new Ax.sql.Date(2020,1,1, 12,30,30), 'a disturbance in the Force' ); // At 12:30:30 PM on Jan 1, 2020, there was a disturbance in the Force on planet 7
4 NumberFormat
Class Ax.text.NumberFormat
Constructor Summary
Method Summary
Constructor Detail
Ax.text.NumberFormat.JSNumberFormat
-
Ax.text.NumberFormat.JSNumberFormat( string lang )
- Info:
-
Creates a nw number formatter instance for the given language. - Parameters:
- lang - the language to get the locale
Method Detail
Ax.text.NumberFormat.format
-
string Ax.text.NumberFormat.format( object number, string format )
- Info:
-
Formats the given short value. - Parameters:
- number - the number to format
- format - the format to use
- Returns:
- string
Ax.text.NumberFormat.format
-
string Ax.text.NumberFormat.format( smallint number, string format )
- Info:
-
Formats the given int value. - Parameters:
- number - the number to format
- format - the format to use
- Returns:
- string
Ax.text.NumberFormat.format
-
string Ax.text.NumberFormat.format( object number, string format )
- Info:
-
Formats the given float value. - Parameters:
- number - the number to format
- format - the format to use
- Returns:
- string
Ax.text.NumberFormat.format
-
string Ax.text.NumberFormat.format( long number, string format )
- Info:
-
Formats the given long value. - Parameters:
- number - the number to format
- format - the format to use
- Returns:
- string
Ax.text.NumberFormat.format
-
string Ax.text.NumberFormat.format( double number, string format )
- Info:
-
Formats the given double value. - Parameters:
- number - the number to format
- format - the format to use
- Returns:
- string
Ax.text.NumberFormat.format
-
string Ax.text.NumberFormat.format( object number, string format )
- Info:
-
Formats the given BigDecimal value. - Parameters:
- number - the number to format
- format - the format to use
- Returns:
- string
Ax.text.NumberFormat.parse
-
object Ax.text.NumberFormat.parse( string source, string format )
- Info:
-
Parses the given string and retrieves its numeric value. - Parameters:
- source - the string to parse
- format - the format used
- Returns:
- object
5 DecimalFormat
DateFormat is an abstract class for date/time formatting subclasses which formats and parses dates or time in a language-independent manner.
DecimalFormat documentation page.
6 String
The String class represents character strings. All string literals in Java programs, such as "abc", are implemented as instances of this class.