Overview | Package | Class | Use | Deprecated | Help
| GWT 2.7.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.gwt.dom.builder.shared
Class HtmlStylesBuilder

    java.lang.Object
      com.google.gwt.dom.builder.shared.HtmlStylesBuilder

All Implemented Interfaces:
  StylesBuilder

     class HtmlStylesBuilder

extends java.lang.Object
implements StylesBuilder

Builds the style object.

Constructor Summary
`HtmlStylesBuilder(HtmlBuilderImpl delegate)` Construct a new `HtmlStylesBuilder`.

Method Summary
`StylesBuilder` | `backgroundImage(SafeUri uri)` Sets the background-image CSS property.
`StylesBuilder` | `borderStyle(Style.BorderStyle value)` Sets the border-style CSS property.
`StylesBuilder` | `borderWidth(double value, Style.Unit unit)` Set the border-width css property.
`StylesBuilder` | `bottom(double value, Style.Unit unit)` Set the bottom css property.
`StylesBuilder` | `cursor(Style.Cursor value)` Sets the cursor CSS property.
`StylesBuilder` | `display(Style.Display value)` Sets the display CSS property.
`void` | `endStyle()` End the current style attribute.
`StylesBuilder` | `floatprop(Style.Float value)` Set the float css property.
`StylesBuilder` | `fontSize(double value, Style.Unit unit)` Set the font-size css property.
`StylesBuilder` | `fontStyle(Style.FontStyle value)` Sets the font-style CSS property.
`StylesBuilder` | `fontWeight(Style.FontWeight value)` Sets the font-weight CSS property.
`StylesBuilder` | `height(double value, Style.Unit unit)` Set the height css property.
`StylesBuilder` | `left(double value, Style.Unit unit)` Set the left css property.
`StylesBuilder` | `lineHeight(double value, Style.Unit unit)` Set the line-height css property.
`StylesBuilder` | `listStyleType(Style.ListStyleType value)` Sets the list-style-type CSS property.
`StylesBuilder` | `margin(double value, Style.Unit unit)` Set the margin css property.
`StylesBuilder` | `marginBottom(double value, Style.Unit unit)` Set the margin-bottom css property.
`StylesBuilder` | `marginLeft(double value, Style.Unit unit)` Set the margin-left css property.
`StylesBuilder` | `marginRight(double value, Style.Unit unit)` Set the margin-right css property.
`StylesBuilder` | `marginTop(double value, Style.Unit unit)` Set the margin-top css property.
`StylesBuilder` | `opacity(double value)` Set the opacity css property.
`StylesBuilder` | `outlineStyle(Style.OutlineStyle value)` Sets the outline-style CSS property.
`StylesBuilder` | `outlineWidth(double value, Style.Unit unit)` Set the outline-width css property.
`StylesBuilder` | `overflow(Style.Overflow value)` Sets the overflow CSS property.
`StylesBuilder` | `overflowX(Style.Overflow value)` Sets the overflow-x CSS property.
`StylesBuilder` | `overflowY(Style.Overflow value)` Sets the overflow-y CSS property.
`StylesBuilder` | `padding(double value, Style.Unit unit)` Set the padding css property.
`StylesBuilder` | `paddingBottom(double value, Style.Unit unit)` Set the padding-bottom css property.
`StylesBuilder` | `paddingLeft(double value, Style.Unit unit)` Set the padding-left css property.
`StylesBuilder` | `paddingRight(double value, Style.Unit unit)` Set the padding-right css property.
`StylesBuilder` | `paddingTop(double value, Style.Unit unit)` Set the padding-top css property.
`StylesBuilder` | `position(Style.Position value)` Sets the position CSS property.
`StylesBuilder` | `right(double value, Style.Unit unit)` Set the right css property.
`StylesBuilder` | `tableLayout(Style.TableLayout value)` Set the table-layout CSS property.
`StylesBuilder` | `textAlign(Style.TextAlign value)` Set the text-align CSS property.
`StylesBuilder` | `textDecoration(Style.TextDecoration value)` Set the text-decoration CSS property.
`StylesBuilder` | `textIndent(double value, Style.Unit unit)` Set the text-indent CSS property.
`StylesBuilder` | `textJustify(Style.TextJustify value)` Set the text-justify CSS3 property.
`StylesBuilder` | `textOverflow(Style.TextOverflow value)` Set the text-overflow CSS3 property.
`StylesBuilder` | `textTransform(Style.TextTransform value)` Set the text-transform CSS property.
`(package private) static java.lang.String` | `toHyphenatedForm(java.lang.String name)` Convert a camelCase or hyphenated string to a hyphenated string.
`StylesBuilder` | `top(double value, Style.Unit unit)` Set the top css property.
`StylesBuilder` | `trustedBackgroundColor(java.lang.String value)` Sets the "background-color" style property to the specified color string.
`StylesBuilder` | `trustedBackgroundImage(java.lang.String value)` Sets the "background-image" style property to the specified value.
`StylesBuilder` | `trustedBorderColor(java.lang.String value)` Sets the "border-color" style property to the specified color string.
`StylesBuilder` | `trustedColor(java.lang.String value)` Sets the "color" style property, which controls font color, to the specified color string.
`StylesBuilder` | `trustedOutlineColor(java.lang.String value)` Sets the "outline-color" style property to the specified color string.
`StylesBuilder` | `trustedProperty(java.lang.String name, double value, Style.Unit unit)` Set a style property from a trusted name and a trusted value, i.e., without escaping the name and value.
`StylesBuilder` | `trustedProperty(java.lang.String name, java.lang.String value)` Set a style property from a trusted name and a trusted value, i.e., without escaping the name and value.
`StylesBuilder` | `verticalAlign(double value, Style.Unit unit)` Sets the vertical-align CSS property.
`StylesBuilder` | `verticalAlign(Style.VerticalAlign value)` Sets the vertical-align CSS property.
`StylesBuilder` | `visibility(Style.Visibility value)` Sets the visibility CSS property.
`StylesBuilder` | `width(double value, Style.Unit unit)` Set the width css property.
`StylesBuilder` | `zIndex(int value)` Set the z-index css property.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### HtmlStylesBuilder

    HtmlStylesBuilder(HtmlBuilderImpl delegate)

  Construct a new `HtmlStylesBuilder`.

  Parameters:
    `delegate` - the delegate that builds the style

