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

com.jwebmp.plugins.angularslimscroll.AngularSlimScrollReferencePool Maven / Gradle / Ivy

There is a newer version: 0.66.0.1
Show newest version
package com.jwebmp.plugins.angularslimscroll;

import com.jwebmp.core.base.references.CSSReference;
import com.jwebmp.core.base.references.JavascriptReference;
import com.jwebmp.core.base.servlets.enumarations.RequirementsPriority;
import com.jwebmp.core.base.servlets.interfaces.ReferencePool;

/**
 * References for angular
 *
 * @author Marc Magon
 * @since 09 Jun 2017
 */
enum AngularSlimScrollReferencePool
		implements ReferencePool
{
	SlimScrollReference(new JavascriptReference("SlimScroll", 1.1, "bower_components/slimScroll/jquery.slimscroll.js"), null),
	AngularSlimScroll(new JavascriptReference("AngularSlimScroll", 1.1, "bower_components/angular-slimscroll/angular-slimscroll.js"), null);
	/**
	 * Any sub data
	 */
	private String data;
	private JavascriptReference javaScriptReference;
	private CSSReference cssReference;

	/**
	 * A new AngularSlimScrollReferencePool
	 */
	AngularSlimScrollReferencePool()
	{

	}

	AngularSlimScrollReferencePool(JavascriptReference javaScriptReference, CSSReference cssReference)
	{
		this.javaScriptReference = javaScriptReference;
		if (this.javaScriptReference != null)
		{
			this.javaScriptReference.setPriority(RequirementsPriority.DontCare);
		}
		this.cssReference = cssReference;
		if (this.cssReference != null)
		{
			this.cssReference.setPriority(RequirementsPriority.DontCare);
		}
	}

	@Override
	public CSSReference getCssReference()
	{
		return cssReference;
	}

	@Override
	public void setCssReference(CSSReference cssReference)
	{
		this.cssReference = cssReference;
	}

	@Override
	public JavascriptReference getJavaScriptReference()
	{
		return javaScriptReference;
	}

	@Override
	public void setJavaScriptReference(JavascriptReference javaScriptReference)
	{
		this.javaScriptReference = javaScriptReference;
	}

	/**
	 * Returns the name or the data contained within
	 *
	 * @return
	 */
	@Override
	public String toString()
	{
		if (data != null && !data.isEmpty())
		{
			return data;
		}
		else
		{
			return name();
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy