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 ICSSPropertygetClone(ECSSVendorPrefix eVendorPrefix)Get a clone of this property with the same base property but a different vendor prefix.ICSSPropertygetClone(ECSSProperty eProp)Get a clone of this property with another (or the same) base property.ICSSPropertyCustomizergetCustomizer()intgetMaximumArgumentCount()intgetMinimumArgumentCount()ECSSPropertygetProp()StringgetPropertyName()ECSSVendorPrefixgetVendorPrefix()booleanisValidValue(String sValue)Check if the passed value is valid for this property according to the defined rule.default ICSSValuenewImportantValue(ICSSNamedColor aColor)Create a new important CSS value with this property and the specified named color.default ICSSValuenewImportantValue(String sValue)Create a new important CSS value with this property and the specified value.default ICSSValuenewValue(ICSSNamedColor aColor)Create a new CSS value with this property and the specified named color.default ICSSValuenewValue(ICSSNamedColor aColor, boolean bImportant)Create a new CSS value with this property and the specified named color.default ICSSValuenewValue(String sValue)Create a new CSS value with this property and the specified value.ICSSValuenewValue(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
nullnor 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:
trueif the value is valid,falseotherwise
-
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 benullnor empty.bImportant-trueif it is an important value,falseif 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 benullnor 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 benullnor 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-trueif it is an important value,falseif 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
-
-