public final class Background extends java.lang.Object implements StyleElement
Modifier and Type | Class and Description |
---|---|
static class |
Background.Attachment
The background-attachment property sets whether a background image is
fixed or scrolls with the rest of the page.
|
static class |
Background.Repeat
The background-repeat property sets if/how a background image will be
repeated.
|
Constructor and Description |
---|
Background()
Creates "background: initial";
|
Background(Background.Attachment attachment,
ColorType color,
java.lang.String image,
BackgroundPosition position,
Background.Repeat repeat)
Creates background with one or all parameters.
|
Background(ColorType color)
Creates background with color.
|
Background(java.lang.String image)
Creates background with image from url.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
draw()
All descendant have to implement how to draw it
|
Background.Attachment |
getAttachment() |
ColorType |
getColor() |
java.lang.String |
getImage() |
BackgroundPosition |
getPosition() |
Background.Repeat |
getRepeat() |
public Background()
public Background(ColorType color)
color
- of backgroundpublic Background(java.lang.String image)
image
- urlpublic Background(Background.Attachment attachment, ColorType color, java.lang.String image, BackgroundPosition position, Background.Repeat repeat)
attachment
- one of Background.Attachment
color
- of backgroundimage
- string urlposition
- one of BackgroundPosition
repeat
- one of Background.Repeat
public Background.Attachment getAttachment()
public ColorType getColor()
public java.lang.String getImage()
public BackgroundPosition getPosition()
public Background.Repeat getRepeat()
public java.lang.String draw()
StyleElement
draw
in interface StyleElement