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
-
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 void
getAllRegisteredCSSIncludesForGlobal
(Collection<? super com.helger.html.resource.css.ICSSPathProvider> aTarget) static com.helger.commons.collection.impl.ICommonsOrderedSet<com.helger.html.resource.css.ICSSPathProvider>
static void
getAllRegisteredCSSIncludesForThisRequest
(Collection<? super com.helger.html.resource.css.ICSSPathProvider> aTarget) static boolean
static boolean
static void
readCSSIncludesForGlobal
(com.helger.commons.io.resource.IReadableResource aRes) static void
registerCSSIncludeForGlobal
(int nIndex, com.helger.html.resource.css.ICSSPathProvider aCSSPathProvider) Register a new CSS item for global scope.static void
registerCSSIncludeForGlobal
(com.helger.html.resource.css.ICSSPathProvider aCSSPathProvider) Register a new CSS item for global scope.static void
registerCSSIncludeForThisRequest
(com.helger.html.resource.css.ICSSPathProvider aCSSPathProvider) Register a new CSS item only for this requeststatic void
Unregister all existing CSS items from global scope.static void
Unregister all existing CSS items from this requeststatic void
unregisterCSSIncludeForGlobal
(com.helger.html.resource.css.ICSSPathProvider aCSSPathProvider) Unregister an existing CSS item for global scope.static void
unregisterCSSIncludeFromThisRequest
(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-
null
set 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:
true
if 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-
null
set 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:
true
if at least a single CSS path has been registered for this request only
-