Interface ExportCell
- All Known Subinterfaces:
ExcelCell,PrintableCell
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 TypeMethodDescriptionvoidSet a date as the cell value.voidsetDatetime(Date date) Set a date and time as the cell value.voidsetDuration(Long duration) Set a duration as the cell value.voidsetHyperlink(String text, String url) Set a hyperlink as the cell value.voidSet a number as the cell value.voidsetPercentage(Double percentage) Set a percentage as the cell value.voidSet a simple text string as the cell value.
-
Method Details
-
setText
Set a simple text string as the cell value.- Parameters:
text- The text.
-
setNumber
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
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
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
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
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
Set a hyperlink as the cell value.- Parameters:
text- The text of the hyperlink. Ifnull, the URL is used as the text.url- The target URL of the hyperlink. Ifnull, the cell is cleared.
-