net.sf.mpxj.utility
Class MPXJFormats

java.lang.Object
  extended by net.sf.mpxj.utility.MPXJFormats

public final class MPXJFormats
extends Object

This class manages the various objects required to parse and format data items in MPX files.


Constructor Summary
MPXJFormats(Locale locale, String nullText, ProjectFile file)
          Constructor.
 
Method Summary
 NumberFormat getCurrencyFormat()
          Retrieve the currency format.
 DateFormat getDateFormat()
          Retrieve the date format.
 DateFormat getDateTimeFormat()
          Retrieve the date time format.
 NumberFormat getDecimalFormat()
          Retrieve the decimal format.
 NumberFormat getDurationDecimalFormat()
          Retrieve the duration decimal format.
 String getNullText()
          Retrieve the text representing a null value.
 NumberFormat getPercentageDecimalFormat()
          Retrieve the percentage decimal format.
 DateFormat getTimeFormat()
          Retrieve the time format.
 NumberFormat getUnitsDecimalFormat()
          Retrieve the units decimal format.
 void update()
          Called to update the cached formats when something changes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MPXJFormats

public MPXJFormats(Locale locale,
                   String nullText,
                   ProjectFile file)
Constructor.

Parameters:
locale - target locale
nullText - locale specific text to represent a value which has not been set, normally "NA"
file - parent file
Method Detail

update

public void update()
Called to update the cached formats when something changes.


getUnitsDecimalFormat

public NumberFormat getUnitsDecimalFormat()
Retrieve the units decimal format.

Returns:
units decimal format

getDecimalFormat

public NumberFormat getDecimalFormat()
Retrieve the decimal format.

Returns:
decimal format

getCurrencyFormat

public NumberFormat getCurrencyFormat()
Retrieve the currency format.

Returns:
currency format

getDurationDecimalFormat

public NumberFormat getDurationDecimalFormat()
Retrieve the duration decimal format.

Returns:
duration decimal format

getPercentageDecimalFormat

public NumberFormat getPercentageDecimalFormat()
Retrieve the percentage decimal format.

Returns:
percentage decimal format

getDateTimeFormat

public DateFormat getDateTimeFormat()
Retrieve the date time format.

Returns:
date time format

getDateFormat

public DateFormat getDateFormat()
Retrieve the date format.

Returns:
date format

getTimeFormat

public DateFormat getTimeFormat()
Retrieve the time format.

Returns:
time format

getNullText

public String getNullText()
Retrieve the text representing a null value.

Returns:
null text


Copyright © 2012. All Rights Reserved.