com.jwebmp.plugins.angularslimscroll.AngularSlimScrollReferencePool Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jwebmp-angular-slim-scroll Show documentation
Show all versions of jwebmp-angular-slim-scroll Show documentation
The JWebSwing implementation for Angular SlimScroll
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();
}
}
}