001package react4j.dom.proptypes.html;
002
003import javax.annotation.Nonnull;
004import javax.annotation.Nullable;
005import jsinterop.annotations.JsOverlay;
006import jsinterop.annotations.JsPackage;
007import jsinterop.annotations.JsType;
008import react4j.dom.events.DragEventHandler;
009import react4j.dom.events.FocusEventHandler;
010import react4j.dom.events.KeyboardEventHandler;
011import react4j.dom.events.MouseEventHandler;
012import react4j.dom.events.TouchEventHandler;
013import react4j.dom.events.UIEventHandler;
014
015@JsType( isNative = true, namespace = JsPackage.GLOBAL, name = "Object" )
016public class HtmlProps
017  extends HtmlGlobalFields<HtmlProps>
018{
019  //Applicable Event Handlers
020
021  // Focus Events
022  @JsOverlay
023  @Nonnull
024  public final HtmlProps onBlur( @Nullable final FocusEventHandler handler )
025  {
026    setOnBlur( handler );
027    return self();
028  }
029
030  @JsOverlay
031  @Nonnull
032  public final HtmlProps onFocus( @Nullable final FocusEventHandler handler )
033  {
034    setOnFocus( handler );
035    return self();
036  }
037
038  // Keyboard Events
039  @JsOverlay
040  @Nonnull
041  public final HtmlProps onKeyDown( @Nullable final KeyboardEventHandler handler )
042  {
043    setOnKeyDown( handler );
044    return self();
045  }
046
047  @JsOverlay
048  @Nonnull
049  public final HtmlProps onKeyPress( @Nullable final KeyboardEventHandler handler )
050  {
051    setOnKeyPress( handler );
052    return self();
053  }
054
055  @JsOverlay
056  @Nonnull
057  public final HtmlProps onKeyUp( @Nullable final KeyboardEventHandler handler )
058  {
059    setOnKeyUp( handler );
060    return self();
061  }
062
063  @JsOverlay
064  @Nonnull
065  public final HtmlProps onClick( @Nullable final MouseEventHandler handler )
066  {
067    setOnClick( handler );
068    return self();
069  }
070
071  @JsOverlay
072  @Nonnull
073  public final HtmlProps onContextMenu( @Nullable final MouseEventHandler handler )
074  {
075    setOnContextMenu( handler );
076    return self();
077  }
078
079  @JsOverlay
080  @Nonnull
081  public final HtmlProps onDoubleClick( @Nullable final MouseEventHandler handler )
082  {
083    setOnDoubleClick( handler );
084    return self();
085  }
086
087  @JsOverlay
088  @Nonnull
089  public final HtmlProps onDrag( @Nullable final DragEventHandler handler )
090  {
091    setOnDrag( handler );
092    return self();
093  }
094
095  @JsOverlay
096  @Nonnull
097  public final HtmlProps onDragEnd( @Nullable final DragEventHandler handler )
098  {
099    setOnDragEnd( handler );
100    return self();
101  }
102
103  @JsOverlay
104  @Nonnull
105  public final HtmlProps onDragEnter( @Nullable final DragEventHandler handler )
106  {
107    setOnDragEnter( handler );
108    return self();
109  }
110
111  @JsOverlay
112  @Nonnull
113  public final HtmlProps onDragExit( @Nullable final DragEventHandler handler )
114  {
115    setOnDragExit( handler );
116    return self();
117  }
118
119  @JsOverlay
120  @Nonnull
121  public final HtmlProps onDragLeave( @Nullable final DragEventHandler handler )
122  {
123    setOnDragLeave( handler );
124    return self();
125  }
126
127  @JsOverlay
128  @Nonnull
129  public final HtmlProps onDragOver( @Nullable final DragEventHandler handler )
130  {
131    setOnDragOver( handler );
132    return self();
133  }
134
135  @JsOverlay
136  @Nonnull
137  public final HtmlProps onDragStart( @Nullable final DragEventHandler handler )
138  {
139    setOnDragStart( handler );
140    return self();
141  }
142
143  @JsOverlay
144  @Nonnull
145  public final HtmlProps onDrop( @Nullable final DragEventHandler handler )
146  {
147    setOnDrop( handler );
148    return self();
149  }
150
151  @JsOverlay
152  @Nonnull
153  public final HtmlProps onMouseDown( @Nullable final MouseEventHandler handler )
154  {
155    setOnMouseDown( handler );
156    return self();
157  }
158
159  @JsOverlay
160  @Nonnull
161  public final HtmlProps onMouseEnter( @Nullable final MouseEventHandler handler )
162  {
163    setOnMouseEnter( handler );
164    return self();
165  }
166
167  @JsOverlay
168  @Nonnull
169  public final HtmlProps onMouseLeave( @Nullable final MouseEventHandler handler )
170  {
171    setOnMouseLeave( handler );
172    return self();
173  }
174
175  @JsOverlay
176  @Nonnull
177  public final HtmlProps onMouseMove( @Nullable final MouseEventHandler handler )
178  {
179    setOnMouseMove( handler );
180    return self();
181  }
182
183  @JsOverlay
184  @Nonnull
185  public final HtmlProps onMouseOut( @Nullable final MouseEventHandler handler )
186  {
187    setOnMouseOut( handler );
188    return self();
189  }
190
191  @JsOverlay
192  @Nonnull
193  public final HtmlProps onMouseOver( @Nullable final MouseEventHandler handler )
194  {
195    setOnMouseOver( handler );
196    return self();
197  }
198
199  @JsOverlay
200  @Nonnull
201  public final HtmlProps onMouseUp( @Nullable final MouseEventHandler handler )
202  {
203    setOnMouseUp( handler );
204    return self();
205  }
206
207  // Touch Events
208  @JsOverlay
209  @Nonnull
210  public final HtmlProps onTouchCancel( @Nullable final TouchEventHandler handler )
211  {
212    setOnTouchCancel( handler );
213    return self();
214  }
215
216  @JsOverlay
217  @Nonnull
218  public final HtmlProps onTouchEnd( @Nullable final TouchEventHandler handler )
219  {
220    setOnTouchEnd( handler );
221    return self();
222  }
223
224  @JsOverlay
225  @Nonnull
226  public final HtmlProps onTouchMove( @Nullable final TouchEventHandler handler )
227  {
228    setOnTouchMove( handler );
229    return self();
230  }
231
232  @JsOverlay
233  @Nonnull
234  public final HtmlProps onTouchStart( @Nullable final TouchEventHandler handler )
235  {
236    setOnTouchStart( handler );
237    return self();
238  }
239
240  @JsOverlay
241  @Nonnull
242  public final HtmlProps onScroll( @Nullable final UIEventHandler onScroll )
243  {
244    setOnScroll( onScroll );
245    return self();
246  }
247}