Method Detail

### toHyphenatedForm

    static java.lang.String toHyphenatedForm(java.lang.String name)

  Convert a camelCase or hyphenated string to a hyphenated string.

  Parameters:
    `name` - the camelCase or hyphenated string to convert
  Returns:
    the hyphenated string

### backgroundImage

    public StylesBuilder backgroundImage(SafeUri uri)

  Description copied from interface: `StylesBuilder`
  Sets the background-image CSS property.

  Specified by:
    `backgroundImage` in interface `StylesBuilder`
  Parameters:
    `uri` - the URI of the background image
  Returns:
    this `StylesBuilder`
  See Also:
    `StylesBuilder.trustedBackgroundImage(String)`

### borderStyle

    public StylesBuilder borderStyle(Style.BorderStyle value)

  Description copied from interface: `StylesBuilder`
  Sets the border-style CSS property.

  Specified by:
    `borderStyle` in interface `StylesBuilder`

### borderWidth

    public StylesBuilder borderWidth(double value,
                                     Style.Unit unit)

  Description copied from interface: `StylesBuilder`
  Set the border-width css property.

  Specified by:
    `borderWidth` in interface `StylesBuilder`

### bottom

    public StylesBuilder bottom(double value,
                                Style.Unit unit)

  Description copied from interface: `StylesBuilder`
  Set the bottom css property.

  Specified by:
    `bottom` in interface `StylesBuilder`

### cursor

    public StylesBuilder cursor(Style.Cursor value)

  Description copied from interface: `StylesBuilder`
  Sets the cursor CSS property.

  Specified by:
    `cursor` in interface `StylesBuilder`

### display

    public StylesBuilder display(Style.Display value)

  Description copied from interface: `StylesBuilder`
  Sets the display CSS property.

  Specified by:
    `display` in interface `StylesBuilder`

### endStyle

    public void endStyle()

  Description copied from interface: `StylesBuilder`
  End the current style attribute.

  Specified by:
    `endStyle` in interface `StylesBuilder`

### floatprop

    public StylesBuilder floatprop(Style.Float value)

  Description copied from interface: `StylesBuilder`
  Set the float css property.

  Specified by:
    `floatprop` in interface `StylesBuilder`

