Class JListFormatter

All Implemented Interfaces:
ComponentFormatter

public class JListFormatter extends ComponentFormatterTemplate
Understands a formatter for JLists.
  • Constructor Details

    • JListFormatter

      public JListFormatter()
  • Method Details

    • doFormat

      protected String doFormat(Component c)
      Returns the String representation of the given Component, which should be a JList (or subclass.)
      Specified by:
      doFormat in class ComponentFormatterTemplate
      Parameters:
      c - the given Component.
      Returns:
      the String representation of the given JList.
    • contentsOf

      private Object[] contentsOf(JList list)
    • targetType

      public Class<? extends Component> targetType()
      Indicates that this formatter supports JList only.
      Returns:
      JList.class.