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