Side of Software
Print Preview Library 1.8.1

sos.preview
Class FitLayoutFormat

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

public class FitLayoutFormat
extends java.text.Format

A class that formats and parses instances of FitLayout.

Since:
1.0
See Also:
FitLayout

Constructor Summary
FitLayoutFormat()
          Creates a FitLayoutFormat for the default locale.
FitLayoutFormat(java.util.Locale locale)
          Creates a FitLayoutFormat 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 FitLayoutFormats are installed.
static FitLayoutFormat getInstance()
          Returns the default FitLayoutFormat for the default locale.
static FitLayoutFormat getInstance(java.util.Locale locale)
          Returns the default FitLayoutFormat 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

FitLayoutFormat

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


FitLayoutFormat

public FitLayoutFormat(java.util.Locale locale)
Creates a FitLayoutFormat 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 FitLayoutFormats are installed.

Returns:
the available locales

getInstance

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

Returns:
returns the default FitLayoutFormat for the default locale

getInstance

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

Returns:
returns the default FitLayoutFormat 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.