### fontSize

    public StylesBuilder fontSize(double value,
                                  Style.Unit unit)

  Description copied from interface: `StylesBuilder`
  Set the font-size css property.

  Specified by:
    `fontSize` in interface `StylesBuilder`

### fontStyle

    public StylesBuilder fontStyle(Style.FontStyle value)

  Description copied from interface: `StylesBuilder`
  Sets the font-style CSS property.

  Specified by:
    `fontStyle` in interface `StylesBuilder`

### fontWeight

    public StylesBuilder fontWeight(Style.FontWeight value)

  Description copied from interface: `StylesBuilder`
  Sets the font-weight CSS property.

  Specified by:
    `fontWeight` in interface `StylesBuilder`

### height

    public StylesBuilder height(double value,
                                Style.Unit unit)

  Description copied from interface: `StylesBuilder`
  Set the height css property.

  Specified by:
    `height` in interface `StylesBuilder`

### left

    public StylesBuilder left(double value,
                              Style.Unit unit)

  Description copied from interface: `StylesBuilder`
  Set the left css property.

  Specified by:
    `left` in interface `StylesBuilder`

### lineHeight

    public StylesBuilder lineHeight(double value,
                                    Style.Unit unit)

  Description copied from interface: `StylesBuilder`
  Set the line-height css property.

  Specified by:
    `lineHeight` in interface `StylesBuilder`

### listStyleType

    public StylesBuilder listStyleType(Style.ListStyleType value)

  Description copied from interface: `StylesBuilder`
  Sets the list-style-type CSS property.

  Specified by:
    `listStyleType` in interface `StylesBuilder`

### margin

    public StylesBuilder margin(double value,
                                Style.Unit unit)

  Description copied from interface: `StylesBuilder`
  Set the margin css property.

  Specified by:
    `margin` in interface `StylesBuilder`

### marginBottom

    public StylesBuilder marginBottom(double value,
                                      Style.Unit unit)

  Description copied from interface: `StylesBuilder`
  Set the margin-bottom css property.

  Specified by:
    `marginBottom` in interface `StylesBuilder`

### marginLeft

    public StylesBuilder marginLeft(double value,
                                    Style.Unit unit)

  Description copied from interface: `StylesBuilder`
  Set the margin-left css property.

  Specified by:
    `marginLeft` in interface `StylesBuilder`

### marginRight

    public StylesBuilder marginRight(double value,
                                     Style.Unit unit)

  Description copied from interface: `StylesBuilder`
  Set the margin-right css property.

  Specified by:
    `marginRight` in interface `StylesBuilder`

### marginTop

    public StylesBuilder marginTop(double value,
                                   Style.Unit unit)

  Description copied from interface: `StylesBuilder`
  Set the margin-top css property.

  Specified by:
    `marginTop` in interface `StylesBuilder`

### opacity

    public StylesBuilder opacity(double value)

  Description copied from interface: `StylesBuilder`
  Set the opacity css property.

  Specified by:
    `opacity` in interface `StylesBuilder`

### outlineStyle

    public StylesBuilder outlineStyle(Style.OutlineStyle value)

  Description copied from interface: `StylesBuilder`
  Sets the outline-style CSS property.

  Specified by:
    `outlineStyle` in interface `StylesBuilder`

### outlineWidth

    public StylesBuilder outlineWidth(double value,
                                      Style.Unit unit)

  Description copied from interface: `StylesBuilder`
  Set the outline-width css property.

  Specified by:
    `outlineWidth` in interface `StylesBuilder`

### overflow

    public StylesBuilder overflow(Style.Overflow value)

  Description copied from interface: `StylesBuilder`
  Sets the overflow CSS property.

  Specified by:
    `overflow` in interface `StylesBuilder`

### overflowX

    public StylesBuilder overflowX(Style.Overflow value)

  Description copied from interface: `StylesBuilder`
  Sets the overflow-x CSS property.

  Specified by:
    `overflowX` in interface `StylesBuilder`

### overflowY

    public StylesBuilder overflowY(Style.Overflow value)

  Description copied from interface: `StylesBuilder`
  Sets the overflow-y CSS property.

  Specified by:
    `overflowY` in interface `StylesBuilder`

### padding

    public StylesBuilder padding(double value,
                                 Style.Unit unit)

  Description copied from interface: `StylesBuilder`
  Set the padding css property.

  Specified by:
    `padding` in interface `StylesBuilder`

