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

org.wicketstuff.jwicket.ui.effect.Clip Maven / Gradle / Ivy

Go to download

WicketJQuery by Stefan Lindner has been renamed to jWicket, mavenized, and migrated to WicketStuff. This Wicketstuff version supercedes the original version which was available at http://subversion.visionet.de/project/WicketJQuery/wiki

There is a newer version: 9.7.0
Show newest version
package org.wicketstuff.jwicket.ui.effect;


import org.wicketstuff.jwicket.JQuery;
import org.wicketstuff.jwicket.JQueryResourceReference;


public class Clip extends AbstractJqueryUiEffect {

	private static final long serialVersionUID = 1L;

	public static final JQueryResourceReference jQueryUiEffectsClipJs
		= JQuery.isDebug()
		? new JQueryResourceReference(Blind.class, "jquery.effects.clip.js")
		: new JQueryResourceReference(Blind.class, "jquery.effects.clip.min.js");

	public Clip() {
		super(jQueryUiEffectsClipJs);
	}



	@Override
	String getEffectName() {
		return "clip";
	}



	private String mode = null;
	
	/**	Set the clip mode
	 * 
	 *	@param value the mode
	 *	@return this object
	 */
	public Clip setMode(final EffectMode value) {
		if (value == null)
			mode = null;
		else
			mode = value.getMode();
		return this;
	}



	private String direction = null;
	
	/**	Set the clip direction
	 * 
	 *	@param value the direction
	 *	@return this object
	 */
	public Clip setDirection(final EffectHorVerDirection value) {
		if (value == null)
			direction = null;
		else
			direction = value.getDirection();
		return this;
	}


	@Override
	void appendOptions(final StringBuilder jsString) {
		if (mode != null || direction != null) {
			boolean firstOption = true;
			jsString.append(",{");
			if (mode != null) {
				jsString.append("mode:'");
				jsString.append(mode);
				jsString.append("'");
				firstOption = false;
			}
			if (direction != null) {
				if (!firstOption)
					jsString.append(",");
				jsString.append("direction:'");
				jsString.append(direction);
				jsString.append("'");
			}
			jsString.append("}");
		}
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy