Class ComponentFormatterTemplate

java.lang.Object
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.
  • Constructor Details

    • ComponentFormatterTemplate

      public ComponentFormatterTemplate()
  • Method Details

    • 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.
    • validateTypeOf

      private void validateTypeOf(Component c)