java.lang.Object
org.jdrupes.mdoclet.internal.doclets.toolkit.Content
org.jdrupes.mdoclet.internal.doclets.formats.html.TableHeader

public class TableHeader extends Content
A row of header cells for an HTML table.

The header contains a list of cells, providing the column headers. The attribute scope=“col” is automatically added to each header cell. In addition, a series of style class names can be specified, to be applied one per cell.

  • Konstruktordetails

    • TableHeader

      public TableHeader(Contents contents, String... colHeaderKeys)
      Creates a header row, with localized content for each cell.

      Resources keys will be converted to content using Contents.getContent(String).

      Parameter:
      contents - a factory to get the content for each header cell.
      colHeaderKeys - the resource keys for the content in each cell.
    • TableHeader

      public TableHeader(Content... headerCellContents)
      Creates a header row, with specified content for each cell.
      Parameter:
      headerCellContents - a content object for each header cell
    • TableHeader

      public TableHeader(List<Content> headerCellContents)
      Creates a header row, with specified content for each cell.
      Parameter:
      headerCellContents - a content object for each header cell
  • Methodendetails

    • styles

      public TableHeader styles(HtmlStyle... styles)
      Set the style class names for each header cell.

      The number of names must match the number of cells given to the constructor.

      Parameter:
      styles - the style class names
      Gibt zurück:
      this object
    • sortable

      public TableHeader sortable(boolean... sortable)
      Makes the table sortable by the content of columns for which the argument boolean array contains true.
      Parameter:
      sortable - boolean array specifying sortable columns
      Gibt zurück:
      this object
    • styles

      public TableHeader styles(List<HtmlStyle> styles)
      Set the style class names for each header cell.

      The number of names must match the number of cells given to the constructor.

      Parameter:
      styles - the style class names
      Gibt zurück:
      this object
    • isEmpty

      public boolean isEmpty()
      Returns true if the content is empty.
      Angegeben von:
      isEmpty in Klasse Content
      Gibt zurück:
      false
    • write

      public boolean write(Writer out, String newline, boolean atNewline) throws IOException
      Beschreibung aus Klasse kopiert: Content
      Writes content to a writer, using a given newline sequence, which should be either \n or the platform line separator.
      Angegeben von:
      write in Klasse Content
      Parameter:
      out - the writer
      newline - the newline sequence to use
      atNewline - whether the writer has just written a newline
      Gibt zurück:
      whether the writer has just written a newline
      Löst aus:
      IOException - if an error occurs while writing the output