Package de.xima.fc.css.builder
Class CssDeclarationListBuilder
java.lang.Object
de.xima.fc.css.builder.CssDeclarationListBuilder
Simple builder for creating a CSS
declaration list string (e.g. a list of styles such as
color: red; background: green;
- For lengths,you can use strings or numbers (uses the default unit
ECssUnit.PIXELS
. Strings can also be created viaECssUnit.amount(double)
orCssBuilder.pixels(double)
etc. - For times,you can use strings or numbers (uses the default unit
ECssUnit.MILLISECONDS
. Strings can also be created viaECssUnit.amount(double)
orCssBuilder.milliseconds(double)
etc. - For colors,you can use strings,
ENamedCssColor
, orCssColor
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptionalignItems
(Object... alignItems) align-items: safe center
backgroundRepeat
(Object... repeatModes) background-repeat: repeat space;
backgroundSize
(Object... sizes) background-size: 6px, auto, contain;
bottom: 50%;
box-sizing: "border-box";
build()
color: #fff;
cursor: pointer
declaration
(String name, String value) Adds a generic declaration with a property name and a property value.display: inline block
fontFamily
(Object... fontFamilies) font-family: "Arial";
font-size: 1.5em;
width: 50vw;
justifyContent
(Object... justifyContent) justify-content: unsafe center
left: 50%;
lineHeight
(Object value) line-height: 4mm)
overflow: auto hidden
pointerEvents
(Object pointerEvents) pointer-events: none
position: absolute
right: 50%;
text-align: left;
top: 50%;
toString()
transform: translateX(20px) scale(1.5)
transformOrigin
(Object... origins) transform-origin: bottom left;
width(50em)
-
Method Details
-
alignItems
align-items: safe center
- Parameters:
alignItems
- Alignment values.- Returns:
- This builder instance for chaining method calls.
- See Also:
-
backgroundRepeat
background-repeat: repeat space;
- Parameters:
repeatModes
- Background sizes to set.- Returns:
- This builder instance for chaining method calls.
- See Also:
-
backgroundSize
background-size: 6px, auto, contain;
- Parameters:
sizes
- Background sizes to set.- Returns:
- This builder instance for chaining method calls.
-
bottom
bottom: 50%;
- Parameters:
value
- Right position .- Returns:
- This builder instance for chaining method calls.
-
boxSizing
box-sizing: "border-box";
- Parameters:
sizing
- Box sizing to use.- Returns:
- This builder instance for chaining method calls.
- See Also:
-
build
- Returns:
- The string representing the CSS declaration list.
-
color
color: #fff;
- Parameters:
color
- Font color to use.- Returns:
- This builder instance for chaining method calls.
- See Also:
-
cursor
cursor: pointer
- Parameters:
cursors
- Cursor value.- Returns:
- This builder instance for chaining method calls.
- See Also:
-
declaration
Adds a generic declaration with a property name and a property value.- Parameters:
name
- Name of the property.value
- Name of the property.- Returns:
- This builder instance for chaining method calls.
-
display
display: inline block
- Parameters:
displays
- Display values.- Returns:
- This builder instance for chaining method calls.
- See Also:
-
fontFamily
font-family: "Arial";
- Parameters:
fontFamilies
- Font families to use.- Returns:
- This builder instance for chaining method calls.
-
fontSize
font-size: 1.5em;
- Parameters:
value
- Font size.- Returns:
- This builder instance for chaining method calls.
-
height
width: 50vw;
- Parameters:
value
- Width value.- Returns:
- This builder instance for chaining method calls.
-
justifyContent
justify-content: unsafe center
- Parameters:
justifyContent
- Justify values.- Returns:
- This builder instance for chaining method calls.
- See Also:
-
left
left: 50%;
- Parameters:
value
- Left position .- Returns:
- This builder instance for chaining method calls.
-
lineHeight
line-height: 4mm)
- Parameters:
value
- Line height value.- Returns:
- This builder instance for chaining method calls.
-
overflow
overflow: auto hidden
- Parameters:
overflows
- Overflow values.- Returns:
- This builder instance for chaining method calls.
- See Also:
-
pointerEvents
pointer-events: none
- Parameters:
pointerEvents
- Pointer events value.- Returns:
- This builder instance for chaining method calls.
- See Also:
-
position
position: absolute
- Parameters:
position
- Position value.- Returns:
- This builder instance for chaining method calls.
- See Also:
-
right
right: 50%;
- Parameters:
value
- Right position .- Returns:
- This builder instance for chaining method calls.
-
textAlign
text-align: left;
- Parameters:
alignment
- Alignment for the text.- Returns:
- This builder instance for chaining method calls.
- See Also:
-
top
top: 50%;
- Parameters:
value
- Top position.- Returns:
- This builder instance for chaining method calls.
-
toString
-
transform
transform: translateX(20px) scale(1.5)
- Parameters:
transforms
- A list of CSS tranforms to apply. transform strings.- Returns:
- This builder instance for chaining method calls.
- See Also:
-
transformOrigin
transform-origin: bottom left;
- Parameters:
origins
- A list of origin specifications.- Returns:
- This builder instance for chaining method calls.
- See Also:
-
width
width(50em)
- Parameters:
value
- Width value.- Returns:
- This builder instance for chaining method calls.
-