com.jwebmp.plugins.angulartrackwidth.AngularTrackWidthPageConfigurator Maven / Gradle / Ivy
Show all versions of jwebmp-angular-track-width Show documentation
/*
* Copyright (C) 2017 GedMarc
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
package com.jwebmp.plugins.angulartrackwidth;
import com.jwebmp.core.Page;
import com.jwebmp.core.base.angular.AngularPageConfigurator;
import com.jwebmp.core.plugins.ComponentInformation;
import com.jwebmp.core.plugins.PluginInformation;
import com.jwebmp.core.plugins.jquery.JQueryPageConfigurator;
import com.jwebmp.core.services.IPageConfigurator;
import jakarta.validation.constraints.NotNull;
/**
* Allows for elements to do auto focus
*
* @author GedMarc
* @since 16 Jun 2017
*/
@PluginInformation(pluginName = "Auto Focus",
pluginDescription = "Allows your auto focus components using Angular",
pluginUniqueName = "angular-auto-focus",
pluginVersion = "1.0.0",
pluginCategories = "angular,auto focus,focus,ui,web ui, framework",
pluginSubtitle = "Allows your auto focus components using Angular",
pluginSourceUrl = "http://www.angulartutorial.net/2014/04/angular-js-auto-focus-for-input-box.html",
pluginWikiUrl = "https://github.com/GedMarc/JWebMP-Angular-Auto-Focus/wiki",
pluginGitUrl = "https://github.com/GedMarc/JWebMP-Angular-Auto-Focus",
pluginIconUrl = "",
pluginIconImageUrl = "",
pluginOriginalHomepage = "https://www.pakainfo.com/automatically-angularjs-set-focus-input-from-controller/",
pluginDownloadUrl = "https://mvnrepository.com/artifact/com.jwebmp.plugins.angular/jwebmp-angular-auto-focus")
@ComponentInformation(name = "Angular Auto Focus",
description = "Allows your auto focus components using Angular",
url = "https://www.akveo.com/products.html")
public class AngularTrackWidthPageConfigurator
implements IPageConfigurator
{
/**
* If this configurator is enabled
*/
private static boolean enabled = true;
/*
* Constructs a new AngularTrackWidthPageConfigurator
*/
public AngularTrackWidthPageConfigurator()
{
//Nothing needed
}
/**
* Method isEnabled returns the enabled of this AngularAnimatedChangePageConfigurator object.
*
* If this configurator is enabled
*
* @return the enabled (type boolean) of this AngularAnimatedChangePageConfigurator object.
*/
public static boolean isEnabled()
{
return AngularTrackWidthPageConfigurator.enabled;
}
/**
* Method setEnabled sets the enabled of this AngularAnimatedChangePageConfigurator object.
*
* If this configurator is enabled
*
* @param mustEnable
* the enabled of this AngularAnimatedChangePageConfigurator object.
*/
public static void setEnabled(boolean mustEnable)
{
AngularTrackWidthPageConfigurator.enabled = mustEnable;
}
@NotNull
@Override
public Page> configure(Page> page)
{
if (!page.isConfigured() && enabled())
{
JQueryPageConfigurator.setRequired(true);
AngularPageConfigurator.setRequired(true);
}
return page;
}
@Override
public boolean enabled()
{
return AngularTrackWidthPageConfigurator.enabled;
}
}