Enum Class Theme

java.lang.Object
java.lang.Enum<Theme>
pro.verron.asciidoc.converters.svg.Theme
All Implemented Interfaces:
Serializable, Comparable<Theme>, Constable

public enum Theme extends Enum<Theme>
Editor theme used by the SVG converter to simulate different word-processor interfaces (Word, Google Docs, LibreOffice).
  • Enum Constant Details

    • NONE

      public static final Theme NONE
      No editor chrome; renders only the document content.
    • WORD

      public static final Theme WORD
      Microsoft Word-style chrome.
    • GDOCS

      public static final Theme GDOCS
      Google Docs-style chrome.
    • LIBRE

      public static final Theme LIBRE
      LibreOffice Writer-style chrome.
  • Method Details

    • values

      public static Theme[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Theme valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getStrokeColor

      public Optional<String> getStrokeColor()
      Returns the stroke color used for comment connectors and element outlines.
      Returns:
      the stroke color, or empty if the theme has none
    • getHighlightColor

      public Optional<String> getHighlightColor()
      Returns the background highlight color for commented blocks.
      Returns:
      the highlight color, or empty if the theme has none
    • getBgColor

      public Optional<String> getBgColor()
      Returns the overall background color of the simulated editor.
      Returns:
      the background color, or empty if the theme has none
    • getFontFamily

      public Optional<String> getFontFamily()
      Returns the SVG font-family string for a given theme.
      Returns:
      font-family string
    • renderBanner

      public Collection<? extends SvgElement> renderBanner(String title, double bannerHeight)
      Renders the editor banner (toolbar and menu bar) as a collection of SVG elements.
      Parameters:
      title - document title displayed in the banner
      bannerHeight - total height of the banner area in pixels
      Returns:
      SVG elements that compose the banner