All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jwebmp.plugins.weathericons.WeatherIconsPageConfigurator Maven / Gradle / Ivy

There is a newer version: 0.59.0.14
Show newest version
package com.jwebmp.plugins.weathericons;

import com.jwebmp.core.Page;
import com.jwebmp.core.base.references.CSSReference;
import com.jwebmp.core.services.IPageConfigurator;

import javax.validation.constraints.NotNull;

public class WeatherIconsPageConfigurator
		implements IPageConfigurator
{
	/**
	 * Field reference
	 */
	private static final CSSReference reference = new CSSReference("WeatherIconsCSS", 1.0, "bower_components/weather-icons/weather-icons.min.css");

	/**
	 * Returns the associated CSS Reference for the icons
	 *
	 * @return
	 */
	public static CSSReference getReference()
	{
		return WeatherIconsPageConfigurator.reference;
	}

	/**
	 * Configures the given page for the parameters
	 *
	 * @param page
	 * 		The page incoming
	 *
	 * @return The original page incoming or a new page, never null
	 */
	@Override
	public @NotNull Page configure(Page page)
	{
		if (!page.isConfigured())
		{
			page.addCssReference(WeatherIconsPageConfigurator.reference);
		}
		return page;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy