001package gwt.material.design.client.ui.animate;
002
003/*
004 * #%L
005 * GwtMaterialDesign
006 * %%
007 * Copyright (C) 2015 - 2017 GwtMaterial
008 * %%
009 * Licensed under the Apache License, Version 2.0 (the "License");
010 * you may not use this file except in compliance with the License.
011 * You may obtain a copy of the License at
012 * 
013 *      http://www.apache.org/licenses/LICENSE-2.0
014 * 
015 * Unless required by applicable law or agreed to in writing, software
016 * distributed under the License is distributed on an "AS IS" BASIS,
017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
018 * See the License for the specific language governing permissions and
019 * limitations under the License.
020 * #L%
021 */
022
023import gwt.material.design.client.base.helper.EnumHelper;
024import gwt.material.design.client.constants.CssType;
025
026public enum Transition implements CssType {
027    // Material Animation Components
028    SHOW_STAGGERED_LIST("staggered_list"),
029    FADE_IN_IMAGE("fade_in_image"),
030    SHOW_GRID("show_grid"),
031    CLOSE_GRID("close_grid"),
032
033    // Core Animation Components
034    BOUNCE("bounce"),
035    FLASH("flash"),
036    PULSE("pulse"),
037    RUBBERBAND("rubberBand"),
038    SHAKE("shake"),
039    HEADSHAKE("headShake"),
040    SWING("swing"),
041    TADA("tada"),
042    WOBBLE("wobble"),
043    JELLO("jello"),
044    BOUNCEIN("bounceIn"),
045    BOUNCEINDOWN("bounceInDown"),
046    BOUNCEINLEFT("bounceInLeft"),
047    BOUNCEINRIGHT("bounceInRight"),
048    BOUNCEINUP("bounceInUp"),
049    BOUNCEOUT("bounceOut"),
050    BOUNCEOUTDOWN("bounceOutDown"),
051    BOUNCEOUTLEFT("bounceOutLeft"),
052    BOUNCEOUTRIGHT("bounceOutRight"),
053    BOUNCEOUTUP("bounceOutUp"),
054    FADEIN("fadeIn"),
055    FADEINDOWN("fadeInDown"),
056    FADEINDOWNBIG("fadeInDownBig"),
057    FADEINLEFT("fadeInLeft"),
058    FADEINLEFTBIG("fadeInLeftBig"),
059    FADEINRIGHT("fadeInRight"),
060    FADEINRIGHTBIG("fadeInRightBig"),
061    FADEINUP("fadeInUp"),
062    FADEINUPBIG("fadeInUpBig"),
063    FADEOUT("fadeOut"),
064    FADEOUTDOWN("fadeOutDown"),
065    FADEOUTDOWNBIG("fadeOutDownBig"),
066    FADEOUTLEFT("fadeOutLeft"),
067    FADEOUTLEFTBIG("fadeOutLeftBig"),
068    FADEOUTRIGHT("fadeOutRight"),
069    FADEOUTRIGHTBIG("fadeOutRightBig"),
070    FADEOUTUP("fadeOutUp"),
071    FADEOUTUPBIG("fadeOutUpBig"),
072    FLIPINX("flipInX"),
073    FLIPINY("flipInY"),
074    FLIPOUTX("flipOutX"),
075    FLIPOUTY("flipOutY"),
076    LIGHTSPEEDIN("lightSpeedIn"),
077    LIGHTSPEEDOUT("lightSpeedOut"),
078    ROTATEIN("rotateIn"),
079    ROTATEINDOWNLEFT("rotateInDownLeft"),
080    ROTATEINDOWNRIGHT("rotateInDownRight"),
081    ROTATEINUPLEFT("rotateInUpLeft"),
082    ROTATEINUPRIGHT("rotateInUpRight"),
083    ROTATEOUT("rotateOut"),
084    ROTATEOUTDOWNLEFT("rotateOutDownLeft"),
085    ROTATEOUTDOWNRIGHT("rotateOutDownRight"),
086    ROTATEOUTUPLEFT("rotateOutUpLeft"),
087    ROTATEOUTUPRIGHT("rotateOutUpRight"),
088    HINGE("hinge"),
089    ROLLIN("rollIn"),
090    ROLLOUT("rollOut"),
091    ZOOMIN("zoomIn"),
092    ZOOMINDOWN("zoomInDown"),
093    ZOOMINLEFT("zoomInLeft"),
094    ZOOMINRIGHT("zoomInRight"),
095    ZOOMINUP("zoomInUp"),
096    ZOOMOUT("zoomOut"),
097    ZOOMOUTDOWN("zoomOutDown"),
098    ZOOMOUTLEFT("zoomOutLeft"),
099    ZOOMOUTRIGHT("zoomOutRight"),
100    ZOOMOUTUP("zoomOutUp"),
101    SLIDEINDOWN("slideInDown"),
102    SLIDEINLEFT("slideInLeft"),
103    SLIDEINRIGHT("slideInRight"),
104    SLIDEINUP("slideInUp"),
105    SLIDEOUTDOWN("slideOutDown"),
106    SLIDEOUTLEFT("slideOutLeft"),
107    SLIDEOUTRIGHT("slideOutRight"),
108    SLIDEOUTUP("slideOutUp");
109
110    private final String cssClass;
111
112    Transition(final String cssClass) {
113        this.cssClass = cssClass;
114    }
115
116    @Override
117    public String getCssName() {
118        return cssClass;
119    }
120
121    public static Transition fromStyleName(final String styleName) {
122        return EnumHelper.fromStyleName(styleName, Transition.class, SHOW_STAGGERED_LIST);
123    }
124}