th.co.edge.jseq
Class FormatterRegistry

java.lang.Object
  extended by th.co.edge.jseq.FormatterRegistry

public class FormatterRegistry
extends java.lang.Object

A singleton that holds all Formatters known to the system.


Method Summary
 Formatter get(java.lang.String type)
          Returns the Formatter associated with the given name.
 java.lang.String getFormatterTypes()
          Returns a comma-separated list with the names of the formatters that have been registered.
static FormatterRegistry getInstance()
          Returns the only instance of this singleton.
 void register(java.lang.String type, Formatter formatter)
          Registers a new Formatter so that it can be used
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static FormatterRegistry getInstance()
Returns the only instance of this singleton. By default, it contains Formatters for some commonly used formats, e.g., text and SVG, but more can be added using the register method.

Returns:
the only instance of this singleton
See Also:
register(String, Formatter)

get

public Formatter get(java.lang.String type)
Returns the Formatter associated with the given name.

Parameters:
type - the name of the Formatter to look up
Returns:
the Formatter associated with type

getFormatterTypes

public java.lang.String getFormatterTypes()
Returns a comma-separated list with the names of the formatters that have been registered.

Returns:
a comma-separated list with names of all formatters known to the system

register

public void register(java.lang.String type,
                     Formatter formatter)
Registers a new Formatter so that it can be used

Parameters:
type - the name of the Formatter
formatter - the Formatter to associate with type


Copyright © 2008 Edge Software, Co., Ltd.. All Rights Reserved.