Class AttributeToStyle

java.lang.Object
io.sf.carte.doc.style.css.property.AttributeToStyle

public final class AttributeToStyle extends Object
Transforms legacy HTML attributes into style declarations.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    align(String attribute, CSSStyleDeclaration style)
    Set a style according to the align attribute of table elements interpreted as a presentational hint.
    static void
    Set a style according to the background attribute of table elements interpreted as a presentational hint.
    static void
    bgcolor(String bgcolorAttr, CSSStyleDeclaration style)
    Set a style according to the bgcolor attribute of table elements interpreted as a presentational hint.
    static boolean
    border(String attribute, CSSStyleDeclaration style)
    Set a style according to the border attribute of table elements interpreted as a presentational hint.
    static void
    Set a style according to the bordercolor attribute of table elements interpreted as a presentational hint.
    static void
    Set a style according to the cell-spacing attribute of table elements interpreted as a presentational hint.
    static void
    color(String attribute, CSSStyleDeclaration style)
    Set a style according to the color attribute of FONT elements interpreted as a presentational hint.
    static void
    face(String attribute, CSSStyleDeclaration style)
    Set a style according to the size attribute of FONT elements interpreted as a presentational hint.
    static void
    height(String heightAttr, CSSStyleDeclaration style)
    Set a style according to the height attribute of legacy HTML 4.01 elements interpreted as a presentational hint.
    static void
    hspace(String attribute, CSSStyleDeclaration style)
    Set a style according to the hspace attribute of the IMG element interpreted as a presentational hint.
    static void
    size(String attribute, CSSStyleDeclaration style)
    Set a style according to the size attribute of FONT elements interpreted as a presentational hint.
    static void
    vspace(String attribute, CSSStyleDeclaration style)
    Set a style according to the vspace attribute of the IMG element interpreted as a presentational hint.
    static void
    width(String widthAttr, CSSStyleDeclaration style)
    Set a style according to the height attribute of legacy HTML 4.01 elements interpreted as a presentational hint.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AttributeToStyle

      public AttributeToStyle()
  • Method Details

    • align

      public static void align(String attribute, CSSStyleDeclaration style)
      Set a style according to the align attribute of table elements interpreted as a presentational hint.
      Parameters:
      attribute - the attribute value.
      style - the style to set.
    • bgcolor

      public static void bgcolor(String bgcolorAttr, CSSStyleDeclaration style)
      Set a style according to the bgcolor attribute of table elements interpreted as a presentational hint.
      Parameters:
      bgcolorAttr - the attribute value.
      style - the style to set.
    • width

      public static void width(String widthAttr, CSSStyleDeclaration style)
      Set a style according to the height attribute of legacy HTML 4.01 elements interpreted as a presentational hint.
      Parameters:
      widthAttr - the attribute value.
      style - the style to set.
    • height

      public static void height(String heightAttr, CSSStyleDeclaration style)
      Set a style according to the height attribute of legacy HTML 4.01 elements interpreted as a presentational hint.
      Parameters:
      heightAttr - the attribute value.
      style - the style to set.
    • face

      public static void face(String attribute, CSSStyleDeclaration style)
      Set a style according to the size attribute of FONT elements interpreted as a presentational hint.
      Parameters:
      attribute - the attribute value.
      style - the style to set.
    • size

      public static void size(String attribute, CSSStyleDeclaration style)
      Set a style according to the size attribute of FONT elements interpreted as a presentational hint.
      Parameters:
      attribute - the attribute value.
      style - the style to set.
    • color

      public static void color(String attribute, CSSStyleDeclaration style)
      Set a style according to the color attribute of FONT elements interpreted as a presentational hint.
      Parameters:
      attribute - the attribute value.
      style - the style to set.
    • border

      public static boolean border(String attribute, CSSStyleDeclaration style)
      Set a style according to the border attribute of table elements interpreted as a presentational hint.
      Parameters:
      attribute - the attribute value.
      style - the style to set.
    • borderColor

      public static void borderColor(String attribute, CSSStyleDeclaration style)
      Set a style according to the bordercolor attribute of table elements interpreted as a presentational hint.
      Parameters:
      attribute - the attribute value.
      style - the style to set.
    • cellSpacing

      public static void cellSpacing(String attribute, CSSStyleDeclaration style)
      Set a style according to the cell-spacing attribute of table elements interpreted as a presentational hint.
      Parameters:
      attribute - the attribute value.
      style - the style to set.
    • background

      public static void background(String attribute, CSSStyleDeclaration style)
      Set a style according to the background attribute of table elements interpreted as a presentational hint.
      Parameters:
      attribute - the attribute value.
      style - the style to set.
    • hspace

      public static void hspace(String attribute, CSSStyleDeclaration style)
      Set a style according to the hspace attribute of the IMG element interpreted as a presentational hint.
      Parameters:
      attribute - the attribute value.
      style - the style to set.
    • vspace

      public static void vspace(String attribute, CSSStyleDeclaration style)
      Set a style according to the vspace attribute of the IMG element interpreted as a presentational hint.
      Parameters:
      attribute - the attribute value.
      style - the style to set.