Package com.helger.html.hc.html
Interface IHCHasCSSStyles<IMPLTYPE extends IHCHasCSSStyles<IMPLTYPE>>
-
- Type Parameters:
IMPLTYPE- Implementation type
- All Superinterfaces:
com.helger.commons.traits.IGenericImplTrait<IMPLTYPE>
- All Known Subinterfaces:
IHCA<IMPLTYPE>,IHCArea<IMPLTYPE>,IHCButton<IMPLTYPE>,IHCCanvas<IMPLTYPE>,IHCCell<IMPLTYPE>,IHCCol<IMPLTYPE>,IHCControl<IMPLTYPE>,IHCDefinitionItem<IMPLTYPE>,IHCDiv<IMPLTYPE>,IHCElement<IMPLTYPE>,IHCElementWithChildren<IMPLTYPE>,IHCElementWithInternalChildren<IMPLTYPE,CHILDTYPE>,IHCFooter<IMPLTYPE>,IHCForm<IMPLTYPE>,IHCIFrame<IMPLTYPE>,IHCImg<IMPLTYPE>,IHCInput<IMPLTYPE>,IHCLabel<IMPLTYPE>,IHCLI<IMPLTYPE>,IHCList<IMPLTYPE,ITEMTYPE>,IHCMediaElement<IMPLTYPE>,IHCMediaElementChild<IMPLTYPE>,IHCMeter<IMPLTYPE>,IHCNav<IMPLTYPE>,IHCObject<IMPLTYPE>,IHCOL<IMPLTYPE>,IHCOLBase<IMPLTYPE,ITEMTYPE>,IHCPre<IMPLTYPE>,IHCProgress<IMPLTYPE>,IHCRubyChild<IMPLTYPE>,IHCScript<IMPLTYPE>,IHCScriptInline<IMPLTYPE>,IHCSelect<IMPLTYPE>,IHCSpan<IMPLTYPE>,IHCTable<IMPLTYPE>,IHCTablePart<IMPLTYPE>,IHCTextArea<IMPLTYPE>,IHCUL<IMPLTYPE>,IHCULBase<IMPLTYPE,ITEMTYPE>
- All Known Implementing Classes:
AbstractHCA,AbstractHCArea,AbstractHCBaseTable,AbstractHCBlockQuote,AbstractHCButton,AbstractHCCanvas,AbstractHCCell,AbstractHCCheckBox,AbstractHCCol,AbstractHCControl,AbstractHCDefinitionItem,AbstractHCDiv,AbstractHCElement,AbstractHCElementWithChildren,AbstractHCElementWithInternalChildren,AbstractHCFooter,AbstractHCForm,AbstractHCH1,AbstractHCH2,AbstractHCH3,AbstractHCH4,AbstractHCH5,AbstractHCH6,AbstractHCIFrame,AbstractHCImg,AbstractHCInput,AbstractHCLabel,AbstractHCLI,AbstractHCList,AbstractHCListLI,AbstractHCMediaElement,AbstractHCMediaElementChild,AbstractHCMeter,AbstractHCNav,AbstractHCObject,AbstractHCOL,AbstractHCOLBase,AbstractHCPre,AbstractHCProgress,AbstractHCRadioButton,AbstractHCRubyChild,AbstractHCScript,AbstractHCScriptInline,AbstractHCSelect,AbstractHCSpan,AbstractHCTable,AbstractHCTablePart,AbstractHCTextArea,AbstractHCUL,AbstractHCULBase,HCA,HCA_JS,HCA_MailTo,HCAbbr,HCAddress,HCArea,HCArticle,HCAside,HCAudio,HCB,HCBase,HCBDI,HCBDO,HCBlockQuote,HCBody,HCBR,HCButton,HCButton_Reset,HCButton_Submit,HCCanvas,HCCaption,HCCenter,HCCheckBox,HCCite,HCCode,HCCol,HCColGroup,HCCommand,HCData,HCDataList,HCDD,HCDel,HCDetails,HCDFN,HCDialog,HCDir,HCDiv,HCDL,HCDT,HCEdit,HCEditFile,HCEditPassword,HCEM,HCEmbed,HCFieldSet,HCFigCaption,HCFigure,HCFont,HCFooter,HCForm,HCFrame,HCFrameset,HCGenericElement,HCGenericElementWithChildren,HCH1,HCH2,HCH3,HCH4,HCH5,HCH6,HCHasCSSStyles,HCHead,HCHeader,HCHGroup,HCHiddenField,HCHR,HCHtml,HCI,HCIFrame,HCImg,HCInput,HCIns,HCKBD,HCLabel,HCLegend,HCLI,HCLink,HCLinkButton,HCMain,HCMap,HCMark,HCMenu,HCMenuItem,HCMeta,HCMeter,HCNav,HCNoBR,HCNoScript,HCObject,HCOL,HCOptGroup,HCOption,HCOutput,HCP,HCParam,HCPicture,HCPre,HCProgress,HCQ,HCRadioButton,HCRow,HCRP,HCRT,HCRuby,HCS,HCSamp,HCScriptFile,HCScriptInline,HCScriptInlineOnDocumentReady,HCSection,HCSelect,HCSlot,HCSmall,HCSource,HCSpan,HCStrong,HCStyle,HCSub,HCSummary,HCSup,HCTable,HCTBody,HCTD,HCTextArea,HCTFoot,HCTH,HCTHead,HCTime,HCTitle,HCTrack,HCU,HCUL,HCVar,HCVideo,HCWBR
public interface IHCHasCSSStyles<IMPLTYPE extends IHCHasCSSStyles<IMPLTYPE>> extends com.helger.commons.traits.IGenericImplTrait<IMPLTYPE>Base interface for objects having CSS styles- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default IMPLTYPEaddStyle(com.helger.css.property.ECSSProperty eProperty, String sPropertyValue)Add an element specific style (that is not consistency checked).IMPLTYPEaddStyle(com.helger.css.propertyvalue.ICSSValue aValue)Add an element specific style.default IMPLTYPEaddStyles(com.helger.css.propertyvalue.ICSSValue aValue)Deprecated.default IMPLTYPEaddStyles(com.helger.css.propertyvalue.ICSSValue... aValues)Add element specific styles.default IMPLTYPEaddStyles(Iterable<? extends com.helger.css.propertyvalue.ICSSValue> aValues)Add element specific styles.booleancontainsStyle(com.helger.css.property.ECSSProperty eProperty)Check if a style value is associated to a single property.com.helger.commons.collection.impl.ICommonsOrderedMap<com.helger.css.property.ECSSProperty,com.helger.css.propertyvalue.ICSSValue>getAllStyles()StringgetAllStylesAsString(com.helger.css.ICSSWriterSettings aCSSSettings)The value to be set to the HTML style attributecom.helger.commons.collection.impl.ICommonsList<com.helger.css.propertyvalue.ICSSValue>getAllStyleValues()com.helger.css.propertyvalue.ICSSValuegetStyleValue(com.helger.css.property.ECSSProperty eProperty)Find the style value associated to a single property.booleanhasAnyStyle()booleanhasStyle(com.helger.css.propertyvalue.ICSSValue aValue)Check if the style property is contained, and the value matches.IMPLTYPEremoveAllStyles()Remove all styles from the elementIMPLTYPEremoveStyle(com.helger.css.property.ECSSProperty eProperty)Remove the specified style from the element
-
-
-
Method Detail
-
addStyle
@Nonnull default IMPLTYPE addStyle(@Nonnull com.helger.css.property.ECSSProperty eProperty, @Nonnull @Nonempty String sPropertyValue)
Add an element specific style (that is not consistency checked).- Parameters:
eProperty- The CSS property to be added. May not benull.sPropertyValue- The property value to be used. May not benull.- Returns:
- this
-
addStyle
@Nonnull IMPLTYPE addStyle(@Nullable com.helger.css.propertyvalue.ICSSValue aValue)
Add an element specific style.- Parameters:
aValue- The value to be added. May benull.- Returns:
- this
-
addStyles
@Nonnull @Deprecated(forRemoval=false) @DevelopersNote("Use addStyle instead!") default IMPLTYPE addStyles(@Nullable com.helger.css.propertyvalue.ICSSValue aValue)
Deprecated.
-
addStyles
@Nonnull default IMPLTYPE addStyles(@Nullable com.helger.css.propertyvalue.ICSSValue... aValues)
Add element specific styles.- Parameters:
aValues- The values to be added. May benull.- Returns:
- this
-
addStyles
@Nonnull default IMPLTYPE addStyles(@Nullable Iterable<? extends com.helger.css.propertyvalue.ICSSValue> aValues)
Add element specific styles.- Parameters:
aValues- The values to be added. May benull.- Returns:
- this
-
removeStyle
@Nonnull IMPLTYPE removeStyle(@Nonnull com.helger.css.property.ECSSProperty eProperty)
Remove the specified style from the element- Parameters:
eProperty- The style property to remove- Returns:
- this
-
removeAllStyles
@Nonnull IMPLTYPE removeAllStyles()
Remove all styles from the element- Returns:
- this
-
getAllStyles
@Nonnull @ReturnsMutableCopy com.helger.commons.collection.impl.ICommonsOrderedMap<com.helger.css.property.ECSSProperty,com.helger.css.propertyvalue.ICSSValue> getAllStyles()
- Returns:
- A copy of all contained styles. Never
null.
-
getAllStyleValues
@Nonnull @ReturnsMutableCopy com.helger.commons.collection.impl.ICommonsList<com.helger.css.propertyvalue.ICSSValue> getAllStyleValues()
- Returns:
- All style values. Never
null.
-
getStyleValue
@Nullable com.helger.css.propertyvalue.ICSSValue getStyleValue(@Nullable com.helger.css.property.ECSSProperty eProperty)
Find the style value associated to a single property.- Parameters:
eProperty- The property to search. May benull.- Returns:
nullif no such style is contained.
-
containsStyle
boolean containsStyle(@Nullable com.helger.css.property.ECSSProperty eProperty)
Check if a style value is associated to a single property.- Parameters:
eProperty- The property to search. May benull.- Returns:
trueif a respective style is present,falseotherwise.
-
hasStyle
boolean hasStyle(@Nullable com.helger.css.propertyvalue.ICSSValue aValue)
Check if the style property is contained, and the value matches.- Parameters:
aValue- The value to be checked- Returns:
trueif such a CSS value is contained,falseotherwise
-
hasAnyStyle
boolean hasAnyStyle()
- Returns:
trueif at least one CSS style is assigned,falseotherwise.
-
-