001/**
002 * Get more info at : www.jrebirth.org .
003 * Copyright JRebirth.org © 2011-2016
004 * Contact : sebastien.bordes@jrebirth.org
005 *
006 * Licensed under the Apache License, Version 2.0 (the "License");
007 * you may not use this file except in compliance with the License.
008 * You may obtain a copy of the License at
009 *
010 *     http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018package org.jrebirth.af.api.ui.annotation.type;
019
020import javafx.event.EventType;
021import javafx.scene.input.TouchEvent;
022
023/**
024 * The Touch event type.<br />
025 * The Touch type will be appended to method name to use.
026 */
027public enum Touch implements EnumEventType {
028
029    /** Any Swipe Event. */
030    Any(TouchEvent.ANY),
031
032    /** Touch pressed event. */
033    Pressed(TouchEvent.TOUCH_PRESSED),
034
035    /** Touch released event. */
036    Released(TouchEvent.TOUCH_RELEASED),
037
038    /** Touch moved event. */
039    Moved(TouchEvent.TOUCH_MOVED),
040
041    /** Touch stationary event. */
042    Stationary(TouchEvent.TOUCH_STATIONARY);
043
044    /** The JavaFX internal api name. */
045    private EventType<?> eventType;
046
047    /**
048     * Default constructor used to link the apiName.
049     *
050     * @param eventType the javafx event type
051     */
052    private Touch(final EventType<?> eventType) {
053        this.eventType = eventType;
054    }
055
056    /**
057     * {@inheritDoc}
058     */
059    @Override
060    public EventType<?> eventType() {
061        return this.eventType;
062    }
063
064}