### paddingBottom

    public StylesBuilder paddingBottom(double value,
                                       Style.Unit unit)

  Description copied from interface: `StylesBuilder`
  Set the padding-bottom css property.

  Specified by:
    `paddingBottom` in interface `StylesBuilder`

### paddingLeft

    public StylesBuilder paddingLeft(double value,
                                     Style.Unit unit)

  Description copied from interface: `StylesBuilder`
  Set the padding-left css property.

  Specified by:
    `paddingLeft` in interface `StylesBuilder`

### paddingRight

    public StylesBuilder paddingRight(double value,
                                      Style.Unit unit)

  Description copied from interface: `StylesBuilder`
  Set the padding-right css property.

  Specified by:
    `paddingRight` in interface `StylesBuilder`

### paddingTop

    public StylesBuilder paddingTop(double value,
                                    Style.Unit unit)

  Description copied from interface: `StylesBuilder`
  Set the padding-top css property.

  Specified by:
    `paddingTop` in interface `StylesBuilder`

### position

    public StylesBuilder position(Style.Position value)

  Description copied from interface: `StylesBuilder`
  Sets the position CSS property.

  Specified by:
    `position` in interface `StylesBuilder`

### right

    public StylesBuilder right(double value,
                               Style.Unit unit)

  Description copied from interface: `StylesBuilder`
  Set the right css property.

  Specified by:
    `right` in interface `StylesBuilder`

### tableLayout

    public StylesBuilder tableLayout(Style.TableLayout value)

  Description copied from interface: `StylesBuilder`
  Set the table-layout CSS property.

  Specified by:
    `tableLayout` in interface `StylesBuilder`

### textAlign

    public StylesBuilder textAlign(Style.TextAlign value)

  Description copied from interface: `StylesBuilder`
  Set the text-align CSS property.

  Specified by:
    `textAlign` in interface `StylesBuilder`

### textDecoration

    public StylesBuilder textDecoration(Style.TextDecoration value)

  Description copied from interface: `StylesBuilder`
  Set the text-decoration CSS property.

  Specified by:
    `textDecoration` in interface `StylesBuilder`

### textIndent

    public StylesBuilder textIndent(double value,
                                    Style.Unit unit)

  Description copied from interface: `StylesBuilder`
  Set the text-indent CSS property.

  Specified by:
    `textIndent` in interface `StylesBuilder`

### textJustify

    public StylesBuilder textJustify(Style.TextJustify value)

  Description copied from interface: `StylesBuilder`
  Set the text-justify CSS3 property.

  Specified by:
    `textJustify` in interface `StylesBuilder`

### textOverflow

    public StylesBuilder textOverflow(Style.TextOverflow value)

  Description copied from interface: `StylesBuilder`
  Set the text-overflow CSS3 property.

  Specified by:
    `textOverflow` in interface `StylesBuilder`

### textTransform

    public StylesBuilder textTransform(Style.TextTransform value)

  Description copied from interface: `StylesBuilder`
  Set the text-transform CSS property.

  Specified by:
    `textTransform` in interface `StylesBuilder`

### top

    public StylesBuilder top(double value,
                             Style.Unit unit)

  Description copied from interface: `StylesBuilder`
  Set the top css property.

  Specified by:
    `top` in interface `StylesBuilder`

### trustedBackgroundColor

    public StylesBuilder trustedBackgroundColor(java.lang.String value)

  Description copied from interface: `StylesBuilder`

  Sets the "background-color" style property to the specified color string. Does not check or escape the color string. The calling code should be carefully reviewed to ensure that the provided color string won't cause a security issue if included in a style attribute.

  For details and constraints, see `SafeStyles`.

  Specified by:
    `trustedBackgroundColor` in interface `StylesBuilder`
  Returns:
    this `StylesBuilder`

### trustedBackgroundImage

    public StylesBuilder trustedBackgroundImage(java.lang.String value)

  Description copied from interface: `StylesBuilder`

  Sets the "background-image" style property to the specified value. Does not check or escape the value. The calling code should be carefully reviewed to ensure that the provided value string won't cause a security issue if included in a style attribute.

  For details and constraints, see `SafeStyles`.

  Specified by:
    `trustedBackgroundImage` in interface `StylesBuilder`
  Returns:
    this `StylesBuilder`

