Interface ExportCell

All Known Subinterfaces:
ExcelCell, PrintableCell

@PublicApi public interface ExportCell

ExportCell represents a single cell in the underlying table-like medium (e.g. an Excel sheet or an HTML table) that a structure can be exported into. Structure creates a new cell for each column and each issue in the exported structure (or part of a structure), and passes an ExportCell instance to the ExportRenderer responsible for the column for rendering the cell. Please note that the same ExportCell instances may be reused in many calls to export renderers in order to put less stress on the garbage collector.

An ExportCell has a bunch of methods to put different types of values into the cell. The actual representation of a particular value type may depend on the underlying medium, the user's locale, and other settings. If not specified otherwise, passing a null value to any of the value-setting methods clears the cell. Media-specific sub-interfaces may add methods for setting other types of values and configuring the cell.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setDate(Date date)
    Set a date as the cell value.
    void
    Set a date and time as the cell value.
    void
    setDuration(Long duration)
    Set a duration as the cell value.
    void
    Set a hyperlink as the cell value.
    void
    setNumber(Number number)
    Set a number as the cell value.
    void
    setPercentage(Double percentage)
    Set a percentage as the cell value.
    void
    Set a simple text string as the cell value.
  • Method Details

    • setText

      void setText(@Nullable String text)
      Set a simple text string as the cell value.
      Parameters:
      text - The text.
    • setNumber

      void setNumber(@Nullable Number number)
      Set a number as the cell value. The number may be formatted according to the user's locale and other settings.
      Parameters:
      number - The number.
    • setPercentage

      void setPercentage(@Nullable Double percentage)
      Set a percentage as the cell value. The percentage may be represented as text or graphically, depending on the medium and other settings. This is the method used by Structure's Progress and Formula columns.
      Parameters:
      percentage - The percentage, 1.0 is interpreted as 100%.
    • setDate

      void setDate(@Nullable Date date)
      Set a date as the cell value. The date may be formatted according to the user's locale and other settings.
      Parameters:
      date - The date.
    • setDatetime

      void setDatetime(@Nullable Date date)
      Set a date and time as the cell value. The value may be formatted according to the user's locale and other settings.
      Parameters:
      date - The date and time.
    • setDuration

      void setDuration(@Nullable Long duration)
      Set a duration as the cell value. The duration may be converted into a human-readable form according to the user's locale and other settings. Examples of duration representations are "2h 30m", "2 hours, 30 minutes", or "2:30".
      Parameters:
      duration - The duration, in seconds.
    • setHyperlink

      void setHyperlink(@Nullable String text, @Nullable String url)
      Set a hyperlink as the cell value.
      Parameters:
      text - The text of the hyperlink. If null, the URL is used as the text.
      url - The target URL of the hyperlink. If null, the cell is cleared.