Class PropertiesTableFormat

java.lang.Object
org.jppf.utils.PropertiesTableFormat
Direct Known Subclasses:
HTMLPropertiesTableFormat, TextPropertiesTableFormat

public abstract class PropertiesTableFormat extends Object
Abstract class for formatters that print the contents of a Properties object as a string.
Author:
Laurent Cohen
  • Field Details

    • sb

      protected final StringBuffer sb
      Contains the formatted text.
    • docTitle

      protected final String docTitle
      The title of the whole document.
  • Constructor Details

    • PropertiesTableFormat

      public PropertiesTableFormat(String docTitle)
      Initialize this formatter with the specified title.
      Parameters:
      docTitle - the title of the whole document.
  • Method Details

    • getText

      public String getText()
      Get the formatted text.
      Returns:
      the text as a string.
    • start

      public void start()
      Write the prologue for the formatted text.
    • end

      public void end()
      Write the epilogue for the formatted text.
    • formatTable

      public void formatTable(Properties props, String title)
      Generate the formatted text for a set of properties.
      Parameters:
      props - the set of properties to format.
      title - the title of the formatted table.
    • tableStart

      public void tableStart(String title)
      Write the prologue of a table.
      Parameters:
      title - the title for the table.
    • tableEnd

      public void tableEnd()
      Write the prologue of a table.
    • rowStart

      public void rowStart()
      Write the prologue of a table row.
    • rowEnd

      public void rowEnd()
      Write the prologue of a table row.
    • cellStart

      public void cellStart()
      Write the prologue of a table cell.
    • cellEnd

      public void cellEnd()
      Write the prologue of a table cell.
    • cellSeparator

      public void cellSeparator()
      Write the separator between 2 cells.
    • formatName

      public String formatName(String name)
      Format the specified property name if needed.
      Parameters:
      name - the name to format.
      Returns:
      the formatted name as a string.
    • print

      public void print(String message)
      Print the specified string.
      Parameters:
      message - the string to print.