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

org.devocative.wickomp.html.icon.FontAwesome Maven / Gradle / Ivy

package org.devocative.wickomp.html.icon;

import org.apache.wicket.model.IModel;

public class FontAwesome extends IconFont {
	private static final long serialVersionUID = 8571616115102148637L;

	public enum Size {
		lg("lg"), x2("2x"), x3("3x"), x4("4x"), x5("5x");

		private String value;

		Size(String value) {
			this.value = value;
		}


		@Override
		public String toString() {
			return value;
		}
	}

	public enum Flip {horizontal, vertical}

	private Size size;

	private boolean spin = false;

	private Integer rotation;

	private Flip flip;

	private String color;

	private String styleClass;

	// ------------------------------

	public FontAwesome(String name) {
		this(name, null);
	}

	// Main Constructor
	public FontAwesome(String name, IModel tooltip) {
		super(name, tooltip);
	}

	// ------------------------------

	public FontAwesome setSize(Size size) {
		this.size = size;
		return this;
	}

	public FontAwesome setColor(String color) {
		this.color = color;
		return this;
	}

	public FontAwesome setStyleClass(String styleClass) {
		this.styleClass = styleClass;
		return this;
	}

	public FontAwesome spin() {
		this.spin = true;
		return this;
	}

	public FontAwesome rotate(Integer rotation) {
		this.rotation = rotation;
		return this;
	}

	public FontAwesome flip(Flip flip) {
		this.flip = flip;
		return this;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder("");
		return builder.toString();
	}

	@Override
	public FontAwesome copyTo() {
		return new FontAwesome(getName(), getTooltip());
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy