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

com.jwebmp.plugins.blockui.GrowlUIFeature Maven / Gradle / Ivy

package com.jwebmp.plugins.blockui;

import com.jwebmp.core.Feature;
import com.jwebmp.core.base.html.interfaces.GlobalFeatures;
import com.jwebmp.core.htmlbuilder.css.colours.ColourCSSImpl;
import com.jwebmp.core.htmlbuilder.css.measurement.MeasurementCSSImpl;
import com.jwebmp.plugins.blockui.options.BlockUIOptions;

import static com.jwebmp.core.htmlbuilder.css.measurement.MeasurementTypes.*;

/**
 * A very basic growler with some default set
 *
 * @param 
 */
@SuppressWarnings("MissingClassJavaDoc")
public class GrowlUIFeature>
		extends Feature
{
	/**
	 * A block ui with the following settings
	 * 

* getOptions().setFadeIn(700) * .setFadeOut(700) * .setTimeout(2000) * .setShowOverlay(false) * .setCenterY(false) * .getCss() * .setWidth(new MeasurementCSSImpl(350, Pixels)) * .setTop(new MeasurementCSSImpl(10, Pixels)) * .setRight(new MeasurementCSSImpl(10, Pixels)) * .setPadding(5) * .setBackgroundColor(new ColourCSSImpl("#000")) * .setColor(new ColourCSSImpl("#000")); */ public GrowlUIFeature() { super("GrowlUIFeature"); getOptions().setFadeIn(700) .setFadeOut(700) .setTimeout(2000) .setShowOverlay(false) .setCenterY(false) .getCss() .setWidth(new MeasurementCSSImpl(350, Pixels)) .setTop(new MeasurementCSSImpl(10, Pixels)) .setRight(new MeasurementCSSImpl(10, Pixels)) .setPadding(5) .setBackgroundColor(new ColourCSSImpl("#000")) .setColor(new ColourCSSImpl("#000")); } @Override public BlockUIOptions getOptions() { BlockUIOptions options = super.getOptions(); if (options == null) { return new BlockUIOptions<>(); } return options; } /** * Any work that needs to get done pre render */ @Override protected void assignFunctionsToComponent() { StringBuilder sb = new StringBuilder(); sb.append("$.blockUI(") .append(getOptions()) .append(");") .append(getNewLine()); addQuery(sb); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy