/*
 * Copyright 2016 Langhammer, Tim | Earth >> Europe >> Potsdam |
 * {@literal @}<a href="mailto:tlhammer@mailbox.org" alt="email">mail</a> |
 * "Tolerance first".
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package eu.jtzipi.project0.common.events;

import javafx.event.Event;
import javafx.event.EventTarget;
import javafx.event.EventType;

/**
 *
 * @author Langhammer, Tim | Earth >> Europe >> Potsdam |
 * {@literal @}<a href="mailto:tlhammer@mailbox.org" alt="email">mail</a> |
 * "Tolerance first"
 */
public class TimeEvent extends Event {

    public enum Type {

        DAY( "day" ),
        HOUR( "" ),
        MINUTE( "min" ),
        SECOND( "sec" ),
        MILLISECOND( "ms" );

        private final EventType<? extends TimeEvent> type;

        private Type( final String nameStr ) {
            this.type = new EventType<>( nameStr );
        }

        public EventType<? extends TimeEvent> type() {
            return type;
        }

    }

    public TimeEvent( final Object source,
                      final EventTarget target,
                      final EventType<? extends TimeEvent> eventType ) {
        super( source, target, eventType );
    }

}
