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; 013 014/** 015 * Props for input elements. Refer to http://www.w3schools.com/tags/tag_iframe.asp 016 */ 017@JsType( isNative = true, namespace = JsPackage.GLOBAL, name = "Object" ) 018public class IFrameProps 019 extends HtmlGlobalFields<IFrameProps> 020{ 021 @JsOverlay 022 @Nonnull 023 public final IFrameProps height( int i ) 024 { 025 setHeight( Integer.toString( i ) ); 026 return self(); 027 } 028 029 @JsOverlay 030 @Nonnull 031 public final IFrameProps name( String s ) 032 { 033 setName( s ); 034 return self(); 035 } 036 037 @JsOverlay 038 @Nonnull 039 public final IFrameProps src( String s ) 040 { 041 setSrc( s ); 042 return self(); 043 } 044 045 @JsOverlay 046 @Nonnull 047 public final IFrameProps sandbox( String s ) 048 { 049 setSandbox( s ); 050 return self(); 051 } 052 053 @JsOverlay 054 @Nonnull 055 public final IFrameProps width( int i ) 056 { 057 setWidth( Integer.toString( i ) ); 058 return self(); 059 } 060 061 //Applicable Event Handlers 062 063 //TODO refine 064 // Focus Events 065 @JsOverlay 066 @Nonnull 067 public final IFrameProps onBlur( @Nullable final FocusEventHandler handler ) 068 { 069 setOnBlur( handler ); 070 return self(); 071 } 072 073 @JsOverlay 074 @Nonnull 075 public final IFrameProps onFocus( @Nullable final FocusEventHandler handler ) 076 { 077 setOnFocus( handler ); 078 return self(); 079 } 080 081 // Keyboard Events 082 @JsOverlay 083 @Nonnull 084 public final IFrameProps onKeyDown( @Nullable final KeyboardEventHandler handler ) 085 { 086 setOnKeyDown( handler ); 087 return self(); 088 } 089 090 @JsOverlay 091 @Nonnull 092 public final IFrameProps onKeyPress( @Nullable final KeyboardEventHandler handler ) 093 { 094 setOnKeyPress( handler ); 095 return self(); 096 } 097 098 @JsOverlay 099 @Nonnull 100 public final IFrameProps onKeyUp( @Nullable final KeyboardEventHandler handler ) 101 { 102 setOnKeyUp( handler ); 103 return self(); 104 } 105 106 @JsOverlay 107 @Nonnull 108 public final IFrameProps onClick( @Nullable final MouseEventHandler handler ) 109 { 110 setOnClick( handler ); 111 return self(); 112 } 113 114 @JsOverlay 115 @Nonnull 116 public final IFrameProps onContextMenu( @Nullable final MouseEventHandler handler ) 117 { 118 setOnContextMenu( handler ); 119 return self(); 120 } 121 122 @JsOverlay 123 @Nonnull 124 public final IFrameProps onDoubleClick( @Nullable final MouseEventHandler handler ) 125 { 126 setOnDoubleClick( handler ); 127 return self(); 128 } 129 130 @JsOverlay 131 @Nonnull 132 public final IFrameProps onDrag( @Nullable final DragEventHandler handler ) 133 { 134 setOnDrag( handler ); 135 return self(); 136 } 137 138 @JsOverlay 139 @Nonnull 140 public final IFrameProps onDragEnd( @Nullable final DragEventHandler handler ) 141 { 142 setOnDragEnd( handler ); 143 return self(); 144 } 145 146 @JsOverlay 147 @Nonnull 148 public final IFrameProps onDragEnter( @Nullable final DragEventHandler handler ) 149 { 150 setOnDragEnter( handler ); 151 return self(); 152 } 153 154 @JsOverlay 155 @Nonnull 156 public final IFrameProps onDragExit( @Nullable final DragEventHandler handler ) 157 { 158 setOnDragExit( handler ); 159 return self(); 160 } 161 162 @JsOverlay 163 @Nonnull 164 public final IFrameProps onDragLeave( @Nullable final DragEventHandler handler ) 165 { 166 setOnDragLeave( handler ); 167 return self(); 168 } 169 170 @JsOverlay 171 @Nonnull 172 public final IFrameProps onDragOver( @Nullable final DragEventHandler handler ) 173 { 174 setOnDragOver( handler ); 175 return self(); 176 } 177 178 @JsOverlay 179 @Nonnull 180 public final IFrameProps onDragStart( @Nullable final DragEventHandler handler ) 181 { 182 setOnDragStart( handler ); 183 return self(); 184 } 185 186 @JsOverlay 187 @Nonnull 188 public final IFrameProps onDrop( @Nullable final DragEventHandler handler ) 189 { 190 setOnDrop( handler ); 191 return self(); 192 } 193 194 @JsOverlay 195 @Nonnull 196 public final IFrameProps onMouseDown( @Nullable final MouseEventHandler handler ) 197 { 198 setOnMouseDown( handler ); 199 return self(); 200 } 201 202 @JsOverlay 203 @Nonnull 204 public final IFrameProps onMouseEnter( @Nullable final MouseEventHandler handler ) 205 { 206 setOnMouseEnter( handler ); 207 return self(); 208 } 209 210 @JsOverlay 211 @Nonnull 212 public final IFrameProps onMouseLeave( @Nullable final MouseEventHandler handler ) 213 { 214 setOnMouseLeave( handler ); 215 return self(); 216 } 217 218 @JsOverlay 219 @Nonnull 220 public final IFrameProps onMouseMove( @Nullable final MouseEventHandler handler ) 221 { 222 setOnMouseMove( handler ); 223 return self(); 224 } 225 226 @JsOverlay 227 @Nonnull 228 public final IFrameProps onMouseOut( @Nullable final MouseEventHandler handler ) 229 { 230 setOnMouseOut( handler ); 231 return self(); 232 } 233 234 @JsOverlay 235 @Nonnull 236 public final IFrameProps onMouseOver( @Nullable final MouseEventHandler handler ) 237 { 238 setOnMouseOver( handler ); 239 return self(); 240 } 241 242 @JsOverlay 243 @Nonnull 244 public final IFrameProps onMouseUp( @Nullable final MouseEventHandler handler ) 245 { 246 setOnMouseUp( handler ); 247 return self(); 248 } 249 250 // Touch Events 251 @JsOverlay 252 @Nonnull 253 public final IFrameProps onTouchCancel( @Nullable final TouchEventHandler handler ) 254 { 255 setOnTouchCancel( handler ); 256 return self(); 257 } 258 259 @JsOverlay 260 @Nonnull 261 public final IFrameProps onTouchEnd( @Nullable final TouchEventHandler handler ) 262 { 263 setOnTouchEnd( handler ); 264 return self(); 265 } 266 267 @JsOverlay 268 @Nonnull 269 public final IFrameProps onTouchMove( @Nullable final TouchEventHandler handler ) 270 { 271 setOnTouchMove( handler ); 272 return self(); 273 } 274 275 @JsOverlay 276 @Nonnull 277 public final IFrameProps onTouchStart( @Nullable final TouchEventHandler handler ) 278 { 279 setOnTouchStart( handler ); 280 return self(); 281 } 282}