Package com.helger.css.property
Interface ICSSProperty
-
- All Superinterfaces:
ICSSVersionAware
- All Known Implementing Classes:
AbstractCSSProperty
,AbstractCSSPropertyEnums
,CSSPropertyColor
,CSSPropertyColors
,CSSPropertyDouble
,CSSPropertyEnum
,CSSPropertyEnumOrColor
,CSSPropertyEnumOrColors
,CSSPropertyEnumOrInt
,CSSPropertyEnumOrNumber
,CSSPropertyEnumOrNumbers
,CSSPropertyEnumOrRect
,CSSPropertyEnumOrURL
,CSSPropertyEnums
,CSSPropertyFree
,CSSPropertyLong
,CSSPropertyNumber
,CSSPropertyNumbers
,CSSPropertyURL
public interface ICSSProperty extends ICSSVersionAware
Base interface for a single CSS property.- Author:
- Philip Helger
- See Also:
CCSSProperties for a list of default CSS properties
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ICSSProperty
getClone(ECSSVendorPrefix eVendorPrefix)
Get a clone of this property with the same base property but a different vendor prefix.ICSSProperty
getClone(ECSSProperty eProp)
Get a clone of this property with another (or the same) base property.ICSSPropertyCustomizer
getCustomizer()
int
getMaximumArgumentCount()
int
getMinimumArgumentCount()
ECSSProperty
getProp()
String
getPropertyName()
ECSSVendorPrefix
getVendorPrefix()
boolean
isValidValue(String sValue)
Check if the passed value is valid for this property according to the defined rule.default ICSSValue
newImportantValue(ICSSNamedColor aColor)
Create a new important CSS value with this property and the specified named color.default ICSSValue
newImportantValue(String sValue)
Create a new important CSS value with this property and the specified value.default ICSSValue
newValue(ICSSNamedColor aColor)
Create a new CSS value with this property and the specified named color.default ICSSValue
newValue(ICSSNamedColor aColor, boolean bImportant)
Create a new CSS value with this property and the specified named color.default ICSSValue
newValue(String sValue)
Create a new CSS value with this property and the specified value.ICSSValue
newValue(String sValue, boolean bImportant)
Create a new CSS value with this property and the specified value.-
Methods inherited from interface com.helger.css.ICSSVersionAware
getMinimumCSSVersion
-
-
-
-
Method Detail
-
getProp
@Nonnull ECSSProperty getProp()
- Returns:
- The underlying base property. Never
null
.
-
getVendorPrefix
@Nullable ECSSVendorPrefix getVendorPrefix()
- Returns:
- The vendor prefix to be used. May be
null
. - Since:
- 3.9.0
-
getPropertyName
@Nonnull @Nonempty String getPropertyName()
- Returns:
- The property name including an eventually contained vendor prefix.
Neither
null
nor empty. - Since:
- 3.9.0
-
getCustomizer
@Nullable ICSSPropertyCustomizer getCustomizer()
- Returns:
- The CSS customizer assigned to this property. May be
null
.
-
getMinimumArgumentCount
@Nonnegative int getMinimumArgumentCount()
- Returns:
- The minimum number of arguments for this property.
- Since:
- 3.7.4
-
getMaximumArgumentCount
@Nonnegative int getMaximumArgumentCount()
- Returns:
- The maximum number of arguments for this property.
- Since:
- 3.7.4
-
isValidValue
boolean isValidValue(@Nullable String sValue)
Check if the passed value is valid for this property according to the defined rule.- Parameters:
sValue
- The value to check. May benull
.- Returns:
true
if the value is valid,false
otherwise
-
newValue
@Nonnull ICSSValue newValue(@Nonnull @Nonempty String sValue, boolean bImportant)
Create a new CSS value with this property and the specified value.- Parameters:
sValue
- The CSS String value. May neither benull
nor empty.bImportant
-true
if it is an important value,false
if not- Returns:
- Never
null
.
-
newValue
@Nonnull default ICSSValue newValue(@Nonnull @Nonempty String sValue)
Create a new CSS value with this property and the specified value. This is a shortcut fornewValue (sValue, false)
.- Parameters:
sValue
- The CSS String value. May neither benull
nor empty.- Returns:
- Never
null
.
-
newImportantValue
@Nonnull default ICSSValue newImportantValue(@Nonnull @Nonempty String sValue)
Create a new important CSS value with this property and the specified value. This is a shortcut fornewValue (sValue, true)
.- Parameters:
sValue
- The CSS String value. May neither benull
nor empty.- Returns:
- Never
null
.
-
newValue
@Nonnull default ICSSValue newValue(@Nonnull ICSSNamedColor aColor, boolean bImportant)
Create a new CSS value with this property and the specified named color.- Parameters:
aColor
- The CSS color valuebImportant
-true
if it is an important value,false
if not- Returns:
- Never
null
.
-
newValue
@Nonnull default ICSSValue newValue(@Nonnull ICSSNamedColor aColor)
Create a new CSS value with this property and the specified named color. This is a shortcut fornewValue (aColor, false)
.- Parameters:
aColor
- The CSS color value- Returns:
- Never
null
.
-
newImportantValue
@Nonnull default ICSSValue newImportantValue(@Nonnull ICSSNamedColor aColor)
Create a new important CSS value with this property and the specified named color. This is a shortcut fornewValue (aColor, true)
.- Parameters:
aColor
- The CSS color value- Returns:
- Never
null
.
-
getClone
@Nonnull ICSSProperty getClone(@Nonnull ECSSProperty eProp)
Get a clone of this property with another (or the same) base property.- Parameters:
eProp
- The base property to use. May not benull
.- Returns:
- Never
null
-
getClone
@Nonnull ICSSProperty getClone(@Nullable ECSSVendorPrefix eVendorPrefix)
Get a clone of this property with the same base property but a different vendor prefix.- Parameters:
eVendorPrefix
- The new vendor prefix to use. May benull
.- Returns:
- Never
null
- Since:
- 3.9.0
-
-