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

com.sksamuel.jqm4gwt.DataIcon Maven / Gradle / Ivy

The newest version!
package com.sksamuel.jqm4gwt;

import java.util.HashMap;
import java.util.Map;

/**
 * @author Stephen K Samuel [email protected] 9 Jul 2011 14:23:25
 *
 * 
This enum represents the default iconset available in jquery mobile. * *
To see what the icon set looks like, visit the following site: * *

JQM Icons

* */ public enum DataIcon { ACTION("action"), ALERT("alert"), DOWN("arrow-d"), DOWNLEFT("arrow-d-l"), DOWNRIGHT("arrow-d-r"), LEFT("arrow-l"), RIGHT("arrow-r"), UP("arrow-u"), UPLEFT("arrow-u-l"), UPRIGHT("arrow-u-r"), AUDIO("audio"), BACK("back"), BARS("bars"), BULLETS("bullets"), CALENDAR("calendar"), CAMERA("camera"), DOWNCARAT("carat-d"), LEFTCARAT("carat-l"), RIGHTCARAT("carat-r"), UPCARAT("carat-u"), CHECK("check"), CLOCK("clock"), CLOUD("cloud"), COMMENT("comment"), DELETE("delete"), EDIT("edit"), EYE("eye"), FORBIDDEN("forbidden"), FORWARD("forward"), GEAR("gear"), GRID("grid"), HEART("heart"), HOME("home"), INFO("info"), LOCATION("location"), LOCK("lock"), MAIL("mail"), MINUS("minus"), NAVIGATION("navigation"), PHONE("phone"), PLUS("plus"), POWER("power"), RECYCLE("recycle"), REFRESH("refresh"), SEARCH("search"), SHOP("shop"), STAR("star"), TAG("tag"), USER("user"), VIDEO("video"), CUSTOM("custom"), NONE("false"); private static final Map jqmToIcon = new HashMap(); static { for (DataIcon i : DataIcon.values()) { jqmToIcon.put(i.getJqmValue(), i); } } private final String jqmValue; private DataIcon(String jqmValue) { this.jqmValue = jqmValue; } /** * Returns the string value that JQM expects */ public String getJqmValue() { return jqmValue; } public static DataIcon fromJqmValue(String jqmValue) { if (jqmValue == null || jqmValue.isEmpty()) return null; return jqmToIcon.get(jqmValue); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy