Side of Software
Print Preview Library 1.8.1

sos.preview
Class MatrixLayoutFormat

java.lang.Object
  |
  +--java.text.Format
        |
        +--sos.preview.MatrixLayoutFormat
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class MatrixLayoutFormat
extends java.text.Format

A class that formats and parses instances of MatrixLayout.

Since:
1.0
See Also:
MatrixLayout

Constructor Summary
MatrixLayoutFormat()
          Creates a MatrixLayoutFormat for the default locale.
MatrixLayoutFormat(java.util.Locale locale)
          Creates a MatrixLayoutFormat for the specified locale.
 
Method Summary
 java.lang.StringBuffer format(java.lang.Object obj, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)
          Formats an object and appends the resulting text to a given string buffer.
static java.util.Locale[] getAvailableLocales()
          Returns the set of locales for which MatrixLayoutFormats are installed.
static MatrixLayoutFormat getInstance()
          Returns the default MatrixLayoutFormat for the default locale.
static MatrixLayoutFormat getInstance(java.util.Locale locale)
          Returns the default MatrixLayoutFormat for the specified locale.
 java.lang.Object parseObject(java.lang.String source, java.text.ParsePosition pos)
          Parses text from a string to produce an object.
 
Methods inherited from class java.text.Format
clone, format, formatToCharacterIterator, parseObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MatrixLayoutFormat

public MatrixLayoutFormat()
Creates a MatrixLayoutFormat for the default locale.


MatrixLayoutFormat

public MatrixLayoutFormat(java.util.Locale locale)
Creates a MatrixLayoutFormat for the specified locale.

Parameters:
locale - the desired locale
Method Detail

format

public java.lang.StringBuffer format(java.lang.Object obj,
                                     java.lang.StringBuffer toAppendTo,
                                     java.text.FieldPosition pos)
Formats an object and appends the resulting text to a given string buffer.

Specified by:
format in class java.text.Format
Parameters:
obj - the object to format
toAppendTo - where the text is to be appended
pos - a FieldPosition identifying a field in the formatted text
Returns:
the string buffer passed in as toAppendTo, with formatted text appended
Throws:
java.lang.IllegalArgumentException - if this Format cannot format the given object
java.lang.NullPointerException - if toAppendTo or pos is null

getAvailableLocales

public static java.util.Locale[] getAvailableLocales()
Returns the set of locales for which MatrixLayoutFormats are installed.

Returns:
the available locales

getInstance

public static MatrixLayoutFormat getInstance()
Returns the default MatrixLayoutFormat for the default locale.

Returns:
returns the default MatrixLayoutFormat for the default locale

getInstance

public static MatrixLayoutFormat getInstance(java.util.Locale locale)
Returns the default MatrixLayoutFormat for the specified locale.

Returns:
returns the default MatrixLayoutFormat for the specified locale

parseObject

public java.lang.Object parseObject(java.lang.String source,
                                    java.text.ParsePosition pos)
Parses text from a string to produce an object.

Specified by:
parseObject in class java.text.Format
Parameters:
source - a String, part of which should be parsed
pos - a ParsePosition object with index and error index information
Returns:
an object parsed from the string, or null, if an error occurs
Throws:
java.lang.NullPointerException - if pos is null

Side of Software
Print Preview Library 1.8.1

Copyright 2003-07 Side of Software (SOS). All rights reserved.