### trustedBorderColor

    public StylesBuilder trustedBorderColor(java.lang.String value)

  Description copied from interface: `StylesBuilder`

  Sets the "border-color" style property to the specified color string. Does not check or escape the color string. The calling code should be carefully reviewed to ensure that the provided color string won't cause a security issue if included in a style attribute.

  For details and constraints, see `SafeStyles`.

  Specified by:
    `trustedBorderColor` in interface `StylesBuilder`
  Returns:
    this `StylesBuilder`

### trustedColor

    public StylesBuilder trustedColor(java.lang.String value)

  Description copied from interface: `StylesBuilder`

  Sets the "color" style property, which controls font color, to the specified color string. Does not check or escape the color string. The calling code should be carefully reviewed to ensure that the provided color string won't cause a security issue if included in a style attribute.

  For details and constraints, see `SafeStyles`.

  Specified by:
    `trustedColor` in interface `StylesBuilder`
  Returns:
    this `StylesBuilder`

### trustedOutlineColor

    public StylesBuilder trustedOutlineColor(java.lang.String value)

  Description copied from interface: `StylesBuilder`

  Sets the "outline-color" style property to the specified color string. Does not check or escape the color string. The calling code should be carefully reviewed to ensure that the provided color string won't cause a security issue if included in a style attribute.

  For details and constraints, see `SafeStyles`.

  Specified by:
    `trustedOutlineColor` in interface `StylesBuilder`
  Returns:
    this `StylesBuilder`

### trustedProperty

    public StylesBuilder trustedProperty(java.lang.String name,
                                         double value,
                                         Style.Unit unit)

  Description copied from interface: `StylesBuilder`

  Set a style property from a trusted name and a trusted value, i.e., without escaping the name and value. No checks are performed. The calling code should be carefully reviewed to ensure the argument will satisfy the `SafeStyles` contract when they are composed into the form: "<name>:<value>;".

  SafeStyles may never contain literal angle brackets. Otherwise, it could be unsafe to place a SafeStyles into a <style> tag (where it can't be HTML escaped). For example, if the SafeStyles containing " `font: 'foo <style><script>evil</script>`'" is used in a style sheet in a <style> tag, this could then break out of the style context into HTML.

  Specified by:
    `trustedProperty` in interface `StylesBuilder`
    `unit` - the units of the value
  Returns:
    this `StylesBuilder`

### trustedProperty

    public StylesBuilder trustedProperty(java.lang.String name,
                                         java.lang.String value)

  Description copied from interface: `StylesBuilder`

  Set a style property from a trusted name and a trusted value, i.e., without escaping the name and value. No checks are performed. The calling code should be carefully reviewed to ensure the argument will satisfy the `SafeStyles` contract when they are composed into the form: "<name>:<value>;".

  SafeStyles may never contain literal angle brackets. Otherwise, it could be unsafe to place a SafeStyles into a <style> tag (where it can't be HTML escaped). For example, if the SafeStyles containing " `font: 'foo <style><script>evil</script>`'" is used in a style sheet in a <style> tag, this could then break out of the style context into HTML.

  Specified by:
    `trustedProperty` in interface `StylesBuilder`
  Returns:
    this `StylesBuilder`

### verticalAlign

    public StylesBuilder verticalAlign(double value,
                                       Style.Unit unit)

  Description copied from interface: `StylesBuilder`
  Sets the vertical-align CSS property.

  Specified by:
    `verticalAlign` in interface `StylesBuilder`

### verticalAlign

    public StylesBuilder verticalAlign(Style.VerticalAlign value)

  Description copied from interface: `StylesBuilder`
  Sets the vertical-align CSS property.

  Specified by:
    `verticalAlign` in interface `StylesBuilder`

### visibility

    public StylesBuilder visibility(Style.Visibility value)

  Description copied from interface: `StylesBuilder`
  Sets the visibility CSS property.

  Specified by:
    `visibility` in interface `StylesBuilder`

### width

    public StylesBuilder width(double value,
                               Style.Unit unit)

  Description copied from interface: `StylesBuilder`
  Set the width css property.

  Specified by:
    `width` in interface `StylesBuilder`

### zIndex

    public StylesBuilder zIndex(int value)

  Description copied from interface: `StylesBuilder`
  Set the z-index css property.

  Specified by:
    `zIndex` in interface `StylesBuilder`

Overview | Package | Class | Use | Deprecated | Help
| GWT 2.7.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD