org.fest.swing.format
Class ComponentFormatterTemplate

java.lang.Object
  extended by org.fest.swing.format.ComponentFormatterTemplate
All Implemented Interfaces:
ComponentFormatter
Direct Known Subclasses:
IntrospectionComponentFormatter, JComboBoxFormatter, JFileChooserFormatter, JListFormatter, JOptionPaneFormatter, JTabbedPaneFormatter, JTableFormatter, JTreeFormatter

public abstract class ComponentFormatterTemplate
extends Object
implements ComponentFormatter

Understands a template for implementations of ComponentFormatter.

Author:
Yvonne Wang

Constructor Summary
ComponentFormatterTemplate()
           
 
Method Summary
protected abstract  String doFormat(Component c)
          Returns the String representation of the given Component.
 String format(Component c)
          Returns the String representation of the given Component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.fest.swing.format.ComponentFormatter
targetType
 

Constructor Detail

ComponentFormatterTemplate

public ComponentFormatterTemplate()
Method Detail

format

public final String format(Component c)
Returns the String representation of the given Component.

Specified by:
format in interface ComponentFormatter
Parameters:
c - the given Component.
Returns:
the String representation of the given Component.
Throws:
NullPointerException - if the given Component is null.
IllegalArgumentException - if the type of the given Component is not supported by this formatter.

doFormat

protected abstract String doFormat(Component c)
Returns the String representation of the given Component.

Parameters:
c - the given Component.
Returns:
the String representation of the given Component.


Copyright © 2007-2011 FEST (Fixtures for Easy Software Testing). All Rights Reserved.