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