Package com.helger.photon.app.html
Class PhotonCSS
java.lang.Object
com.helger.photon.app.html.PhotonCSS
This class keeps track of all the CSS files that must be included globally or
for a single request.
- Author:
- Philip Helger
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic void_readCSSIncludes(com.helger.commons.io.resource.IReadableResource aRes, CSSResourceSet aTarget) static com.helger.commons.collection.impl.ICommonsOrderedSet<com.helger.html.resource.css.ICSSPathProvider>static voidgetAllRegisteredCSSIncludesForGlobal(Collection<? super com.helger.html.resource.css.ICSSPathProvider> aTarget) static com.helger.commons.collection.impl.ICommonsOrderedSet<com.helger.html.resource.css.ICSSPathProvider>static voidgetAllRegisteredCSSIncludesForThisRequest(Collection<? super com.helger.html.resource.css.ICSSPathProvider> aTarget) static booleanstatic booleanstatic voidreadCSSIncludesForGlobal(com.helger.commons.io.resource.IReadableResource aRes) static voidregisterCSSIncludeForGlobal(int nIndex, com.helger.html.resource.css.ICSSPathProvider aCSSPathProvider) Register a new CSS item for global scope.static voidregisterCSSIncludeForGlobal(com.helger.html.resource.css.ICSSPathProvider aCSSPathProvider) Register a new CSS item for global scope.static voidregisterCSSIncludeForThisRequest(com.helger.html.resource.css.ICSSPathProvider aCSSPathProvider) Register a new CSS item only for this requeststatic voidUnregister all existing CSS items from global scope.static voidUnregister all existing CSS items from this requeststatic voidunregisterCSSIncludeForGlobal(com.helger.html.resource.css.ICSSPathProvider aCSSPathProvider) Unregister an existing CSS item for global scope.static voidunregisterCSSIncludeFromThisRequest(com.helger.html.resource.css.ICSSPathProvider aCSSPathProvider) Unregister an existing CSS item only from this request
-
Field Details
-
DEFAULT_FILENAME
- See Also:
-
-
Method Details
-
_readCSSIncludes
public static void _readCSSIncludes(@Nonnull com.helger.commons.io.resource.IReadableResource aRes, @Nonnull CSSResourceSet aTarget) -
readCSSIncludesForGlobal
public static void readCSSIncludesForGlobal(@Nonnull com.helger.commons.io.resource.IReadableResource aRes) -
registerCSSIncludeForGlobal
public static void registerCSSIncludeForGlobal(@Nonnull com.helger.html.resource.css.ICSSPathProvider aCSSPathProvider) Register a new CSS item for global scope.- Parameters:
aCSSPathProvider- The CSS path provider to use. May not benull.
-
registerCSSIncludeForGlobal
public static void registerCSSIncludeForGlobal(int nIndex, @Nonnull com.helger.html.resource.css.ICSSPathProvider aCSSPathProvider) Register a new CSS item for global scope.- Parameters:
nIndex- The index to be used. If the value is < 0 the value is ignored and item is appended.aCSSPathProvider- The CSS path provider to use. May not benull.
-
unregisterCSSIncludeForGlobal
public static void unregisterCSSIncludeForGlobal(@Nonnull com.helger.html.resource.css.ICSSPathProvider aCSSPathProvider) Unregister an existing CSS item for global scope.- Parameters:
aCSSPathProvider- The CSS path provider to use. May not benull.
-
unregisterAllCSSIncludesFromGlobal
public static void unregisterAllCSSIncludesFromGlobal()Unregister all existing CSS items from global scope. -
getAllRegisteredCSSIncludesForGlobal
@Nonnull @ReturnsMutableCopy public static com.helger.commons.collection.impl.ICommonsOrderedSet<com.helger.html.resource.css.ICSSPathProvider> getAllRegisteredCSSIncludesForGlobal()- Returns:
- A non-
nullset with all CSS paths to be included globally.
-
getAllRegisteredCSSIncludesForGlobal
public static void getAllRegisteredCSSIncludesForGlobal(@Nonnull Collection<? super com.helger.html.resource.css.ICSSPathProvider> aTarget) -
hasRegisteredCSSIncludesForGlobal
public static boolean hasRegisteredCSSIncludesForGlobal()- Returns:
trueif at least a single CSS path has been registered globally.
-
registerCSSIncludeForThisRequest
public static void registerCSSIncludeForThisRequest(@Nonnull com.helger.html.resource.css.ICSSPathProvider aCSSPathProvider) Register a new CSS item only for this request- Parameters:
aCSSPathProvider- The CSS path provider to use. May not benull.
-
unregisterCSSIncludeFromThisRequest
public static void unregisterCSSIncludeFromThisRequest(@Nonnull com.helger.html.resource.css.ICSSPathProvider aCSSPathProvider) Unregister an existing CSS item only from this request- Parameters:
aCSSPathProvider- The CSS path provider to use. May not benull.
-
unregisterAllCSSIncludesFromThisRequest
public static void unregisterAllCSSIncludesFromThisRequest()Unregister all existing CSS items from this request -
getAllRegisteredCSSIncludesForThisRequest
@Nonnull @ReturnsMutableCopy public static com.helger.commons.collection.impl.ICommonsOrderedSet<com.helger.html.resource.css.ICSSPathProvider> getAllRegisteredCSSIncludesForThisRequest()- Returns:
- A non-
nullset with all CSS paths to be included in this request.
-
getAllRegisteredCSSIncludesForThisRequest
public static void getAllRegisteredCSSIncludesForThisRequest(@Nonnull Collection<? super com.helger.html.resource.css.ICSSPathProvider> aTarget) -
hasRegisteredCSSIncludesForThisRequest
public static boolean hasRegisteredCSSIncludesForThisRequest()- Returns:
trueif at least a single CSS path has been registered for this request only
-