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 @JsProperty 084 public boolean shiftKey; 085 086 @JsProperty 087 public boolean altKey; 088 089 @JsProperty 090 public boolean ctrlKey; 091 092 @JsOverlay 093 public final String getMetaKey() { 094 return metaKey; 095 } 096 097 @JsProperty 098 public int timeStamp; 099 100 @JsOverlay 101 public final int getTimeStamp() { 102 return timeStamp; 103 } 104 105 @JsProperty 106 public JQueryElement relatedTarget; 107 108 @JsProperty 109 public Element target; 110 111 @JsOverlay 112 public final JQueryElement getRelatedTarget() { 113 return relatedTarget; 114 } 115 116 @JsProperty 117 public String namespace; 118 119 @JsOverlay 120 public final String getNamespace() { 121 return namespace; 122 } 123 124 public native void stopPropagation(); 125 126 public native void stopImmediatePropagation(); 127 128 public native void preventDefault(); 129 130 public Boolean propagationStopped; 131 132 public Boolean defaultPrevented; 133 134 public Boolean immediatePropagationStopped; 135}