001package gwt.material.design.jquery.client.api; 002 003/* 004 * #%L 005 * GwtMaterial 006 * %% 007 * Copyright (C) 2015 - 2017 GwtMaterialDesign 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 com.google.gwt.dom.client.Element; 024import jsinterop.annotations.JsConstructor; 025import jsinterop.annotations.JsOverlay; 026import jsinterop.annotations.JsProperty; 027import jsinterop.annotations.JsType; 028 029/** 030 * Event for JQuery. 031 * 032 * @author Cristian Rinaldi 033 */ 034@JsType(namespace = "jQuery", name = "Event", isNative=true) 035public class Event { 036 037 @JsConstructor 038 public Event(String type) {} 039 040 @JsProperty 041 public String type; 042 043 @JsOverlay 044 public final String getType() { 045 return type; 046 } 047 048 @JsProperty 049 public Object data; 050 051 @JsOverlay 052 public final Object getData() { 053 return data; 054 } 055 056 @JsProperty 057 public Element currentTarget; 058 059 @JsOverlay 060 public final Element getCurrentTarget() { 061 return currentTarget; 062 } 063 064 @JsProperty 065 public Element delegateTarget; 066 067 @JsOverlay 068 public final Element getDelegateTarget() { 069 return delegateTarget; 070 } 071 072 @JsProperty 073 public Object result; 074 075 @JsOverlay 076 public final Object getResult() { 077 return result; 078 } 079 080 @JsProperty 081 public String metaKey; 082 083 @JsOverlay 084 public final String getMetaKey() { 085 return metaKey; 086 } 087 088 @JsProperty 089 public int timeStamp; 090 091 @JsOverlay 092 public final int getTimeStamp() { 093 return timeStamp; 094 } 095 096 @JsProperty 097 public JQueryElement relatedTarget; 098 099 @JsOverlay 100 public final JQueryElement getRelatedTarget() { 101 return relatedTarget; 102 } 103 104 @JsProperty 105 public String namespace; 106 107 @JsOverlay 108 public final String getNamespace() { 109 return namespace; 110 } 111 112 public native void stopPropagation(); 113 114 public native void stopImmediatePropagation(); 115 116 public native void preventDefault(); 117 118 public Boolean propagationStopped; 119 120 public Boolean defaultPrevented; 121 122 public Boolean immediatePropagationStopped; 123}