com.sksamuel.jqm4gwt.Transition Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jqm4gwt-standalone Show documentation
Show all versions of jqm4gwt-standalone Show documentation
jqm4gwt bundled with all of its dependencies
The newest version!
package com.sksamuel.jqm4gwt;
/**
* @author Stephen K Samuel [email protected] 9 May 2011 23:41:05
*
*
Enum representing the different transitions methods available in JQM.
*
See Transitions
*
*/
public enum Transition implements TransitionIntf {
FADE("fade"), POP("pop"), FLIP("flip"), TURN("turn"), FLOW("flow"),
SLIDE_FADE("slidefade"), SLIDE("slide"), SLIDE_UP("slideup"), SLIDE_DOWN("slidedown"),
NONE("none");
private final String jqmValue;
private Transition(String jqmValue) {
this.jqmValue = jqmValue;
}
/** Returns the string value that JQM expects */
@Override
public String getJqmValue() {
return jqmValue;
}
@Override
public Transition parseJqmValue(String jqmValue) {
return fromJqmValue(jqmValue);
}
public static Transition fromJqmValue(String jqmValue) {
if (jqmValue == null || jqmValue.isEmpty()) return null;
for (Transition i : Transition.values()) {
if (i.getJqmValue().equals(jqmValue)) return i;
}
return null;
}
}