repo_name stringlengths 7 104 | file_path stringlengths 13 198 | context stringlengths 67 7.15k | import_statement stringlengths 16 4.43k | code stringlengths 40 6.98k | prompt stringlengths 227 8.27k | next_line stringlengths 8 795 |
|---|---|---|---|---|---|---|
GWTReact/gwt-react | src/gwt/react/client/elements/ReactElement.java | // Path: src/gwt/react/client/proptypes/BaseProps.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
// public class BaseProps extends JsPlainObj {
// public ReactElementChildren children;
// public String key;
// public Object ref; //Either a String Id or RefCallback
// }
| import gwt.react.client.proptypes.BaseProps;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.elements;
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class ReactElement {
public Object type; | // Path: src/gwt/react/client/proptypes/BaseProps.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
// public class BaseProps extends JsPlainObj {
// public ReactElementChildren children;
// public String key;
// public Object ref; //Either a String Id or RefCallback
// }
// Path: src/gwt/react/client/elements/ReactElement.java
import gwt.react.client.proptypes.BaseProps;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.elements;
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class ReactElement {
public Object type; | public BaseProps props; |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/CssProps.java | // Path: src/gwt/react/client/proptypes/html/cssPropertyTypes/AnimationFillMode.java
// public enum AnimationFillMode {
// none, forwards, backwards, both, initial, inherit;
// }
//
// Path: src/gwt/react/client/proptypes/html/cssPropertyTypes/Visibility.java
// public enum Visibility {
// hidden, visible, collapse, initial, inherit
// }
| import gwt.interop.utils.client.plainobjects.JsPlainObj;
import gwt.react.client.proptypes.html.cssPropertyTypes.AnimationFillMode;
import gwt.react.client.proptypes.html.cssPropertyTypes.Visibility;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* This class represents properties of the CSS style object.
*
* NOTE: this is very much a work in progress. Further refinements will include
* defining enumerations for many of the properties
*/
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class CssProps extends JsPlainObj {
@JsProperty public String animationFillMode;
| // Path: src/gwt/react/client/proptypes/html/cssPropertyTypes/AnimationFillMode.java
// public enum AnimationFillMode {
// none, forwards, backwards, both, initial, inherit;
// }
//
// Path: src/gwt/react/client/proptypes/html/cssPropertyTypes/Visibility.java
// public enum Visibility {
// hidden, visible, collapse, initial, inherit
// }
// Path: src/gwt/react/client/proptypes/html/CssProps.java
import gwt.interop.utils.client.plainobjects.JsPlainObj;
import gwt.react.client.proptypes.html.cssPropertyTypes.AnimationFillMode;
import gwt.react.client.proptypes.html.cssPropertyTypes.Visibility;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* This class represents properties of the CSS style object.
*
* NOTE: this is very much a work in progress. Further refinements will include
* defining enumerations for many of the properties
*/
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class CssProps extends JsPlainObj {
@JsProperty public String animationFillMode;
| @JsOverlay public final CssProps animationFillMode(AnimationFillMode mode) { |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/CssProps.java | // Path: src/gwt/react/client/proptypes/html/cssPropertyTypes/AnimationFillMode.java
// public enum AnimationFillMode {
// none, forwards, backwards, both, initial, inherit;
// }
//
// Path: src/gwt/react/client/proptypes/html/cssPropertyTypes/Visibility.java
// public enum Visibility {
// hidden, visible, collapse, initial, inherit
// }
| import gwt.interop.utils.client.plainobjects.JsPlainObj;
import gwt.react.client.proptypes.html.cssPropertyTypes.AnimationFillMode;
import gwt.react.client.proptypes.html.cssPropertyTypes.Visibility;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType; | @JsProperty public String userInput;
/**
* For inputing user content
*/
@JsOverlay public final CssProps userInput(String s) {
userInput = s;
return this;
}
@JsProperty public String verticalAlign;
/**
* The vertical-align property controls how inline elements or text are vertically aligned
* compared to the baseline. If this property is used on table-cells it controls the vertical
* alignment of content of the table cell.
*/
@JsOverlay public final CssProps verticalAlign(String s) {
verticalAlign = s;
return this;
}
@JsProperty public String visibility;
/**
* The visibility property specifies whether the boxes generated by an element are rendered.
*/ | // Path: src/gwt/react/client/proptypes/html/cssPropertyTypes/AnimationFillMode.java
// public enum AnimationFillMode {
// none, forwards, backwards, both, initial, inherit;
// }
//
// Path: src/gwt/react/client/proptypes/html/cssPropertyTypes/Visibility.java
// public enum Visibility {
// hidden, visible, collapse, initial, inherit
// }
// Path: src/gwt/react/client/proptypes/html/CssProps.java
import gwt.interop.utils.client.plainobjects.JsPlainObj;
import gwt.react.client.proptypes.html.cssPropertyTypes.AnimationFillMode;
import gwt.react.client.proptypes.html.cssPropertyTypes.Visibility;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;
@JsProperty public String userInput;
/**
* For inputing user content
*/
@JsOverlay public final CssProps userInput(String s) {
userInput = s;
return this;
}
@JsProperty public String verticalAlign;
/**
* The vertical-align property controls how inline elements or text are vertically aligned
* compared to the baseline. If this property is used on table-cells it controls the vertical
* alignment of content of the table cell.
*/
@JsOverlay public final CssProps verticalAlign(String s) {
verticalAlign = s;
return this;
}
@JsProperty public String visibility;
/**
* The visibility property specifies whether the boxes generated by an element are rendered.
*/ | @JsOverlay public final CssProps visibility(Visibility v) { |
GWTReact/gwt-react | src/gwt/react/client/api/ChildrenForEachFn.java | // Path: src/gwt/react/client/elements/ReactElement.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactElement {
// public Object type;
// public BaseProps props;
// public String key;
//
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// protected ReactElement() {
// }
// }
| import jsinterop.annotations.JsFunction;
import gwt.react.client.elements.ReactElement; | package gwt.react.client.api;
/* The MIT License (MIT)
Copyright (c) 2016 GWT React
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
@JsFunction
public interface ChildrenForEachFn { | // Path: src/gwt/react/client/elements/ReactElement.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactElement {
// public Object type;
// public BaseProps props;
// public String key;
//
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// protected ReactElement() {
// }
// }
// Path: src/gwt/react/client/api/ChildrenForEachFn.java
import jsinterop.annotations.JsFunction;
import gwt.react.client.elements.ReactElement;
package gwt.react.client.api;
/* The MIT License (MIT)
Copyright (c) 2016 GWT React
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
@JsFunction
public interface ChildrenForEachFn { | void forEachChild(ReactElement childElement); |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/BtnProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/ButtonType.java
// public enum ButtonType {
// button, reset, submit
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLButtonElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.ButtonType;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for button elements. Refer to http://www.w3schools.com/tags/tag_button.asp
*/
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class BtnProps extends HtmlGlobalFields {
@JsOverlay public final BtnProps autoFocus(boolean b) { autoFocus = b; return this; }
@JsOverlay public final BtnProps disabled(boolean b) { disabled = b; return this; }
@JsOverlay public final BtnProps from(String s) { form = s; return this; }
@JsOverlay public final BtnProps formAction(String s) { formAction = s; return this; }
@JsOverlay public final BtnProps formEncType(String s) { formEncType = s; return this; }
@JsOverlay public final BtnProps formMethod(String s) { formMethod = s; return this; }
@JsOverlay public final BtnProps formNoValidate(boolean b) { formNoValidate = b; return this; }
@JsOverlay public final BtnProps formTarget(String s) { formTarget = s; return this; }
@JsOverlay public final BtnProps name(String s) { name = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/ButtonType.java
// public enum ButtonType {
// button, reset, submit
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/BtnProps.java
import elemental2.dom.HTMLButtonElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.ButtonType;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for button elements. Refer to http://www.w3schools.com/tags/tag_button.asp
*/
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class BtnProps extends HtmlGlobalFields {
@JsOverlay public final BtnProps autoFocus(boolean b) { autoFocus = b; return this; }
@JsOverlay public final BtnProps disabled(boolean b) { disabled = b; return this; }
@JsOverlay public final BtnProps from(String s) { form = s; return this; }
@JsOverlay public final BtnProps formAction(String s) { formAction = s; return this; }
@JsOverlay public final BtnProps formEncType(String s) { formEncType = s; return this; }
@JsOverlay public final BtnProps formMethod(String s) { formMethod = s; return this; }
@JsOverlay public final BtnProps formNoValidate(boolean b) { formNoValidate = b; return this; }
@JsOverlay public final BtnProps formTarget(String s) { formTarget = s; return this; }
@JsOverlay public final BtnProps name(String s) { name = s; return this; } | @JsOverlay public final BtnProps type(ButtonType t) { type = t.name(); return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/BtnProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/ButtonType.java
// public enum ButtonType {
// button, reset, submit
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLButtonElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.ButtonType;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for button elements. Refer to http://www.w3schools.com/tags/tag_button.asp
*/
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class BtnProps extends HtmlGlobalFields {
@JsOverlay public final BtnProps autoFocus(boolean b) { autoFocus = b; return this; }
@JsOverlay public final BtnProps disabled(boolean b) { disabled = b; return this; }
@JsOverlay public final BtnProps from(String s) { form = s; return this; }
@JsOverlay public final BtnProps formAction(String s) { formAction = s; return this; }
@JsOverlay public final BtnProps formEncType(String s) { formEncType = s; return this; }
@JsOverlay public final BtnProps formMethod(String s) { formMethod = s; return this; }
@JsOverlay public final BtnProps formNoValidate(boolean b) { formNoValidate = b; return this; }
@JsOverlay public final BtnProps formTarget(String s) { formTarget = s; return this; }
@JsOverlay public final BtnProps name(String s) { name = s; return this; }
@JsOverlay public final BtnProps type(ButtonType t) { type = t.name(); return this; }
@JsOverlay public final BtnProps value(String s) { value = s; return this; }
//React Specific
@JsOverlay public final BtnProps defaultChecked(boolean b) { defaultChecked = b; return this; }
@JsOverlay public final BtnProps defaultValue(String s) { defaultValue = s; return this; }
@Deprecated @JsOverlay public final BtnProps ref(String s) { ref = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/ButtonType.java
// public enum ButtonType {
// button, reset, submit
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/BtnProps.java
import elemental2.dom.HTMLButtonElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.ButtonType;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for button elements. Refer to http://www.w3schools.com/tags/tag_button.asp
*/
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class BtnProps extends HtmlGlobalFields {
@JsOverlay public final BtnProps autoFocus(boolean b) { autoFocus = b; return this; }
@JsOverlay public final BtnProps disabled(boolean b) { disabled = b; return this; }
@JsOverlay public final BtnProps from(String s) { form = s; return this; }
@JsOverlay public final BtnProps formAction(String s) { formAction = s; return this; }
@JsOverlay public final BtnProps formEncType(String s) { formEncType = s; return this; }
@JsOverlay public final BtnProps formMethod(String s) { formMethod = s; return this; }
@JsOverlay public final BtnProps formNoValidate(boolean b) { formNoValidate = b; return this; }
@JsOverlay public final BtnProps formTarget(String s) { formTarget = s; return this; }
@JsOverlay public final BtnProps name(String s) { name = s; return this; }
@JsOverlay public final BtnProps type(ButtonType t) { type = t.name(); return this; }
@JsOverlay public final BtnProps value(String s) { value = s; return this; }
//React Specific
@JsOverlay public final BtnProps defaultChecked(boolean b) { defaultChecked = b; return this; }
@JsOverlay public final BtnProps defaultValue(String s) { defaultValue = s; return this; }
@Deprecated @JsOverlay public final BtnProps ref(String s) { ref = s; return this; } | @JsOverlay public final BtnProps ref(ReactRefCallback callback) { ref = callback; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/BtnProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/ButtonType.java
// public enum ButtonType {
// button, reset, submit
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLButtonElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.ButtonType;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for button elements. Refer to http://www.w3schools.com/tags/tag_button.asp
*/
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class BtnProps extends HtmlGlobalFields {
@JsOverlay public final BtnProps autoFocus(boolean b) { autoFocus = b; return this; }
@JsOverlay public final BtnProps disabled(boolean b) { disabled = b; return this; }
@JsOverlay public final BtnProps from(String s) { form = s; return this; }
@JsOverlay public final BtnProps formAction(String s) { formAction = s; return this; }
@JsOverlay public final BtnProps formEncType(String s) { formEncType = s; return this; }
@JsOverlay public final BtnProps formMethod(String s) { formMethod = s; return this; }
@JsOverlay public final BtnProps formNoValidate(boolean b) { formNoValidate = b; return this; }
@JsOverlay public final BtnProps formTarget(String s) { formTarget = s; return this; }
@JsOverlay public final BtnProps name(String s) { name = s; return this; }
@JsOverlay public final BtnProps type(ButtonType t) { type = t.name(); return this; }
@JsOverlay public final BtnProps value(String s) { value = s; return this; }
//React Specific
@JsOverlay public final BtnProps defaultChecked(boolean b) { defaultChecked = b; return this; }
@JsOverlay public final BtnProps defaultValue(String s) { defaultValue = s; return this; }
@Deprecated @JsOverlay public final BtnProps ref(String s) { ref = s; return this; }
@JsOverlay public final BtnProps ref(ReactRefCallback callback) { ref = callback; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/ButtonType.java
// public enum ButtonType {
// button, reset, submit
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/BtnProps.java
import elemental2.dom.HTMLButtonElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.ButtonType;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for button elements. Refer to http://www.w3schools.com/tags/tag_button.asp
*/
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class BtnProps extends HtmlGlobalFields {
@JsOverlay public final BtnProps autoFocus(boolean b) { autoFocus = b; return this; }
@JsOverlay public final BtnProps disabled(boolean b) { disabled = b; return this; }
@JsOverlay public final BtnProps from(String s) { form = s; return this; }
@JsOverlay public final BtnProps formAction(String s) { formAction = s; return this; }
@JsOverlay public final BtnProps formEncType(String s) { formEncType = s; return this; }
@JsOverlay public final BtnProps formMethod(String s) { formMethod = s; return this; }
@JsOverlay public final BtnProps formNoValidate(boolean b) { formNoValidate = b; return this; }
@JsOverlay public final BtnProps formTarget(String s) { formTarget = s; return this; }
@JsOverlay public final BtnProps name(String s) { name = s; return this; }
@JsOverlay public final BtnProps type(ButtonType t) { type = t.name(); return this; }
@JsOverlay public final BtnProps value(String s) { value = s; return this; }
//React Specific
@JsOverlay public final BtnProps defaultChecked(boolean b) { defaultChecked = b; return this; }
@JsOverlay public final BtnProps defaultValue(String s) { defaultValue = s; return this; }
@Deprecated @JsOverlay public final BtnProps ref(String s) { ref = s; return this; }
@JsOverlay public final BtnProps ref(ReactRefCallback callback) { ref = callback; return this; } | @JsOverlay public final BtnProps ref(ReactRef<HTMLButtonElement> reactRef) { ref = reactRef; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/BtnProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/ButtonType.java
// public enum ButtonType {
// button, reset, submit
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLButtonElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.ButtonType;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | @JsOverlay public final BtnProps formNoValidate(boolean b) { formNoValidate = b; return this; }
@JsOverlay public final BtnProps formTarget(String s) { formTarget = s; return this; }
@JsOverlay public final BtnProps name(String s) { name = s; return this; }
@JsOverlay public final BtnProps type(ButtonType t) { type = t.name(); return this; }
@JsOverlay public final BtnProps value(String s) { value = s; return this; }
//React Specific
@JsOverlay public final BtnProps defaultChecked(boolean b) { defaultChecked = b; return this; }
@JsOverlay public final BtnProps defaultValue(String s) { defaultValue = s; return this; }
@Deprecated @JsOverlay public final BtnProps ref(String s) { ref = s; return this; }
@JsOverlay public final BtnProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final BtnProps ref(ReactRef<HTMLButtonElement> reactRef) { ref = reactRef; return this; }
@JsOverlay public final BtnProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final BtnProps accessKey(String s) { accessKey = s;return this;}
@JsOverlay public final BtnProps className(String s) { className = s; return this; }
@JsOverlay public final BtnProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final BtnProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final BtnProps dir(String s) { dir = s; return this; }
@JsOverlay public final BtnProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final BtnProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final BtnProps id(String s) { id = s; return this; }
@JsOverlay public final BtnProps lang(String s) { lang = s; return this; }
@JsOverlay public final BtnProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final BtnProps style(CssProps s) { style = s; return this; }
@JsOverlay public final BtnProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final BtnProps title(String s) { title = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/ButtonType.java
// public enum ButtonType {
// button, reset, submit
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/BtnProps.java
import elemental2.dom.HTMLButtonElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.ButtonType;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
@JsOverlay public final BtnProps formNoValidate(boolean b) { formNoValidate = b; return this; }
@JsOverlay public final BtnProps formTarget(String s) { formTarget = s; return this; }
@JsOverlay public final BtnProps name(String s) { name = s; return this; }
@JsOverlay public final BtnProps type(ButtonType t) { type = t.name(); return this; }
@JsOverlay public final BtnProps value(String s) { value = s; return this; }
//React Specific
@JsOverlay public final BtnProps defaultChecked(boolean b) { defaultChecked = b; return this; }
@JsOverlay public final BtnProps defaultValue(String s) { defaultValue = s; return this; }
@Deprecated @JsOverlay public final BtnProps ref(String s) { ref = s; return this; }
@JsOverlay public final BtnProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final BtnProps ref(ReactRef<HTMLButtonElement> reactRef) { ref = reactRef; return this; }
@JsOverlay public final BtnProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final BtnProps accessKey(String s) { accessKey = s;return this;}
@JsOverlay public final BtnProps className(String s) { className = s; return this; }
@JsOverlay public final BtnProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final BtnProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final BtnProps dir(String s) { dir = s; return this; }
@JsOverlay public final BtnProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final BtnProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final BtnProps id(String s) { id = s; return this; }
@JsOverlay public final BtnProps lang(String s) { lang = s; return this; }
@JsOverlay public final BtnProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final BtnProps style(CssProps s) { style = s; return this; }
@JsOverlay public final BtnProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final BtnProps title(String s) { title = s; return this; } | @JsOverlay public final BtnProps translate(YesNo s) { translate = s.name(); return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/HtmlProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class HtmlProps extends HtmlGlobalFields {
//React Specific
@JsOverlay public final HtmlProps dangerouslySetInnerHTML(String s) { setDangerouslyInnerHTML(s); return this; }
@Deprecated @JsOverlay public final HtmlProps ref(String s) { ref = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/HtmlProps.java
import elemental2.dom.HTMLElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class HtmlProps extends HtmlGlobalFields {
//React Specific
@JsOverlay public final HtmlProps dangerouslySetInnerHTML(String s) { setDangerouslyInnerHTML(s); return this; }
@Deprecated @JsOverlay public final HtmlProps ref(String s) { ref = s; return this; } | @JsOverlay public final HtmlProps ref(ReactRefCallback callback) { ref = callback; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/HtmlProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class HtmlProps extends HtmlGlobalFields {
//React Specific
@JsOverlay public final HtmlProps dangerouslySetInnerHTML(String s) { setDangerouslyInnerHTML(s); return this; }
@Deprecated @JsOverlay public final HtmlProps ref(String s) { ref = s; return this; }
@JsOverlay public final HtmlProps ref(ReactRefCallback callback) { ref = callback; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/HtmlProps.java
import elemental2.dom.HTMLElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class HtmlProps extends HtmlGlobalFields {
//React Specific
@JsOverlay public final HtmlProps dangerouslySetInnerHTML(String s) { setDangerouslyInnerHTML(s); return this; }
@Deprecated @JsOverlay public final HtmlProps ref(String s) { ref = s; return this; }
@JsOverlay public final HtmlProps ref(ReactRefCallback callback) { ref = callback; return this; } | @JsOverlay public final HtmlProps ref(ReactRef<HTMLElement> reactRef) { ref = reactRef; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/HtmlProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class HtmlProps extends HtmlGlobalFields {
//React Specific
@JsOverlay public final HtmlProps dangerouslySetInnerHTML(String s) { setDangerouslyInnerHTML(s); return this; }
@Deprecated @JsOverlay public final HtmlProps ref(String s) { ref = s; return this; }
@JsOverlay public final HtmlProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final HtmlProps ref(ReactRef<HTMLElement> reactRef) { ref = reactRef; return this; }
@JsOverlay public final HtmlProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final HtmlProps accessKey(String s) { accessKey = s;return this;}
@JsOverlay public final HtmlProps className(String s) { className = s; return this; }
@JsOverlay public final HtmlProps className(String s1, String s2) { className = s1 + " " + s2; return this; }
@JsOverlay public final HtmlProps className(String s1, String s2, String s3) { className = s1 + " " + s2 + " " + s3; return this; }
@JsOverlay public final HtmlProps className(String s1, String s2, String s3, String s4) { className = s1 + " " + s2 + " " + s3 + " " + s4; return this; }
@JsOverlay public final HtmlProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final HtmlProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final HtmlProps dir(String s) { dir = s; return this; }
@JsOverlay public final HtmlProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final HtmlProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final HtmlProps id(String s) { id = s; return this; }
@JsOverlay public final HtmlProps lang(String s) { lang = s; return this; }
@JsOverlay public final HtmlProps style(CssProps s) { style = s; return this; }
@JsOverlay public final HtmlProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final HtmlProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final HtmlProps title(String s) { title = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/HtmlProps.java
import elemental2.dom.HTMLElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class HtmlProps extends HtmlGlobalFields {
//React Specific
@JsOverlay public final HtmlProps dangerouslySetInnerHTML(String s) { setDangerouslyInnerHTML(s); return this; }
@Deprecated @JsOverlay public final HtmlProps ref(String s) { ref = s; return this; }
@JsOverlay public final HtmlProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final HtmlProps ref(ReactRef<HTMLElement> reactRef) { ref = reactRef; return this; }
@JsOverlay public final HtmlProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final HtmlProps accessKey(String s) { accessKey = s;return this;}
@JsOverlay public final HtmlProps className(String s) { className = s; return this; }
@JsOverlay public final HtmlProps className(String s1, String s2) { className = s1 + " " + s2; return this; }
@JsOverlay public final HtmlProps className(String s1, String s2, String s3) { className = s1 + " " + s2 + " " + s3; return this; }
@JsOverlay public final HtmlProps className(String s1, String s2, String s3, String s4) { className = s1 + " " + s2 + " " + s3 + " " + s4; return this; }
@JsOverlay public final HtmlProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final HtmlProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final HtmlProps dir(String s) { dir = s; return this; }
@JsOverlay public final HtmlProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final HtmlProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final HtmlProps id(String s) { id = s; return this; }
@JsOverlay public final HtmlProps lang(String s) { lang = s; return this; }
@JsOverlay public final HtmlProps style(CssProps s) { style = s; return this; }
@JsOverlay public final HtmlProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final HtmlProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final HtmlProps title(String s) { title = s; return this; } | @JsOverlay public final HtmlProps translate(YesNo s) { translate = s.name(); return this; } |
GWTReact/gwt-react | src/gwt/react/client/components/StatelessComponent.java | // Path: src/gwt/react/client/elements/ReactElement.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactElement {
// public Object type;
// public BaseProps props;
// public String key;
//
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// protected ReactElement() {
// }
// }
//
// Path: src/gwt/react/client/proptypes/BaseProps.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
// public class BaseProps extends JsPlainObj {
// public ReactElementChildren children;
// public String key;
// public Object ref; //Either a String Id or RefCallback
// }
| import gwt.react.client.elements.ReactElement;
import gwt.react.client.proptypes.BaseProps;
import jsinterop.annotations.JsFunction; | package gwt.react.client.components;
/**
* <p>Define a stateless component expressed as plain function.This simplified component
* API is intended for components that are pure functions of their props. These
* components must not retain internal state, do not have backing instances, and do
* not have the component lifecycle methods. They are pure functional transforms of
* their input, with zero boilerplate.</p>
*
* <p>In an ideal world, most of your components would be stateless functions because
* in the future we'll also be able to make performance optimizations specific to these
* components by avoiding unnecessary checks and memory allocations. This is the
* recommended pattern, when possible.</p>
*
* @param <P> The type of props this component expects
*/
@JsFunction
public interface StatelessComponent<P extends BaseProps> {
/**
* The render() method is required.
*
* <p>When called, it should examine props return a single child element.
* This child element can be either a virtual representation of a native DOM component
* (such as React.DOM.div()) or another composite component that you've defined
* yourself.</p>
*
* <p>You can also return null to indicate that you don't want anything rendered.
* Behind the scenes, React renders a <noscript> tag to work with our current diffing
* algorithm.</p>
*
* <p>The render() function should be pure, meaning that it does not modify component
* state, it returns the same result each time it's invoked, and it does not read from
* or write to the DOM or otherwise interact with the browser (e.g., by using setTimeout).</p>
*
* @param props The props for this component
* @return A single {@link ReactElement}
*/ | // Path: src/gwt/react/client/elements/ReactElement.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactElement {
// public Object type;
// public BaseProps props;
// public String key;
//
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// protected ReactElement() {
// }
// }
//
// Path: src/gwt/react/client/proptypes/BaseProps.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
// public class BaseProps extends JsPlainObj {
// public ReactElementChildren children;
// public String key;
// public Object ref; //Either a String Id or RefCallback
// }
// Path: src/gwt/react/client/components/StatelessComponent.java
import gwt.react.client.elements.ReactElement;
import gwt.react.client.proptypes.BaseProps;
import jsinterop.annotations.JsFunction;
package gwt.react.client.components;
/**
* <p>Define a stateless component expressed as plain function.This simplified component
* API is intended for components that are pure functions of their props. These
* components must not retain internal state, do not have backing instances, and do
* not have the component lifecycle methods. They are pure functional transforms of
* their input, with zero boilerplate.</p>
*
* <p>In an ideal world, most of your components would be stateless functions because
* in the future we'll also be able to make performance optimizations specific to these
* components by avoiding unnecessary checks and memory allocations. This is the
* recommended pattern, when possible.</p>
*
* @param <P> The type of props this component expects
*/
@JsFunction
public interface StatelessComponent<P extends BaseProps> {
/**
* The render() method is required.
*
* <p>When called, it should examine props return a single child element.
* This child element can be either a virtual representation of a native DOM component
* (such as React.DOM.div()) or another composite component that you've defined
* yourself.</p>
*
* <p>You can also return null to indicate that you don't want anything rendered.
* Behind the scenes, React renders a <noscript> tag to work with our current diffing
* algorithm.</p>
*
* <p>The render() function should be pure, meaning that it does not modify component
* state, it returns the same result each time it's invoked, and it does not read from
* or write to the DOM or otherwise interact with the browser (e.g., by using setTimeout).</p>
*
* @param props The props for this component
* @return A single {@link ReactElement}
*/ | ReactElement render(P props); |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/PolygonProps.java | // Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for svg polygon elements. Refer to https://developer.mozilla.org/en-US/docs/Web/SVG/Element/polygon
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class PolygonProps extends HtmlGlobalFields {
@JsOverlay public final PolygonProps points(String p) { set("points", p); return this; }
//React Specific
@JsOverlay public final PolygonProps ref(String s) { ref = s; return this; } | // Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/PolygonProps.java
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for svg polygon elements. Refer to https://developer.mozilla.org/en-US/docs/Web/SVG/Element/polygon
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class PolygonProps extends HtmlGlobalFields {
@JsOverlay public final PolygonProps points(String p) { set("points", p); return this; }
//React Specific
@JsOverlay public final PolygonProps ref(String s) { ref = s; return this; } | @JsOverlay public final PolygonProps ref(ReactRefCallback callback) { ref = callback; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/PolygonProps.java | // Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for svg polygon elements. Refer to https://developer.mozilla.org/en-US/docs/Web/SVG/Element/polygon
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class PolygonProps extends HtmlGlobalFields {
@JsOverlay public final PolygonProps points(String p) { set("points", p); return this; }
//React Specific
@JsOverlay public final PolygonProps ref(String s) { ref = s; return this; }
@JsOverlay public final PolygonProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final PolygonProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final PolygonProps accessKey(String s) { accessKey = s; return this;}
@JsOverlay public final PolygonProps className(String s) { className = s; return this; }
@JsOverlay public final PolygonProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final PolygonProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final PolygonProps dir(String s) { dir = s; return this; }
@JsOverlay public final PolygonProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final PolygonProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final PolygonProps id(String s) { id = s; return this; }
@JsOverlay public final PolygonProps lang(String s) { lang = s; return this; }
@JsOverlay public final PolygonProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final PolygonProps style(CssProps s) { style = s; return this; }
@JsOverlay public final PolygonProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final PolygonProps title(String s) { title = s; return this; } | // Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/PolygonProps.java
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for svg polygon elements. Refer to https://developer.mozilla.org/en-US/docs/Web/SVG/Element/polygon
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class PolygonProps extends HtmlGlobalFields {
@JsOverlay public final PolygonProps points(String p) { set("points", p); return this; }
//React Specific
@JsOverlay public final PolygonProps ref(String s) { ref = s; return this; }
@JsOverlay public final PolygonProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final PolygonProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final PolygonProps accessKey(String s) { accessKey = s; return this;}
@JsOverlay public final PolygonProps className(String s) { className = s; return this; }
@JsOverlay public final PolygonProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final PolygonProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final PolygonProps dir(String s) { dir = s; return this; }
@JsOverlay public final PolygonProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final PolygonProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final PolygonProps id(String s) { id = s; return this; }
@JsOverlay public final PolygonProps lang(String s) { lang = s; return this; }
@JsOverlay public final PolygonProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final PolygonProps style(CssProps s) { style = s; return this; }
@JsOverlay public final PolygonProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final PolygonProps title(String s) { title = s; return this; } | @JsOverlay public final PolygonProps translate(YesNo s) { translate = s.name(); return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/TextAreaProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/OnOff.java
// public enum OnOff {
// on, off
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLTextAreaElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.OnOff;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for input elements. Refer to https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class TextAreaProps extends HtmlGlobalFields {
| // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/OnOff.java
// public enum OnOff {
// on, off
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/TextAreaProps.java
import elemental2.dom.HTMLTextAreaElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.OnOff;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for input elements. Refer to https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class TextAreaProps extends HtmlGlobalFields {
| @JsOverlay public final TextAreaProps autoComplete(OnOff s) { autoComplete = s.name(); return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/TextAreaProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/OnOff.java
// public enum OnOff {
// on, off
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLTextAreaElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.OnOff;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for input elements. Refer to https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class TextAreaProps extends HtmlGlobalFields {
@JsOverlay public final TextAreaProps autoComplete(OnOff s) { autoComplete = s.name(); return this; }
@JsOverlay public final TextAreaProps autoFocus(boolean b) { autoFocus = b; return this; }
@JsOverlay public final TextAreaProps cols(int b) { cols = b; return this; }
@JsOverlay public final TextAreaProps disabled(boolean b) { disabled = b; return this; }
@JsOverlay public final TextAreaProps form(String s) { form = s; return this; }
@JsOverlay public final TextAreaProps maxLength(int l) { maxLength = l; return this; }
@JsOverlay public final TextAreaProps minLength(int l) { minLength = l; return this; }
@JsOverlay public final TextAreaProps name(String s) { name = s; return this; }
@JsOverlay public final TextAreaProps placeHolder(String s) { placeholder = s; return this; }
@JsOverlay public final TextAreaProps readonly(boolean b) { readOnly = b; return this; }
@JsOverlay public final TextAreaProps required(boolean b) { required = b; return this; }
@JsOverlay public final TextAreaProps rows(int l) { rows = l; return this; }
@JsOverlay public final TextAreaProps value(String s) { value = s; return this; }
//React Specific
@JsOverlay public final TextAreaProps defaultValue(String s) { defaultValue = s; return this; }
@Deprecated @JsOverlay public final TextAreaProps ref(String s) { ref = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/OnOff.java
// public enum OnOff {
// on, off
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/TextAreaProps.java
import elemental2.dom.HTMLTextAreaElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.OnOff;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for input elements. Refer to https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class TextAreaProps extends HtmlGlobalFields {
@JsOverlay public final TextAreaProps autoComplete(OnOff s) { autoComplete = s.name(); return this; }
@JsOverlay public final TextAreaProps autoFocus(boolean b) { autoFocus = b; return this; }
@JsOverlay public final TextAreaProps cols(int b) { cols = b; return this; }
@JsOverlay public final TextAreaProps disabled(boolean b) { disabled = b; return this; }
@JsOverlay public final TextAreaProps form(String s) { form = s; return this; }
@JsOverlay public final TextAreaProps maxLength(int l) { maxLength = l; return this; }
@JsOverlay public final TextAreaProps minLength(int l) { minLength = l; return this; }
@JsOverlay public final TextAreaProps name(String s) { name = s; return this; }
@JsOverlay public final TextAreaProps placeHolder(String s) { placeholder = s; return this; }
@JsOverlay public final TextAreaProps readonly(boolean b) { readOnly = b; return this; }
@JsOverlay public final TextAreaProps required(boolean b) { required = b; return this; }
@JsOverlay public final TextAreaProps rows(int l) { rows = l; return this; }
@JsOverlay public final TextAreaProps value(String s) { value = s; return this; }
//React Specific
@JsOverlay public final TextAreaProps defaultValue(String s) { defaultValue = s; return this; }
@Deprecated @JsOverlay public final TextAreaProps ref(String s) { ref = s; return this; } | @JsOverlay public final TextAreaProps ref(ReactRefCallback callback) { ref = callback; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/TextAreaProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/OnOff.java
// public enum OnOff {
// on, off
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLTextAreaElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.OnOff;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for input elements. Refer to https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class TextAreaProps extends HtmlGlobalFields {
@JsOverlay public final TextAreaProps autoComplete(OnOff s) { autoComplete = s.name(); return this; }
@JsOverlay public final TextAreaProps autoFocus(boolean b) { autoFocus = b; return this; }
@JsOverlay public final TextAreaProps cols(int b) { cols = b; return this; }
@JsOverlay public final TextAreaProps disabled(boolean b) { disabled = b; return this; }
@JsOverlay public final TextAreaProps form(String s) { form = s; return this; }
@JsOverlay public final TextAreaProps maxLength(int l) { maxLength = l; return this; }
@JsOverlay public final TextAreaProps minLength(int l) { minLength = l; return this; }
@JsOverlay public final TextAreaProps name(String s) { name = s; return this; }
@JsOverlay public final TextAreaProps placeHolder(String s) { placeholder = s; return this; }
@JsOverlay public final TextAreaProps readonly(boolean b) { readOnly = b; return this; }
@JsOverlay public final TextAreaProps required(boolean b) { required = b; return this; }
@JsOverlay public final TextAreaProps rows(int l) { rows = l; return this; }
@JsOverlay public final TextAreaProps value(String s) { value = s; return this; }
//React Specific
@JsOverlay public final TextAreaProps defaultValue(String s) { defaultValue = s; return this; }
@Deprecated @JsOverlay public final TextAreaProps ref(String s) { ref = s; return this; }
@JsOverlay public final TextAreaProps ref(ReactRefCallback callback) { ref = callback; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/OnOff.java
// public enum OnOff {
// on, off
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/TextAreaProps.java
import elemental2.dom.HTMLTextAreaElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.OnOff;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for input elements. Refer to https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class TextAreaProps extends HtmlGlobalFields {
@JsOverlay public final TextAreaProps autoComplete(OnOff s) { autoComplete = s.name(); return this; }
@JsOverlay public final TextAreaProps autoFocus(boolean b) { autoFocus = b; return this; }
@JsOverlay public final TextAreaProps cols(int b) { cols = b; return this; }
@JsOverlay public final TextAreaProps disabled(boolean b) { disabled = b; return this; }
@JsOverlay public final TextAreaProps form(String s) { form = s; return this; }
@JsOverlay public final TextAreaProps maxLength(int l) { maxLength = l; return this; }
@JsOverlay public final TextAreaProps minLength(int l) { minLength = l; return this; }
@JsOverlay public final TextAreaProps name(String s) { name = s; return this; }
@JsOverlay public final TextAreaProps placeHolder(String s) { placeholder = s; return this; }
@JsOverlay public final TextAreaProps readonly(boolean b) { readOnly = b; return this; }
@JsOverlay public final TextAreaProps required(boolean b) { required = b; return this; }
@JsOverlay public final TextAreaProps rows(int l) { rows = l; return this; }
@JsOverlay public final TextAreaProps value(String s) { value = s; return this; }
//React Specific
@JsOverlay public final TextAreaProps defaultValue(String s) { defaultValue = s; return this; }
@Deprecated @JsOverlay public final TextAreaProps ref(String s) { ref = s; return this; }
@JsOverlay public final TextAreaProps ref(ReactRefCallback callback) { ref = callback; return this; } | @JsOverlay public final TextAreaProps ref(ReactRef<HTMLTextAreaElement> reactRef) { ref = reactRef; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/TextAreaProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/OnOff.java
// public enum OnOff {
// on, off
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLTextAreaElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.OnOff;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | @JsOverlay public final TextAreaProps name(String s) { name = s; return this; }
@JsOverlay public final TextAreaProps placeHolder(String s) { placeholder = s; return this; }
@JsOverlay public final TextAreaProps readonly(boolean b) { readOnly = b; return this; }
@JsOverlay public final TextAreaProps required(boolean b) { required = b; return this; }
@JsOverlay public final TextAreaProps rows(int l) { rows = l; return this; }
@JsOverlay public final TextAreaProps value(String s) { value = s; return this; }
//React Specific
@JsOverlay public final TextAreaProps defaultValue(String s) { defaultValue = s; return this; }
@Deprecated @JsOverlay public final TextAreaProps ref(String s) { ref = s; return this; }
@JsOverlay public final TextAreaProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final TextAreaProps ref(ReactRef<HTMLTextAreaElement> reactRef) { ref = reactRef; return this; }
@JsOverlay public final TextAreaProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final TextAreaProps accessKey(String s) { accessKey = s;return this;}
@JsOverlay public final TextAreaProps className(String s) { className = s; return this; }
@JsOverlay public final TextAreaProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final TextAreaProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final TextAreaProps dir(String s) { dir = s; return this; }
@JsOverlay public final TextAreaProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final TextAreaProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final TextAreaProps id(String s) { id = s; return this; }
@JsOverlay public final TextAreaProps lang(String s) { lang = s; return this; }
@JsOverlay public final TextAreaProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final TextAreaProps style(CssProps s) { style = s; return this; }
@JsOverlay public final TextAreaProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final TextAreaProps title(String s) { title = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/OnOff.java
// public enum OnOff {
// on, off
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/TextAreaProps.java
import elemental2.dom.HTMLTextAreaElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.OnOff;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
@JsOverlay public final TextAreaProps name(String s) { name = s; return this; }
@JsOverlay public final TextAreaProps placeHolder(String s) { placeholder = s; return this; }
@JsOverlay public final TextAreaProps readonly(boolean b) { readOnly = b; return this; }
@JsOverlay public final TextAreaProps required(boolean b) { required = b; return this; }
@JsOverlay public final TextAreaProps rows(int l) { rows = l; return this; }
@JsOverlay public final TextAreaProps value(String s) { value = s; return this; }
//React Specific
@JsOverlay public final TextAreaProps defaultValue(String s) { defaultValue = s; return this; }
@Deprecated @JsOverlay public final TextAreaProps ref(String s) { ref = s; return this; }
@JsOverlay public final TextAreaProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final TextAreaProps ref(ReactRef<HTMLTextAreaElement> reactRef) { ref = reactRef; return this; }
@JsOverlay public final TextAreaProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final TextAreaProps accessKey(String s) { accessKey = s;return this;}
@JsOverlay public final TextAreaProps className(String s) { className = s; return this; }
@JsOverlay public final TextAreaProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final TextAreaProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final TextAreaProps dir(String s) { dir = s; return this; }
@JsOverlay public final TextAreaProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final TextAreaProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final TextAreaProps id(String s) { id = s; return this; }
@JsOverlay public final TextAreaProps lang(String s) { lang = s; return this; }
@JsOverlay public final TextAreaProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final TextAreaProps style(CssProps s) { style = s; return this; }
@JsOverlay public final TextAreaProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final TextAreaProps title(String s) { title = s; return this; } | @JsOverlay public final TextAreaProps translate(YesNo s) { translate = s.name(); return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/LabelProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLLabelElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for input elements. Refer to http://www.w3schools.com/tags/tag_label.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class LabelProps extends HtmlGlobalFields {
@JsOverlay public final LabelProps htmlFor(String s) { htmlFor = s; return this; }
@JsOverlay public final LabelProps form(String s) { form = s; return this; }
//React Specific
@Deprecated @JsOverlay public final LabelProps ref(String s) { ref = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/LabelProps.java
import elemental2.dom.HTMLLabelElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for input elements. Refer to http://www.w3schools.com/tags/tag_label.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class LabelProps extends HtmlGlobalFields {
@JsOverlay public final LabelProps htmlFor(String s) { htmlFor = s; return this; }
@JsOverlay public final LabelProps form(String s) { form = s; return this; }
//React Specific
@Deprecated @JsOverlay public final LabelProps ref(String s) { ref = s; return this; } | @JsOverlay public final LabelProps ref(ReactRefCallback callback) { ref = callback; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/LabelProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLLabelElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for input elements. Refer to http://www.w3schools.com/tags/tag_label.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class LabelProps extends HtmlGlobalFields {
@JsOverlay public final LabelProps htmlFor(String s) { htmlFor = s; return this; }
@JsOverlay public final LabelProps form(String s) { form = s; return this; }
//React Specific
@Deprecated @JsOverlay public final LabelProps ref(String s) { ref = s; return this; }
@JsOverlay public final LabelProps ref(ReactRefCallback callback) { ref = callback; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/LabelProps.java
import elemental2.dom.HTMLLabelElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for input elements. Refer to http://www.w3schools.com/tags/tag_label.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class LabelProps extends HtmlGlobalFields {
@JsOverlay public final LabelProps htmlFor(String s) { htmlFor = s; return this; }
@JsOverlay public final LabelProps form(String s) { form = s; return this; }
//React Specific
@Deprecated @JsOverlay public final LabelProps ref(String s) { ref = s; return this; }
@JsOverlay public final LabelProps ref(ReactRefCallback callback) { ref = callback; return this; } | @JsOverlay public final LabelProps ref(ReactRef<HTMLLabelElement> reactRef) { ref = reactRef; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/LabelProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLLabelElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for input elements. Refer to http://www.w3schools.com/tags/tag_label.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class LabelProps extends HtmlGlobalFields {
@JsOverlay public final LabelProps htmlFor(String s) { htmlFor = s; return this; }
@JsOverlay public final LabelProps form(String s) { form = s; return this; }
//React Specific
@Deprecated @JsOverlay public final LabelProps ref(String s) { ref = s; return this; }
@JsOverlay public final LabelProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final LabelProps ref(ReactRef<HTMLLabelElement> reactRef) { ref = reactRef; return this; }
@JsOverlay public final LabelProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final LabelProps accessKey(String s) { accessKey = s; return this;}
@JsOverlay public final LabelProps className(String s) { className = s; return this; }
@JsOverlay public final LabelProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final LabelProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final LabelProps dir(String s) { dir = s; return this; }
@JsOverlay public final LabelProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final LabelProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final LabelProps id(String s) { id = s; return this; }
@JsOverlay public final LabelProps lang(String s) { lang = s; return this; }
@JsOverlay public final LabelProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final LabelProps style(CssProps s) { style = s; return this; }
@JsOverlay public final LabelProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final LabelProps title(String s) { title = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/LabelProps.java
import elemental2.dom.HTMLLabelElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for input elements. Refer to http://www.w3schools.com/tags/tag_label.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class LabelProps extends HtmlGlobalFields {
@JsOverlay public final LabelProps htmlFor(String s) { htmlFor = s; return this; }
@JsOverlay public final LabelProps form(String s) { form = s; return this; }
//React Specific
@Deprecated @JsOverlay public final LabelProps ref(String s) { ref = s; return this; }
@JsOverlay public final LabelProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final LabelProps ref(ReactRef<HTMLLabelElement> reactRef) { ref = reactRef; return this; }
@JsOverlay public final LabelProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final LabelProps accessKey(String s) { accessKey = s; return this;}
@JsOverlay public final LabelProps className(String s) { className = s; return this; }
@JsOverlay public final LabelProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final LabelProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final LabelProps dir(String s) { dir = s; return this; }
@JsOverlay public final LabelProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final LabelProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final LabelProps id(String s) { id = s; return this; }
@JsOverlay public final LabelProps lang(String s) { lang = s; return this; }
@JsOverlay public final LabelProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final LabelProps style(CssProps s) { style = s; return this; }
@JsOverlay public final LabelProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final LabelProps title(String s) { title = s; return this; } | @JsOverlay public final LabelProps translate(YesNo s) { translate = s.name(); return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/ThProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/HeaderScope.java
// public enum HeaderScope {
// col, colgroup, row, rowgroup
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLTableRowElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.HeaderScope;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for td elements. Refer to http://www.w3schools.com/tags/tag_td.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class ThProps extends HtmlGlobalFields {
@JsOverlay public final ThProps colSpan(int i) { colSpan = i; return this; }
@JsOverlay public final ThProps headers(String headerId) { headers = headerId; return this; }
@JsOverlay public final ThProps rowSpan(int i) { rowSpan = i; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/HeaderScope.java
// public enum HeaderScope {
// col, colgroup, row, rowgroup
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/ThProps.java
import elemental2.dom.HTMLTableRowElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.HeaderScope;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for td elements. Refer to http://www.w3schools.com/tags/tag_td.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class ThProps extends HtmlGlobalFields {
@JsOverlay public final ThProps colSpan(int i) { colSpan = i; return this; }
@JsOverlay public final ThProps headers(String headerId) { headers = headerId; return this; }
@JsOverlay public final ThProps rowSpan(int i) { rowSpan = i; return this; } | @JsOverlay public final ThProps scope(HeaderScope s) { scope = s.name(); return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/ThProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/HeaderScope.java
// public enum HeaderScope {
// col, colgroup, row, rowgroup
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLTableRowElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.HeaderScope;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for td elements. Refer to http://www.w3schools.com/tags/tag_td.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class ThProps extends HtmlGlobalFields {
@JsOverlay public final ThProps colSpan(int i) { colSpan = i; return this; }
@JsOverlay public final ThProps headers(String headerId) { headers = headerId; return this; }
@JsOverlay public final ThProps rowSpan(int i) { rowSpan = i; return this; }
@JsOverlay public final ThProps scope(HeaderScope s) { scope = s.name(); return this; }
//React Specific
@Deprecated @JsOverlay public final ThProps ref(String s) { ref = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/HeaderScope.java
// public enum HeaderScope {
// col, colgroup, row, rowgroup
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/ThProps.java
import elemental2.dom.HTMLTableRowElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.HeaderScope;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for td elements. Refer to http://www.w3schools.com/tags/tag_td.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class ThProps extends HtmlGlobalFields {
@JsOverlay public final ThProps colSpan(int i) { colSpan = i; return this; }
@JsOverlay public final ThProps headers(String headerId) { headers = headerId; return this; }
@JsOverlay public final ThProps rowSpan(int i) { rowSpan = i; return this; }
@JsOverlay public final ThProps scope(HeaderScope s) { scope = s.name(); return this; }
//React Specific
@Deprecated @JsOverlay public final ThProps ref(String s) { ref = s; return this; } | @JsOverlay public final ThProps ref(ReactRefCallback callback) { ref = callback; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/ThProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/HeaderScope.java
// public enum HeaderScope {
// col, colgroup, row, rowgroup
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLTableRowElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.HeaderScope;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for td elements. Refer to http://www.w3schools.com/tags/tag_td.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class ThProps extends HtmlGlobalFields {
@JsOverlay public final ThProps colSpan(int i) { colSpan = i; return this; }
@JsOverlay public final ThProps headers(String headerId) { headers = headerId; return this; }
@JsOverlay public final ThProps rowSpan(int i) { rowSpan = i; return this; }
@JsOverlay public final ThProps scope(HeaderScope s) { scope = s.name(); return this; }
//React Specific
@Deprecated @JsOverlay public final ThProps ref(String s) { ref = s; return this; }
@JsOverlay public final ThProps ref(ReactRefCallback callback) { ref = callback; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/HeaderScope.java
// public enum HeaderScope {
// col, colgroup, row, rowgroup
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/ThProps.java
import elemental2.dom.HTMLTableRowElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.HeaderScope;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for td elements. Refer to http://www.w3schools.com/tags/tag_td.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class ThProps extends HtmlGlobalFields {
@JsOverlay public final ThProps colSpan(int i) { colSpan = i; return this; }
@JsOverlay public final ThProps headers(String headerId) { headers = headerId; return this; }
@JsOverlay public final ThProps rowSpan(int i) { rowSpan = i; return this; }
@JsOverlay public final ThProps scope(HeaderScope s) { scope = s.name(); return this; }
//React Specific
@Deprecated @JsOverlay public final ThProps ref(String s) { ref = s; return this; }
@JsOverlay public final ThProps ref(ReactRefCallback callback) { ref = callback; return this; } | @JsOverlay public final ThProps ref(ReactRef<HTMLTableRowElement> reactRef) { ref = reactRef; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/ThProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/HeaderScope.java
// public enum HeaderScope {
// col, colgroup, row, rowgroup
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLTableRowElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.HeaderScope;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for td elements. Refer to http://www.w3schools.com/tags/tag_td.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class ThProps extends HtmlGlobalFields {
@JsOverlay public final ThProps colSpan(int i) { colSpan = i; return this; }
@JsOverlay public final ThProps headers(String headerId) { headers = headerId; return this; }
@JsOverlay public final ThProps rowSpan(int i) { rowSpan = i; return this; }
@JsOverlay public final ThProps scope(HeaderScope s) { scope = s.name(); return this; }
//React Specific
@Deprecated @JsOverlay public final ThProps ref(String s) { ref = s; return this; }
@JsOverlay public final ThProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final ThProps ref(ReactRef<HTMLTableRowElement> reactRef) { ref = reactRef; return this; }
@JsOverlay public final ThProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final ThProps accessKey(String s) { accessKey = s; return this;}
@JsOverlay public final ThProps className(String s) { className = s; return this; }
@JsOverlay public final ThProps className(String s1, String s2) { className = s1 + " " + s2; return this; }
@JsOverlay public final ThProps className(String s1, String s2, String s3) { className = s1 + " " + s2 + " " + s3; return this; }
@JsOverlay public final ThProps className(String s1, String s2, String s3, String s4) { className = s1 + " " + s2 + " " + s3 + " " + s4; return this; }
@JsOverlay public final ThProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final ThProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final ThProps dir(String s) { dir = s; return this; }
@JsOverlay public final ThProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final ThProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final ThProps id(String s) { id = s; return this; }
@JsOverlay public final ThProps lang(String s) { lang = s; return this; }
@JsOverlay public final ThProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final ThProps style(CssProps s) { style = s; return this; }
@JsOverlay public final ThProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final ThProps title(String s) { title = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/HeaderScope.java
// public enum HeaderScope {
// col, colgroup, row, rowgroup
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/ThProps.java
import elemental2.dom.HTMLTableRowElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.HeaderScope;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for td elements. Refer to http://www.w3schools.com/tags/tag_td.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class ThProps extends HtmlGlobalFields {
@JsOverlay public final ThProps colSpan(int i) { colSpan = i; return this; }
@JsOverlay public final ThProps headers(String headerId) { headers = headerId; return this; }
@JsOverlay public final ThProps rowSpan(int i) { rowSpan = i; return this; }
@JsOverlay public final ThProps scope(HeaderScope s) { scope = s.name(); return this; }
//React Specific
@Deprecated @JsOverlay public final ThProps ref(String s) { ref = s; return this; }
@JsOverlay public final ThProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final ThProps ref(ReactRef<HTMLTableRowElement> reactRef) { ref = reactRef; return this; }
@JsOverlay public final ThProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final ThProps accessKey(String s) { accessKey = s; return this;}
@JsOverlay public final ThProps className(String s) { className = s; return this; }
@JsOverlay public final ThProps className(String s1, String s2) { className = s1 + " " + s2; return this; }
@JsOverlay public final ThProps className(String s1, String s2, String s3) { className = s1 + " " + s2 + " " + s3; return this; }
@JsOverlay public final ThProps className(String s1, String s2, String s3, String s4) { className = s1 + " " + s2 + " " + s3 + " " + s4; return this; }
@JsOverlay public final ThProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final ThProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final ThProps dir(String s) { dir = s; return this; }
@JsOverlay public final ThProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final ThProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final ThProps id(String s) { id = s; return this; }
@JsOverlay public final ThProps lang(String s) { lang = s; return this; }
@JsOverlay public final ThProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final ThProps style(CssProps s) { style = s; return this; }
@JsOverlay public final ThProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final ThProps title(String s) { title = s; return this; } | @JsOverlay public final ThProps translate(YesNo s) { translate = s.name(); return this; } |
GWTReact/gwt-react | src/gwt/react/client/components/lifecycle/ComponentWillUpdate.java | // Path: src/gwt/react/client/components/Component.java
// @JsType(isNative = true, namespace = "React", name = "Component")
// public abstract class Component<P extends BaseProps, S extends JsPlainObj> {
// @JsProperty
// protected S state;
//
// @JsProperty
// protected P props;
//
// @JsProperty
// protected StringMap<Object> refs;
//
// private Component() {}
//
// public Component(P props) {
// }
//
// /**
// * Performs a shallow merge of nextState into current state. This is the primary method you
// * use to trigger UI updates from event handlers and server request callbacks.
// *
// * @param state Object Literal (containing zero or more keys to update)
// */
// protected native void setState(S state);
//
// /**
// * Performs a shallow merge of nextState into current state. This is the primary method you
// * use to trigger UI updates from event handlers and server request callbacks.
// *
// * @param state Object Literal (containing zero or more keys to update)
// * @param callback callback function that will be executed once setState is completed and
// * the component is re-rendered.
// */
// protected native void setState(S state, JsRunnable callback);
//
//
// /**
// * <p>Performs a shallow merge of nextState into current state. This is the primary method
// * you use to trigger UI updates from event handlers and server request callbacks.</p>
// *
// * <p>It's also possible to pass a function with the signature function(state, props).
// * This can be useful in some cases when you want to enqueue an atomic update that
// * consults the previous value of state+props before setting any values</p>
// *
// * @param callback callback function that will be executed once setState is completed and
// * the component is re-rendered.
// */
// protected native void setState(SetStateCallback<S, P> callback);
//
// /**
// * <p>By default, when your component's state or props change, your component will re-render.
// * However, if these change implicitly (eg: data deep within an object changes without
// * changing the object itself) or if your render() method depends on some other data, you can
// * tell React that it needs to re-run render() by calling forceUpdate().</p>
// *
// * <p>Calling forceUpdate() will cause render() to be called on the component, skipping
// * shouldComponentUpdate(). This will trigger the normal lifecycle methods for child
// * components, including the shouldComponentUpdate() method of each child. React will still
// * only update the DOM if the markup changes.</p>
// *
// * <p>Normally you should try to avoid all uses of forceUpdate() and only read from this.props
// * and this.state in render(). This makes your component "pure" and your application much
// * simpler and more efficient.</p>
// *
// * @param callBack callback function that will be executed once the component has been updated
// */
// protected native void forceUpdate(JsRunnable callBack);
// protected native void forceUpdate();
//
// /**
// * The render() method is required.
// *
// * <p>When called, it should examine props and state and return a single child element.
// * This child element can be either a virtual representation of a native DOM component
// * (such as React.DOM.div()) or another composite component that you've defined
// * yourself.</p>
// *
// * <p>You can also return null to indicate that you don't want anything rendered.
// * Behind the scenes, React renders a <noscript> tag to work with our current diffing
// * algorithm.</p>
// *
// * <p>The render() function should be pure, meaning that it does not modify component
// * state, it returns the same result each time it's invoked, and it does not read from
// * or write to the DOM or otherwise interact with the browser (e.g., by using setTimeout).
// * If you need to interact with the browser, perform your work in {@link ComponentDidMount#componentDidMount()} or
// * the other lifecycle methods instead. Keeping render() pure makes components easier to
// * think about.</p>
// *
// * @return A single {@link ReactElement}
// */
// @JsMethod
// protected abstract ReactElement render();
// }
//
// Path: src/gwt/react/client/components/PureComponent.java
// @JsType(isNative = true, namespace = "React", name = "PureComponent")
// public abstract class PureComponent<P extends BaseProps, S extends JsPlainObj> extends Component<P,S>{
//
// public PureComponent(P props) {
// super(props);
// }
// }
//
// Path: src/gwt/react/client/proptypes/BaseProps.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
// public class BaseProps extends JsPlainObj {
// public ReactElementChildren children;
// public String key;
// public Object ref; //Either a String Id or RefCallback
// }
| import gwt.interop.utils.client.plainobjects.JsPlainObj;
import gwt.react.client.components.Component;
import gwt.react.client.components.PureComponent;
import gwt.react.client.proptypes.BaseProps;
import jsinterop.annotations.JsMethod;
import jsinterop.annotations.JsType; | package gwt.react.client.components.lifecycle;
/* The MIT License (MIT)
Copyright (c) 2016 GWT React
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
/**
* Implement this interface when using {@link Component} or {@link PureComponent} to receive the {@link #componentWillUpdate(P,S)} lifecycle event.
*/
@Deprecated
@JsType | // Path: src/gwt/react/client/components/Component.java
// @JsType(isNative = true, namespace = "React", name = "Component")
// public abstract class Component<P extends BaseProps, S extends JsPlainObj> {
// @JsProperty
// protected S state;
//
// @JsProperty
// protected P props;
//
// @JsProperty
// protected StringMap<Object> refs;
//
// private Component() {}
//
// public Component(P props) {
// }
//
// /**
// * Performs a shallow merge of nextState into current state. This is the primary method you
// * use to trigger UI updates from event handlers and server request callbacks.
// *
// * @param state Object Literal (containing zero or more keys to update)
// */
// protected native void setState(S state);
//
// /**
// * Performs a shallow merge of nextState into current state. This is the primary method you
// * use to trigger UI updates from event handlers and server request callbacks.
// *
// * @param state Object Literal (containing zero or more keys to update)
// * @param callback callback function that will be executed once setState is completed and
// * the component is re-rendered.
// */
// protected native void setState(S state, JsRunnable callback);
//
//
// /**
// * <p>Performs a shallow merge of nextState into current state. This is the primary method
// * you use to trigger UI updates from event handlers and server request callbacks.</p>
// *
// * <p>It's also possible to pass a function with the signature function(state, props).
// * This can be useful in some cases when you want to enqueue an atomic update that
// * consults the previous value of state+props before setting any values</p>
// *
// * @param callback callback function that will be executed once setState is completed and
// * the component is re-rendered.
// */
// protected native void setState(SetStateCallback<S, P> callback);
//
// /**
// * <p>By default, when your component's state or props change, your component will re-render.
// * However, if these change implicitly (eg: data deep within an object changes without
// * changing the object itself) or if your render() method depends on some other data, you can
// * tell React that it needs to re-run render() by calling forceUpdate().</p>
// *
// * <p>Calling forceUpdate() will cause render() to be called on the component, skipping
// * shouldComponentUpdate(). This will trigger the normal lifecycle methods for child
// * components, including the shouldComponentUpdate() method of each child. React will still
// * only update the DOM if the markup changes.</p>
// *
// * <p>Normally you should try to avoid all uses of forceUpdate() and only read from this.props
// * and this.state in render(). This makes your component "pure" and your application much
// * simpler and more efficient.</p>
// *
// * @param callBack callback function that will be executed once the component has been updated
// */
// protected native void forceUpdate(JsRunnable callBack);
// protected native void forceUpdate();
//
// /**
// * The render() method is required.
// *
// * <p>When called, it should examine props and state and return a single child element.
// * This child element can be either a virtual representation of a native DOM component
// * (such as React.DOM.div()) or another composite component that you've defined
// * yourself.</p>
// *
// * <p>You can also return null to indicate that you don't want anything rendered.
// * Behind the scenes, React renders a <noscript> tag to work with our current diffing
// * algorithm.</p>
// *
// * <p>The render() function should be pure, meaning that it does not modify component
// * state, it returns the same result each time it's invoked, and it does not read from
// * or write to the DOM or otherwise interact with the browser (e.g., by using setTimeout).
// * If you need to interact with the browser, perform your work in {@link ComponentDidMount#componentDidMount()} or
// * the other lifecycle methods instead. Keeping render() pure makes components easier to
// * think about.</p>
// *
// * @return A single {@link ReactElement}
// */
// @JsMethod
// protected abstract ReactElement render();
// }
//
// Path: src/gwt/react/client/components/PureComponent.java
// @JsType(isNative = true, namespace = "React", name = "PureComponent")
// public abstract class PureComponent<P extends BaseProps, S extends JsPlainObj> extends Component<P,S>{
//
// public PureComponent(P props) {
// super(props);
// }
// }
//
// Path: src/gwt/react/client/proptypes/BaseProps.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
// public class BaseProps extends JsPlainObj {
// public ReactElementChildren children;
// public String key;
// public Object ref; //Either a String Id or RefCallback
// }
// Path: src/gwt/react/client/components/lifecycle/ComponentWillUpdate.java
import gwt.interop.utils.client.plainobjects.JsPlainObj;
import gwt.react.client.components.Component;
import gwt.react.client.components.PureComponent;
import gwt.react.client.proptypes.BaseProps;
import jsinterop.annotations.JsMethod;
import jsinterop.annotations.JsType;
package gwt.react.client.components.lifecycle;
/* The MIT License (MIT)
Copyright (c) 2016 GWT React
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
/**
* Implement this interface when using {@link Component} or {@link PureComponent} to receive the {@link #componentWillUpdate(P,S)} lifecycle event.
*/
@Deprecated
@JsType | public interface ComponentWillUpdate<P extends BaseProps, S extends JsPlainObj> { |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/SelectProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLSelectElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for select elements. Refer to http://www.w3schools.com/tags/tag_select.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class SelectProps extends HtmlGlobalFields {
@JsOverlay public final SelectProps autoFocus(boolean b) { autoFocus = b; return this; }
@JsOverlay public final SelectProps disabled(boolean b) { disabled = b; return this; }
@JsOverlay public final SelectProps form(String s) { form = s; return this; }
@JsOverlay public final SelectProps multiple(boolean b) { multiple = b; return this; }
@JsOverlay public final SelectProps name(String s) { name = s; return this; }
@JsOverlay public final SelectProps required(boolean b) { required = b; return this; }
@JsOverlay public final SelectProps size(int b) { size = b; return this; }
@JsOverlay public final SelectProps value(String s) { value = s; return this; }
@JsOverlay public final SelectProps defaultValue(String s) { defaultValue = s; return this; }
//React Specific
@Deprecated @JsOverlay public final SelectProps ref(String s) { ref = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/SelectProps.java
import elemental2.dom.HTMLSelectElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for select elements. Refer to http://www.w3schools.com/tags/tag_select.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class SelectProps extends HtmlGlobalFields {
@JsOverlay public final SelectProps autoFocus(boolean b) { autoFocus = b; return this; }
@JsOverlay public final SelectProps disabled(boolean b) { disabled = b; return this; }
@JsOverlay public final SelectProps form(String s) { form = s; return this; }
@JsOverlay public final SelectProps multiple(boolean b) { multiple = b; return this; }
@JsOverlay public final SelectProps name(String s) { name = s; return this; }
@JsOverlay public final SelectProps required(boolean b) { required = b; return this; }
@JsOverlay public final SelectProps size(int b) { size = b; return this; }
@JsOverlay public final SelectProps value(String s) { value = s; return this; }
@JsOverlay public final SelectProps defaultValue(String s) { defaultValue = s; return this; }
//React Specific
@Deprecated @JsOverlay public final SelectProps ref(String s) { ref = s; return this; } | @JsOverlay public final SelectProps ref(ReactRefCallback callback) { ref = callback; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/SelectProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLSelectElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for select elements. Refer to http://www.w3schools.com/tags/tag_select.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class SelectProps extends HtmlGlobalFields {
@JsOverlay public final SelectProps autoFocus(boolean b) { autoFocus = b; return this; }
@JsOverlay public final SelectProps disabled(boolean b) { disabled = b; return this; }
@JsOverlay public final SelectProps form(String s) { form = s; return this; }
@JsOverlay public final SelectProps multiple(boolean b) { multiple = b; return this; }
@JsOverlay public final SelectProps name(String s) { name = s; return this; }
@JsOverlay public final SelectProps required(boolean b) { required = b; return this; }
@JsOverlay public final SelectProps size(int b) { size = b; return this; }
@JsOverlay public final SelectProps value(String s) { value = s; return this; }
@JsOverlay public final SelectProps defaultValue(String s) { defaultValue = s; return this; }
//React Specific
@Deprecated @JsOverlay public final SelectProps ref(String s) { ref = s; return this; }
@JsOverlay public final SelectProps ref(ReactRefCallback callback) { ref = callback; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/SelectProps.java
import elemental2.dom.HTMLSelectElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for select elements. Refer to http://www.w3schools.com/tags/tag_select.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class SelectProps extends HtmlGlobalFields {
@JsOverlay public final SelectProps autoFocus(boolean b) { autoFocus = b; return this; }
@JsOverlay public final SelectProps disabled(boolean b) { disabled = b; return this; }
@JsOverlay public final SelectProps form(String s) { form = s; return this; }
@JsOverlay public final SelectProps multiple(boolean b) { multiple = b; return this; }
@JsOverlay public final SelectProps name(String s) { name = s; return this; }
@JsOverlay public final SelectProps required(boolean b) { required = b; return this; }
@JsOverlay public final SelectProps size(int b) { size = b; return this; }
@JsOverlay public final SelectProps value(String s) { value = s; return this; }
@JsOverlay public final SelectProps defaultValue(String s) { defaultValue = s; return this; }
//React Specific
@Deprecated @JsOverlay public final SelectProps ref(String s) { ref = s; return this; }
@JsOverlay public final SelectProps ref(ReactRefCallback callback) { ref = callback; return this; } | @JsOverlay public final SelectProps ref(ReactRef<HTMLSelectElement> reactRef) { ref = reactRef; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/SelectProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLSelectElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for select elements. Refer to http://www.w3schools.com/tags/tag_select.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class SelectProps extends HtmlGlobalFields {
@JsOverlay public final SelectProps autoFocus(boolean b) { autoFocus = b; return this; }
@JsOverlay public final SelectProps disabled(boolean b) { disabled = b; return this; }
@JsOverlay public final SelectProps form(String s) { form = s; return this; }
@JsOverlay public final SelectProps multiple(boolean b) { multiple = b; return this; }
@JsOverlay public final SelectProps name(String s) { name = s; return this; }
@JsOverlay public final SelectProps required(boolean b) { required = b; return this; }
@JsOverlay public final SelectProps size(int b) { size = b; return this; }
@JsOverlay public final SelectProps value(String s) { value = s; return this; }
@JsOverlay public final SelectProps defaultValue(String s) { defaultValue = s; return this; }
//React Specific
@Deprecated @JsOverlay public final SelectProps ref(String s) { ref = s; return this; }
@JsOverlay public final SelectProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final SelectProps ref(ReactRef<HTMLSelectElement> reactRef) { ref = reactRef; return this; }
@JsOverlay public final SelectProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final SelectProps accessKey(String s) { accessKey = s; return this;}
@JsOverlay public final SelectProps className(String s) { className = s; return this; }
@JsOverlay public final SelectProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final SelectProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final SelectProps dir(String s) { dir = s; return this; }
@JsOverlay public final SelectProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final SelectProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final SelectProps id(String s) { id = s; return this; }
@JsOverlay public final SelectProps lang(String s) { lang = s; return this; }
@JsOverlay public final SelectProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final SelectProps style(CssProps s) { style = s; return this; }
@JsOverlay public final SelectProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final SelectProps title(String s) { title = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/SelectProps.java
import elemental2.dom.HTMLSelectElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for select elements. Refer to http://www.w3schools.com/tags/tag_select.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class SelectProps extends HtmlGlobalFields {
@JsOverlay public final SelectProps autoFocus(boolean b) { autoFocus = b; return this; }
@JsOverlay public final SelectProps disabled(boolean b) { disabled = b; return this; }
@JsOverlay public final SelectProps form(String s) { form = s; return this; }
@JsOverlay public final SelectProps multiple(boolean b) { multiple = b; return this; }
@JsOverlay public final SelectProps name(String s) { name = s; return this; }
@JsOverlay public final SelectProps required(boolean b) { required = b; return this; }
@JsOverlay public final SelectProps size(int b) { size = b; return this; }
@JsOverlay public final SelectProps value(String s) { value = s; return this; }
@JsOverlay public final SelectProps defaultValue(String s) { defaultValue = s; return this; }
//React Specific
@Deprecated @JsOverlay public final SelectProps ref(String s) { ref = s; return this; }
@JsOverlay public final SelectProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final SelectProps ref(ReactRef<HTMLSelectElement> reactRef) { ref = reactRef; return this; }
@JsOverlay public final SelectProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final SelectProps accessKey(String s) { accessKey = s; return this;}
@JsOverlay public final SelectProps className(String s) { className = s; return this; }
@JsOverlay public final SelectProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final SelectProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final SelectProps dir(String s) { dir = s; return this; }
@JsOverlay public final SelectProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final SelectProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final SelectProps id(String s) { id = s; return this; }
@JsOverlay public final SelectProps lang(String s) { lang = s; return this; }
@JsOverlay public final SelectProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final SelectProps style(CssProps s) { style = s; return this; }
@JsOverlay public final SelectProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final SelectProps title(String s) { title = s; return this; } | @JsOverlay public final SelectProps translate(YesNo s) { translate = s.name(); return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/InputProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/InputType.java
// public enum InputType {
// button,
// checkbox,
// color,
// date,
// datetime,
// //datetime-local
// email,
// file,
// hidden,
// image,
// month,
// number,
// password,
// radio,
// range,
// reset,
// search,
// submit,
// tel,
// text,
// time,
// url,
// week
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/OnOff.java
// public enum OnOff {
// on, off
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLInputElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.InputType;
import gwt.react.client.proptypes.html.attributeTypes.OnOff;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for input elements. Refer to http://www.w3schools.com/tags/tag_input.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class InputProps extends HtmlGlobalFields {
@JsOverlay public final InputProps accept(String s) { accept = s; return this; }
@JsOverlay public final InputProps alt(String s) { alt = s; return this; }
@JsOverlay public final InputProps async(boolean b) { async = b; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/InputType.java
// public enum InputType {
// button,
// checkbox,
// color,
// date,
// datetime,
// //datetime-local
// email,
// file,
// hidden,
// image,
// month,
// number,
// password,
// radio,
// range,
// reset,
// search,
// submit,
// tel,
// text,
// time,
// url,
// week
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/OnOff.java
// public enum OnOff {
// on, off
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/InputProps.java
import elemental2.dom.HTMLInputElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.InputType;
import gwt.react.client.proptypes.html.attributeTypes.OnOff;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for input elements. Refer to http://www.w3schools.com/tags/tag_input.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class InputProps extends HtmlGlobalFields {
@JsOverlay public final InputProps accept(String s) { accept = s; return this; }
@JsOverlay public final InputProps alt(String s) { alt = s; return this; }
@JsOverlay public final InputProps async(boolean b) { async = b; return this; } | @JsOverlay public final InputProps autoComplete(OnOff s) { autoComplete = s.name(); return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/InputProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/InputType.java
// public enum InputType {
// button,
// checkbox,
// color,
// date,
// datetime,
// //datetime-local
// email,
// file,
// hidden,
// image,
// month,
// number,
// password,
// radio,
// range,
// reset,
// search,
// submit,
// tel,
// text,
// time,
// url,
// week
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/OnOff.java
// public enum OnOff {
// on, off
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLInputElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.InputType;
import gwt.react.client.proptypes.html.attributeTypes.OnOff;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for input elements. Refer to http://www.w3schools.com/tags/tag_input.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class InputProps extends HtmlGlobalFields {
@JsOverlay public final InputProps accept(String s) { accept = s; return this; }
@JsOverlay public final InputProps alt(String s) { alt = s; return this; }
@JsOverlay public final InputProps async(boolean b) { async = b; return this; }
@JsOverlay public final InputProps autoComplete(OnOff s) { autoComplete = s.name(); return this; }
@JsOverlay public final InputProps autoFocus(boolean b) { autoFocus = b; return this; }
@JsOverlay public final InputProps checked(boolean b) { checked = b; return this; }
@JsOverlay public final InputProps disabled(boolean b) { disabled = b; return this; }
@JsOverlay public final InputProps form(String s) { form = s; return this; }
@JsOverlay public final InputProps formAction(String s) { formAction = s; return this; }
@JsOverlay public final InputProps formEncType(String s) { formEncType = s; return this; }
@JsOverlay public final InputProps formMethod(String s) { formMethod = s; return this; }
@JsOverlay public final InputProps formNoValidate(boolean b) { formNoValidate = b; return this; }
@JsOverlay public final InputProps formTarget(String s) { formTarget = s; return this; }
@JsOverlay public final InputProps height(String s) { height = s; return this; }
@JsOverlay public final InputProps list(String s) { list = s; return this; }
@JsOverlay public final InputProps max(String s) { max = s; return this; }
@JsOverlay public final InputProps maxLength(int b) { maxLength = b; return this; }
@JsOverlay public final InputProps min(String s) { min = s; return this; }
@JsOverlay public final InputProps multiple(boolean b) { multiple = b; return this; }
@JsOverlay public final InputProps name(String s) { name = s; return this; }
@JsOverlay public final InputProps placeholder(String s) { placeholder = s; return this; }
@JsOverlay public final InputProps readonly(boolean b) { readOnly = b; return this; }
@JsOverlay public final InputProps required(boolean b) { required = b; return this; }
@JsOverlay public final InputProps size(int b) { size = b; return this; }
@JsOverlay public final InputProps src(String s) { src = s; return this; }
@JsOverlay public final InputProps step(String s) { step = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/InputType.java
// public enum InputType {
// button,
// checkbox,
// color,
// date,
// datetime,
// //datetime-local
// email,
// file,
// hidden,
// image,
// month,
// number,
// password,
// radio,
// range,
// reset,
// search,
// submit,
// tel,
// text,
// time,
// url,
// week
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/OnOff.java
// public enum OnOff {
// on, off
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/InputProps.java
import elemental2.dom.HTMLInputElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.InputType;
import gwt.react.client.proptypes.html.attributeTypes.OnOff;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for input elements. Refer to http://www.w3schools.com/tags/tag_input.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class InputProps extends HtmlGlobalFields {
@JsOverlay public final InputProps accept(String s) { accept = s; return this; }
@JsOverlay public final InputProps alt(String s) { alt = s; return this; }
@JsOverlay public final InputProps async(boolean b) { async = b; return this; }
@JsOverlay public final InputProps autoComplete(OnOff s) { autoComplete = s.name(); return this; }
@JsOverlay public final InputProps autoFocus(boolean b) { autoFocus = b; return this; }
@JsOverlay public final InputProps checked(boolean b) { checked = b; return this; }
@JsOverlay public final InputProps disabled(boolean b) { disabled = b; return this; }
@JsOverlay public final InputProps form(String s) { form = s; return this; }
@JsOverlay public final InputProps formAction(String s) { formAction = s; return this; }
@JsOverlay public final InputProps formEncType(String s) { formEncType = s; return this; }
@JsOverlay public final InputProps formMethod(String s) { formMethod = s; return this; }
@JsOverlay public final InputProps formNoValidate(boolean b) { formNoValidate = b; return this; }
@JsOverlay public final InputProps formTarget(String s) { formTarget = s; return this; }
@JsOverlay public final InputProps height(String s) { height = s; return this; }
@JsOverlay public final InputProps list(String s) { list = s; return this; }
@JsOverlay public final InputProps max(String s) { max = s; return this; }
@JsOverlay public final InputProps maxLength(int b) { maxLength = b; return this; }
@JsOverlay public final InputProps min(String s) { min = s; return this; }
@JsOverlay public final InputProps multiple(boolean b) { multiple = b; return this; }
@JsOverlay public final InputProps name(String s) { name = s; return this; }
@JsOverlay public final InputProps placeholder(String s) { placeholder = s; return this; }
@JsOverlay public final InputProps readonly(boolean b) { readOnly = b; return this; }
@JsOverlay public final InputProps required(boolean b) { required = b; return this; }
@JsOverlay public final InputProps size(int b) { size = b; return this; }
@JsOverlay public final InputProps src(String s) { src = s; return this; }
@JsOverlay public final InputProps step(String s) { step = s; return this; } | @JsOverlay public final InputProps type(InputType t) { type = t.name(); return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/InputProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/InputType.java
// public enum InputType {
// button,
// checkbox,
// color,
// date,
// datetime,
// //datetime-local
// email,
// file,
// hidden,
// image,
// month,
// number,
// password,
// radio,
// range,
// reset,
// search,
// submit,
// tel,
// text,
// time,
// url,
// week
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/OnOff.java
// public enum OnOff {
// on, off
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLInputElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.InputType;
import gwt.react.client.proptypes.html.attributeTypes.OnOff;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | @JsOverlay public final InputProps checked(boolean b) { checked = b; return this; }
@JsOverlay public final InputProps disabled(boolean b) { disabled = b; return this; }
@JsOverlay public final InputProps form(String s) { form = s; return this; }
@JsOverlay public final InputProps formAction(String s) { formAction = s; return this; }
@JsOverlay public final InputProps formEncType(String s) { formEncType = s; return this; }
@JsOverlay public final InputProps formMethod(String s) { formMethod = s; return this; }
@JsOverlay public final InputProps formNoValidate(boolean b) { formNoValidate = b; return this; }
@JsOverlay public final InputProps formTarget(String s) { formTarget = s; return this; }
@JsOverlay public final InputProps height(String s) { height = s; return this; }
@JsOverlay public final InputProps list(String s) { list = s; return this; }
@JsOverlay public final InputProps max(String s) { max = s; return this; }
@JsOverlay public final InputProps maxLength(int b) { maxLength = b; return this; }
@JsOverlay public final InputProps min(String s) { min = s; return this; }
@JsOverlay public final InputProps multiple(boolean b) { multiple = b; return this; }
@JsOverlay public final InputProps name(String s) { name = s; return this; }
@JsOverlay public final InputProps placeholder(String s) { placeholder = s; return this; }
@JsOverlay public final InputProps readonly(boolean b) { readOnly = b; return this; }
@JsOverlay public final InputProps required(boolean b) { required = b; return this; }
@JsOverlay public final InputProps size(int b) { size = b; return this; }
@JsOverlay public final InputProps src(String s) { src = s; return this; }
@JsOverlay public final InputProps step(String s) { step = s; return this; }
@JsOverlay public final InputProps type(InputType t) { type = t.name(); return this; }
@JsOverlay public final InputProps value(String s) { value = s; return this; }
@JsOverlay public final InputProps width(int i) { width = Integer.toString(i); return this; }
//React Specific
@JsOverlay public final InputProps defaultChecked(boolean b) { defaultChecked = b; return this; };
@JsOverlay public final InputProps defaultValue(String s) { defaultValue = s; return this; }
@Deprecated @JsOverlay public final InputProps ref(String s) { ref = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/InputType.java
// public enum InputType {
// button,
// checkbox,
// color,
// date,
// datetime,
// //datetime-local
// email,
// file,
// hidden,
// image,
// month,
// number,
// password,
// radio,
// range,
// reset,
// search,
// submit,
// tel,
// text,
// time,
// url,
// week
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/OnOff.java
// public enum OnOff {
// on, off
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/InputProps.java
import elemental2.dom.HTMLInputElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.InputType;
import gwt.react.client.proptypes.html.attributeTypes.OnOff;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
@JsOverlay public final InputProps checked(boolean b) { checked = b; return this; }
@JsOverlay public final InputProps disabled(boolean b) { disabled = b; return this; }
@JsOverlay public final InputProps form(String s) { form = s; return this; }
@JsOverlay public final InputProps formAction(String s) { formAction = s; return this; }
@JsOverlay public final InputProps formEncType(String s) { formEncType = s; return this; }
@JsOverlay public final InputProps formMethod(String s) { formMethod = s; return this; }
@JsOverlay public final InputProps formNoValidate(boolean b) { formNoValidate = b; return this; }
@JsOverlay public final InputProps formTarget(String s) { formTarget = s; return this; }
@JsOverlay public final InputProps height(String s) { height = s; return this; }
@JsOverlay public final InputProps list(String s) { list = s; return this; }
@JsOverlay public final InputProps max(String s) { max = s; return this; }
@JsOverlay public final InputProps maxLength(int b) { maxLength = b; return this; }
@JsOverlay public final InputProps min(String s) { min = s; return this; }
@JsOverlay public final InputProps multiple(boolean b) { multiple = b; return this; }
@JsOverlay public final InputProps name(String s) { name = s; return this; }
@JsOverlay public final InputProps placeholder(String s) { placeholder = s; return this; }
@JsOverlay public final InputProps readonly(boolean b) { readOnly = b; return this; }
@JsOverlay public final InputProps required(boolean b) { required = b; return this; }
@JsOverlay public final InputProps size(int b) { size = b; return this; }
@JsOverlay public final InputProps src(String s) { src = s; return this; }
@JsOverlay public final InputProps step(String s) { step = s; return this; }
@JsOverlay public final InputProps type(InputType t) { type = t.name(); return this; }
@JsOverlay public final InputProps value(String s) { value = s; return this; }
@JsOverlay public final InputProps width(int i) { width = Integer.toString(i); return this; }
//React Specific
@JsOverlay public final InputProps defaultChecked(boolean b) { defaultChecked = b; return this; };
@JsOverlay public final InputProps defaultValue(String s) { defaultValue = s; return this; }
@Deprecated @JsOverlay public final InputProps ref(String s) { ref = s; return this; } | @JsOverlay public final InputProps ref(ReactRefCallback callback) { ref = callback; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/InputProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/InputType.java
// public enum InputType {
// button,
// checkbox,
// color,
// date,
// datetime,
// //datetime-local
// email,
// file,
// hidden,
// image,
// month,
// number,
// password,
// radio,
// range,
// reset,
// search,
// submit,
// tel,
// text,
// time,
// url,
// week
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/OnOff.java
// public enum OnOff {
// on, off
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLInputElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.InputType;
import gwt.react.client.proptypes.html.attributeTypes.OnOff;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | @JsOverlay public final InputProps disabled(boolean b) { disabled = b; return this; }
@JsOverlay public final InputProps form(String s) { form = s; return this; }
@JsOverlay public final InputProps formAction(String s) { formAction = s; return this; }
@JsOverlay public final InputProps formEncType(String s) { formEncType = s; return this; }
@JsOverlay public final InputProps formMethod(String s) { formMethod = s; return this; }
@JsOverlay public final InputProps formNoValidate(boolean b) { formNoValidate = b; return this; }
@JsOverlay public final InputProps formTarget(String s) { formTarget = s; return this; }
@JsOverlay public final InputProps height(String s) { height = s; return this; }
@JsOverlay public final InputProps list(String s) { list = s; return this; }
@JsOverlay public final InputProps max(String s) { max = s; return this; }
@JsOverlay public final InputProps maxLength(int b) { maxLength = b; return this; }
@JsOverlay public final InputProps min(String s) { min = s; return this; }
@JsOverlay public final InputProps multiple(boolean b) { multiple = b; return this; }
@JsOverlay public final InputProps name(String s) { name = s; return this; }
@JsOverlay public final InputProps placeholder(String s) { placeholder = s; return this; }
@JsOverlay public final InputProps readonly(boolean b) { readOnly = b; return this; }
@JsOverlay public final InputProps required(boolean b) { required = b; return this; }
@JsOverlay public final InputProps size(int b) { size = b; return this; }
@JsOverlay public final InputProps src(String s) { src = s; return this; }
@JsOverlay public final InputProps step(String s) { step = s; return this; }
@JsOverlay public final InputProps type(InputType t) { type = t.name(); return this; }
@JsOverlay public final InputProps value(String s) { value = s; return this; }
@JsOverlay public final InputProps width(int i) { width = Integer.toString(i); return this; }
//React Specific
@JsOverlay public final InputProps defaultChecked(boolean b) { defaultChecked = b; return this; };
@JsOverlay public final InputProps defaultValue(String s) { defaultValue = s; return this; }
@Deprecated @JsOverlay public final InputProps ref(String s) { ref = s; return this; }
@JsOverlay public final InputProps ref(ReactRefCallback callback) { ref = callback; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/InputType.java
// public enum InputType {
// button,
// checkbox,
// color,
// date,
// datetime,
// //datetime-local
// email,
// file,
// hidden,
// image,
// month,
// number,
// password,
// radio,
// range,
// reset,
// search,
// submit,
// tel,
// text,
// time,
// url,
// week
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/OnOff.java
// public enum OnOff {
// on, off
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/InputProps.java
import elemental2.dom.HTMLInputElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.InputType;
import gwt.react.client.proptypes.html.attributeTypes.OnOff;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
@JsOverlay public final InputProps disabled(boolean b) { disabled = b; return this; }
@JsOverlay public final InputProps form(String s) { form = s; return this; }
@JsOverlay public final InputProps formAction(String s) { formAction = s; return this; }
@JsOverlay public final InputProps formEncType(String s) { formEncType = s; return this; }
@JsOverlay public final InputProps formMethod(String s) { formMethod = s; return this; }
@JsOverlay public final InputProps formNoValidate(boolean b) { formNoValidate = b; return this; }
@JsOverlay public final InputProps formTarget(String s) { formTarget = s; return this; }
@JsOverlay public final InputProps height(String s) { height = s; return this; }
@JsOverlay public final InputProps list(String s) { list = s; return this; }
@JsOverlay public final InputProps max(String s) { max = s; return this; }
@JsOverlay public final InputProps maxLength(int b) { maxLength = b; return this; }
@JsOverlay public final InputProps min(String s) { min = s; return this; }
@JsOverlay public final InputProps multiple(boolean b) { multiple = b; return this; }
@JsOverlay public final InputProps name(String s) { name = s; return this; }
@JsOverlay public final InputProps placeholder(String s) { placeholder = s; return this; }
@JsOverlay public final InputProps readonly(boolean b) { readOnly = b; return this; }
@JsOverlay public final InputProps required(boolean b) { required = b; return this; }
@JsOverlay public final InputProps size(int b) { size = b; return this; }
@JsOverlay public final InputProps src(String s) { src = s; return this; }
@JsOverlay public final InputProps step(String s) { step = s; return this; }
@JsOverlay public final InputProps type(InputType t) { type = t.name(); return this; }
@JsOverlay public final InputProps value(String s) { value = s; return this; }
@JsOverlay public final InputProps width(int i) { width = Integer.toString(i); return this; }
//React Specific
@JsOverlay public final InputProps defaultChecked(boolean b) { defaultChecked = b; return this; };
@JsOverlay public final InputProps defaultValue(String s) { defaultValue = s; return this; }
@Deprecated @JsOverlay public final InputProps ref(String s) { ref = s; return this; }
@JsOverlay public final InputProps ref(ReactRefCallback callback) { ref = callback; return this; } | @JsOverlay public final InputProps ref(ReactRef<HTMLInputElement> reactRef) { ref = reactRef; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/InputProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/InputType.java
// public enum InputType {
// button,
// checkbox,
// color,
// date,
// datetime,
// //datetime-local
// email,
// file,
// hidden,
// image,
// month,
// number,
// password,
// radio,
// range,
// reset,
// search,
// submit,
// tel,
// text,
// time,
// url,
// week
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/OnOff.java
// public enum OnOff {
// on, off
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLInputElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.InputType;
import gwt.react.client.proptypes.html.attributeTypes.OnOff;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | @JsOverlay public final InputProps value(String s) { value = s; return this; }
@JsOverlay public final InputProps width(int i) { width = Integer.toString(i); return this; }
//React Specific
@JsOverlay public final InputProps defaultChecked(boolean b) { defaultChecked = b; return this; };
@JsOverlay public final InputProps defaultValue(String s) { defaultValue = s; return this; }
@Deprecated @JsOverlay public final InputProps ref(String s) { ref = s; return this; }
@JsOverlay public final InputProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final InputProps ref(ReactRef<HTMLInputElement> reactRef) { ref = reactRef; return this; }
@JsOverlay public final InputProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final InputProps accessKey(String s) { accessKey = s;return this;}
@JsOverlay public final InputProps className(String s) { className = s; return this; }
@JsOverlay public final InputProps className(String s1, String s2) { className = s1 + " " + s2; return this; }
@JsOverlay public final InputProps className(String s1, String s2, String s3) { className = s1 + " " + s2 + " " + s3; return this; }
@JsOverlay public final InputProps className(String s1, String s2, String s3, String s4) { className = s1 + " " + s2 + " " + s3 + " " + s4; return this; }
@JsOverlay public final InputProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final InputProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final InputProps dir(String s) { dir = s; return this; }
@JsOverlay public final InputProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final InputProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final InputProps id(String s) { id = s; return this; }
@JsOverlay public final InputProps lang(String s) { lang = s; return this; }
@JsOverlay public final InputProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final InputProps style(CssProps s) { style = s; return this; }
@JsOverlay public final InputProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final InputProps title(String s) { title = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/InputType.java
// public enum InputType {
// button,
// checkbox,
// color,
// date,
// datetime,
// //datetime-local
// email,
// file,
// hidden,
// image,
// month,
// number,
// password,
// radio,
// range,
// reset,
// search,
// submit,
// tel,
// text,
// time,
// url,
// week
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/OnOff.java
// public enum OnOff {
// on, off
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/InputProps.java
import elemental2.dom.HTMLInputElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.InputType;
import gwt.react.client.proptypes.html.attributeTypes.OnOff;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
@JsOverlay public final InputProps value(String s) { value = s; return this; }
@JsOverlay public final InputProps width(int i) { width = Integer.toString(i); return this; }
//React Specific
@JsOverlay public final InputProps defaultChecked(boolean b) { defaultChecked = b; return this; };
@JsOverlay public final InputProps defaultValue(String s) { defaultValue = s; return this; }
@Deprecated @JsOverlay public final InputProps ref(String s) { ref = s; return this; }
@JsOverlay public final InputProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final InputProps ref(ReactRef<HTMLInputElement> reactRef) { ref = reactRef; return this; }
@JsOverlay public final InputProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final InputProps accessKey(String s) { accessKey = s;return this;}
@JsOverlay public final InputProps className(String s) { className = s; return this; }
@JsOverlay public final InputProps className(String s1, String s2) { className = s1 + " " + s2; return this; }
@JsOverlay public final InputProps className(String s1, String s2, String s3) { className = s1 + " " + s2 + " " + s3; return this; }
@JsOverlay public final InputProps className(String s1, String s2, String s3, String s4) { className = s1 + " " + s2 + " " + s3 + " " + s4; return this; }
@JsOverlay public final InputProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final InputProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final InputProps dir(String s) { dir = s; return this; }
@JsOverlay public final InputProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final InputProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final InputProps id(String s) { id = s; return this; }
@JsOverlay public final InputProps lang(String s) { lang = s; return this; }
@JsOverlay public final InputProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final InputProps style(CssProps s) { style = s; return this; }
@JsOverlay public final InputProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final InputProps title(String s) { title = s; return this; } | @JsOverlay public final InputProps translate(YesNo s) { translate = s.name(); return this; } |
GWTReact/gwt-react | src/gwt/react/client/api/GwtReact.java | // Path: src/gwt/react/client/elements/ReactElement.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactElement {
// public Object type;
// public BaseProps props;
// public String key;
//
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// protected ReactElement() {
// }
// }
//
// Path: src/gwt/react/client/elements/ReactElementChildren.java
// @JsType(isNative = true)
// public class ReactElementChildren {
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// private ReactElementChildren() {
// }
// }
| import gwt.react.client.elements.ReactElement;
import gwt.react.client.elements.ReactElementChildren;
import jsinterop.base.Js;
import gwt.interop.utils.shared.collections.Array; | package gwt.react.client.api;
/* The MIT License (MIT)
Copyright (c) 2016 GWT React
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
public class GwtReact {
/**
* This is a static class.
*/
private GwtReact() {
}
//The following methods are used to work around limitations in the Java type system when
//creating React Elements | // Path: src/gwt/react/client/elements/ReactElement.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactElement {
// public Object type;
// public BaseProps props;
// public String key;
//
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// protected ReactElement() {
// }
// }
//
// Path: src/gwt/react/client/elements/ReactElementChildren.java
// @JsType(isNative = true)
// public class ReactElementChildren {
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// private ReactElementChildren() {
// }
// }
// Path: src/gwt/react/client/api/GwtReact.java
import gwt.react.client.elements.ReactElement;
import gwt.react.client.elements.ReactElementChildren;
import jsinterop.base.Js;
import gwt.interop.utils.shared.collections.Array;
package gwt.react.client.api;
/* The MIT License (MIT)
Copyright (c) 2016 GWT React
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
public class GwtReact {
/**
* This is a static class.
*/
private GwtReact() {
}
//The following methods are used to work around limitations in the Java type system when
//creating React Elements | public static ReactElement castAsReactElement(Array<? extends ReactElement> children) { |
GWTReact/gwt-react | src/gwt/react/client/api/GwtReact.java | // Path: src/gwt/react/client/elements/ReactElement.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactElement {
// public Object type;
// public BaseProps props;
// public String key;
//
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// protected ReactElement() {
// }
// }
//
// Path: src/gwt/react/client/elements/ReactElementChildren.java
// @JsType(isNative = true)
// public class ReactElementChildren {
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// private ReactElementChildren() {
// }
// }
| import gwt.react.client.elements.ReactElement;
import gwt.react.client.elements.ReactElementChildren;
import jsinterop.base.Js;
import gwt.interop.utils.shared.collections.Array; | package gwt.react.client.api;
/* The MIT License (MIT)
Copyright (c) 2016 GWT React
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
public class GwtReact {
/**
* This is a static class.
*/
private GwtReact() {
}
//The following methods are used to work around limitations in the Java type system when
//creating React Elements
public static ReactElement castAsReactElement(Array<? extends ReactElement> children) {
return Js.uncheckedCast(children);
}
| // Path: src/gwt/react/client/elements/ReactElement.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactElement {
// public Object type;
// public BaseProps props;
// public String key;
//
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// protected ReactElement() {
// }
// }
//
// Path: src/gwt/react/client/elements/ReactElementChildren.java
// @JsType(isNative = true)
// public class ReactElementChildren {
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// private ReactElementChildren() {
// }
// }
// Path: src/gwt/react/client/api/GwtReact.java
import gwt.react.client.elements.ReactElement;
import gwt.react.client.elements.ReactElementChildren;
import jsinterop.base.Js;
import gwt.interop.utils.shared.collections.Array;
package gwt.react.client.api;
/* The MIT License (MIT)
Copyright (c) 2016 GWT React
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
public class GwtReact {
/**
* This is a static class.
*/
private GwtReact() {
}
//The following methods are used to work around limitations in the Java type system when
//creating React Elements
public static ReactElement castAsReactElement(Array<? extends ReactElement> children) {
return Js.uncheckedCast(children);
}
| public static ReactElement castAsReactElement(ReactElementChildren children) { |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/IFrameProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLIFrameElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for input elements. Refer to http://www.w3schools.com/tags/tag_iframe.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class IFrameProps extends HtmlGlobalFields {
@JsOverlay public final IFrameProps height(int i) { height = Integer.toString(i); return this; }
@JsOverlay public final IFrameProps name(String s) { name = s; return this; }
@JsOverlay public final IFrameProps src(String s) { src = s; return this; }
@JsOverlay public final IFrameProps sandbox(String s) { sandbox = s; return this; }
@JsOverlay public final IFrameProps width(int i) { width = Integer.toString(i); return this; }
@JsOverlay public final IFrameProps frameBorder(String s) { frameBorder = s; return this; }
//React Specific
@Deprecated @JsOverlay public final IFrameProps ref(String s) { ref = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/IFrameProps.java
import elemental2.dom.HTMLIFrameElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for input elements. Refer to http://www.w3schools.com/tags/tag_iframe.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class IFrameProps extends HtmlGlobalFields {
@JsOverlay public final IFrameProps height(int i) { height = Integer.toString(i); return this; }
@JsOverlay public final IFrameProps name(String s) { name = s; return this; }
@JsOverlay public final IFrameProps src(String s) { src = s; return this; }
@JsOverlay public final IFrameProps sandbox(String s) { sandbox = s; return this; }
@JsOverlay public final IFrameProps width(int i) { width = Integer.toString(i); return this; }
@JsOverlay public final IFrameProps frameBorder(String s) { frameBorder = s; return this; }
//React Specific
@Deprecated @JsOverlay public final IFrameProps ref(String s) { ref = s; return this; } | @JsOverlay public final IFrameProps ref(ReactRefCallback callback) { ref = callback; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/IFrameProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLIFrameElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for input elements. Refer to http://www.w3schools.com/tags/tag_iframe.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class IFrameProps extends HtmlGlobalFields {
@JsOverlay public final IFrameProps height(int i) { height = Integer.toString(i); return this; }
@JsOverlay public final IFrameProps name(String s) { name = s; return this; }
@JsOverlay public final IFrameProps src(String s) { src = s; return this; }
@JsOverlay public final IFrameProps sandbox(String s) { sandbox = s; return this; }
@JsOverlay public final IFrameProps width(int i) { width = Integer.toString(i); return this; }
@JsOverlay public final IFrameProps frameBorder(String s) { frameBorder = s; return this; }
//React Specific
@Deprecated @JsOverlay public final IFrameProps ref(String s) { ref = s; return this; }
@JsOverlay public final IFrameProps ref(ReactRefCallback callback) { ref = callback; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/IFrameProps.java
import elemental2.dom.HTMLIFrameElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for input elements. Refer to http://www.w3schools.com/tags/tag_iframe.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class IFrameProps extends HtmlGlobalFields {
@JsOverlay public final IFrameProps height(int i) { height = Integer.toString(i); return this; }
@JsOverlay public final IFrameProps name(String s) { name = s; return this; }
@JsOverlay public final IFrameProps src(String s) { src = s; return this; }
@JsOverlay public final IFrameProps sandbox(String s) { sandbox = s; return this; }
@JsOverlay public final IFrameProps width(int i) { width = Integer.toString(i); return this; }
@JsOverlay public final IFrameProps frameBorder(String s) { frameBorder = s; return this; }
//React Specific
@Deprecated @JsOverlay public final IFrameProps ref(String s) { ref = s; return this; }
@JsOverlay public final IFrameProps ref(ReactRefCallback callback) { ref = callback; return this; } | @JsOverlay public final IFrameProps ref(ReactRef<HTMLIFrameElement> reactRef) { ref = reactRef; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/IFrameProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLIFrameElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for input elements. Refer to http://www.w3schools.com/tags/tag_iframe.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class IFrameProps extends HtmlGlobalFields {
@JsOverlay public final IFrameProps height(int i) { height = Integer.toString(i); return this; }
@JsOverlay public final IFrameProps name(String s) { name = s; return this; }
@JsOverlay public final IFrameProps src(String s) { src = s; return this; }
@JsOverlay public final IFrameProps sandbox(String s) { sandbox = s; return this; }
@JsOverlay public final IFrameProps width(int i) { width = Integer.toString(i); return this; }
@JsOverlay public final IFrameProps frameBorder(String s) { frameBorder = s; return this; }
//React Specific
@Deprecated @JsOverlay public final IFrameProps ref(String s) { ref = s; return this; }
@JsOverlay public final IFrameProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final IFrameProps ref(ReactRef<HTMLIFrameElement> reactRef) { ref = reactRef; return this; }
@JsOverlay public final IFrameProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final IFrameProps accessKey(String s) { accessKey = s;return this;}
@JsOverlay public final IFrameProps className(String s) { className = s; return this; }
@JsOverlay public final IFrameProps className(String s, String s2) { className = s + " " + s2; return this; }
@JsOverlay public final IFrameProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final IFrameProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final IFrameProps dir(String s) { dir = s; return this; }
@JsOverlay public final IFrameProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final IFrameProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final IFrameProps id(String s) { id = s; return this; }
@JsOverlay public final IFrameProps lang(String s) { lang = s; return this; }
@JsOverlay public final IFrameProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final IFrameProps style(CssProps s) { style = s; return this; }
@JsOverlay public final IFrameProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final IFrameProps title(String s) { title = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/IFrameProps.java
import elemental2.dom.HTMLIFrameElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for input elements. Refer to http://www.w3schools.com/tags/tag_iframe.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class IFrameProps extends HtmlGlobalFields {
@JsOverlay public final IFrameProps height(int i) { height = Integer.toString(i); return this; }
@JsOverlay public final IFrameProps name(String s) { name = s; return this; }
@JsOverlay public final IFrameProps src(String s) { src = s; return this; }
@JsOverlay public final IFrameProps sandbox(String s) { sandbox = s; return this; }
@JsOverlay public final IFrameProps width(int i) { width = Integer.toString(i); return this; }
@JsOverlay public final IFrameProps frameBorder(String s) { frameBorder = s; return this; }
//React Specific
@Deprecated @JsOverlay public final IFrameProps ref(String s) { ref = s; return this; }
@JsOverlay public final IFrameProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final IFrameProps ref(ReactRef<HTMLIFrameElement> reactRef) { ref = reactRef; return this; }
@JsOverlay public final IFrameProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final IFrameProps accessKey(String s) { accessKey = s;return this;}
@JsOverlay public final IFrameProps className(String s) { className = s; return this; }
@JsOverlay public final IFrameProps className(String s, String s2) { className = s + " " + s2; return this; }
@JsOverlay public final IFrameProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final IFrameProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final IFrameProps dir(String s) { dir = s; return this; }
@JsOverlay public final IFrameProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final IFrameProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final IFrameProps id(String s) { id = s; return this; }
@JsOverlay public final IFrameProps lang(String s) { lang = s; return this; }
@JsOverlay public final IFrameProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final IFrameProps style(CssProps s) { style = s; return this; }
@JsOverlay public final IFrameProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final IFrameProps title(String s) { title = s; return this; } | @JsOverlay public final IFrameProps translate(YesNo s) { translate = s.name(); return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/TableProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLTableElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class TableProps extends HtmlGlobalFields {
@JsOverlay public final TableProps cellPadding(String s) { cellPadding = s; return this; }
@JsOverlay public final TableProps cellSpacing(String s) { cellSpacing = s; return this; }
//React Specific
@JsOverlay public final TableProps dangerouslyinnerHTML(String s) { setDangerouslyInnerHTML(s); return this; }
@Deprecated @JsOverlay public final TableProps ref(String s) { ref = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/TableProps.java
import elemental2.dom.HTMLTableElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class TableProps extends HtmlGlobalFields {
@JsOverlay public final TableProps cellPadding(String s) { cellPadding = s; return this; }
@JsOverlay public final TableProps cellSpacing(String s) { cellSpacing = s; return this; }
//React Specific
@JsOverlay public final TableProps dangerouslyinnerHTML(String s) { setDangerouslyInnerHTML(s); return this; }
@Deprecated @JsOverlay public final TableProps ref(String s) { ref = s; return this; } | @JsOverlay public final TableProps ref(ReactRefCallback callback) { ref = callback; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/TableProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLTableElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class TableProps extends HtmlGlobalFields {
@JsOverlay public final TableProps cellPadding(String s) { cellPadding = s; return this; }
@JsOverlay public final TableProps cellSpacing(String s) { cellSpacing = s; return this; }
//React Specific
@JsOverlay public final TableProps dangerouslyinnerHTML(String s) { setDangerouslyInnerHTML(s); return this; }
@Deprecated @JsOverlay public final TableProps ref(String s) { ref = s; return this; }
@JsOverlay public final TableProps ref(ReactRefCallback callback) { ref = callback; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/TableProps.java
import elemental2.dom.HTMLTableElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class TableProps extends HtmlGlobalFields {
@JsOverlay public final TableProps cellPadding(String s) { cellPadding = s; return this; }
@JsOverlay public final TableProps cellSpacing(String s) { cellSpacing = s; return this; }
//React Specific
@JsOverlay public final TableProps dangerouslyinnerHTML(String s) { setDangerouslyInnerHTML(s); return this; }
@Deprecated @JsOverlay public final TableProps ref(String s) { ref = s; return this; }
@JsOverlay public final TableProps ref(ReactRefCallback callback) { ref = callback; return this; } | @JsOverlay public final TableProps ref(ReactRef<HTMLTableElement> reactRef) { ref = reactRef; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/TableProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLTableElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class TableProps extends HtmlGlobalFields {
@JsOverlay public final TableProps cellPadding(String s) { cellPadding = s; return this; }
@JsOverlay public final TableProps cellSpacing(String s) { cellSpacing = s; return this; }
//React Specific
@JsOverlay public final TableProps dangerouslyinnerHTML(String s) { setDangerouslyInnerHTML(s); return this; }
@Deprecated @JsOverlay public final TableProps ref(String s) { ref = s; return this; }
@JsOverlay public final TableProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final TableProps ref(ReactRef<HTMLTableElement> reactRef) { ref = reactRef; return this; }
@JsOverlay public final TableProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final TableProps accessKey(String s) { accessKey = s;return this;}
@JsOverlay public final TableProps className(String s) { className = s; return this; }
@JsOverlay public final TableProps className(String s1, String s2) { className = s1 + " " + s2; return this; }
@JsOverlay public final TableProps className(String s1, String s2, String s3) { className = s1 + " " + s2 + " " + s3; return this; }
@JsOverlay public final TableProps className(String s1, String s2, String s3, String s4) { className = s1 + " " + s2 + " " + s3 + " " + s4; return this; }
@JsOverlay public final TableProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final TableProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final TableProps dir(String s) { dir = s; return this; }
@JsOverlay public final TableProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final TableProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final TableProps id(String s) { id = s; return this; }
@JsOverlay public final TableProps lang(String s) { lang = s; return this; }
@JsOverlay public final TableProps style(CssProps s) { style = s; return this; }
@JsOverlay public final TableProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final TableProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final TableProps title(String s) { title = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/TableProps.java
import elemental2.dom.HTMLTableElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class TableProps extends HtmlGlobalFields {
@JsOverlay public final TableProps cellPadding(String s) { cellPadding = s; return this; }
@JsOverlay public final TableProps cellSpacing(String s) { cellSpacing = s; return this; }
//React Specific
@JsOverlay public final TableProps dangerouslyinnerHTML(String s) { setDangerouslyInnerHTML(s); return this; }
@Deprecated @JsOverlay public final TableProps ref(String s) { ref = s; return this; }
@JsOverlay public final TableProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final TableProps ref(ReactRef<HTMLTableElement> reactRef) { ref = reactRef; return this; }
@JsOverlay public final TableProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final TableProps accessKey(String s) { accessKey = s;return this;}
@JsOverlay public final TableProps className(String s) { className = s; return this; }
@JsOverlay public final TableProps className(String s1, String s2) { className = s1 + " " + s2; return this; }
@JsOverlay public final TableProps className(String s1, String s2, String s3) { className = s1 + " " + s2 + " " + s3; return this; }
@JsOverlay public final TableProps className(String s1, String s2, String s3, String s4) { className = s1 + " " + s2 + " " + s3 + " " + s4; return this; }
@JsOverlay public final TableProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final TableProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final TableProps dir(String s) { dir = s; return this; }
@JsOverlay public final TableProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final TableProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final TableProps id(String s) { id = s; return this; }
@JsOverlay public final TableProps lang(String s) { lang = s; return this; }
@JsOverlay public final TableProps style(CssProps s) { style = s; return this; }
@JsOverlay public final TableProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final TableProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final TableProps title(String s) { title = s; return this; } | @JsOverlay public final TableProps translate(YesNo s) { translate = s.name(); return this; } |
GWTReact/gwt-react | src/gwt/react/client/api/ReactDOM.java | // Path: src/gwt/react/client/elements/ReactElement.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactElement {
// public Object type;
// public BaseProps props;
// public String key;
//
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// protected ReactElement() {
// }
// }
| import gwt.react.client.elements.ReactElement;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
import gwt.interop.utils.shared.functional.JsRunnable; | package gwt.react.client.api;
/* The MIT License (MIT)
Copyright (c) 2016 GWT React
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
@JsType(isNative = true, namespace = JsPackage.GLOBAL)
public class ReactDOM {
/**
* This is a static class.
*/
private ReactDOM() {
}
/**
* <p>Render a ReactElement<?, ?> into the DOM in the supplied container and return a reference to
* the component (or returns nothing for stateless components).</p>
*
* <p>If the ReactElement<?, ?> was previously rendered into container, this will perform an update
* on it and only mutate the DOM as necessary to reflect the latest React component.</p>
*
* <p>If the optional callback is provided, it will be executed after the component is rendered
* or updated.</p>
*
* @param element the react element to render
* @param container the DOM container to render into
* @return a reference to the component or returns nothing for stateless components
*/ | // Path: src/gwt/react/client/elements/ReactElement.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactElement {
// public Object type;
// public BaseProps props;
// public String key;
//
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// protected ReactElement() {
// }
// }
// Path: src/gwt/react/client/api/ReactDOM.java
import gwt.react.client.elements.ReactElement;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
import gwt.interop.utils.shared.functional.JsRunnable;
package gwt.react.client.api;
/* The MIT License (MIT)
Copyright (c) 2016 GWT React
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
@JsType(isNative = true, namespace = JsPackage.GLOBAL)
public class ReactDOM {
/**
* This is a static class.
*/
private ReactDOM() {
}
/**
* <p>Render a ReactElement<?, ?> into the DOM in the supplied container and return a reference to
* the component (or returns nothing for stateless components).</p>
*
* <p>If the ReactElement<?, ?> was previously rendered into container, this will perform an update
* on it and only mutate the DOM as necessary to reflect the latest React component.</p>
*
* <p>If the optional callback is provided, it will be executed after the component is rendered
* or updated.</p>
*
* @param element the react element to render
* @param container the DOM container to render into
* @return a reference to the component or returns nothing for stateless components
*/ | public static native <C> ReactElement render(ReactElement element, C container); |
GWTReact/gwt-react | src/gwt/react/client/api/React.java | // Path: src/gwt/react/client/elements/ReactElement.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactElement {
// public Object type;
// public BaseProps props;
// public String key;
//
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// protected ReactElement() {
// }
// }
//
// Path: src/gwt/react/client/elements/ReactElementChildren.java
// @JsType(isNative = true)
// public class ReactElementChildren {
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// private ReactElementChildren() {
// }
// }
//
// Path: src/gwt/react/client/proptypes/BaseProps.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
// public class BaseProps extends JsPlainObj {
// public ReactElementChildren children;
// public String key;
// public Object ref; //Either a String Id or RefCallback
// }
//
// Path: src/gwt/react/client/proptypes/FragmentProps.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
// public class FragmentProps extends BaseProps {
// @JsOverlay
// public final FragmentProps key(String s) { key = s; return this; }
// }
| import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;
import gwt.interop.utils.client.plainobjects.JsPlainObj;
import gwt.interop.utils.shared.collections.Array;
import gwt.react.client.components.*;
import gwt.react.client.elements.ReactElement;
import gwt.react.client.elements.ReactElementChildren;
import gwt.react.client.proptypes.BaseProps;
import gwt.react.client.proptypes.FragmentProps;
import gwt.react.client.proptypes.html.*;
import jsinterop.annotations.JsOverlay; | package gwt.react.client.api;
/* The MIT License (MIT)
Copyright (c) 2016 GWT React
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
@JsType(isNative = true, namespace = JsPackage.GLOBAL)
public class React {
/**
* This is a static class.
*/
private React() {
}
/**
* <p>Create and return a new ReactElement of the given type.
*
* @param type a HTML tag name (eg. 'div', 'span', etc)
* @param props the props to pass to the element
* @return a {@link ReactElement}
*/ | // Path: src/gwt/react/client/elements/ReactElement.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactElement {
// public Object type;
// public BaseProps props;
// public String key;
//
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// protected ReactElement() {
// }
// }
//
// Path: src/gwt/react/client/elements/ReactElementChildren.java
// @JsType(isNative = true)
// public class ReactElementChildren {
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// private ReactElementChildren() {
// }
// }
//
// Path: src/gwt/react/client/proptypes/BaseProps.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
// public class BaseProps extends JsPlainObj {
// public ReactElementChildren children;
// public String key;
// public Object ref; //Either a String Id or RefCallback
// }
//
// Path: src/gwt/react/client/proptypes/FragmentProps.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
// public class FragmentProps extends BaseProps {
// @JsOverlay
// public final FragmentProps key(String s) { key = s; return this; }
// }
// Path: src/gwt/react/client/api/React.java
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;
import gwt.interop.utils.client.plainobjects.JsPlainObj;
import gwt.interop.utils.shared.collections.Array;
import gwt.react.client.components.*;
import gwt.react.client.elements.ReactElement;
import gwt.react.client.elements.ReactElementChildren;
import gwt.react.client.proptypes.BaseProps;
import gwt.react.client.proptypes.FragmentProps;
import gwt.react.client.proptypes.html.*;
import jsinterop.annotations.JsOverlay;
package gwt.react.client.api;
/* The MIT License (MIT)
Copyright (c) 2016 GWT React
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
@JsType(isNative = true, namespace = JsPackage.GLOBAL)
public class React {
/**
* This is a static class.
*/
private React() {
}
/**
* <p>Create and return a new ReactElement of the given type.
*
* @param type a HTML tag name (eg. 'div', 'span', etc)
* @param props the props to pass to the element
* @return a {@link ReactElement}
*/ | public static native <P extends HtmlGlobalFields> ReactElement createElement(String type, P props); |
GWTReact/gwt-react | src/gwt/react/client/api/React.java | // Path: src/gwt/react/client/elements/ReactElement.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactElement {
// public Object type;
// public BaseProps props;
// public String key;
//
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// protected ReactElement() {
// }
// }
//
// Path: src/gwt/react/client/elements/ReactElementChildren.java
// @JsType(isNative = true)
// public class ReactElementChildren {
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// private ReactElementChildren() {
// }
// }
//
// Path: src/gwt/react/client/proptypes/BaseProps.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
// public class BaseProps extends JsPlainObj {
// public ReactElementChildren children;
// public String key;
// public Object ref; //Either a String Id or RefCallback
// }
//
// Path: src/gwt/react/client/proptypes/FragmentProps.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
// public class FragmentProps extends BaseProps {
// @JsOverlay
// public final FragmentProps key(String s) { key = s; return this; }
// }
| import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;
import gwt.interop.utils.client.plainobjects.JsPlainObj;
import gwt.interop.utils.shared.collections.Array;
import gwt.react.client.components.*;
import gwt.react.client.elements.ReactElement;
import gwt.react.client.elements.ReactElementChildren;
import gwt.react.client.proptypes.BaseProps;
import gwt.react.client.proptypes.FragmentProps;
import gwt.react.client.proptypes.html.*;
import jsinterop.annotations.JsOverlay; | package gwt.react.client.api;
/* The MIT License (MIT)
Copyright (c) 2016 GWT React
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
@JsType(isNative = true, namespace = JsPackage.GLOBAL)
public class React {
/**
* This is a static class.
*/
private React() {
}
/**
* <p>Create and return a new ReactElement of the given type.
*
* @param type a HTML tag name (eg. 'div', 'span', etc)
* @param props the props to pass to the element
* @return a {@link ReactElement}
*/
public static native <P extends HtmlGlobalFields> ReactElement createElement(String type, P props);
public static native <P extends HtmlGlobalFields> ReactElement createElement(String type, P props, String value);
public static native <P extends HtmlGlobalFields> ReactElement createElement(String type, P props, ReactElement ...children);
public static native <P extends HtmlGlobalFields> ReactElement createElement(String type, P props, ReactElement child, String value);
/**
* Create and return a new ReactElement of the given type.
*
* @param type a ReactClass (created via React.createClass).
* @param props the props to pass to the element
* @return a {@link ReactElement}
*/
//Create Stateless Components
| // Path: src/gwt/react/client/elements/ReactElement.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactElement {
// public Object type;
// public BaseProps props;
// public String key;
//
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// protected ReactElement() {
// }
// }
//
// Path: src/gwt/react/client/elements/ReactElementChildren.java
// @JsType(isNative = true)
// public class ReactElementChildren {
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// private ReactElementChildren() {
// }
// }
//
// Path: src/gwt/react/client/proptypes/BaseProps.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
// public class BaseProps extends JsPlainObj {
// public ReactElementChildren children;
// public String key;
// public Object ref; //Either a String Id or RefCallback
// }
//
// Path: src/gwt/react/client/proptypes/FragmentProps.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
// public class FragmentProps extends BaseProps {
// @JsOverlay
// public final FragmentProps key(String s) { key = s; return this; }
// }
// Path: src/gwt/react/client/api/React.java
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;
import gwt.interop.utils.client.plainobjects.JsPlainObj;
import gwt.interop.utils.shared.collections.Array;
import gwt.react.client.components.*;
import gwt.react.client.elements.ReactElement;
import gwt.react.client.elements.ReactElementChildren;
import gwt.react.client.proptypes.BaseProps;
import gwt.react.client.proptypes.FragmentProps;
import gwt.react.client.proptypes.html.*;
import jsinterop.annotations.JsOverlay;
package gwt.react.client.api;
/* The MIT License (MIT)
Copyright (c) 2016 GWT React
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
@JsType(isNative = true, namespace = JsPackage.GLOBAL)
public class React {
/**
* This is a static class.
*/
private React() {
}
/**
* <p>Create and return a new ReactElement of the given type.
*
* @param type a HTML tag name (eg. 'div', 'span', etc)
* @param props the props to pass to the element
* @return a {@link ReactElement}
*/
public static native <P extends HtmlGlobalFields> ReactElement createElement(String type, P props);
public static native <P extends HtmlGlobalFields> ReactElement createElement(String type, P props, String value);
public static native <P extends HtmlGlobalFields> ReactElement createElement(String type, P props, ReactElement ...children);
public static native <P extends HtmlGlobalFields> ReactElement createElement(String type, P props, ReactElement child, String value);
/**
* Create and return a new ReactElement of the given type.
*
* @param type a ReactClass (created via React.createClass).
* @param props the props to pass to the element
* @return a {@link ReactElement}
*/
//Create Stateless Components
| public static native <P extends BaseProps> ReactElement createElement(StatelessComponent<P> type, P props); |
GWTReact/gwt-react | src/gwt/react/client/api/React.java | // Path: src/gwt/react/client/elements/ReactElement.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactElement {
// public Object type;
// public BaseProps props;
// public String key;
//
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// protected ReactElement() {
// }
// }
//
// Path: src/gwt/react/client/elements/ReactElementChildren.java
// @JsType(isNative = true)
// public class ReactElementChildren {
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// private ReactElementChildren() {
// }
// }
//
// Path: src/gwt/react/client/proptypes/BaseProps.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
// public class BaseProps extends JsPlainObj {
// public ReactElementChildren children;
// public String key;
// public Object ref; //Either a String Id or RefCallback
// }
//
// Path: src/gwt/react/client/proptypes/FragmentProps.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
// public class FragmentProps extends BaseProps {
// @JsOverlay
// public final FragmentProps key(String s) { key = s; return this; }
// }
| import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;
import gwt.interop.utils.client.plainobjects.JsPlainObj;
import gwt.interop.utils.shared.collections.Array;
import gwt.react.client.components.*;
import gwt.react.client.elements.ReactElement;
import gwt.react.client.elements.ReactElementChildren;
import gwt.react.client.proptypes.BaseProps;
import gwt.react.client.proptypes.FragmentProps;
import gwt.react.client.proptypes.html.*;
import jsinterop.annotations.JsOverlay; | * Create a reference to hold a reference to either a DOM node or React Element
*
* @param <T> The type of object the reference refers to
* @return A Reference object
*/
public static native <T> ReactRef<T> createRef();
/**
* Create a forward ref wrapper
*
* @param props
* @param ref
* @param <T> The type of object the ref refers to
* @param <P> The prop type
* @return A react element where ref will be forwarded.
*/
public static native <T, P extends BaseProps> ForwardRefCallback<T> forwardRef(P props, ReactRef<T> ref);
/**
* React.DOM provides convenience wrappers around React.createElement for DOM components.
* For example React.DOM.div(null, 'Hello World!')
*/
@JsType(isNative = true)
public static class DOM {
/**
* This is a static class.
*/
private DOM() {
}
| // Path: src/gwt/react/client/elements/ReactElement.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactElement {
// public Object type;
// public BaseProps props;
// public String key;
//
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// protected ReactElement() {
// }
// }
//
// Path: src/gwt/react/client/elements/ReactElementChildren.java
// @JsType(isNative = true)
// public class ReactElementChildren {
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// private ReactElementChildren() {
// }
// }
//
// Path: src/gwt/react/client/proptypes/BaseProps.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
// public class BaseProps extends JsPlainObj {
// public ReactElementChildren children;
// public String key;
// public Object ref; //Either a String Id or RefCallback
// }
//
// Path: src/gwt/react/client/proptypes/FragmentProps.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
// public class FragmentProps extends BaseProps {
// @JsOverlay
// public final FragmentProps key(String s) { key = s; return this; }
// }
// Path: src/gwt/react/client/api/React.java
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;
import gwt.interop.utils.client.plainobjects.JsPlainObj;
import gwt.interop.utils.shared.collections.Array;
import gwt.react.client.components.*;
import gwt.react.client.elements.ReactElement;
import gwt.react.client.elements.ReactElementChildren;
import gwt.react.client.proptypes.BaseProps;
import gwt.react.client.proptypes.FragmentProps;
import gwt.react.client.proptypes.html.*;
import jsinterop.annotations.JsOverlay;
* Create a reference to hold a reference to either a DOM node or React Element
*
* @param <T> The type of object the reference refers to
* @return A Reference object
*/
public static native <T> ReactRef<T> createRef();
/**
* Create a forward ref wrapper
*
* @param props
* @param ref
* @param <T> The type of object the ref refers to
* @param <P> The prop type
* @return A react element where ref will be forwarded.
*/
public static native <T, P extends BaseProps> ForwardRefCallback<T> forwardRef(P props, ReactRef<T> ref);
/**
* React.DOM provides convenience wrappers around React.createElement for DOM components.
* For example React.DOM.div(null, 'Hello World!')
*/
@JsType(isNative = true)
public static class DOM {
/**
* This is a static class.
*/
private DOM() {
}
| @JsOverlay public static ReactElement fragment(FragmentProps props, ReactElement ...child) { return createElement(Fragment, props, child); } |
GWTReact/gwt-react | src/gwt/react/client/api/React.java | // Path: src/gwt/react/client/elements/ReactElement.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactElement {
// public Object type;
// public BaseProps props;
// public String key;
//
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// protected ReactElement() {
// }
// }
//
// Path: src/gwt/react/client/elements/ReactElementChildren.java
// @JsType(isNative = true)
// public class ReactElementChildren {
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// private ReactElementChildren() {
// }
// }
//
// Path: src/gwt/react/client/proptypes/BaseProps.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
// public class BaseProps extends JsPlainObj {
// public ReactElementChildren children;
// public String key;
// public Object ref; //Either a String Id or RefCallback
// }
//
// Path: src/gwt/react/client/proptypes/FragmentProps.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
// public class FragmentProps extends BaseProps {
// @JsOverlay
// public final FragmentProps key(String s) { key = s; return this; }
// }
| import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;
import gwt.interop.utils.client.plainobjects.JsPlainObj;
import gwt.interop.utils.shared.collections.Array;
import gwt.react.client.components.*;
import gwt.react.client.elements.ReactElement;
import gwt.react.client.elements.ReactElementChildren;
import gwt.react.client.proptypes.BaseProps;
import gwt.react.client.proptypes.FragmentProps;
import gwt.react.client.proptypes.html.*;
import jsinterop.annotations.JsOverlay; | @JsOverlay public static ReactElement ul(HtmlProps props, ReactElement ...child) { return createElement("ul", props, child); }
//SVG related elements
@JsOverlay public static ReactElement svg(SvgProps props, ReactElement ...child) { return createElement("svg", props, child); }
@JsOverlay public static ReactElement polygon(PolygonProps props) { return createElement("polygon", props); }
@JsOverlay public static ReactElement circle(CircleProps props) { return createElement("circle", props); }
}
/**
* React.Children provides utilities for dealing with the this.props.children opaque data
* structure.
*/
@JsType(isNative = true)
public static class Children {
/**
* This is a static class.
*/
private Children() {
}
/**
* Invoke fn on every immediate child contained within children. If children is a nested
* object or array it will be traversed: fn will never be passed the container objects.
* If children is null returns null rather than an array.
*
* @param children The opaque children structure to iterate over
* @param Fn The function to execute
* @return An Array of child ReactElements
*/ | // Path: src/gwt/react/client/elements/ReactElement.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactElement {
// public Object type;
// public BaseProps props;
// public String key;
//
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// protected ReactElement() {
// }
// }
//
// Path: src/gwt/react/client/elements/ReactElementChildren.java
// @JsType(isNative = true)
// public class ReactElementChildren {
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// private ReactElementChildren() {
// }
// }
//
// Path: src/gwt/react/client/proptypes/BaseProps.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
// public class BaseProps extends JsPlainObj {
// public ReactElementChildren children;
// public String key;
// public Object ref; //Either a String Id or RefCallback
// }
//
// Path: src/gwt/react/client/proptypes/FragmentProps.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
// public class FragmentProps extends BaseProps {
// @JsOverlay
// public final FragmentProps key(String s) { key = s; return this; }
// }
// Path: src/gwt/react/client/api/React.java
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;
import gwt.interop.utils.client.plainobjects.JsPlainObj;
import gwt.interop.utils.shared.collections.Array;
import gwt.react.client.components.*;
import gwt.react.client.elements.ReactElement;
import gwt.react.client.elements.ReactElementChildren;
import gwt.react.client.proptypes.BaseProps;
import gwt.react.client.proptypes.FragmentProps;
import gwt.react.client.proptypes.html.*;
import jsinterop.annotations.JsOverlay;
@JsOverlay public static ReactElement ul(HtmlProps props, ReactElement ...child) { return createElement("ul", props, child); }
//SVG related elements
@JsOverlay public static ReactElement svg(SvgProps props, ReactElement ...child) { return createElement("svg", props, child); }
@JsOverlay public static ReactElement polygon(PolygonProps props) { return createElement("polygon", props); }
@JsOverlay public static ReactElement circle(CircleProps props) { return createElement("circle", props); }
}
/**
* React.Children provides utilities for dealing with the this.props.children opaque data
* structure.
*/
@JsType(isNative = true)
public static class Children {
/**
* This is a static class.
*/
private Children() {
}
/**
* Invoke fn on every immediate child contained within children. If children is a nested
* object or array it will be traversed: fn will never be passed the container objects.
* If children is null returns null rather than an array.
*
* @param children The opaque children structure to iterate over
* @param Fn The function to execute
* @return An Array of child ReactElements
*/ | public static native Array<ReactElement> map(ReactElementChildren children, ChildrenMapFn Fn); // Object thisArg); |
GWTReact/gwt-react | src/gwt/react/client/api/ForwardRefCallback.java | // Path: src/gwt/react/client/elements/ReactElement.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactElement {
// public Object type;
// public BaseProps props;
// public String key;
//
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// protected ReactElement() {
// }
// }
//
// Path: src/gwt/react/client/proptypes/BaseProps.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
// public class BaseProps extends JsPlainObj {
// public ReactElementChildren children;
// public String key;
// public Object ref; //Either a String Id or RefCallback
// }
| import gwt.react.client.proptypes.BaseProps;
import jsinterop.annotations.JsFunction;
import gwt.react.client.elements.ReactElement; | package gwt.react.client.api;
/* The MIT License (MIT)
Copyright (c) 2018 GWT React
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
@JsFunction
public interface ForwardRefCallback<T> { | // Path: src/gwt/react/client/elements/ReactElement.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactElement {
// public Object type;
// public BaseProps props;
// public String key;
//
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// protected ReactElement() {
// }
// }
//
// Path: src/gwt/react/client/proptypes/BaseProps.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
// public class BaseProps extends JsPlainObj {
// public ReactElementChildren children;
// public String key;
// public Object ref; //Either a String Id or RefCallback
// }
// Path: src/gwt/react/client/api/ForwardRefCallback.java
import gwt.react.client.proptypes.BaseProps;
import jsinterop.annotations.JsFunction;
import gwt.react.client.elements.ReactElement;
package gwt.react.client.api;
/* The MIT License (MIT)
Copyright (c) 2018 GWT React
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
@JsFunction
public interface ForwardRefCallback<T> { | ReactElement forward(BaseProps props, ReactRef<T> ref); |
GWTReact/gwt-react | src/gwt/react/client/api/ForwardRefCallback.java | // Path: src/gwt/react/client/elements/ReactElement.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactElement {
// public Object type;
// public BaseProps props;
// public String key;
//
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// protected ReactElement() {
// }
// }
//
// Path: src/gwt/react/client/proptypes/BaseProps.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
// public class BaseProps extends JsPlainObj {
// public ReactElementChildren children;
// public String key;
// public Object ref; //Either a String Id or RefCallback
// }
| import gwt.react.client.proptypes.BaseProps;
import jsinterop.annotations.JsFunction;
import gwt.react.client.elements.ReactElement; | package gwt.react.client.api;
/* The MIT License (MIT)
Copyright (c) 2018 GWT React
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
@JsFunction
public interface ForwardRefCallback<T> { | // Path: src/gwt/react/client/elements/ReactElement.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactElement {
// public Object type;
// public BaseProps props;
// public String key;
//
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// protected ReactElement() {
// }
// }
//
// Path: src/gwt/react/client/proptypes/BaseProps.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
// public class BaseProps extends JsPlainObj {
// public ReactElementChildren children;
// public String key;
// public Object ref; //Either a String Id or RefCallback
// }
// Path: src/gwt/react/client/api/ForwardRefCallback.java
import gwt.react.client.proptypes.BaseProps;
import jsinterop.annotations.JsFunction;
import gwt.react.client.elements.ReactElement;
package gwt.react.client.api;
/* The MIT License (MIT)
Copyright (c) 2018 GWT React
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
@JsFunction
public interface ForwardRefCallback<T> { | ReactElement forward(BaseProps props, ReactRef<T> ref); |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/CircleProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for svg circle elements. Refer to https://developer.mozilla.org/en-US/docs/Web/SVG/Element/circle
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class CircleProps extends HtmlGlobalFields {
@JsOverlay public final CircleProps height(int i) { height = Integer.toString(i); return this; }
@JsOverlay public final CircleProps width(int i) { width = Integer.toString(i); return this; }
@JsOverlay public final CircleProps cX(String s) { set("cx", s); return this;}
@JsOverlay public final CircleProps cY(String s) { set("cy", s); return this;}
@JsOverlay public final CircleProps r(String s) { set("r", s); return this;}
@JsOverlay public final CircleProps fill(String s) { set("fill", s); return this;}
@JsOverlay public final CircleProps strokeDasharray(String s) { set("strokeDasharray", s); return this;}
@JsOverlay public final CircleProps strokeDashoffset(String s) { set("strokeDashoffset", s); return this;}
//React Specific
@Deprecated @JsOverlay public final CircleProps ref(String s) { ref = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/CircleProps.java
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for svg circle elements. Refer to https://developer.mozilla.org/en-US/docs/Web/SVG/Element/circle
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class CircleProps extends HtmlGlobalFields {
@JsOverlay public final CircleProps height(int i) { height = Integer.toString(i); return this; }
@JsOverlay public final CircleProps width(int i) { width = Integer.toString(i); return this; }
@JsOverlay public final CircleProps cX(String s) { set("cx", s); return this;}
@JsOverlay public final CircleProps cY(String s) { set("cy", s); return this;}
@JsOverlay public final CircleProps r(String s) { set("r", s); return this;}
@JsOverlay public final CircleProps fill(String s) { set("fill", s); return this;}
@JsOverlay public final CircleProps strokeDasharray(String s) { set("strokeDasharray", s); return this;}
@JsOverlay public final CircleProps strokeDashoffset(String s) { set("strokeDashoffset", s); return this;}
//React Specific
@Deprecated @JsOverlay public final CircleProps ref(String s) { ref = s; return this; } | @JsOverlay public final CircleProps ref(ReactRefCallback callback) { ref = callback; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/CircleProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for svg circle elements. Refer to https://developer.mozilla.org/en-US/docs/Web/SVG/Element/circle
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class CircleProps extends HtmlGlobalFields {
@JsOverlay public final CircleProps height(int i) { height = Integer.toString(i); return this; }
@JsOverlay public final CircleProps width(int i) { width = Integer.toString(i); return this; }
@JsOverlay public final CircleProps cX(String s) { set("cx", s); return this;}
@JsOverlay public final CircleProps cY(String s) { set("cy", s); return this;}
@JsOverlay public final CircleProps r(String s) { set("r", s); return this;}
@JsOverlay public final CircleProps fill(String s) { set("fill", s); return this;}
@JsOverlay public final CircleProps strokeDasharray(String s) { set("strokeDasharray", s); return this;}
@JsOverlay public final CircleProps strokeDashoffset(String s) { set("strokeDashoffset", s); return this;}
//React Specific
@Deprecated @JsOverlay public final CircleProps ref(String s) { ref = s; return this; }
@JsOverlay public final CircleProps ref(ReactRefCallback callback) { ref = callback; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/CircleProps.java
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for svg circle elements. Refer to https://developer.mozilla.org/en-US/docs/Web/SVG/Element/circle
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class CircleProps extends HtmlGlobalFields {
@JsOverlay public final CircleProps height(int i) { height = Integer.toString(i); return this; }
@JsOverlay public final CircleProps width(int i) { width = Integer.toString(i); return this; }
@JsOverlay public final CircleProps cX(String s) { set("cx", s); return this;}
@JsOverlay public final CircleProps cY(String s) { set("cy", s); return this;}
@JsOverlay public final CircleProps r(String s) { set("r", s); return this;}
@JsOverlay public final CircleProps fill(String s) { set("fill", s); return this;}
@JsOverlay public final CircleProps strokeDasharray(String s) { set("strokeDasharray", s); return this;}
@JsOverlay public final CircleProps strokeDashoffset(String s) { set("strokeDashoffset", s); return this;}
//React Specific
@Deprecated @JsOverlay public final CircleProps ref(String s) { ref = s; return this; }
@JsOverlay public final CircleProps ref(ReactRefCallback callback) { ref = callback; return this; } | @JsOverlay public final <T> CircleProps ref(ReactRef<T> reactRef) { ref = reactRef; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/CircleProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for svg circle elements. Refer to https://developer.mozilla.org/en-US/docs/Web/SVG/Element/circle
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class CircleProps extends HtmlGlobalFields {
@JsOverlay public final CircleProps height(int i) { height = Integer.toString(i); return this; }
@JsOverlay public final CircleProps width(int i) { width = Integer.toString(i); return this; }
@JsOverlay public final CircleProps cX(String s) { set("cx", s); return this;}
@JsOverlay public final CircleProps cY(String s) { set("cy", s); return this;}
@JsOverlay public final CircleProps r(String s) { set("r", s); return this;}
@JsOverlay public final CircleProps fill(String s) { set("fill", s); return this;}
@JsOverlay public final CircleProps strokeDasharray(String s) { set("strokeDasharray", s); return this;}
@JsOverlay public final CircleProps strokeDashoffset(String s) { set("strokeDashoffset", s); return this;}
//React Specific
@Deprecated @JsOverlay public final CircleProps ref(String s) { ref = s; return this; }
@JsOverlay public final CircleProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final <T> CircleProps ref(ReactRef<T> reactRef) { ref = reactRef; return this; }
@JsOverlay public final CircleProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final CircleProps accessKey(String s) { accessKey = s; return this;}
@JsOverlay public final CircleProps className(String s) { className = s; return this; }
@JsOverlay public final CircleProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final CircleProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final CircleProps dir(String s) { dir = s; return this; }
@JsOverlay public final CircleProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final CircleProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final CircleProps id(String s) { id = s; return this; }
@JsOverlay public final CircleProps lang(String s) { lang = s; return this; }
@JsOverlay public final CircleProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final CircleProps style(CssProps s) { style = s; return this; }
@JsOverlay public final CircleProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final CircleProps title(String s) { title = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/CircleProps.java
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for svg circle elements. Refer to https://developer.mozilla.org/en-US/docs/Web/SVG/Element/circle
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class CircleProps extends HtmlGlobalFields {
@JsOverlay public final CircleProps height(int i) { height = Integer.toString(i); return this; }
@JsOverlay public final CircleProps width(int i) { width = Integer.toString(i); return this; }
@JsOverlay public final CircleProps cX(String s) { set("cx", s); return this;}
@JsOverlay public final CircleProps cY(String s) { set("cy", s); return this;}
@JsOverlay public final CircleProps r(String s) { set("r", s); return this;}
@JsOverlay public final CircleProps fill(String s) { set("fill", s); return this;}
@JsOverlay public final CircleProps strokeDasharray(String s) { set("strokeDasharray", s); return this;}
@JsOverlay public final CircleProps strokeDashoffset(String s) { set("strokeDashoffset", s); return this;}
//React Specific
@Deprecated @JsOverlay public final CircleProps ref(String s) { ref = s; return this; }
@JsOverlay public final CircleProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final <T> CircleProps ref(ReactRef<T> reactRef) { ref = reactRef; return this; }
@JsOverlay public final CircleProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final CircleProps accessKey(String s) { accessKey = s; return this;}
@JsOverlay public final CircleProps className(String s) { className = s; return this; }
@JsOverlay public final CircleProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final CircleProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final CircleProps dir(String s) { dir = s; return this; }
@JsOverlay public final CircleProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final CircleProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final CircleProps id(String s) { id = s; return this; }
@JsOverlay public final CircleProps lang(String s) { lang = s; return this; }
@JsOverlay public final CircleProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final CircleProps style(CssProps s) { style = s; return this; }
@JsOverlay public final CircleProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final CircleProps title(String s) { title = s; return this; } | @JsOverlay public final CircleProps translate(YesNo s) { translate = s.name(); return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/TdProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLTableCellElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for td elements. Refer to http://www.w3schools.com/tags/tag_td.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class TdProps extends HtmlGlobalFields {
@JsOverlay public final TdProps colSpan(int i) { colSpan = i; return this; }
@JsOverlay public final TdProps headers(String s) { headers = s; return this; }
@JsOverlay public final TdProps rowSpan(int i) { rowSpan = i; return this; }
//React Specific
@Deprecated @JsOverlay public final TdProps ref(String s) { ref = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/TdProps.java
import elemental2.dom.HTMLTableCellElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for td elements. Refer to http://www.w3schools.com/tags/tag_td.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class TdProps extends HtmlGlobalFields {
@JsOverlay public final TdProps colSpan(int i) { colSpan = i; return this; }
@JsOverlay public final TdProps headers(String s) { headers = s; return this; }
@JsOverlay public final TdProps rowSpan(int i) { rowSpan = i; return this; }
//React Specific
@Deprecated @JsOverlay public final TdProps ref(String s) { ref = s; return this; } | @JsOverlay public final TdProps ref(ReactRefCallback callback) { ref = callback; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/TdProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLTableCellElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for td elements. Refer to http://www.w3schools.com/tags/tag_td.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class TdProps extends HtmlGlobalFields {
@JsOverlay public final TdProps colSpan(int i) { colSpan = i; return this; }
@JsOverlay public final TdProps headers(String s) { headers = s; return this; }
@JsOverlay public final TdProps rowSpan(int i) { rowSpan = i; return this; }
//React Specific
@Deprecated @JsOverlay public final TdProps ref(String s) { ref = s; return this; }
@JsOverlay public final TdProps ref(ReactRefCallback callback) { ref = callback; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/TdProps.java
import elemental2.dom.HTMLTableCellElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for td elements. Refer to http://www.w3schools.com/tags/tag_td.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class TdProps extends HtmlGlobalFields {
@JsOverlay public final TdProps colSpan(int i) { colSpan = i; return this; }
@JsOverlay public final TdProps headers(String s) { headers = s; return this; }
@JsOverlay public final TdProps rowSpan(int i) { rowSpan = i; return this; }
//React Specific
@Deprecated @JsOverlay public final TdProps ref(String s) { ref = s; return this; }
@JsOverlay public final TdProps ref(ReactRefCallback callback) { ref = callback; return this; } | @JsOverlay public final TdProps ref(ReactRef<HTMLTableCellElement> reactRef) { ref = reactRef; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/TdProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLTableCellElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for td elements. Refer to http://www.w3schools.com/tags/tag_td.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class TdProps extends HtmlGlobalFields {
@JsOverlay public final TdProps colSpan(int i) { colSpan = i; return this; }
@JsOverlay public final TdProps headers(String s) { headers = s; return this; }
@JsOverlay public final TdProps rowSpan(int i) { rowSpan = i; return this; }
//React Specific
@Deprecated @JsOverlay public final TdProps ref(String s) { ref = s; return this; }
@JsOverlay public final TdProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final TdProps ref(ReactRef<HTMLTableCellElement> reactRef) { ref = reactRef; return this; }
@JsOverlay public final TdProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final TdProps accessKey(String s) { accessKey = s; return this;}
@JsOverlay public final TdProps className(String s) { className = s; return this; }
@JsOverlay public final TdProps className(String s1, String s2) { className = s1 + " " + s2; return this; }
@JsOverlay public final TdProps className(String s1, String s2, String s3) { className = s1 + " " + s2 + " " + s3; return this; }
@JsOverlay public final TdProps className(String s1, String s2, String s3, String s4) { className = s1 + " " + s2 + " " + s3 + " " + s4; return this; }
@JsOverlay public final TdProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final TdProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final TdProps dir(String s) { dir = s; return this; }
@JsOverlay public final TdProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final TdProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final TdProps id(String s) { id = s; return this; }
@JsOverlay public final TdProps lang(String s) { lang = s; return this; }
@JsOverlay public final TdProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final TdProps style(CssProps s) { style = s; return this; }
@JsOverlay public final TdProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final TdProps title(String s) { title = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/TdProps.java
import elemental2.dom.HTMLTableCellElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for td elements. Refer to http://www.w3schools.com/tags/tag_td.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class TdProps extends HtmlGlobalFields {
@JsOverlay public final TdProps colSpan(int i) { colSpan = i; return this; }
@JsOverlay public final TdProps headers(String s) { headers = s; return this; }
@JsOverlay public final TdProps rowSpan(int i) { rowSpan = i; return this; }
//React Specific
@Deprecated @JsOverlay public final TdProps ref(String s) { ref = s; return this; }
@JsOverlay public final TdProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final TdProps ref(ReactRef<HTMLTableCellElement> reactRef) { ref = reactRef; return this; }
@JsOverlay public final TdProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final TdProps accessKey(String s) { accessKey = s; return this;}
@JsOverlay public final TdProps className(String s) { className = s; return this; }
@JsOverlay public final TdProps className(String s1, String s2) { className = s1 + " " + s2; return this; }
@JsOverlay public final TdProps className(String s1, String s2, String s3) { className = s1 + " " + s2 + " " + s3; return this; }
@JsOverlay public final TdProps className(String s1, String s2, String s3, String s4) { className = s1 + " " + s2 + " " + s3 + " " + s4; return this; }
@JsOverlay public final TdProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final TdProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final TdProps dir(String s) { dir = s; return this; }
@JsOverlay public final TdProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final TdProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final TdProps id(String s) { id = s; return this; }
@JsOverlay public final TdProps lang(String s) { lang = s; return this; }
@JsOverlay public final TdProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final TdProps style(CssProps s) { style = s; return this; }
@JsOverlay public final TdProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final TdProps title(String s) { title = s; return this; } | @JsOverlay public final TdProps translate(YesNo s) { translate = s.name(); return this; } |
GWTReact/gwt-react | src/gwt/react/client/api/ReactDOMServer.java | // Path: src/gwt/react/client/elements/ReactElement.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactElement {
// public Object type;
// public BaseProps props;
// public String key;
//
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// protected ReactElement() {
// }
// }
| import gwt.react.client.elements.ReactElement;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.api;
/* The MIT License (MIT)
Copyright (c) 2016 GWT React
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
@JsType(isNative = true, namespace = JsPackage.GLOBAL)
public class ReactDOMServer {
/**
* This is a static class.
*/
private ReactDOMServer() {
}
/**
* <p>Render a ReactElement to its initial HTML. This should only be used on the server. React
* will return an HTML string. You can use this method to generate HTML on the server and send
* the markup down on the initial request for faster page loads and to allow search engines to
* crawl your pages for SEO purposes.</p>
*
* <p>If you call ReactDOM.render() on a node that already has this server-rendered markup,
* React will preserve it and only attach event handlers, allowing you to have a very
* performant first-load experience.</p>
*
* @param element the element to render
* @return the HTML markup
*/ | // Path: src/gwt/react/client/elements/ReactElement.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactElement {
// public Object type;
// public BaseProps props;
// public String key;
//
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// protected ReactElement() {
// }
// }
// Path: src/gwt/react/client/api/ReactDOMServer.java
import gwt.react.client.elements.ReactElement;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.api;
/* The MIT License (MIT)
Copyright (c) 2016 GWT React
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
@JsType(isNative = true, namespace = JsPackage.GLOBAL)
public class ReactDOMServer {
/**
* This is a static class.
*/
private ReactDOMServer() {
}
/**
* <p>Render a ReactElement to its initial HTML. This should only be used on the server. React
* will return an HTML string. You can use this method to generate HTML on the server and send
* the markup down on the initial request for faster page loads and to allow search engines to
* crawl your pages for SEO purposes.</p>
*
* <p>If you call ReactDOM.render() on a node that already has this server-rendered markup,
* React will preserve it and only attach event handlers, allowing you to have a very
* performant first-load experience.</p>
*
* @param element the element to render
* @return the HTML markup
*/ | public static native String renderToString(ReactElement element); |
GWTReact/gwt-react | src/gwt/react/client/components/lifecycle/ComponentWillReceiveProps.java | // Path: src/gwt/react/client/components/Component.java
// @JsType(isNative = true, namespace = "React", name = "Component")
// public abstract class Component<P extends BaseProps, S extends JsPlainObj> {
// @JsProperty
// protected S state;
//
// @JsProperty
// protected P props;
//
// @JsProperty
// protected StringMap<Object> refs;
//
// private Component() {}
//
// public Component(P props) {
// }
//
// /**
// * Performs a shallow merge of nextState into current state. This is the primary method you
// * use to trigger UI updates from event handlers and server request callbacks.
// *
// * @param state Object Literal (containing zero or more keys to update)
// */
// protected native void setState(S state);
//
// /**
// * Performs a shallow merge of nextState into current state. This is the primary method you
// * use to trigger UI updates from event handlers and server request callbacks.
// *
// * @param state Object Literal (containing zero or more keys to update)
// * @param callback callback function that will be executed once setState is completed and
// * the component is re-rendered.
// */
// protected native void setState(S state, JsRunnable callback);
//
//
// /**
// * <p>Performs a shallow merge of nextState into current state. This is the primary method
// * you use to trigger UI updates from event handlers and server request callbacks.</p>
// *
// * <p>It's also possible to pass a function with the signature function(state, props).
// * This can be useful in some cases when you want to enqueue an atomic update that
// * consults the previous value of state+props before setting any values</p>
// *
// * @param callback callback function that will be executed once setState is completed and
// * the component is re-rendered.
// */
// protected native void setState(SetStateCallback<S, P> callback);
//
// /**
// * <p>By default, when your component's state or props change, your component will re-render.
// * However, if these change implicitly (eg: data deep within an object changes without
// * changing the object itself) or if your render() method depends on some other data, you can
// * tell React that it needs to re-run render() by calling forceUpdate().</p>
// *
// * <p>Calling forceUpdate() will cause render() to be called on the component, skipping
// * shouldComponentUpdate(). This will trigger the normal lifecycle methods for child
// * components, including the shouldComponentUpdate() method of each child. React will still
// * only update the DOM if the markup changes.</p>
// *
// * <p>Normally you should try to avoid all uses of forceUpdate() and only read from this.props
// * and this.state in render(). This makes your component "pure" and your application much
// * simpler and more efficient.</p>
// *
// * @param callBack callback function that will be executed once the component has been updated
// */
// protected native void forceUpdate(JsRunnable callBack);
// protected native void forceUpdate();
//
// /**
// * The render() method is required.
// *
// * <p>When called, it should examine props and state and return a single child element.
// * This child element can be either a virtual representation of a native DOM component
// * (such as React.DOM.div()) or another composite component that you've defined
// * yourself.</p>
// *
// * <p>You can also return null to indicate that you don't want anything rendered.
// * Behind the scenes, React renders a <noscript> tag to work with our current diffing
// * algorithm.</p>
// *
// * <p>The render() function should be pure, meaning that it does not modify component
// * state, it returns the same result each time it's invoked, and it does not read from
// * or write to the DOM or otherwise interact with the browser (e.g., by using setTimeout).
// * If you need to interact with the browser, perform your work in {@link ComponentDidMount#componentDidMount()} or
// * the other lifecycle methods instead. Keeping render() pure makes components easier to
// * think about.</p>
// *
// * @return A single {@link ReactElement}
// */
// @JsMethod
// protected abstract ReactElement render();
// }
//
// Path: src/gwt/react/client/components/PureComponent.java
// @JsType(isNative = true, namespace = "React", name = "PureComponent")
// public abstract class PureComponent<P extends BaseProps, S extends JsPlainObj> extends Component<P,S>{
//
// public PureComponent(P props) {
// super(props);
// }
// }
//
// Path: src/gwt/react/client/proptypes/BaseProps.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
// public class BaseProps extends JsPlainObj {
// public ReactElementChildren children;
// public String key;
// public Object ref; //Either a String Id or RefCallback
// }
| import gwt.interop.utils.client.plainobjects.JsPlainObj;
import gwt.react.client.components.Component;
import gwt.react.client.components.PureComponent;
import gwt.react.client.proptypes.BaseProps;
import jsinterop.annotations.JsMethod;
import jsinterop.annotations.JsType; | package gwt.react.client.components.lifecycle;
/* The MIT License (MIT)
Copyright (c) 2016 GWT React
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
/**
* Implement this interface when using {@link Component} or {@link PureComponent} to receive the {@link #componentWillReceiveProps(BaseProps)} lifecycle event.
*/
@Deprecated
@JsType | // Path: src/gwt/react/client/components/Component.java
// @JsType(isNative = true, namespace = "React", name = "Component")
// public abstract class Component<P extends BaseProps, S extends JsPlainObj> {
// @JsProperty
// protected S state;
//
// @JsProperty
// protected P props;
//
// @JsProperty
// protected StringMap<Object> refs;
//
// private Component() {}
//
// public Component(P props) {
// }
//
// /**
// * Performs a shallow merge of nextState into current state. This is the primary method you
// * use to trigger UI updates from event handlers and server request callbacks.
// *
// * @param state Object Literal (containing zero or more keys to update)
// */
// protected native void setState(S state);
//
// /**
// * Performs a shallow merge of nextState into current state. This is the primary method you
// * use to trigger UI updates from event handlers and server request callbacks.
// *
// * @param state Object Literal (containing zero or more keys to update)
// * @param callback callback function that will be executed once setState is completed and
// * the component is re-rendered.
// */
// protected native void setState(S state, JsRunnable callback);
//
//
// /**
// * <p>Performs a shallow merge of nextState into current state. This is the primary method
// * you use to trigger UI updates from event handlers and server request callbacks.</p>
// *
// * <p>It's also possible to pass a function with the signature function(state, props).
// * This can be useful in some cases when you want to enqueue an atomic update that
// * consults the previous value of state+props before setting any values</p>
// *
// * @param callback callback function that will be executed once setState is completed and
// * the component is re-rendered.
// */
// protected native void setState(SetStateCallback<S, P> callback);
//
// /**
// * <p>By default, when your component's state or props change, your component will re-render.
// * However, if these change implicitly (eg: data deep within an object changes without
// * changing the object itself) or if your render() method depends on some other data, you can
// * tell React that it needs to re-run render() by calling forceUpdate().</p>
// *
// * <p>Calling forceUpdate() will cause render() to be called on the component, skipping
// * shouldComponentUpdate(). This will trigger the normal lifecycle methods for child
// * components, including the shouldComponentUpdate() method of each child. React will still
// * only update the DOM if the markup changes.</p>
// *
// * <p>Normally you should try to avoid all uses of forceUpdate() and only read from this.props
// * and this.state in render(). This makes your component "pure" and your application much
// * simpler and more efficient.</p>
// *
// * @param callBack callback function that will be executed once the component has been updated
// */
// protected native void forceUpdate(JsRunnable callBack);
// protected native void forceUpdate();
//
// /**
// * The render() method is required.
// *
// * <p>When called, it should examine props and state and return a single child element.
// * This child element can be either a virtual representation of a native DOM component
// * (such as React.DOM.div()) or another composite component that you've defined
// * yourself.</p>
// *
// * <p>You can also return null to indicate that you don't want anything rendered.
// * Behind the scenes, React renders a <noscript> tag to work with our current diffing
// * algorithm.</p>
// *
// * <p>The render() function should be pure, meaning that it does not modify component
// * state, it returns the same result each time it's invoked, and it does not read from
// * or write to the DOM or otherwise interact with the browser (e.g., by using setTimeout).
// * If you need to interact with the browser, perform your work in {@link ComponentDidMount#componentDidMount()} or
// * the other lifecycle methods instead. Keeping render() pure makes components easier to
// * think about.</p>
// *
// * @return A single {@link ReactElement}
// */
// @JsMethod
// protected abstract ReactElement render();
// }
//
// Path: src/gwt/react/client/components/PureComponent.java
// @JsType(isNative = true, namespace = "React", name = "PureComponent")
// public abstract class PureComponent<P extends BaseProps, S extends JsPlainObj> extends Component<P,S>{
//
// public PureComponent(P props) {
// super(props);
// }
// }
//
// Path: src/gwt/react/client/proptypes/BaseProps.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
// public class BaseProps extends JsPlainObj {
// public ReactElementChildren children;
// public String key;
// public Object ref; //Either a String Id or RefCallback
// }
// Path: src/gwt/react/client/components/lifecycle/ComponentWillReceiveProps.java
import gwt.interop.utils.client.plainobjects.JsPlainObj;
import gwt.react.client.components.Component;
import gwt.react.client.components.PureComponent;
import gwt.react.client.proptypes.BaseProps;
import jsinterop.annotations.JsMethod;
import jsinterop.annotations.JsType;
package gwt.react.client.components.lifecycle;
/* The MIT License (MIT)
Copyright (c) 2016 GWT React
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
/**
* Implement this interface when using {@link Component} or {@link PureComponent} to receive the {@link #componentWillReceiveProps(BaseProps)} lifecycle event.
*/
@Deprecated
@JsType | public interface ComponentWillReceiveProps<P extends BaseProps> { |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/SvgProps.java | // Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for svg elements. Refer to https://www.w3schools.com/graphics/svg_reference.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class SvgProps extends HtmlGlobalFields {
@JsOverlay public final SvgProps height(int i) { height = Integer.toString(i); return this; }
@JsOverlay public final SvgProps width(int i) { width = Integer.toString(i); return this; }
@JsOverlay public final SvgProps viewBox(String s) { set("viewBox", s); return this;}
@JsOverlay public final SvgProps version(String s) { set("version", s); return this;}
@JsOverlay public final SvgProps xmlns(String s) { set("xmlns", s); return this;}
//React Specific
@JsOverlay public final SvgProps ref(String s) { ref = s; return this; } | // Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/SvgProps.java
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for svg elements. Refer to https://www.w3schools.com/graphics/svg_reference.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class SvgProps extends HtmlGlobalFields {
@JsOverlay public final SvgProps height(int i) { height = Integer.toString(i); return this; }
@JsOverlay public final SvgProps width(int i) { width = Integer.toString(i); return this; }
@JsOverlay public final SvgProps viewBox(String s) { set("viewBox", s); return this;}
@JsOverlay public final SvgProps version(String s) { set("version", s); return this;}
@JsOverlay public final SvgProps xmlns(String s) { set("xmlns", s); return this;}
//React Specific
@JsOverlay public final SvgProps ref(String s) { ref = s; return this; } | @JsOverlay public final SvgProps ref(ReactRefCallback callback) { ref = callback; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/SvgProps.java | // Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for svg elements. Refer to https://www.w3schools.com/graphics/svg_reference.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class SvgProps extends HtmlGlobalFields {
@JsOverlay public final SvgProps height(int i) { height = Integer.toString(i); return this; }
@JsOverlay public final SvgProps width(int i) { width = Integer.toString(i); return this; }
@JsOverlay public final SvgProps viewBox(String s) { set("viewBox", s); return this;}
@JsOverlay public final SvgProps version(String s) { set("version", s); return this;}
@JsOverlay public final SvgProps xmlns(String s) { set("xmlns", s); return this;}
//React Specific
@JsOverlay public final SvgProps ref(String s) { ref = s; return this; }
@JsOverlay public final SvgProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final SvgProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final SvgProps accessKey(String s) { accessKey = s; return this;}
@JsOverlay public final SvgProps className(String s) { className = s; return this; }
@JsOverlay public final SvgProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final SvgProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final SvgProps dir(String s) { dir = s; return this; }
@JsOverlay public final SvgProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final SvgProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final SvgProps id(String s) { id = s; return this; }
@JsOverlay public final SvgProps lang(String s) { lang = s; return this; }
@JsOverlay public final SvgProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final SvgProps style(CssProps s) { style = s; return this; }
@JsOverlay public final SvgProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final SvgProps title(String s) { title = s; return this; } | // Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/SvgProps.java
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for svg elements. Refer to https://www.w3schools.com/graphics/svg_reference.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class SvgProps extends HtmlGlobalFields {
@JsOverlay public final SvgProps height(int i) { height = Integer.toString(i); return this; }
@JsOverlay public final SvgProps width(int i) { width = Integer.toString(i); return this; }
@JsOverlay public final SvgProps viewBox(String s) { set("viewBox", s); return this;}
@JsOverlay public final SvgProps version(String s) { set("version", s); return this;}
@JsOverlay public final SvgProps xmlns(String s) { set("xmlns", s); return this;}
//React Specific
@JsOverlay public final SvgProps ref(String s) { ref = s; return this; }
@JsOverlay public final SvgProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final SvgProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final SvgProps accessKey(String s) { accessKey = s; return this;}
@JsOverlay public final SvgProps className(String s) { className = s; return this; }
@JsOverlay public final SvgProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final SvgProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final SvgProps dir(String s) { dir = s; return this; }
@JsOverlay public final SvgProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final SvgProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final SvgProps id(String s) { id = s; return this; }
@JsOverlay public final SvgProps lang(String s) { lang = s; return this; }
@JsOverlay public final SvgProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final SvgProps style(CssProps s) { style = s; return this; }
@JsOverlay public final SvgProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final SvgProps title(String s) { title = s; return this; } | @JsOverlay public final SvgProps translate(YesNo s) { translate = s.name(); return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/BaseProps.java | // Path: src/gwt/react/client/elements/ReactElementChildren.java
// @JsType(isNative = true)
// public class ReactElementChildren {
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// private ReactElementChildren() {
// }
// }
| import gwt.interop.utils.client.plainobjects.JsPlainObj;
import gwt.react.client.elements.ReactElementChildren;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes;
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
public class BaseProps extends JsPlainObj { | // Path: src/gwt/react/client/elements/ReactElementChildren.java
// @JsType(isNative = true)
// public class ReactElementChildren {
// /**
// * Objects of this class cannot be directly instantiated by the user.
// */
// private ReactElementChildren() {
// }
// }
// Path: src/gwt/react/client/proptypes/BaseProps.java
import gwt.interop.utils.client.plainobjects.JsPlainObj;
import gwt.react.client.elements.ReactElementChildren;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes;
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
public class BaseProps extends JsPlainObj { | public ReactElementChildren children; |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/ColProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLTableColElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for col elements. Refer to http://www.w3schools.com/tags/tag_col.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class ColProps extends HtmlGlobalFields {
@JsOverlay public final ColProps span(int i) { span = i; return this; }
//React Specific
@Deprecated @JsOverlay public final ColProps ref(String s) { ref = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/ColProps.java
import elemental2.dom.HTMLTableColElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for col elements. Refer to http://www.w3schools.com/tags/tag_col.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class ColProps extends HtmlGlobalFields {
@JsOverlay public final ColProps span(int i) { span = i; return this; }
//React Specific
@Deprecated @JsOverlay public final ColProps ref(String s) { ref = s; return this; } | @JsOverlay public final ColProps ref(ReactRefCallback callback) { ref = callback; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/ColProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLTableColElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for col elements. Refer to http://www.w3schools.com/tags/tag_col.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class ColProps extends HtmlGlobalFields {
@JsOverlay public final ColProps span(int i) { span = i; return this; }
//React Specific
@Deprecated @JsOverlay public final ColProps ref(String s) { ref = s; return this; }
@JsOverlay public final ColProps ref(ReactRefCallback callback) { ref = callback; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/ColProps.java
import elemental2.dom.HTMLTableColElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for col elements. Refer to http://www.w3schools.com/tags/tag_col.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class ColProps extends HtmlGlobalFields {
@JsOverlay public final ColProps span(int i) { span = i; return this; }
//React Specific
@Deprecated @JsOverlay public final ColProps ref(String s) { ref = s; return this; }
@JsOverlay public final ColProps ref(ReactRefCallback callback) { ref = callback; return this; } | @JsOverlay public final ColProps ref(ReactRef<HTMLTableColElement> reactRef) { ref = reactRef; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/ColProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLTableColElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for col elements. Refer to http://www.w3schools.com/tags/tag_col.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class ColProps extends HtmlGlobalFields {
@JsOverlay public final ColProps span(int i) { span = i; return this; }
//React Specific
@Deprecated @JsOverlay public final ColProps ref(String s) { ref = s; return this; }
@JsOverlay public final ColProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final ColProps ref(ReactRef<HTMLTableColElement> reactRef) { ref = reactRef; return this; }
@JsOverlay public final ColProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final ColProps accessKey(String s) { accessKey = s; return this;}
@JsOverlay public final ColProps className(String s) { className = s; return this; }
@JsOverlay public final ColProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final ColProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final ColProps dir(String s) { dir = s; return this; }
@JsOverlay public final ColProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final ColProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final ColProps id(String s) { id = s; return this; }
@JsOverlay public final ColProps lang(String s) { lang = s; return this; }
@JsOverlay public final ColProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final ColProps style(CssProps s) { style = s; return this; }
@JsOverlay public final ColProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final ColProps title(String s) { title = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/ColProps.java
import elemental2.dom.HTMLTableColElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for col elements. Refer to http://www.w3schools.com/tags/tag_col.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class ColProps extends HtmlGlobalFields {
@JsOverlay public final ColProps span(int i) { span = i; return this; }
//React Specific
@Deprecated @JsOverlay public final ColProps ref(String s) { ref = s; return this; }
@JsOverlay public final ColProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final ColProps ref(ReactRef<HTMLTableColElement> reactRef) { ref = reactRef; return this; }
@JsOverlay public final ColProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final ColProps accessKey(String s) { accessKey = s; return this;}
@JsOverlay public final ColProps className(String s) { className = s; return this; }
@JsOverlay public final ColProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final ColProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final ColProps dir(String s) { dir = s; return this; }
@JsOverlay public final ColProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final ColProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final ColProps id(String s) { id = s; return this; }
@JsOverlay public final ColProps lang(String s) { lang = s; return this; }
@JsOverlay public final ColProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final ColProps style(CssProps s) { style = s; return this; }
@JsOverlay public final ColProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final ColProps title(String s) { title = s; return this; } | @JsOverlay public final ColProps translate(YesNo s) { translate = s.name(); return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/ImgProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLImageElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for img elements. Refer to http://www.w3schools.com/tags/tag_img.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class ImgProps extends HtmlGlobalFields {
@JsOverlay public final ImgProps alt(String s) { alt = s; return this;}
@JsOverlay public final ImgProps crossOrigin(String s) { crossOrigin = s; return this;}
@JsOverlay public final ImgProps height(int i) { height = Integer.toString(i); return this; }
@JsOverlay public final ImgProps src(String s) { src = s; return this;}
@JsOverlay public final ImgProps useMap(String s) { useMap = s; return this; }
@JsOverlay public final ImgProps width(int i) { width = Integer.toString(i); return this; }
//React Specific
@Deprecated @JsOverlay public final ImgProps ref(String s) { ref = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/ImgProps.java
import elemental2.dom.HTMLImageElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for img elements. Refer to http://www.w3schools.com/tags/tag_img.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class ImgProps extends HtmlGlobalFields {
@JsOverlay public final ImgProps alt(String s) { alt = s; return this;}
@JsOverlay public final ImgProps crossOrigin(String s) { crossOrigin = s; return this;}
@JsOverlay public final ImgProps height(int i) { height = Integer.toString(i); return this; }
@JsOverlay public final ImgProps src(String s) { src = s; return this;}
@JsOverlay public final ImgProps useMap(String s) { useMap = s; return this; }
@JsOverlay public final ImgProps width(int i) { width = Integer.toString(i); return this; }
//React Specific
@Deprecated @JsOverlay public final ImgProps ref(String s) { ref = s; return this; } | @JsOverlay public final ImgProps ref(ReactRefCallback callback) { ref = callback; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/ImgProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLImageElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for img elements. Refer to http://www.w3schools.com/tags/tag_img.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class ImgProps extends HtmlGlobalFields {
@JsOverlay public final ImgProps alt(String s) { alt = s; return this;}
@JsOverlay public final ImgProps crossOrigin(String s) { crossOrigin = s; return this;}
@JsOverlay public final ImgProps height(int i) { height = Integer.toString(i); return this; }
@JsOverlay public final ImgProps src(String s) { src = s; return this;}
@JsOverlay public final ImgProps useMap(String s) { useMap = s; return this; }
@JsOverlay public final ImgProps width(int i) { width = Integer.toString(i); return this; }
//React Specific
@Deprecated @JsOverlay public final ImgProps ref(String s) { ref = s; return this; }
@JsOverlay public final ImgProps ref(ReactRefCallback callback) { ref = callback; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/ImgProps.java
import elemental2.dom.HTMLImageElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for img elements. Refer to http://www.w3schools.com/tags/tag_img.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class ImgProps extends HtmlGlobalFields {
@JsOverlay public final ImgProps alt(String s) { alt = s; return this;}
@JsOverlay public final ImgProps crossOrigin(String s) { crossOrigin = s; return this;}
@JsOverlay public final ImgProps height(int i) { height = Integer.toString(i); return this; }
@JsOverlay public final ImgProps src(String s) { src = s; return this;}
@JsOverlay public final ImgProps useMap(String s) { useMap = s; return this; }
@JsOverlay public final ImgProps width(int i) { width = Integer.toString(i); return this; }
//React Specific
@Deprecated @JsOverlay public final ImgProps ref(String s) { ref = s; return this; }
@JsOverlay public final ImgProps ref(ReactRefCallback callback) { ref = callback; return this; } | @JsOverlay public final ImgProps ref(ReactRef<HTMLImageElement> reactRef) { ref = reactRef; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/ImgProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLImageElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for img elements. Refer to http://www.w3schools.com/tags/tag_img.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class ImgProps extends HtmlGlobalFields {
@JsOverlay public final ImgProps alt(String s) { alt = s; return this;}
@JsOverlay public final ImgProps crossOrigin(String s) { crossOrigin = s; return this;}
@JsOverlay public final ImgProps height(int i) { height = Integer.toString(i); return this; }
@JsOverlay public final ImgProps src(String s) { src = s; return this;}
@JsOverlay public final ImgProps useMap(String s) { useMap = s; return this; }
@JsOverlay public final ImgProps width(int i) { width = Integer.toString(i); return this; }
//React Specific
@Deprecated @JsOverlay public final ImgProps ref(String s) { ref = s; return this; }
@JsOverlay public final ImgProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final ImgProps ref(ReactRef<HTMLImageElement> reactRef) { ref = reactRef; return this; }
@JsOverlay public final ImgProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final ImgProps accessKey(String s) { accessKey = s; return this;}
@JsOverlay public final ImgProps className(String s) { className = s; return this; }
@JsOverlay public final ImgProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final ImgProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final ImgProps dir(String s) { dir = s; return this; }
@JsOverlay public final ImgProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final ImgProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final ImgProps id(String s) { id = s; return this; }
@JsOverlay public final ImgProps lang(String s) { lang = s; return this; }
@JsOverlay public final ImgProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final ImgProps style(CssProps s) { style = s; return this; }
@JsOverlay public final ImgProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final ImgProps title(String s) { title = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/ImgProps.java
import elemental2.dom.HTMLImageElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for img elements. Refer to http://www.w3schools.com/tags/tag_img.asp
*/
@JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
public class ImgProps extends HtmlGlobalFields {
@JsOverlay public final ImgProps alt(String s) { alt = s; return this;}
@JsOverlay public final ImgProps crossOrigin(String s) { crossOrigin = s; return this;}
@JsOverlay public final ImgProps height(int i) { height = Integer.toString(i); return this; }
@JsOverlay public final ImgProps src(String s) { src = s; return this;}
@JsOverlay public final ImgProps useMap(String s) { useMap = s; return this; }
@JsOverlay public final ImgProps width(int i) { width = Integer.toString(i); return this; }
//React Specific
@Deprecated @JsOverlay public final ImgProps ref(String s) { ref = s; return this; }
@JsOverlay public final ImgProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final ImgProps ref(ReactRef<HTMLImageElement> reactRef) { ref = reactRef; return this; }
@JsOverlay public final ImgProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final ImgProps accessKey(String s) { accessKey = s; return this;}
@JsOverlay public final ImgProps className(String s) { className = s; return this; }
@JsOverlay public final ImgProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final ImgProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final ImgProps dir(String s) { dir = s; return this; }
@JsOverlay public final ImgProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final ImgProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final ImgProps id(String s) { id = s; return this; }
@JsOverlay public final ImgProps lang(String s) { lang = s; return this; }
@JsOverlay public final ImgProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final ImgProps style(CssProps s) { style = s; return this; }
@JsOverlay public final ImgProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final ImgProps title(String s) { title = s; return this; } | @JsOverlay public final ImgProps translate(YesNo s) { translate = s.name(); return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/AudioProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/AudioPreload.java
// public enum AudioPreload {
// auto, metadata, none
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLAudioElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.AudioPreload;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for audio elements. Refer to http://www.w3schools.com/tags/tag_audio.asp
*/
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class AudioProps extends HtmlGlobalFields {
@JsOverlay public final AudioProps autoPlay(boolean b) { autoPlay = b; return this; }
@JsOverlay public final AudioProps controls(boolean b) { controls = b; return this; }
@JsOverlay public final AudioProps loop(boolean b) { loop = b; return this; }
@JsOverlay public final AudioProps muted(boolean b) { muted = b; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/AudioPreload.java
// public enum AudioPreload {
// auto, metadata, none
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/AudioProps.java
import elemental2.dom.HTMLAudioElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.AudioPreload;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for audio elements. Refer to http://www.w3schools.com/tags/tag_audio.asp
*/
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class AudioProps extends HtmlGlobalFields {
@JsOverlay public final AudioProps autoPlay(boolean b) { autoPlay = b; return this; }
@JsOverlay public final AudioProps controls(boolean b) { controls = b; return this; }
@JsOverlay public final AudioProps loop(boolean b) { loop = b; return this; }
@JsOverlay public final AudioProps muted(boolean b) { muted = b; return this; } | @JsOverlay public final AudioProps preLoad(AudioPreload s) { preload = s.name(); return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/AudioProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/AudioPreload.java
// public enum AudioPreload {
// auto, metadata, none
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLAudioElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.AudioPreload;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for audio elements. Refer to http://www.w3schools.com/tags/tag_audio.asp
*/
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class AudioProps extends HtmlGlobalFields {
@JsOverlay public final AudioProps autoPlay(boolean b) { autoPlay = b; return this; }
@JsOverlay public final AudioProps controls(boolean b) { controls = b; return this; }
@JsOverlay public final AudioProps loop(boolean b) { loop = b; return this; }
@JsOverlay public final AudioProps muted(boolean b) { muted = b; return this; }
@JsOverlay public final AudioProps preLoad(AudioPreload s) { preload = s.name(); return this; }
@JsOverlay public final AudioProps src(String s) { src = s; return this; }
//React Specific
@Deprecated @JsOverlay public final AudioProps ref(String s) { ref = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/AudioPreload.java
// public enum AudioPreload {
// auto, metadata, none
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/AudioProps.java
import elemental2.dom.HTMLAudioElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.AudioPreload;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for audio elements. Refer to http://www.w3schools.com/tags/tag_audio.asp
*/
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class AudioProps extends HtmlGlobalFields {
@JsOverlay public final AudioProps autoPlay(boolean b) { autoPlay = b; return this; }
@JsOverlay public final AudioProps controls(boolean b) { controls = b; return this; }
@JsOverlay public final AudioProps loop(boolean b) { loop = b; return this; }
@JsOverlay public final AudioProps muted(boolean b) { muted = b; return this; }
@JsOverlay public final AudioProps preLoad(AudioPreload s) { preload = s.name(); return this; }
@JsOverlay public final AudioProps src(String s) { src = s; return this; }
//React Specific
@Deprecated @JsOverlay public final AudioProps ref(String s) { ref = s; return this; } | @JsOverlay public final AudioProps ref(ReactRefCallback callback) { ref = callback; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/AudioProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/AudioPreload.java
// public enum AudioPreload {
// auto, metadata, none
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLAudioElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.AudioPreload;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for audio elements. Refer to http://www.w3schools.com/tags/tag_audio.asp
*/
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class AudioProps extends HtmlGlobalFields {
@JsOverlay public final AudioProps autoPlay(boolean b) { autoPlay = b; return this; }
@JsOverlay public final AudioProps controls(boolean b) { controls = b; return this; }
@JsOverlay public final AudioProps loop(boolean b) { loop = b; return this; }
@JsOverlay public final AudioProps muted(boolean b) { muted = b; return this; }
@JsOverlay public final AudioProps preLoad(AudioPreload s) { preload = s.name(); return this; }
@JsOverlay public final AudioProps src(String s) { src = s; return this; }
//React Specific
@Deprecated @JsOverlay public final AudioProps ref(String s) { ref = s; return this; }
@JsOverlay public final AudioProps ref(ReactRefCallback callback) { ref = callback; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/AudioPreload.java
// public enum AudioPreload {
// auto, metadata, none
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/AudioProps.java
import elemental2.dom.HTMLAudioElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.AudioPreload;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for audio elements. Refer to http://www.w3schools.com/tags/tag_audio.asp
*/
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class AudioProps extends HtmlGlobalFields {
@JsOverlay public final AudioProps autoPlay(boolean b) { autoPlay = b; return this; }
@JsOverlay public final AudioProps controls(boolean b) { controls = b; return this; }
@JsOverlay public final AudioProps loop(boolean b) { loop = b; return this; }
@JsOverlay public final AudioProps muted(boolean b) { muted = b; return this; }
@JsOverlay public final AudioProps preLoad(AudioPreload s) { preload = s.name(); return this; }
@JsOverlay public final AudioProps src(String s) { src = s; return this; }
//React Specific
@Deprecated @JsOverlay public final AudioProps ref(String s) { ref = s; return this; }
@JsOverlay public final AudioProps ref(ReactRefCallback callback) { ref = callback; return this; } | @JsOverlay public final AudioProps ref(ReactRef<HTMLAudioElement> reactRef) { ref = reactRef; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/AudioProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/AudioPreload.java
// public enum AudioPreload {
// auto, metadata, none
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLAudioElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.AudioPreload;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for audio elements. Refer to http://www.w3schools.com/tags/tag_audio.asp
*/
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class AudioProps extends HtmlGlobalFields {
@JsOverlay public final AudioProps autoPlay(boolean b) { autoPlay = b; return this; }
@JsOverlay public final AudioProps controls(boolean b) { controls = b; return this; }
@JsOverlay public final AudioProps loop(boolean b) { loop = b; return this; }
@JsOverlay public final AudioProps muted(boolean b) { muted = b; return this; }
@JsOverlay public final AudioProps preLoad(AudioPreload s) { preload = s.name(); return this; }
@JsOverlay public final AudioProps src(String s) { src = s; return this; }
//React Specific
@Deprecated @JsOverlay public final AudioProps ref(String s) { ref = s; return this; }
@JsOverlay public final AudioProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final AudioProps ref(ReactRef<HTMLAudioElement> reactRef) { ref = reactRef; return this; }
@JsOverlay public final AudioProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final AudioProps accessKey(String s) { accessKey = s;return this;}
@JsOverlay public final AudioProps className(String s) { className = s; return this; }
@JsOverlay public final AudioProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final AudioProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final AudioProps dir(String s) { dir = s; return this; }
@JsOverlay public final AudioProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final AudioProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final AudioProps id(String s) { id = s; return this; }
@JsOverlay public final AudioProps lang(String s) { lang = s; return this; }
@JsOverlay public final AudioProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final AudioProps style(CssProps s) { style = s; return this; }
@JsOverlay public final AudioProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final AudioProps title(String s) { title = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/AudioPreload.java
// public enum AudioPreload {
// auto, metadata, none
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/AudioProps.java
import elemental2.dom.HTMLAudioElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.AudioPreload;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for audio elements. Refer to http://www.w3schools.com/tags/tag_audio.asp
*/
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class AudioProps extends HtmlGlobalFields {
@JsOverlay public final AudioProps autoPlay(boolean b) { autoPlay = b; return this; }
@JsOverlay public final AudioProps controls(boolean b) { controls = b; return this; }
@JsOverlay public final AudioProps loop(boolean b) { loop = b; return this; }
@JsOverlay public final AudioProps muted(boolean b) { muted = b; return this; }
@JsOverlay public final AudioProps preLoad(AudioPreload s) { preload = s.name(); return this; }
@JsOverlay public final AudioProps src(String s) { src = s; return this; }
//React Specific
@Deprecated @JsOverlay public final AudioProps ref(String s) { ref = s; return this; }
@JsOverlay public final AudioProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final AudioProps ref(ReactRef<HTMLAudioElement> reactRef) { ref = reactRef; return this; }
@JsOverlay public final AudioProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final AudioProps accessKey(String s) { accessKey = s;return this;}
@JsOverlay public final AudioProps className(String s) { className = s; return this; }
@JsOverlay public final AudioProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final AudioProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final AudioProps dir(String s) { dir = s; return this; }
@JsOverlay public final AudioProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final AudioProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final AudioProps id(String s) { id = s; return this; }
@JsOverlay public final AudioProps lang(String s) { lang = s; return this; }
@JsOverlay public final AudioProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final AudioProps style(CssProps s) { style = s; return this; }
@JsOverlay public final AudioProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final AudioProps title(String s) { title = s; return this; } | @JsOverlay public final AudioProps translate(YesNo s) { translate = s.name(); return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/AnchorProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLAnchorElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for a elements. Refer to http://www.w3schools.com/tags/tag_a.asp
*/
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class AnchorProps extends HtmlGlobalFields {
@JsOverlay public final AnchorProps download(String s) { download = s; return this; }
@JsOverlay public final AnchorProps href(String s) { href = s; return this; }
@JsOverlay public final AnchorProps hrefLang(String s) { hrefLang = s; return this; }
@JsOverlay public final AnchorProps media(String s) { media = s; return this; }
@JsOverlay public final AnchorProps rel(String s) { rel = s; return this; }
@JsOverlay public final AnchorProps referrerPolicy(String s) { referrerPolicy = s; return this; }
@JsOverlay public final AnchorProps target(String s) { target = s; return this; }
@JsOverlay public final AnchorProps type(String t) { type = t; return this; }
//React Specific
@Deprecated @JsOverlay public final AnchorProps ref(String s) { ref = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/AnchorProps.java
import elemental2.dom.HTMLAnchorElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for a elements. Refer to http://www.w3schools.com/tags/tag_a.asp
*/
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class AnchorProps extends HtmlGlobalFields {
@JsOverlay public final AnchorProps download(String s) { download = s; return this; }
@JsOverlay public final AnchorProps href(String s) { href = s; return this; }
@JsOverlay public final AnchorProps hrefLang(String s) { hrefLang = s; return this; }
@JsOverlay public final AnchorProps media(String s) { media = s; return this; }
@JsOverlay public final AnchorProps rel(String s) { rel = s; return this; }
@JsOverlay public final AnchorProps referrerPolicy(String s) { referrerPolicy = s; return this; }
@JsOverlay public final AnchorProps target(String s) { target = s; return this; }
@JsOverlay public final AnchorProps type(String t) { type = t; return this; }
//React Specific
@Deprecated @JsOverlay public final AnchorProps ref(String s) { ref = s; return this; } | @JsOverlay public final AnchorProps ref(ReactRefCallback callback) { ref = callback; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/AnchorProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLAnchorElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for a elements. Refer to http://www.w3schools.com/tags/tag_a.asp
*/
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class AnchorProps extends HtmlGlobalFields {
@JsOverlay public final AnchorProps download(String s) { download = s; return this; }
@JsOverlay public final AnchorProps href(String s) { href = s; return this; }
@JsOverlay public final AnchorProps hrefLang(String s) { hrefLang = s; return this; }
@JsOverlay public final AnchorProps media(String s) { media = s; return this; }
@JsOverlay public final AnchorProps rel(String s) { rel = s; return this; }
@JsOverlay public final AnchorProps referrerPolicy(String s) { referrerPolicy = s; return this; }
@JsOverlay public final AnchorProps target(String s) { target = s; return this; }
@JsOverlay public final AnchorProps type(String t) { type = t; return this; }
//React Specific
@Deprecated @JsOverlay public final AnchorProps ref(String s) { ref = s; return this; }
@JsOverlay public final AnchorProps ref(ReactRefCallback callback) { ref = callback; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/AnchorProps.java
import elemental2.dom.HTMLAnchorElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for a elements. Refer to http://www.w3schools.com/tags/tag_a.asp
*/
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class AnchorProps extends HtmlGlobalFields {
@JsOverlay public final AnchorProps download(String s) { download = s; return this; }
@JsOverlay public final AnchorProps href(String s) { href = s; return this; }
@JsOverlay public final AnchorProps hrefLang(String s) { hrefLang = s; return this; }
@JsOverlay public final AnchorProps media(String s) { media = s; return this; }
@JsOverlay public final AnchorProps rel(String s) { rel = s; return this; }
@JsOverlay public final AnchorProps referrerPolicy(String s) { referrerPolicy = s; return this; }
@JsOverlay public final AnchorProps target(String s) { target = s; return this; }
@JsOverlay public final AnchorProps type(String t) { type = t; return this; }
//React Specific
@Deprecated @JsOverlay public final AnchorProps ref(String s) { ref = s; return this; }
@JsOverlay public final AnchorProps ref(ReactRefCallback callback) { ref = callback; return this; } | @JsOverlay public final AnchorProps ref(ReactRef<HTMLAnchorElement> reactRef) { ref = reactRef; return this; } |
GWTReact/gwt-react | src/gwt/react/client/proptypes/html/AnchorProps.java | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
| import elemental2.dom.HTMLAnchorElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType; | package gwt.react.client.proptypes.html;
/**
* Props for a elements. Refer to http://www.w3schools.com/tags/tag_a.asp
*/
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class AnchorProps extends HtmlGlobalFields {
@JsOverlay public final AnchorProps download(String s) { download = s; return this; }
@JsOverlay public final AnchorProps href(String s) { href = s; return this; }
@JsOverlay public final AnchorProps hrefLang(String s) { hrefLang = s; return this; }
@JsOverlay public final AnchorProps media(String s) { media = s; return this; }
@JsOverlay public final AnchorProps rel(String s) { rel = s; return this; }
@JsOverlay public final AnchorProps referrerPolicy(String s) { referrerPolicy = s; return this; }
@JsOverlay public final AnchorProps target(String s) { target = s; return this; }
@JsOverlay public final AnchorProps type(String t) { type = t; return this; }
//React Specific
@Deprecated @JsOverlay public final AnchorProps ref(String s) { ref = s; return this; }
@JsOverlay public final AnchorProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final AnchorProps ref(ReactRef<HTMLAnchorElement> reactRef) { ref = reactRef; return this; }
@JsOverlay public final AnchorProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final AnchorProps accessKey(String s) { accessKey = s;return this;}
@JsOverlay public final AnchorProps className(String s) { className = s; return this; }
@JsOverlay public final AnchorProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final AnchorProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final AnchorProps dir(String s) { dir = s; return this; }
@JsOverlay public final AnchorProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final AnchorProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final AnchorProps id(String s) { id = s; return this; }
@JsOverlay public final AnchorProps lang(String s) { lang = s; return this; }
@JsOverlay public final AnchorProps style(CssProps s) { style = s; return this; }
@JsOverlay public final AnchorProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final AnchorProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final AnchorProps title(String s) { title = s; return this; } | // Path: src/gwt/react/client/api/ReactRef.java
// @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
// public class ReactRef<T> {
// @JsProperty
// public T current;
// }
//
// Path: src/gwt/react/client/proptypes/ReactRefCallback.java
// @JsFunction
// public interface ReactRefCallback {
// void passRef(Object refElement);
// }
//
// Path: src/gwt/react/client/proptypes/html/attributeTypes/YesNo.java
// public enum YesNo {
// yes, no
// }
// Path: src/gwt/react/client/proptypes/html/AnchorProps.java
import elemental2.dom.HTMLAnchorElement;
import gwt.react.client.api.ReactRef;
import gwt.react.client.events.*;
import gwt.react.client.proptypes.ReactRefCallback;
import gwt.react.client.proptypes.html.attributeTypes.YesNo;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
package gwt.react.client.proptypes.html;
/**
* Props for a elements. Refer to http://www.w3schools.com/tags/tag_a.asp
*/
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class AnchorProps extends HtmlGlobalFields {
@JsOverlay public final AnchorProps download(String s) { download = s; return this; }
@JsOverlay public final AnchorProps href(String s) { href = s; return this; }
@JsOverlay public final AnchorProps hrefLang(String s) { hrefLang = s; return this; }
@JsOverlay public final AnchorProps media(String s) { media = s; return this; }
@JsOverlay public final AnchorProps rel(String s) { rel = s; return this; }
@JsOverlay public final AnchorProps referrerPolicy(String s) { referrerPolicy = s; return this; }
@JsOverlay public final AnchorProps target(String s) { target = s; return this; }
@JsOverlay public final AnchorProps type(String t) { type = t; return this; }
//React Specific
@Deprecated @JsOverlay public final AnchorProps ref(String s) { ref = s; return this; }
@JsOverlay public final AnchorProps ref(ReactRefCallback callback) { ref = callback; return this; }
@JsOverlay public final AnchorProps ref(ReactRef<HTMLAnchorElement> reactRef) { ref = reactRef; return this; }
@JsOverlay public final AnchorProps key(String s) { key = s; return this; }
//Global HTML props
@JsOverlay public final AnchorProps accessKey(String s) { accessKey = s;return this;}
@JsOverlay public final AnchorProps className(String s) { className = s; return this; }
@JsOverlay public final AnchorProps contentEditable(boolean b) { contentEditable = b; return this; }
@JsOverlay public final AnchorProps contextMenu(String s) { contextMenu = s; return this; }
@JsOverlay public final AnchorProps dir(String s) { dir = s; return this; }
@JsOverlay public final AnchorProps draggable(boolean b) { draggable = b; return this; }
@JsOverlay public final AnchorProps hidden(boolean b) { hidden = b; return this; }
@JsOverlay public final AnchorProps id(String s) { id = s; return this; }
@JsOverlay public final AnchorProps lang(String s) { lang = s; return this; }
@JsOverlay public final AnchorProps style(CssProps s) { style = s; return this; }
@JsOverlay public final AnchorProps spellcheck(boolean b) { spellCheck = b; return this; }
@JsOverlay public final AnchorProps tabIndex(int i) { tabIndex = i; return this; }
@JsOverlay public final AnchorProps title(String s) { title = s; return this; } | @JsOverlay public final AnchorProps translate(YesNo s) { translate = s.name(); return this; } |
9468305/crsync | android/src/com/shaddock/crsync/CrsyncService.java | // Path: android/src/com/shaddock/crsync/CrsyncConstants.java
// public static final Logger logger = Logger.getLogger("crsync");
| import static com.shaddock.crsync.CrsyncConstants.logger;
import java.io.File;
import android.app.Service;
import android.content.Intent;
import android.database.ContentObserver;
import android.net.NetworkInfo;
import android.os.Handler;
import android.os.IBinder; | package com.shaddock.crsync;
public class CrsyncService extends Service implements OnepieceObserver {
public static volatile boolean isRunning = false;
private CrsyncContentObserver mObserver = null;
private UpdateThread mUpdateThread = null;
private boolean mPendingUpdate = false;
private String mAppHash = "";
private class CrsyncContentObserver extends ContentObserver {
public CrsyncContentObserver() {
super(new Handler());
}
@Override
public boolean deliverSelfNotifications() {
return false;
}
@Override
public void onChange(final boolean selfChange) {
updateFromProvider();
}
}
@Override
public IBinder onBind(Intent intent) {
throw new UnsupportedOperationException("Cannot bind to CrsyncService");
}
@Override
public void onCreate() {
super.onCreate(); | // Path: android/src/com/shaddock/crsync/CrsyncConstants.java
// public static final Logger logger = Logger.getLogger("crsync");
// Path: android/src/com/shaddock/crsync/CrsyncService.java
import static com.shaddock.crsync.CrsyncConstants.logger;
import java.io.File;
import android.app.Service;
import android.content.Intent;
import android.database.ContentObserver;
import android.net.NetworkInfo;
import android.os.Handler;
import android.os.IBinder;
package com.shaddock.crsync;
public class CrsyncService extends Service implements OnepieceObserver {
public static volatile boolean isRunning = false;
private CrsyncContentObserver mObserver = null;
private UpdateThread mUpdateThread = null;
private boolean mPendingUpdate = false;
private String mAppHash = "";
private class CrsyncContentObserver extends ContentObserver {
public CrsyncContentObserver() {
super(new Handler());
}
@Override
public boolean deliverSelfNotifications() {
return false;
}
@Override
public void onChange(final boolean selfChange) {
updateFromProvider();
}
}
@Override
public IBinder onBind(Intent intent) {
throw new UnsupportedOperationException("Cannot bind to CrsyncService");
}
@Override
public void onCreate() {
super.onCreate(); | logger.info("CrsyncService onCreate"); |
9468305/crsync | android/src/com/shaddock/crsync/CrsyncInfo.java | // Path: android/src/com/shaddock/crsync/CrsyncConstants.java
// public static final Logger logger = Logger.getLogger("crsync");
| import static com.shaddock.crsync.CrsyncConstants.logger;
import java.util.Vector;
import android.content.ContentResolver;
import android.content.ContentValues;
import android.database.Cursor; | package com.shaddock.crsync;
public class CrsyncInfo {
public static class StateInfo {
public int mAction = Crsync.Action_Idle;
public int mCode = Crsync.Code_OK;
public void dump() { | // Path: android/src/com/shaddock/crsync/CrsyncConstants.java
// public static final Logger logger = Logger.getLogger("crsync");
// Path: android/src/com/shaddock/crsync/CrsyncInfo.java
import static com.shaddock.crsync.CrsyncConstants.logger;
import java.util.Vector;
import android.content.ContentResolver;
import android.content.ContentValues;
import android.database.Cursor;
package com.shaddock.crsync;
public class CrsyncInfo {
public static class StateInfo {
public int mAction = Crsync.Action_Idle;
public int mCode = Crsync.Code_OK;
public void dump() { | logger.info("####StateInfo Action : " + mAction); |
9468305/crsync | android/src/com/shaddock/crsync/CrsyncActivity.java | // Path: android/src/com/shaddock/crsync/CrsyncConstants.java
// public static final Logger logger = Logger.getLogger("crsync");
| import static com.shaddock.crsync.CrsyncConstants.logger;
import java.io.File;
import java.util.Vector;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.database.ContentObserver;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.text.method.ScrollingMovementMethod;
import android.widget.TextView; | package com.shaddock.crsync;
public class CrsyncActivity extends Activity {
private MyContentObserver mObserver = null;
private class MyContentObserver extends ContentObserver {
public MyContentObserver() {
super(new Handler());
}
@Override
public boolean deliverSelfNotifications() {
return false;
}
@Override
public void onChange(final boolean selfChange) {
updateFromProvider();
}
}
private static final String APK_MIME = "application/vnd.android.package-archive";
private TextView mTV = null;
private AlertDialog mConfirmDialog = null;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); | // Path: android/src/com/shaddock/crsync/CrsyncConstants.java
// public static final Logger logger = Logger.getLogger("crsync");
// Path: android/src/com/shaddock/crsync/CrsyncActivity.java
import static com.shaddock.crsync.CrsyncConstants.logger;
import java.io.File;
import java.util.Vector;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.database.ContentObserver;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.text.method.ScrollingMovementMethod;
import android.widget.TextView;
package com.shaddock.crsync;
public class CrsyncActivity extends Activity {
private MyContentObserver mObserver = null;
private class MyContentObserver extends ContentObserver {
public MyContentObserver() {
super(new Handler());
}
@Override
public boolean deliverSelfNotifications() {
return false;
}
@Override
public void onChange(final boolean selfChange) {
updateFromProvider();
}
}
private static final String APK_MIME = "application/vnd.android.package-archive";
private TextView mTV = null;
private AlertDialog mConfirmDialog = null;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); | logger.info("Activity onCreate"); |
ClintonCao/UnifiedASATVisualizer | src/main/java/BlueTurtle/uav/JavaController.java | // Path: src/main/java/BlueTurtle/gui/GUIController.java
// public enum ASAT { CheckStyle, PMD, FindBugs; }
| import java.io.IOException;
import java.util.ArrayList;
import BlueTurtle.gui.GUIController.ASAT;
import lombok.Getter;
import lombok.Setter; | package BlueTurtle.uav;
/**
* JavaController controls the analyser to make it analyse java code. It
* constructs an AnalyserCommand for every ASAT which has to be run and passes
* this to the analyser.
*
* @author BlueTurtle.
*
*/
public class JavaController implements Controller {
@Getter @Setter private static String userDir = System.getProperty("user.dir"); //NOPMD - caused by lombok.
@Getter @Setter private static ArrayList<String> checkStyleOutputFiles; //NOPMD - caused by lombok.
@Getter @Setter private static ArrayList<String> pmdOutputFiles; //NOPMD - caused by lombok.
@Getter @Setter private static ArrayList<String> findBugsOutputFiles; //NOPMD - caused by lombok.
/**
* Execute controller. A command is constructed for every ASAT which needs
* to be run.
*
* @throws IOException
* throws an exception if a problem is encountered when
* executing the commands.
*/
public void execute() throws IOException {
new JSONFormatter().format();
}
/**
* Set the output paths for the ASAT.
*
* @param asat
* the ASAT type.
* @param filePaths
* the list of output file paths.
*/ | // Path: src/main/java/BlueTurtle/gui/GUIController.java
// public enum ASAT { CheckStyle, PMD, FindBugs; }
// Path: src/main/java/BlueTurtle/uav/JavaController.java
import java.io.IOException;
import java.util.ArrayList;
import BlueTurtle.gui.GUIController.ASAT;
import lombok.Getter;
import lombok.Setter;
package BlueTurtle.uav;
/**
* JavaController controls the analyser to make it analyse java code. It
* constructs an AnalyserCommand for every ASAT which has to be run and passes
* this to the analyser.
*
* @author BlueTurtle.
*
*/
public class JavaController implements Controller {
@Getter @Setter private static String userDir = System.getProperty("user.dir"); //NOPMD - caused by lombok.
@Getter @Setter private static ArrayList<String> checkStyleOutputFiles; //NOPMD - caused by lombok.
@Getter @Setter private static ArrayList<String> pmdOutputFiles; //NOPMD - caused by lombok.
@Getter @Setter private static ArrayList<String> findBugsOutputFiles; //NOPMD - caused by lombok.
/**
* Execute controller. A command is constructed for every ASAT which needs
* to be run.
*
* @throws IOException
* throws an exception if a problem is encountered when
* executing the commands.
*/
public void execute() throws IOException {
new JSONFormatter().format();
}
/**
* Set the output paths for the ASAT.
*
* @param asat
* the ASAT type.
* @param filePaths
* the list of output file paths.
*/ | public static void setASATOutputFiles(ASAT asat, ArrayList<String> filePaths) { |
ClintonCao/UnifiedASATVisualizer | src/main/java/BlueTurtle/parsers/FindBugsXMLParser.java | // Path: src/main/java/BlueTurtle/warnings/FindBugsWarning.java
// public class FindBugsWarning extends Warning {
//
//
// @Getter @Setter private String category;
// @Getter @Setter private String priority;
//
//
// /**
// * Constructor.
// *
// * @param filePath
// * the path to the file where the warning is located.
// * @param filename
// * the name of the file where the warning is located.
// * @param line
// * the line number where the warning is located.
// * @param message
// * the message of the warning.
// * @param category
// * the category of the warning.
// * @param priority
// * the priority of the warning.
// * @param ruleName
// * the rule name of the warning.
// * @param classification
// * of the violated rule of the warning.
// */
// public FindBugsWarning(String filePath, String filename, int line, String message, String category, String priority, String ruleName, String classification) {
// super(filePath, filename, line, "FindBugs", ruleName, message, classification);
// setCategory(category);
// setPriority(priority);
// }
//
//
// /**
// * Check whether two FindBugs warnings are the same.
// *
// * @param other
// * the other warning.
// * @return a boolean
// */
// @Override
// public boolean equals(Object other) {
//
// if (!(other instanceof FindBugsWarning)) {
// return false;
// }
//
// FindBugsWarning that = (FindBugsWarning) other;
//
// return (filePath.equals(that.filePath) && fileName.equals(that.fileName) && line == that.line
// && message.equals(that.message) && category.equals(that.category) && classification.equals(that.classification)
// && priority.equals(that.priority) && type.equals(that.type) && ruleName.equals(that.ruleName));
// }
//
// /**
// * HashCode for the FindBugsWarning.
// */
// @Override
// public int hashCode() {
// return java.util.Objects.hash(filePath, fileName, type, line, message, category, priority, ruleName, classification);
// }
//
// /**
// * toString method for FindBugsWarning.
// */
// @Override
// public String toString() {
// return "FindBugsWarning [lineNumber=" + line + ", message=" + message + ", category=" + category
// + ", priority=" + priority + ", classification="
// + classification + ", fileName=" + fileName + ", type=" + type + ", filePath=" + filePath
// + ", ruleName=" + ruleName + "]";
// }
//
// }
| import java.io.File;
import java.util.LinkedList;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.regex.Matcher;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import BlueTurtle.finders.ProjectInfoFinder;
import BlueTurtle.warnings.FindBugsWarning;
import BlueTurtle.warnings.Warning; | // The message contained by the warning.
String message = warningElement.getAttribute("message");
// The category of warning.
String category = warningElement.getAttribute("category");
// The priority of warning, can be high or low.
String priority = warningElement.getAttribute("priority");
// line number where the warning is located.
int line = Integer.parseInt(warningElement.getAttribute("lineNumber"));
// Get the category of the warning.
String ruleName = warningElement.getAttribute("type");
String classification = classify(ruleName);
try {
// replace the dot in the file name with file separator.
String fileNWithSep = fileName.replaceAll("\\.", Matcher.quoteReplacement(File.separator)) + ".java";
// for-loop in stream.
String filePath = ProjectInfoFinder.getClassPaths().stream().filter(p -> p.endsWith(fileNWithSep))
.findFirst().get();
// Get the name of the file where the warning is from.
String finalFileName = fileNWithSep.substring(fileNWithSep.lastIndexOf(File.separatorChar) + 1,
fileNWithSep.length());
// Construct the new FindBugsWarning. | // Path: src/main/java/BlueTurtle/warnings/FindBugsWarning.java
// public class FindBugsWarning extends Warning {
//
//
// @Getter @Setter private String category;
// @Getter @Setter private String priority;
//
//
// /**
// * Constructor.
// *
// * @param filePath
// * the path to the file where the warning is located.
// * @param filename
// * the name of the file where the warning is located.
// * @param line
// * the line number where the warning is located.
// * @param message
// * the message of the warning.
// * @param category
// * the category of the warning.
// * @param priority
// * the priority of the warning.
// * @param ruleName
// * the rule name of the warning.
// * @param classification
// * of the violated rule of the warning.
// */
// public FindBugsWarning(String filePath, String filename, int line, String message, String category, String priority, String ruleName, String classification) {
// super(filePath, filename, line, "FindBugs", ruleName, message, classification);
// setCategory(category);
// setPriority(priority);
// }
//
//
// /**
// * Check whether two FindBugs warnings are the same.
// *
// * @param other
// * the other warning.
// * @return a boolean
// */
// @Override
// public boolean equals(Object other) {
//
// if (!(other instanceof FindBugsWarning)) {
// return false;
// }
//
// FindBugsWarning that = (FindBugsWarning) other;
//
// return (filePath.equals(that.filePath) && fileName.equals(that.fileName) && line == that.line
// && message.equals(that.message) && category.equals(that.category) && classification.equals(that.classification)
// && priority.equals(that.priority) && type.equals(that.type) && ruleName.equals(that.ruleName));
// }
//
// /**
// * HashCode for the FindBugsWarning.
// */
// @Override
// public int hashCode() {
// return java.util.Objects.hash(filePath, fileName, type, line, message, category, priority, ruleName, classification);
// }
//
// /**
// * toString method for FindBugsWarning.
// */
// @Override
// public String toString() {
// return "FindBugsWarning [lineNumber=" + line + ", message=" + message + ", category=" + category
// + ", priority=" + priority + ", classification="
// + classification + ", fileName=" + fileName + ", type=" + type + ", filePath=" + filePath
// + ", ruleName=" + ruleName + "]";
// }
//
// }
// Path: src/main/java/BlueTurtle/parsers/FindBugsXMLParser.java
import java.io.File;
import java.util.LinkedList;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.regex.Matcher;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import BlueTurtle.finders.ProjectInfoFinder;
import BlueTurtle.warnings.FindBugsWarning;
import BlueTurtle.warnings.Warning;
// The message contained by the warning.
String message = warningElement.getAttribute("message");
// The category of warning.
String category = warningElement.getAttribute("category");
// The priority of warning, can be high or low.
String priority = warningElement.getAttribute("priority");
// line number where the warning is located.
int line = Integer.parseInt(warningElement.getAttribute("lineNumber"));
// Get the category of the warning.
String ruleName = warningElement.getAttribute("type");
String classification = classify(ruleName);
try {
// replace the dot in the file name with file separator.
String fileNWithSep = fileName.replaceAll("\\.", Matcher.quoteReplacement(File.separator)) + ".java";
// for-loop in stream.
String filePath = ProjectInfoFinder.getClassPaths().stream().filter(p -> p.endsWith(fileNWithSep))
.findFirst().get();
// Get the name of the file where the warning is from.
String finalFileName = fileNWithSep.substring(fileNWithSep.lastIndexOf(File.separatorChar) + 1,
fileNWithSep.length());
// Construct the new FindBugsWarning. | FindBugsWarning fbw = new FindBugsWarning(filePath, finalFileName, line, message, category, priority, |
ClintonCao/UnifiedASATVisualizer | src/main/java/BlueTurtle/summarizers/ComponentSummarizer.java | // Path: src/main/java/BlueTurtle/gui/GUIController.java
// public enum ASAT { CheckStyle, PMD, FindBugs; }
| import java.util.ArrayList;
import java.util.List;
import BlueTurtle.finders.ProjectInfoFinder;
import BlueTurtle.gui.GUIController.ASAT;
import BlueTurtle.warnings.Warning;
import lombok.Getter; | package BlueTurtle.summarizers;
/**
* This class can be used to summarise the warnings for a specific component.
*
* @author BlueTurtle.
*
*/
public class ComponentSummarizer extends Summarizer {
@Getter
private String fileName;
@Getter
private String filePath;
@Getter
private List<Warning> warningList;
@Getter
private int loc;
/**
* Constructor.
*
* @param fileName
* the name of the component.
* @param filePath
* the path to the component.
* @param packageName
* the name of the package where the component is from.
*/
public ComponentSummarizer(String fileName, String filePath, String packageName) {
super(packageName);
this.fileName = fileName;
this.filePath = filePath;
this.loc = ProjectInfoFinder.getClassLocs().get(filePath);
this.warningList = new ArrayList<Warning>();
}
/**
* Summarise the warnings.
*
* @param warnings
* the list of warnings to be summarized.
*/
@Override
public void summarise(List<Warning> warnings) {
for (Warning w : warnings) {
String pn = ProjectInfoFinder.getClassPackage().get(w.getFilePath());
if (w.getFileName().equals(getFileName()) && pn.equals(getPackageName())) {
String warningType = w.getType();
if (!warningTypes.contains(warningType)) {
warningTypes.add(w.getType());
}
warningList.add(w); | // Path: src/main/java/BlueTurtle/gui/GUIController.java
// public enum ASAT { CheckStyle, PMD, FindBugs; }
// Path: src/main/java/BlueTurtle/summarizers/ComponentSummarizer.java
import java.util.ArrayList;
import java.util.List;
import BlueTurtle.finders.ProjectInfoFinder;
import BlueTurtle.gui.GUIController.ASAT;
import BlueTurtle.warnings.Warning;
import lombok.Getter;
package BlueTurtle.summarizers;
/**
* This class can be used to summarise the warnings for a specific component.
*
* @author BlueTurtle.
*
*/
public class ComponentSummarizer extends Summarizer {
@Getter
private String fileName;
@Getter
private String filePath;
@Getter
private List<Warning> warningList;
@Getter
private int loc;
/**
* Constructor.
*
* @param fileName
* the name of the component.
* @param filePath
* the path to the component.
* @param packageName
* the name of the package where the component is from.
*/
public ComponentSummarizer(String fileName, String filePath, String packageName) {
super(packageName);
this.fileName = fileName;
this.filePath = filePath;
this.loc = ProjectInfoFinder.getClassLocs().get(filePath);
this.warningList = new ArrayList<Warning>();
}
/**
* Summarise the warnings.
*
* @param warnings
* the list of warnings to be summarized.
*/
@Override
public void summarise(List<Warning> warnings) {
for (Warning w : warnings) {
String pn = ProjectInfoFinder.getClassPackage().get(w.getFilePath());
if (w.getFileName().equals(getFileName()) && pn.equals(getPackageName())) {
String warningType = w.getType();
if (!warningTypes.contains(warningType)) {
warningTypes.add(w.getType());
}
warningList.add(w); | incrementNumberOfWarnings(ASAT.valueOf(warningType)); |
ClintonCao/UnifiedASATVisualizer | src/test/java/BlueTurtle/uav/JavaControllerTest.java | // Path: src/main/java/BlueTurtle/gui/GUIController.java
// public class GUIController {
//
//
// /**
// * Enums to represent the ASATs.
// *
// * @author BlueTurtle.
// *
// */
// public enum ASAT { CheckStyle, PMD, FindBugs; }
//
// @FXML // ResourceBundle that was given to the FXMLLoader
// private ResourceBundle resources; //NOPMD - needed for the FXMLLoader.
//
// @FXML // URL location of the FXML file that was given to the FXMLLoader
// private URL location; //NOPMD - needed for the FXMLLoader.
//
// @FXML // fx:id="selectButton"
// private Button selectButton; // Value injected by FXMLLoader
//
// @FXML // fx:id="projectSourcePathText"
// private Text projectSourcePathText; // Value injected by FXMLLoader
//
// @FXML // fx:id="visualizeButton"
// private Button visualizeButton; // Value injected by FXMLLoader
//
// @Getter @Setter private static String projectPath; //NOPMD - warning caused by lombok.
//
// /**
// * Event for CheckStyle button.
// *
// * @param event
// * the event.
// */
// @FXML
// void selectCheckStyleConfigEvent(MouseEvent event) { }
//
// /**
// * Event for PMD button.
// *
// * @param event
// * the event.
// */
// @FXML
// void selectPMDConfigEvent(MouseEvent event) { }
//
// /**
// * Event for FindBugs button.
// *
// * @param event
// * the event.
// */
// @FXML
// void selectFindBugsConfigEvent(MouseEvent event) { }
//
// /**
// * Events for the LoadButton.
// *
// * @param event
// * the event.
// */
// @FXML
// void selectButtonEvent(MouseEvent event) { }
//
// /**
// * Events from the VisualizeButton.
// *
// * @param event
// * the event.
// */
// @FXML
// void visualizeButtonEvent(MouseEvent event) { }
//
// /**
// * Initialize the buttons.
// */
// @FXML
// void initialize() {
// assert visualizeButton != null : "fx:id=\"visualizeButton\" was not injected: check your FXML file 'Menu.fxml'.";
// assert projectSourcePathText != null : "fx:id=\"projectSourcePathText\" was not injected: check your FXML file 'Menu.fxml'.";
// assert selectButton != null : "fx:id=\"selectButton\" was not injected: check your FXML file 'Menu.fxml'.";
//
// // Set the event handlers for the buttons.
// selectButton.setOnMouseClicked(new SelectButtonEventHandler(projectSourcePathText, visualizeButton));
// visualizeButton.setOnMouseClicked(new VisualizeButtonEventHandler());
// }
//
// }
//
// Path: src/main/java/BlueTurtle/gui/GUIController.java
// public enum ASAT { CheckStyle, PMD, FindBugs; }
| import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import BlueTurtle.finders.ProjectInfoFinder;
import BlueTurtle.gui.GUIController;
import BlueTurtle.gui.GUIController.ASAT; | package BlueTurtle.uav;
/**
* Test for the JavaController class.
*
* @author BlueTurtle.
*
*/
public class JavaControllerTest {
private String userDir = System.getProperty("user.dir");
private ArrayList<String> checkstyleList = new ArrayList<String>();
private ArrayList<String> pmdList = new ArrayList<String>();
private ArrayList<String> findBugsList = new ArrayList<String>();
private String checkStyleOutputFilePath = userDir + "/src/test/resources/exampleCheckstyle1.xml";
private String pmdOutputFilePath = userDir + "/src/test/resources/examplePmd1.xml";
private String findBugsOutputFilePath = userDir + "/src/test/resources/exampleFindbugs1.xml";
/**
* Clear the attributes of JavaController.
*
* @throws IOException
* throws an exception if there was a problem encounterd while
* reading the files.
*/
@Before
public void setUp() throws IOException { | // Path: src/main/java/BlueTurtle/gui/GUIController.java
// public class GUIController {
//
//
// /**
// * Enums to represent the ASATs.
// *
// * @author BlueTurtle.
// *
// */
// public enum ASAT { CheckStyle, PMD, FindBugs; }
//
// @FXML // ResourceBundle that was given to the FXMLLoader
// private ResourceBundle resources; //NOPMD - needed for the FXMLLoader.
//
// @FXML // URL location of the FXML file that was given to the FXMLLoader
// private URL location; //NOPMD - needed for the FXMLLoader.
//
// @FXML // fx:id="selectButton"
// private Button selectButton; // Value injected by FXMLLoader
//
// @FXML // fx:id="projectSourcePathText"
// private Text projectSourcePathText; // Value injected by FXMLLoader
//
// @FXML // fx:id="visualizeButton"
// private Button visualizeButton; // Value injected by FXMLLoader
//
// @Getter @Setter private static String projectPath; //NOPMD - warning caused by lombok.
//
// /**
// * Event for CheckStyle button.
// *
// * @param event
// * the event.
// */
// @FXML
// void selectCheckStyleConfigEvent(MouseEvent event) { }
//
// /**
// * Event for PMD button.
// *
// * @param event
// * the event.
// */
// @FXML
// void selectPMDConfigEvent(MouseEvent event) { }
//
// /**
// * Event for FindBugs button.
// *
// * @param event
// * the event.
// */
// @FXML
// void selectFindBugsConfigEvent(MouseEvent event) { }
//
// /**
// * Events for the LoadButton.
// *
// * @param event
// * the event.
// */
// @FXML
// void selectButtonEvent(MouseEvent event) { }
//
// /**
// * Events from the VisualizeButton.
// *
// * @param event
// * the event.
// */
// @FXML
// void visualizeButtonEvent(MouseEvent event) { }
//
// /**
// * Initialize the buttons.
// */
// @FXML
// void initialize() {
// assert visualizeButton != null : "fx:id=\"visualizeButton\" was not injected: check your FXML file 'Menu.fxml'.";
// assert projectSourcePathText != null : "fx:id=\"projectSourcePathText\" was not injected: check your FXML file 'Menu.fxml'.";
// assert selectButton != null : "fx:id=\"selectButton\" was not injected: check your FXML file 'Menu.fxml'.";
//
// // Set the event handlers for the buttons.
// selectButton.setOnMouseClicked(new SelectButtonEventHandler(projectSourcePathText, visualizeButton));
// visualizeButton.setOnMouseClicked(new VisualizeButtonEventHandler());
// }
//
// }
//
// Path: src/main/java/BlueTurtle/gui/GUIController.java
// public enum ASAT { CheckStyle, PMD, FindBugs; }
// Path: src/test/java/BlueTurtle/uav/JavaControllerTest.java
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import BlueTurtle.finders.ProjectInfoFinder;
import BlueTurtle.gui.GUIController;
import BlueTurtle.gui.GUIController.ASAT;
package BlueTurtle.uav;
/**
* Test for the JavaController class.
*
* @author BlueTurtle.
*
*/
public class JavaControllerTest {
private String userDir = System.getProperty("user.dir");
private ArrayList<String> checkstyleList = new ArrayList<String>();
private ArrayList<String> pmdList = new ArrayList<String>();
private ArrayList<String> findBugsList = new ArrayList<String>();
private String checkStyleOutputFilePath = userDir + "/src/test/resources/exampleCheckstyle1.xml";
private String pmdOutputFilePath = userDir + "/src/test/resources/examplePmd1.xml";
private String findBugsOutputFilePath = userDir + "/src/test/resources/exampleFindbugs1.xml";
/**
* Clear the attributes of JavaController.
*
* @throws IOException
* throws an exception if there was a problem encounterd while
* reading the files.
*/
@Before
public void setUp() throws IOException { | GUIController.setProjectPath("test"); |
ClintonCao/UnifiedASATVisualizer | src/test/java/BlueTurtle/uav/JavaControllerTest.java | // Path: src/main/java/BlueTurtle/gui/GUIController.java
// public class GUIController {
//
//
// /**
// * Enums to represent the ASATs.
// *
// * @author BlueTurtle.
// *
// */
// public enum ASAT { CheckStyle, PMD, FindBugs; }
//
// @FXML // ResourceBundle that was given to the FXMLLoader
// private ResourceBundle resources; //NOPMD - needed for the FXMLLoader.
//
// @FXML // URL location of the FXML file that was given to the FXMLLoader
// private URL location; //NOPMD - needed for the FXMLLoader.
//
// @FXML // fx:id="selectButton"
// private Button selectButton; // Value injected by FXMLLoader
//
// @FXML // fx:id="projectSourcePathText"
// private Text projectSourcePathText; // Value injected by FXMLLoader
//
// @FXML // fx:id="visualizeButton"
// private Button visualizeButton; // Value injected by FXMLLoader
//
// @Getter @Setter private static String projectPath; //NOPMD - warning caused by lombok.
//
// /**
// * Event for CheckStyle button.
// *
// * @param event
// * the event.
// */
// @FXML
// void selectCheckStyleConfigEvent(MouseEvent event) { }
//
// /**
// * Event for PMD button.
// *
// * @param event
// * the event.
// */
// @FXML
// void selectPMDConfigEvent(MouseEvent event) { }
//
// /**
// * Event for FindBugs button.
// *
// * @param event
// * the event.
// */
// @FXML
// void selectFindBugsConfigEvent(MouseEvent event) { }
//
// /**
// * Events for the LoadButton.
// *
// * @param event
// * the event.
// */
// @FXML
// void selectButtonEvent(MouseEvent event) { }
//
// /**
// * Events from the VisualizeButton.
// *
// * @param event
// * the event.
// */
// @FXML
// void visualizeButtonEvent(MouseEvent event) { }
//
// /**
// * Initialize the buttons.
// */
// @FXML
// void initialize() {
// assert visualizeButton != null : "fx:id=\"visualizeButton\" was not injected: check your FXML file 'Menu.fxml'.";
// assert projectSourcePathText != null : "fx:id=\"projectSourcePathText\" was not injected: check your FXML file 'Menu.fxml'.";
// assert selectButton != null : "fx:id=\"selectButton\" was not injected: check your FXML file 'Menu.fxml'.";
//
// // Set the event handlers for the buttons.
// selectButton.setOnMouseClicked(new SelectButtonEventHandler(projectSourcePathText, visualizeButton));
// visualizeButton.setOnMouseClicked(new VisualizeButtonEventHandler());
// }
//
// }
//
// Path: src/main/java/BlueTurtle/gui/GUIController.java
// public enum ASAT { CheckStyle, PMD, FindBugs; }
| import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import BlueTurtle.finders.ProjectInfoFinder;
import BlueTurtle.gui.GUIController;
import BlueTurtle.gui.GUIController.ASAT; | ProjectInfoFinder.getClassPackage().clear();
}
/**
* Test that the user direction path is the same.
*/
@Test
public void testUserDir() {
String expected = userDir;
String actual = JavaController.getUserDir();
assertEquals(expected, actual);
}
/**
* Test that all files are null at first.
*/
@Test
public void allFilesStringsAreNull() {
assertTrue(JavaController.getCheckStyleOutputFiles() == null && JavaController.getPmdOutputFiles() == null
&& JavaController.getFindBugsOutputFiles() == null);
}
/**
* Test changing CheckStyle list of output file.
*/
@Test
public void testChangingCheckStyleOutputFile() {
ArrayList<String> list = JavaController.getCheckStyleOutputFiles();
ArrayList<String> newList = new ArrayList<String>();
newList.add("test path for checkstyle"); | // Path: src/main/java/BlueTurtle/gui/GUIController.java
// public class GUIController {
//
//
// /**
// * Enums to represent the ASATs.
// *
// * @author BlueTurtle.
// *
// */
// public enum ASAT { CheckStyle, PMD, FindBugs; }
//
// @FXML // ResourceBundle that was given to the FXMLLoader
// private ResourceBundle resources; //NOPMD - needed for the FXMLLoader.
//
// @FXML // URL location of the FXML file that was given to the FXMLLoader
// private URL location; //NOPMD - needed for the FXMLLoader.
//
// @FXML // fx:id="selectButton"
// private Button selectButton; // Value injected by FXMLLoader
//
// @FXML // fx:id="projectSourcePathText"
// private Text projectSourcePathText; // Value injected by FXMLLoader
//
// @FXML // fx:id="visualizeButton"
// private Button visualizeButton; // Value injected by FXMLLoader
//
// @Getter @Setter private static String projectPath; //NOPMD - warning caused by lombok.
//
// /**
// * Event for CheckStyle button.
// *
// * @param event
// * the event.
// */
// @FXML
// void selectCheckStyleConfigEvent(MouseEvent event) { }
//
// /**
// * Event for PMD button.
// *
// * @param event
// * the event.
// */
// @FXML
// void selectPMDConfigEvent(MouseEvent event) { }
//
// /**
// * Event for FindBugs button.
// *
// * @param event
// * the event.
// */
// @FXML
// void selectFindBugsConfigEvent(MouseEvent event) { }
//
// /**
// * Events for the LoadButton.
// *
// * @param event
// * the event.
// */
// @FXML
// void selectButtonEvent(MouseEvent event) { }
//
// /**
// * Events from the VisualizeButton.
// *
// * @param event
// * the event.
// */
// @FXML
// void visualizeButtonEvent(MouseEvent event) { }
//
// /**
// * Initialize the buttons.
// */
// @FXML
// void initialize() {
// assert visualizeButton != null : "fx:id=\"visualizeButton\" was not injected: check your FXML file 'Menu.fxml'.";
// assert projectSourcePathText != null : "fx:id=\"projectSourcePathText\" was not injected: check your FXML file 'Menu.fxml'.";
// assert selectButton != null : "fx:id=\"selectButton\" was not injected: check your FXML file 'Menu.fxml'.";
//
// // Set the event handlers for the buttons.
// selectButton.setOnMouseClicked(new SelectButtonEventHandler(projectSourcePathText, visualizeButton));
// visualizeButton.setOnMouseClicked(new VisualizeButtonEventHandler());
// }
//
// }
//
// Path: src/main/java/BlueTurtle/gui/GUIController.java
// public enum ASAT { CheckStyle, PMD, FindBugs; }
// Path: src/test/java/BlueTurtle/uav/JavaControllerTest.java
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import BlueTurtle.finders.ProjectInfoFinder;
import BlueTurtle.gui.GUIController;
import BlueTurtle.gui.GUIController.ASAT;
ProjectInfoFinder.getClassPackage().clear();
}
/**
* Test that the user direction path is the same.
*/
@Test
public void testUserDir() {
String expected = userDir;
String actual = JavaController.getUserDir();
assertEquals(expected, actual);
}
/**
* Test that all files are null at first.
*/
@Test
public void allFilesStringsAreNull() {
assertTrue(JavaController.getCheckStyleOutputFiles() == null && JavaController.getPmdOutputFiles() == null
&& JavaController.getFindBugsOutputFiles() == null);
}
/**
* Test changing CheckStyle list of output file.
*/
@Test
public void testChangingCheckStyleOutputFile() {
ArrayList<String> list = JavaController.getCheckStyleOutputFiles();
ArrayList<String> newList = new ArrayList<String>();
newList.add("test path for checkstyle"); | JavaController.setASATOutputFiles(ASAT.CheckStyle, newList); |
ClintonCao/UnifiedASATVisualizer | src/main/java/BlueTurtle/writers/JSWriter.java | // Path: src/main/java/BlueTurtle/gui/GUIController.java
// public class GUIController {
//
//
// /**
// * Enums to represent the ASATs.
// *
// * @author BlueTurtle.
// *
// */
// public enum ASAT { CheckStyle, PMD, FindBugs; }
//
// @FXML // ResourceBundle that was given to the FXMLLoader
// private ResourceBundle resources; //NOPMD - needed for the FXMLLoader.
//
// @FXML // URL location of the FXML file that was given to the FXMLLoader
// private URL location; //NOPMD - needed for the FXMLLoader.
//
// @FXML // fx:id="selectButton"
// private Button selectButton; // Value injected by FXMLLoader
//
// @FXML // fx:id="projectSourcePathText"
// private Text projectSourcePathText; // Value injected by FXMLLoader
//
// @FXML // fx:id="visualizeButton"
// private Button visualizeButton; // Value injected by FXMLLoader
//
// @Getter @Setter private static String projectPath; //NOPMD - warning caused by lombok.
//
// /**
// * Event for CheckStyle button.
// *
// * @param event
// * the event.
// */
// @FXML
// void selectCheckStyleConfigEvent(MouseEvent event) { }
//
// /**
// * Event for PMD button.
// *
// * @param event
// * the event.
// */
// @FXML
// void selectPMDConfigEvent(MouseEvent event) { }
//
// /**
// * Event for FindBugs button.
// *
// * @param event
// * the event.
// */
// @FXML
// void selectFindBugsConfigEvent(MouseEvent event) { }
//
// /**
// * Events for the LoadButton.
// *
// * @param event
// * the event.
// */
// @FXML
// void selectButtonEvent(MouseEvent event) { }
//
// /**
// * Events from the VisualizeButton.
// *
// * @param event
// * the event.
// */
// @FXML
// void visualizeButtonEvent(MouseEvent event) { }
//
// /**
// * Initialize the buttons.
// */
// @FXML
// void initialize() {
// assert visualizeButton != null : "fx:id=\"visualizeButton\" was not injected: check your FXML file 'Menu.fxml'.";
// assert projectSourcePathText != null : "fx:id=\"projectSourcePathText\" was not injected: check your FXML file 'Menu.fxml'.";
// assert selectButton != null : "fx:id=\"selectButton\" was not injected: check your FXML file 'Menu.fxml'.";
//
// // Set the event handlers for the buttons.
// selectButton.setOnMouseClicked(new SelectButtonEventHandler(projectSourcePathText, visualizeButton));
// visualizeButton.setOnMouseClicked(new VisualizeButtonEventHandler());
// }
//
// }
| import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import BlueTurtle.gui.GUIController;
import BlueTurtle.summarizers.Summarizer;
import BlueTurtle.uav.CodeFile;
import lombok.Getter;
import lombok.Setter; | package BlueTurtle.writers;
/**
* This class can be used to write the output of the analyzer to JavaScript
* format.
*
* @author BlueTurtle.
*
*/
@SuppressWarnings("checkstyle:nowhitespacebefore")
public final class JSWriter {
private static JSWriter jsWriter = null;
@Getter @Setter private List<Summarizer> summarizedWarnings;
/**
* Constructor. Only this class can instantiate itself.
*/
private JSWriter() {
}
/**
* Get an instance of this class.
*
* @return an instance of this class.
*/
public static synchronized JSWriter getInstance() {
if (jsWriter == null) {
jsWriter = new JSWriter();
}
return jsWriter;
}
/**
* Write the summarized warnings to a file in JavaScript format.
*
* @param outputFilePath
* path to write the output to.
* @throws IOException
* throws an exception if something went wrong in the process of
* writing to file.
*/
public void writeToJSFormat(String outputFilePath) throws IOException {
BufferedWriter writer = new BufferedWriter(new FileWriter(outputFilePath));
Gson gson = new GsonBuilder().setPrettyPrinting().create();
String json = gson.toJson(summarizedWarnings) + ';';
writer.write("var inputData = ");
writer.newLine();
writer.write(json);
writer.newLine(); | // Path: src/main/java/BlueTurtle/gui/GUIController.java
// public class GUIController {
//
//
// /**
// * Enums to represent the ASATs.
// *
// * @author BlueTurtle.
// *
// */
// public enum ASAT { CheckStyle, PMD, FindBugs; }
//
// @FXML // ResourceBundle that was given to the FXMLLoader
// private ResourceBundle resources; //NOPMD - needed for the FXMLLoader.
//
// @FXML // URL location of the FXML file that was given to the FXMLLoader
// private URL location; //NOPMD - needed for the FXMLLoader.
//
// @FXML // fx:id="selectButton"
// private Button selectButton; // Value injected by FXMLLoader
//
// @FXML // fx:id="projectSourcePathText"
// private Text projectSourcePathText; // Value injected by FXMLLoader
//
// @FXML // fx:id="visualizeButton"
// private Button visualizeButton; // Value injected by FXMLLoader
//
// @Getter @Setter private static String projectPath; //NOPMD - warning caused by lombok.
//
// /**
// * Event for CheckStyle button.
// *
// * @param event
// * the event.
// */
// @FXML
// void selectCheckStyleConfigEvent(MouseEvent event) { }
//
// /**
// * Event for PMD button.
// *
// * @param event
// * the event.
// */
// @FXML
// void selectPMDConfigEvent(MouseEvent event) { }
//
// /**
// * Event for FindBugs button.
// *
// * @param event
// * the event.
// */
// @FXML
// void selectFindBugsConfigEvent(MouseEvent event) { }
//
// /**
// * Events for the LoadButton.
// *
// * @param event
// * the event.
// */
// @FXML
// void selectButtonEvent(MouseEvent event) { }
//
// /**
// * Events from the VisualizeButton.
// *
// * @param event
// * the event.
// */
// @FXML
// void visualizeButtonEvent(MouseEvent event) { }
//
// /**
// * Initialize the buttons.
// */
// @FXML
// void initialize() {
// assert visualizeButton != null : "fx:id=\"visualizeButton\" was not injected: check your FXML file 'Menu.fxml'.";
// assert projectSourcePathText != null : "fx:id=\"projectSourcePathText\" was not injected: check your FXML file 'Menu.fxml'.";
// assert selectButton != null : "fx:id=\"selectButton\" was not injected: check your FXML file 'Menu.fxml'.";
//
// // Set the event handlers for the buttons.
// selectButton.setOnMouseClicked(new SelectButtonEventHandler(projectSourcePathText, visualizeButton));
// visualizeButton.setOnMouseClicked(new VisualizeButtonEventHandler());
// }
//
// }
// Path: src/main/java/BlueTurtle/writers/JSWriter.java
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import BlueTurtle.gui.GUIController;
import BlueTurtle.summarizers.Summarizer;
import BlueTurtle.uav.CodeFile;
import lombok.Getter;
import lombok.Setter;
package BlueTurtle.writers;
/**
* This class can be used to write the output of the analyzer to JavaScript
* format.
*
* @author BlueTurtle.
*
*/
@SuppressWarnings("checkstyle:nowhitespacebefore")
public final class JSWriter {
private static JSWriter jsWriter = null;
@Getter @Setter private List<Summarizer> summarizedWarnings;
/**
* Constructor. Only this class can instantiate itself.
*/
private JSWriter() {
}
/**
* Get an instance of this class.
*
* @return an instance of this class.
*/
public static synchronized JSWriter getInstance() {
if (jsWriter == null) {
jsWriter = new JSWriter();
}
return jsWriter;
}
/**
* Write the summarized warnings to a file in JavaScript format.
*
* @param outputFilePath
* path to write the output to.
* @throws IOException
* throws an exception if something went wrong in the process of
* writing to file.
*/
public void writeToJSFormat(String outputFilePath) throws IOException {
BufferedWriter writer = new BufferedWriter(new FileWriter(outputFilePath));
Gson gson = new GsonBuilder().setPrettyPrinting().create();
String json = gson.toJson(summarizedWarnings) + ';';
writer.write("var inputData = ");
writer.newLine();
writer.write(json);
writer.newLine(); | writer.write("var projectName = " + '"' + GUIController.getProjectPath().substring( |
ClintonCao/UnifiedASATVisualizer | src/test/java/BlueTurtle/summarizers/PackageSummarizerTest.java | // Path: src/main/java/BlueTurtle/warnings/CheckStyleWarning.java
// public class CheckStyleWarning extends Warning {
//
//
// /**
// * Constructor.
// *
// * @param filePath
// * the path to the file where the warning is located.
// * @param filename
// * the name of the file where the warning is located.
// * @param line
// * the line number where the warning is located.
// * @param message
// * the message of the warning.
// *
// * @param ruleName
// * the rule name of the warning.
// * @param classification
// * of the violated rule of the warning.
// */
// public CheckStyleWarning(String filePath, String filename, int line, String message, String ruleName, String classification) {
// super(filePath, filename, line, "CheckStyle", ruleName, message, classification);
// setMessage(message.replaceAll("'", ""));
// }
//
// /**
// * Check whether two CheckStyle warnings are the same.
// *
// * @param other
// * the other warning.
// * @return a boolean
// */
// @Override
// public boolean equals(Object other) {
//
// if (!(other instanceof CheckStyleWarning)) {
// return false;
// }
//
// CheckStyleWarning that = (CheckStyleWarning) other;
//
// // fixed SimplifyBooleanReturn, Conditional logic can be removed.
// return (ruleName.equals(that.ruleName) && filePath.equals(that.filePath) && fileName.equals(that.fileName) && line == that.line
// && message.equals(that.message) && classification.equals(that.classification) && type.equals(that.type));
//
// }
//
// /**
// * HashCode for the CheckStyle Warning.
// */
// @Override
// public int hashCode() {
// return java.util.Objects.hash(filePath, fileName, type, line, message, ruleName, classification);
// }
//
// /**
// * toString method for CheckStylWarning.
// */
// @Override
// public String toString() {
// return "CheckStyleWarning [line=" + line + ", message=" + message + ", classification=" + classification
// + ", fileName=" + fileName + ", type=" + type + ", filePath=" + filePath + ", ruleName=" + ruleName
// + "]";
// }
//
// }
| import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertFalse;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import BlueTurtle.finders.ProjectInfoFinder;
import BlueTurtle.warnings.CheckStyleWarning;
import BlueTurtle.warnings.Warning; | package BlueTurtle.summarizers;
/**
* Test for the PackageSummarizer class.
*
* @author BlueTurtle.
*
*/
public class PackageSummarizerTest {
private String packageName;
private List<Warning> warningList;
private Warning w;
private List<Warning> warningList2;
private Warning w2;
private String filePath;
private String filePath2;
/**
* Initialize necessary objects.
*
* @throws IOException
* throws an exception if problem was encountered while reading
* files.
*/
@Before
public void initialize() throws IOException {
ProjectInfoFinder pif = new ProjectInfoFinder();
pif.findFiles(new File(System.getProperty("user.dir") + "/src/test/resources"));
filePath = ProjectInfoFinder.getClassPaths().stream().filter(path -> path.endsWith(
"src" + File.separator + "test" + File.separator + "resources" + File.separator + "ExampleClass.java"))
.findFirst().get();
filePath2 = ProjectInfoFinder.getClassPaths().stream().filter(path -> path.endsWith("src" + File.separator
+ "test" + File.separator + "resources" + File.separator + "ExampleTestClass.java")).findFirst().get();
packageName = "SomePackage.subpackage"; | // Path: src/main/java/BlueTurtle/warnings/CheckStyleWarning.java
// public class CheckStyleWarning extends Warning {
//
//
// /**
// * Constructor.
// *
// * @param filePath
// * the path to the file where the warning is located.
// * @param filename
// * the name of the file where the warning is located.
// * @param line
// * the line number where the warning is located.
// * @param message
// * the message of the warning.
// *
// * @param ruleName
// * the rule name of the warning.
// * @param classification
// * of the violated rule of the warning.
// */
// public CheckStyleWarning(String filePath, String filename, int line, String message, String ruleName, String classification) {
// super(filePath, filename, line, "CheckStyle", ruleName, message, classification);
// setMessage(message.replaceAll("'", ""));
// }
//
// /**
// * Check whether two CheckStyle warnings are the same.
// *
// * @param other
// * the other warning.
// * @return a boolean
// */
// @Override
// public boolean equals(Object other) {
//
// if (!(other instanceof CheckStyleWarning)) {
// return false;
// }
//
// CheckStyleWarning that = (CheckStyleWarning) other;
//
// // fixed SimplifyBooleanReturn, Conditional logic can be removed.
// return (ruleName.equals(that.ruleName) && filePath.equals(that.filePath) && fileName.equals(that.fileName) && line == that.line
// && message.equals(that.message) && classification.equals(that.classification) && type.equals(that.type));
//
// }
//
// /**
// * HashCode for the CheckStyle Warning.
// */
// @Override
// public int hashCode() {
// return java.util.Objects.hash(filePath, fileName, type, line, message, ruleName, classification);
// }
//
// /**
// * toString method for CheckStylWarning.
// */
// @Override
// public String toString() {
// return "CheckStyleWarning [line=" + line + ", message=" + message + ", classification=" + classification
// + ", fileName=" + fileName + ", type=" + type + ", filePath=" + filePath + ", ruleName=" + ruleName
// + "]";
// }
//
// }
// Path: src/test/java/BlueTurtle/summarizers/PackageSummarizerTest.java
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertFalse;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import BlueTurtle.finders.ProjectInfoFinder;
import BlueTurtle.warnings.CheckStyleWarning;
import BlueTurtle.warnings.Warning;
package BlueTurtle.summarizers;
/**
* Test for the PackageSummarizer class.
*
* @author BlueTurtle.
*
*/
public class PackageSummarizerTest {
private String packageName;
private List<Warning> warningList;
private Warning w;
private List<Warning> warningList2;
private Warning w2;
private String filePath;
private String filePath2;
/**
* Initialize necessary objects.
*
* @throws IOException
* throws an exception if problem was encountered while reading
* files.
*/
@Before
public void initialize() throws IOException {
ProjectInfoFinder pif = new ProjectInfoFinder();
pif.findFiles(new File(System.getProperty("user.dir") + "/src/test/resources"));
filePath = ProjectInfoFinder.getClassPaths().stream().filter(path -> path.endsWith(
"src" + File.separator + "test" + File.separator + "resources" + File.separator + "ExampleClass.java"))
.findFirst().get();
filePath2 = ProjectInfoFinder.getClassPaths().stream().filter(path -> path.endsWith("src" + File.separator
+ "test" + File.separator + "resources" + File.separator + "ExampleTestClass.java")).findFirst().get();
packageName = "SomePackage.subpackage"; | w = new CheckStyleWarning(filePath, "ExampleClass.java", 3, "Test", "TestRule", "Class"); |
ClintonCao/UnifiedASATVisualizer | src/main/java/BlueTurtle/gui/GUIController.java | // Path: src/main/java/BlueTurtle/gui/GUIController.java
// public enum ASAT { CheckStyle, PMD, FindBugs; }
//
// Path: src/main/java/BlueTurtle/uav/JavaController.java
// public class JavaController implements Controller {
//
// @Getter @Setter private static String userDir = System.getProperty("user.dir"); //NOPMD - caused by lombok.
// @Getter @Setter private static ArrayList<String> checkStyleOutputFiles; //NOPMD - caused by lombok.
// @Getter @Setter private static ArrayList<String> pmdOutputFiles; //NOPMD - caused by lombok.
// @Getter @Setter private static ArrayList<String> findBugsOutputFiles; //NOPMD - caused by lombok.
//
// /**
// * Execute controller. A command is constructed for every ASAT which needs
// * to be run.
// *
// * @throws IOException
// * throws an exception if a problem is encountered when
// * executing the commands.
// */
// public void execute() throws IOException {
// new JSONFormatter().format();
// }
//
// /**
// * Set the output paths for the ASAT.
// *
// * @param asat
// * the ASAT type.
// * @param filePaths
// * the list of output file paths.
// */
// public static void setASATOutputFiles(ASAT asat, ArrayList<String> filePaths) {
// if (filePaths == null) {
// return;
// }
// switch (asat) {
// case PMD:
// pmdOutputFiles = filePaths;
// break;
// case CheckStyle:
// checkStyleOutputFiles = filePaths;
// break;
// case FindBugs:
// findBugsOutputFiles = filePaths;
// break;
// default:
// break;
// }
// }
// }
| import java.awt.Desktop;
import javafx.scene.control.Alert;
import javafx.scene.control.Alert.AlertType;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;
import BlueTurtle.finders.ProjectInfoFinder;
import BlueTurtle.gui.GUIController.ASAT;
import BlueTurtle.uav.JavaController;
import BlueTurtle.uav.Main;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.input.MouseEvent;
import javafx.scene.text.Text;
import javafx.stage.DirectoryChooser;
import javafx.stage.Stage;
import lombok.Getter;
import lombok.Setter; | @Override
public void handle(MouseEvent event) {
try {
Alert alert = alertCreator.createAlert(AlertType.INFORMATION, "info", "Collecting the data may take a few minutes for large projects.");
alert.showAndWait();
findProjectInfo();
Main.runVisualization();
Desktop.getDesktop().browse(new File("visualization/main.html").toURI());
ProjectInfoFinder.cleanup();
} catch (IOException e) {
e.printStackTrace();
}
}
/**
* Find all necessary information of the project.
* @throws IOException
* throws an exception if a problem is encountered while reading the files.
*/
public void findProjectInfo() throws IOException {
ProjectInfoFinder pif = new ProjectInfoFinder();
pif.findFiles(new File(GUIController.getProjectPath()));
setListOfOutputFiles();
pif.retrieveCodeFiles();
}
/**
* Set the list of output files (generated by Maven) for each ASAT.
*/
public void setListOfOutputFiles() { | // Path: src/main/java/BlueTurtle/gui/GUIController.java
// public enum ASAT { CheckStyle, PMD, FindBugs; }
//
// Path: src/main/java/BlueTurtle/uav/JavaController.java
// public class JavaController implements Controller {
//
// @Getter @Setter private static String userDir = System.getProperty("user.dir"); //NOPMD - caused by lombok.
// @Getter @Setter private static ArrayList<String> checkStyleOutputFiles; //NOPMD - caused by lombok.
// @Getter @Setter private static ArrayList<String> pmdOutputFiles; //NOPMD - caused by lombok.
// @Getter @Setter private static ArrayList<String> findBugsOutputFiles; //NOPMD - caused by lombok.
//
// /**
// * Execute controller. A command is constructed for every ASAT which needs
// * to be run.
// *
// * @throws IOException
// * throws an exception if a problem is encountered when
// * executing the commands.
// */
// public void execute() throws IOException {
// new JSONFormatter().format();
// }
//
// /**
// * Set the output paths for the ASAT.
// *
// * @param asat
// * the ASAT type.
// * @param filePaths
// * the list of output file paths.
// */
// public static void setASATOutputFiles(ASAT asat, ArrayList<String> filePaths) {
// if (filePaths == null) {
// return;
// }
// switch (asat) {
// case PMD:
// pmdOutputFiles = filePaths;
// break;
// case CheckStyle:
// checkStyleOutputFiles = filePaths;
// break;
// case FindBugs:
// findBugsOutputFiles = filePaths;
// break;
// default:
// break;
// }
// }
// }
// Path: src/main/java/BlueTurtle/gui/GUIController.java
import java.awt.Desktop;
import javafx.scene.control.Alert;
import javafx.scene.control.Alert.AlertType;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;
import BlueTurtle.finders.ProjectInfoFinder;
import BlueTurtle.gui.GUIController.ASAT;
import BlueTurtle.uav.JavaController;
import BlueTurtle.uav.Main;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.input.MouseEvent;
import javafx.scene.text.Text;
import javafx.stage.DirectoryChooser;
import javafx.stage.Stage;
import lombok.Getter;
import lombok.Setter;
@Override
public void handle(MouseEvent event) {
try {
Alert alert = alertCreator.createAlert(AlertType.INFORMATION, "info", "Collecting the data may take a few minutes for large projects.");
alert.showAndWait();
findProjectInfo();
Main.runVisualization();
Desktop.getDesktop().browse(new File("visualization/main.html").toURI());
ProjectInfoFinder.cleanup();
} catch (IOException e) {
e.printStackTrace();
}
}
/**
* Find all necessary information of the project.
* @throws IOException
* throws an exception if a problem is encountered while reading the files.
*/
public void findProjectInfo() throws IOException {
ProjectInfoFinder pif = new ProjectInfoFinder();
pif.findFiles(new File(GUIController.getProjectPath()));
setListOfOutputFiles();
pif.retrieveCodeFiles();
}
/**
* Set the list of output files (generated by Maven) for each ASAT.
*/
public void setListOfOutputFiles() { | JavaController.setASATOutputFiles(ASAT.CheckStyle, ProjectInfoFinder.getOutputFilesPaths().get(ASAT.CheckStyle)); |
ClintonCao/UnifiedASATVisualizer | src/test/java/BlueTurtle/parsers/FindBugsXMLParserTest.java | // Path: src/main/java/BlueTurtle/warnings/FindBugsWarning.java
// public class FindBugsWarning extends Warning {
//
//
// @Getter @Setter private String category;
// @Getter @Setter private String priority;
//
//
// /**
// * Constructor.
// *
// * @param filePath
// * the path to the file where the warning is located.
// * @param filename
// * the name of the file where the warning is located.
// * @param line
// * the line number where the warning is located.
// * @param message
// * the message of the warning.
// * @param category
// * the category of the warning.
// * @param priority
// * the priority of the warning.
// * @param ruleName
// * the rule name of the warning.
// * @param classification
// * of the violated rule of the warning.
// */
// public FindBugsWarning(String filePath, String filename, int line, String message, String category, String priority, String ruleName, String classification) {
// super(filePath, filename, line, "FindBugs", ruleName, message, classification);
// setCategory(category);
// setPriority(priority);
// }
//
//
// /**
// * Check whether two FindBugs warnings are the same.
// *
// * @param other
// * the other warning.
// * @return a boolean
// */
// @Override
// public boolean equals(Object other) {
//
// if (!(other instanceof FindBugsWarning)) {
// return false;
// }
//
// FindBugsWarning that = (FindBugsWarning) other;
//
// return (filePath.equals(that.filePath) && fileName.equals(that.fileName) && line == that.line
// && message.equals(that.message) && category.equals(that.category) && classification.equals(that.classification)
// && priority.equals(that.priority) && type.equals(that.type) && ruleName.equals(that.ruleName));
// }
//
// /**
// * HashCode for the FindBugsWarning.
// */
// @Override
// public int hashCode() {
// return java.util.Objects.hash(filePath, fileName, type, line, message, category, priority, ruleName, classification);
// }
//
// /**
// * toString method for FindBugsWarning.
// */
// @Override
// public String toString() {
// return "FindBugsWarning [lineNumber=" + line + ", message=" + message + ", category=" + category
// + ", priority=" + priority + ", classification="
// + classification + ", fileName=" + fileName + ", type=" + type + ", filePath=" + filePath
// + ", ruleName=" + ruleName + "]";
// }
//
// }
| import java.io.File;
import java.io.IOException;
import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertSame;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import BlueTurtle.finders.ProjectInfoFinder;
import BlueTurtle.warnings.FindBugsWarning;
import BlueTurtle.warnings.Warning; | * Clear the attributes of ProjectInfoFinder.
*/
@After
public void tearDown() {
ProjectInfoFinder.getClassLocs().clear();
ProjectInfoFinder.getClassPackage().clear();
ProjectInfoFinder.getClassPaths().clear();
ProjectInfoFinder.getPackages().clear();
}
/**
* Test that the parser can parse a valid FindBugs output file.
*/
@Test
public void testParseCorrectBehaviour() {
FindBugsXMLParser parser = new FindBugsXMLParser();
List<Warning> warnings = parser.parseFile(testSet2);
assertSame(2, warnings.size());
}
/**
* Test whether the parser creates the right object.
*/
@Test
public void testParsingOneWarning() {
FindBugsXMLParser parser = new FindBugsXMLParser();
| // Path: src/main/java/BlueTurtle/warnings/FindBugsWarning.java
// public class FindBugsWarning extends Warning {
//
//
// @Getter @Setter private String category;
// @Getter @Setter private String priority;
//
//
// /**
// * Constructor.
// *
// * @param filePath
// * the path to the file where the warning is located.
// * @param filename
// * the name of the file where the warning is located.
// * @param line
// * the line number where the warning is located.
// * @param message
// * the message of the warning.
// * @param category
// * the category of the warning.
// * @param priority
// * the priority of the warning.
// * @param ruleName
// * the rule name of the warning.
// * @param classification
// * of the violated rule of the warning.
// */
// public FindBugsWarning(String filePath, String filename, int line, String message, String category, String priority, String ruleName, String classification) {
// super(filePath, filename, line, "FindBugs", ruleName, message, classification);
// setCategory(category);
// setPriority(priority);
// }
//
//
// /**
// * Check whether two FindBugs warnings are the same.
// *
// * @param other
// * the other warning.
// * @return a boolean
// */
// @Override
// public boolean equals(Object other) {
//
// if (!(other instanceof FindBugsWarning)) {
// return false;
// }
//
// FindBugsWarning that = (FindBugsWarning) other;
//
// return (filePath.equals(that.filePath) && fileName.equals(that.fileName) && line == that.line
// && message.equals(that.message) && category.equals(that.category) && classification.equals(that.classification)
// && priority.equals(that.priority) && type.equals(that.type) && ruleName.equals(that.ruleName));
// }
//
// /**
// * HashCode for the FindBugsWarning.
// */
// @Override
// public int hashCode() {
// return java.util.Objects.hash(filePath, fileName, type, line, message, category, priority, ruleName, classification);
// }
//
// /**
// * toString method for FindBugsWarning.
// */
// @Override
// public String toString() {
// return "FindBugsWarning [lineNumber=" + line + ", message=" + message + ", category=" + category
// + ", priority=" + priority + ", classification="
// + classification + ", fileName=" + fileName + ", type=" + type + ", filePath=" + filePath
// + ", ruleName=" + ruleName + "]";
// }
//
// }
// Path: src/test/java/BlueTurtle/parsers/FindBugsXMLParserTest.java
import java.io.File;
import java.io.IOException;
import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertSame;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import BlueTurtle.finders.ProjectInfoFinder;
import BlueTurtle.warnings.FindBugsWarning;
import BlueTurtle.warnings.Warning;
* Clear the attributes of ProjectInfoFinder.
*/
@After
public void tearDown() {
ProjectInfoFinder.getClassLocs().clear();
ProjectInfoFinder.getClassPackage().clear();
ProjectInfoFinder.getClassPaths().clear();
ProjectInfoFinder.getPackages().clear();
}
/**
* Test that the parser can parse a valid FindBugs output file.
*/
@Test
public void testParseCorrectBehaviour() {
FindBugsXMLParser parser = new FindBugsXMLParser();
List<Warning> warnings = parser.parseFile(testSet2);
assertSame(2, warnings.size());
}
/**
* Test whether the parser creates the right object.
*/
@Test
public void testParsingOneWarning() {
FindBugsXMLParser parser = new FindBugsXMLParser();
| FindBugsWarning expected = new FindBugsWarning(testSet3FilePath, testSet2FileName, 47, testSet2Message, |
ClintonCao/UnifiedASATVisualizer | src/main/java/BlueTurtle/parsers/CheckStyleXMLParser.java | // Path: src/main/java/BlueTurtle/warnings/CheckStyleWarning.java
// public class CheckStyleWarning extends Warning {
//
//
// /**
// * Constructor.
// *
// * @param filePath
// * the path to the file where the warning is located.
// * @param filename
// * the name of the file where the warning is located.
// * @param line
// * the line number where the warning is located.
// * @param message
// * the message of the warning.
// *
// * @param ruleName
// * the rule name of the warning.
// * @param classification
// * of the violated rule of the warning.
// */
// public CheckStyleWarning(String filePath, String filename, int line, String message, String ruleName, String classification) {
// super(filePath, filename, line, "CheckStyle", ruleName, message, classification);
// setMessage(message.replaceAll("'", ""));
// }
//
// /**
// * Check whether two CheckStyle warnings are the same.
// *
// * @param other
// * the other warning.
// * @return a boolean
// */
// @Override
// public boolean equals(Object other) {
//
// if (!(other instanceof CheckStyleWarning)) {
// return false;
// }
//
// CheckStyleWarning that = (CheckStyleWarning) other;
//
// // fixed SimplifyBooleanReturn, Conditional logic can be removed.
// return (ruleName.equals(that.ruleName) && filePath.equals(that.filePath) && fileName.equals(that.fileName) && line == that.line
// && message.equals(that.message) && classification.equals(that.classification) && type.equals(that.type));
//
// }
//
// /**
// * HashCode for the CheckStyle Warning.
// */
// @Override
// public int hashCode() {
// return java.util.Objects.hash(filePath, fileName, type, line, message, ruleName, classification);
// }
//
// /**
// * toString method for CheckStylWarning.
// */
// @Override
// public String toString() {
// return "CheckStyleWarning [line=" + line + ", message=" + message + ", classification=" + classification
// + ", fileName=" + fileName + ", type=" + type + ", filePath=" + filePath + ", ruleName=" + ruleName
// + "]";
// }
//
// }
| import org.w3c.dom.NodeList;
import BlueTurtle.finders.ProjectInfoFinder;
import BlueTurtle.warnings.CheckStyleWarning;
import BlueTurtle.warnings.Warning;
import org.w3c.dom.Node;
import org.w3c.dom.Element;
import java.io.File;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.regex.Matcher; |
// Convert the node to an element.
Element warningElement = (Element) warning;
// The message contained by the warning.
String message = warningElement.getAttribute("message");
// line number where the warning is located.
int line = Integer.parseInt(warningElement.getAttribute("line"));
// Get the category of the warning.
String ruleName = getRuleName(warningElement.getAttribute("source"));
String classification = classify(ruleName);
// replace the backward slash in the file name with file separator.
String fileNWithSep = fileName.replaceAll("\\\\", Matcher.quoteReplacement(File.separator));
try {
// for-loop in stream, find correct filePath.
String filePath = ProjectInfoFinder.getClassPaths().stream().filter(p -> p.endsWith(fileNWithSep))
.findFirst().get();
// Get the name of the file where the warning is from.
String finalFileName = fileNWithSep.substring(fileNWithSep.lastIndexOf(File.separatorChar) + 1,
fileNWithSep.length());
// Add warning to the list of warnings.
checkStyleWarnings | // Path: src/main/java/BlueTurtle/warnings/CheckStyleWarning.java
// public class CheckStyleWarning extends Warning {
//
//
// /**
// * Constructor.
// *
// * @param filePath
// * the path to the file where the warning is located.
// * @param filename
// * the name of the file where the warning is located.
// * @param line
// * the line number where the warning is located.
// * @param message
// * the message of the warning.
// *
// * @param ruleName
// * the rule name of the warning.
// * @param classification
// * of the violated rule of the warning.
// */
// public CheckStyleWarning(String filePath, String filename, int line, String message, String ruleName, String classification) {
// super(filePath, filename, line, "CheckStyle", ruleName, message, classification);
// setMessage(message.replaceAll("'", ""));
// }
//
// /**
// * Check whether two CheckStyle warnings are the same.
// *
// * @param other
// * the other warning.
// * @return a boolean
// */
// @Override
// public boolean equals(Object other) {
//
// if (!(other instanceof CheckStyleWarning)) {
// return false;
// }
//
// CheckStyleWarning that = (CheckStyleWarning) other;
//
// // fixed SimplifyBooleanReturn, Conditional logic can be removed.
// return (ruleName.equals(that.ruleName) && filePath.equals(that.filePath) && fileName.equals(that.fileName) && line == that.line
// && message.equals(that.message) && classification.equals(that.classification) && type.equals(that.type));
//
// }
//
// /**
// * HashCode for the CheckStyle Warning.
// */
// @Override
// public int hashCode() {
// return java.util.Objects.hash(filePath, fileName, type, line, message, ruleName, classification);
// }
//
// /**
// * toString method for CheckStylWarning.
// */
// @Override
// public String toString() {
// return "CheckStyleWarning [line=" + line + ", message=" + message + ", classification=" + classification
// + ", fileName=" + fileName + ", type=" + type + ", filePath=" + filePath + ", ruleName=" + ruleName
// + "]";
// }
//
// }
// Path: src/main/java/BlueTurtle/parsers/CheckStyleXMLParser.java
import org.w3c.dom.NodeList;
import BlueTurtle.finders.ProjectInfoFinder;
import BlueTurtle.warnings.CheckStyleWarning;
import BlueTurtle.warnings.Warning;
import org.w3c.dom.Node;
import org.w3c.dom.Element;
import java.io.File;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.regex.Matcher;
// Convert the node to an element.
Element warningElement = (Element) warning;
// The message contained by the warning.
String message = warningElement.getAttribute("message");
// line number where the warning is located.
int line = Integer.parseInt(warningElement.getAttribute("line"));
// Get the category of the warning.
String ruleName = getRuleName(warningElement.getAttribute("source"));
String classification = classify(ruleName);
// replace the backward slash in the file name with file separator.
String fileNWithSep = fileName.replaceAll("\\\\", Matcher.quoteReplacement(File.separator));
try {
// for-loop in stream, find correct filePath.
String filePath = ProjectInfoFinder.getClassPaths().stream().filter(p -> p.endsWith(fileNWithSep))
.findFirst().get();
// Get the name of the file where the warning is from.
String finalFileName = fileNWithSep.substring(fileNWithSep.lastIndexOf(File.separatorChar) + 1,
fileNWithSep.length());
// Add warning to the list of warnings.
checkStyleWarnings | .add(new CheckStyleWarning(filePath, finalFileName, line, message, ruleName, classification)); |
albfernandez/javadbf | src/test/java/com/linuxense/javadbf/bug77/Bug77NoHeaderRecordTerminatorTest.java | // Path: src/test/java/com/linuxense/javadbf/ReadDBFAssert.java
// public class ReadDBFAssert {
//
// private ReadDBFAssert() {
// throw new AssertionError("No instances");
// }
//
// public static void testReadDBFFile(String fileName, int expectedColumns, int expectedRows) throws DBFException, IOException {
// testReadDBFFile(fileName, expectedColumns, expectedRows, false);
// }
//
// public static void testReadDBFFile(String fileName, int expectedColumns, int expectedRows, Boolean showDeletedRows) throws DBFException, IOException {
// testReadDBFFile(new File("src/test/resources/" + fileName + ".dbf"), expectedColumns, expectedRows, showDeletedRows);
// }
//
// public static void testReadDBFFile(File file, int expectedColumns, int expectedRows, Boolean showDeletedRows) throws DBFException, IOException {
// DBFReader reader = null;
// try {
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)), showDeletedRows);
// testReadDBFFile(reader, expectedColumns, expectedRows);
// } finally {
// DBFUtils.close(reader);
// }
//
// }
// public static void testReadDBFFile(InputStream is, int expectedColumns, int expectedRows) throws DBFException {
// testReadDBFFile(new DBFReader(is), expectedColumns, expectedRows);
// }
//
// public static void testReadDBFFile(DBFReader reader, int expectedColumns, int expectedRows) throws DBFException {
//
//
// int numberOfFields = reader.getFieldCount();
// Assert.assertEquals(expectedColumns, numberOfFields);
// for (int i = 0; i < numberOfFields; i++) {
// DBFField field = reader.getField(i);
// Assert.assertNotNull(field.getName());
// }
// Object[] rowObject;
// int countedRows = 0;
// while ((rowObject = reader.nextRecord()) != null) {
// Assert.assertEquals(numberOfFields, rowObject.length);
// countedRows++;
// }
// Assert.assertEquals(expectedRows, countedRows);
// Assert.assertEquals(expectedRows, reader.getRecordCount());
// }
//
// public static void testReadDBFFileDeletedRecords(String fileName, int expectedRows, int expectedDeleted) throws DBFException, IOException {
//
// DBFReader reader = null;
// try {
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(new File("src/test/resources/" + fileName + ".dbf"))), true);
// Object[] rowObject;
//
// int countedRows = 0;
// int countedDeletes = 0;
// int headerStoredRows = reader.getHeader().numberOfRecords;
// while ((rowObject = reader.nextRecord()) != null) {
// if(rowObject[0] == Boolean.TRUE) {
// countedDeletes++;
// }
// countedRows++;
// }
//
// Assert.assertEquals(expectedRows, countedRows);
// Assert.assertEquals(expectedDeleted, countedDeletes);
// Assert.assertEquals(expectedRows, headerStoredRows);
// } finally {
// DBFUtils.close(reader);
// }
//
//
// }
// }
| import java.io.File;
import java.io.IOException;
import org.junit.Test;
import com.linuxense.javadbf.ReadDBFAssert; | package com.linuxense.javadbf.bug77;
public class Bug77NoHeaderRecordTerminatorTest {
public Bug77NoHeaderRecordTerminatorTest() {
super();
}
@Test
public void testReadCountriesNoTerminator() throws IOException {
// This file is original continents.dbf tunned by hand to reproduce the bug
File f = new File("src/test/resources/bug-77-no-header-record-terminator/continents_no_header_record_terminator.dbf"); | // Path: src/test/java/com/linuxense/javadbf/ReadDBFAssert.java
// public class ReadDBFAssert {
//
// private ReadDBFAssert() {
// throw new AssertionError("No instances");
// }
//
// public static void testReadDBFFile(String fileName, int expectedColumns, int expectedRows) throws DBFException, IOException {
// testReadDBFFile(fileName, expectedColumns, expectedRows, false);
// }
//
// public static void testReadDBFFile(String fileName, int expectedColumns, int expectedRows, Boolean showDeletedRows) throws DBFException, IOException {
// testReadDBFFile(new File("src/test/resources/" + fileName + ".dbf"), expectedColumns, expectedRows, showDeletedRows);
// }
//
// public static void testReadDBFFile(File file, int expectedColumns, int expectedRows, Boolean showDeletedRows) throws DBFException, IOException {
// DBFReader reader = null;
// try {
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)), showDeletedRows);
// testReadDBFFile(reader, expectedColumns, expectedRows);
// } finally {
// DBFUtils.close(reader);
// }
//
// }
// public static void testReadDBFFile(InputStream is, int expectedColumns, int expectedRows) throws DBFException {
// testReadDBFFile(new DBFReader(is), expectedColumns, expectedRows);
// }
//
// public static void testReadDBFFile(DBFReader reader, int expectedColumns, int expectedRows) throws DBFException {
//
//
// int numberOfFields = reader.getFieldCount();
// Assert.assertEquals(expectedColumns, numberOfFields);
// for (int i = 0; i < numberOfFields; i++) {
// DBFField field = reader.getField(i);
// Assert.assertNotNull(field.getName());
// }
// Object[] rowObject;
// int countedRows = 0;
// while ((rowObject = reader.nextRecord()) != null) {
// Assert.assertEquals(numberOfFields, rowObject.length);
// countedRows++;
// }
// Assert.assertEquals(expectedRows, countedRows);
// Assert.assertEquals(expectedRows, reader.getRecordCount());
// }
//
// public static void testReadDBFFileDeletedRecords(String fileName, int expectedRows, int expectedDeleted) throws DBFException, IOException {
//
// DBFReader reader = null;
// try {
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(new File("src/test/resources/" + fileName + ".dbf"))), true);
// Object[] rowObject;
//
// int countedRows = 0;
// int countedDeletes = 0;
// int headerStoredRows = reader.getHeader().numberOfRecords;
// while ((rowObject = reader.nextRecord()) != null) {
// if(rowObject[0] == Boolean.TRUE) {
// countedDeletes++;
// }
// countedRows++;
// }
//
// Assert.assertEquals(expectedRows, countedRows);
// Assert.assertEquals(expectedDeleted, countedDeletes);
// Assert.assertEquals(expectedRows, headerStoredRows);
// } finally {
// DBFUtils.close(reader);
// }
//
//
// }
// }
// Path: src/test/java/com/linuxense/javadbf/bug77/Bug77NoHeaderRecordTerminatorTest.java
import java.io.File;
import java.io.IOException;
import org.junit.Test;
import com.linuxense.javadbf.ReadDBFAssert;
package com.linuxense.javadbf.bug77;
public class Bug77NoHeaderRecordTerminatorTest {
public Bug77NoHeaderRecordTerminatorTest() {
super();
}
@Test
public void testReadCountriesNoTerminator() throws IOException {
// This file is original continents.dbf tunned by hand to reproduce the bug
File f = new File("src/test/resources/bug-77-no-header-record-terminator/continents_no_header_record_terminator.dbf"); | ReadDBFAssert.testReadDBFFile(f, 1, 7, false); |
albfernandez/javadbf | src/test/java/com/linuxense/javadbf/BinaryImageTest.java | // Path: src/test/java/com/linuxense/javadbf/testutils/AssertUtils.java
// public class AssertUtils {
//
// public static void assertColumnDefinition(DBFField field, String columnName, DBFDataType type, int length, int decimal) {
// Assert.assertEquals(columnName, field.getName());
// Assert.assertEquals(type, field.getType());
// Assert.assertEquals(length, field.getLength());
// Assert.assertEquals(decimal, field.getDecimalCount());
// }
//
// }
//
// Path: src/test/java/com/linuxense/javadbf/testutils/DbfToTxtTest.java
// public final class DbfToTxtTest {
//
// private DbfToTxtTest() {
// throw new AssertionError("no instances");
// }
//
// public static void export(DBFReader reader, File file) {
//
// PrintWriter writer = null;
// try {
// writer = new PrintWriter(file, "UTF-8");
// Object[] row = null;
//
// while ((row = reader.nextRecord()) != null) {
// for (Object o : row) {
// writer.print(o + ";");
// }
// writer.println("");
// }
// }
// catch (IOException e) {
// // nop
// }
// finally {
// DBFUtils.close(writer);
// }
// }
//
// public static void writeToConsole(File file) throws FileNotFoundException {
// DBFReader reader = null;
// try {
//
//
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
//
// // get the field count if you want for some reasons like the following
//
// int numberOfFields = reader.getFieldCount();
//
// // use this count to fetch all field information
// // if required
//
// for (int i = 0; i < numberOfFields; i++) {
//
// DBFField field = reader.getField(i);
//
// // // do something with it if you want
// // // refer the JavaDoc API reference for more details
// // //
// System.out.println(field.getType() + " (" + field.getLength() + ") "+ field.getName());
// }
//
// // Now, lets us start reading the rows
//
// Object[] rowObjects;
//
// int count = 0;
// System.out.println("-------------------");
//
//
// while ((rowObjects = reader.nextRecord()) != null) {
// count++;
// for (int i = 0; i < rowObjects.length; i++) {
// System.out.println(rowObjects[i]);
// }
// System.out.println("-------------------");
// }
// System.out.println(file.getName() + " count=" + count);
//
// // By now, we have iterated through all of the rows
// }
// finally {
// DBFUtils.close(reader);
// }
// }
//
// public static int parseFileCountRecords(File file) throws FileNotFoundException {
// DBFReader reader = null;
// int count=0;
// try {
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
// while(reader.nextRow() != null) {
// count++;
// }
// }
// finally {
// DBFUtils.close(reader);
// }
// return count;
// }
//
// public static void main(String[] args) throws Exception {
// File f = new File(args[0]);
// writeToConsole(f);
// }
// }
| import java.io.File;
import java.io.FileInputStream;
import org.junit.Assert;
import org.junit.Test;
import com.linuxense.javadbf.testutils.AssertUtils;
import com.linuxense.javadbf.testutils.DbfToTxtTest; | /*
(C) Copyright 2017 Alberto Fernández <infjaf@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
package com.linuxense.javadbf;
public class BinaryImageTest {
@Test
public void testBinaryImage() throws Exception {
File file = new File("src/test/resources/inventory.dbf");
DBFReader reader = null;
try {
reader = new DBFReader(new FileInputStream(file));
reader.setMemoFile(new File("src/test/resources/inventory.dbt"));
DBFHeader header = reader.getHeader();
Assert.assertNotNull(header);
Assert.assertEquals(6, header.fieldArray.length);
Assert.assertEquals(12, header.numberOfRecords);
DBFField[] fieldArray = header.fieldArray;
int i = 0;
| // Path: src/test/java/com/linuxense/javadbf/testutils/AssertUtils.java
// public class AssertUtils {
//
// public static void assertColumnDefinition(DBFField field, String columnName, DBFDataType type, int length, int decimal) {
// Assert.assertEquals(columnName, field.getName());
// Assert.assertEquals(type, field.getType());
// Assert.assertEquals(length, field.getLength());
// Assert.assertEquals(decimal, field.getDecimalCount());
// }
//
// }
//
// Path: src/test/java/com/linuxense/javadbf/testutils/DbfToTxtTest.java
// public final class DbfToTxtTest {
//
// private DbfToTxtTest() {
// throw new AssertionError("no instances");
// }
//
// public static void export(DBFReader reader, File file) {
//
// PrintWriter writer = null;
// try {
// writer = new PrintWriter(file, "UTF-8");
// Object[] row = null;
//
// while ((row = reader.nextRecord()) != null) {
// for (Object o : row) {
// writer.print(o + ";");
// }
// writer.println("");
// }
// }
// catch (IOException e) {
// // nop
// }
// finally {
// DBFUtils.close(writer);
// }
// }
//
// public static void writeToConsole(File file) throws FileNotFoundException {
// DBFReader reader = null;
// try {
//
//
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
//
// // get the field count if you want for some reasons like the following
//
// int numberOfFields = reader.getFieldCount();
//
// // use this count to fetch all field information
// // if required
//
// for (int i = 0; i < numberOfFields; i++) {
//
// DBFField field = reader.getField(i);
//
// // // do something with it if you want
// // // refer the JavaDoc API reference for more details
// // //
// System.out.println(field.getType() + " (" + field.getLength() + ") "+ field.getName());
// }
//
// // Now, lets us start reading the rows
//
// Object[] rowObjects;
//
// int count = 0;
// System.out.println("-------------------");
//
//
// while ((rowObjects = reader.nextRecord()) != null) {
// count++;
// for (int i = 0; i < rowObjects.length; i++) {
// System.out.println(rowObjects[i]);
// }
// System.out.println("-------------------");
// }
// System.out.println(file.getName() + " count=" + count);
//
// // By now, we have iterated through all of the rows
// }
// finally {
// DBFUtils.close(reader);
// }
// }
//
// public static int parseFileCountRecords(File file) throws FileNotFoundException {
// DBFReader reader = null;
// int count=0;
// try {
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
// while(reader.nextRow() != null) {
// count++;
// }
// }
// finally {
// DBFUtils.close(reader);
// }
// return count;
// }
//
// public static void main(String[] args) throws Exception {
// File f = new File(args[0]);
// writeToConsole(f);
// }
// }
// Path: src/test/java/com/linuxense/javadbf/BinaryImageTest.java
import java.io.File;
import java.io.FileInputStream;
import org.junit.Assert;
import org.junit.Test;
import com.linuxense.javadbf.testutils.AssertUtils;
import com.linuxense.javadbf.testutils.DbfToTxtTest;
/*
(C) Copyright 2017 Alberto Fernández <infjaf@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
package com.linuxense.javadbf;
public class BinaryImageTest {
@Test
public void testBinaryImage() throws Exception {
File file = new File("src/test/resources/inventory.dbf");
DBFReader reader = null;
try {
reader = new DBFReader(new FileInputStream(file));
reader.setMemoFile(new File("src/test/resources/inventory.dbt"));
DBFHeader header = reader.getHeader();
Assert.assertNotNull(header);
Assert.assertEquals(6, header.fieldArray.length);
Assert.assertEquals(12, header.numberOfRecords);
DBFField[] fieldArray = header.fieldArray;
int i = 0;
| AssertUtils.assertColumnDefinition(fieldArray[i++], "Item ID", DBFDataType.AUTOINCREMENT, 4, 0); |
albfernandez/javadbf | src/test/java/com/linuxense/javadbf/FixtureDBase30Test.java | // Path: src/test/java/com/linuxense/javadbf/testutils/AssertUtils.java
// public class AssertUtils {
//
// public static void assertColumnDefinition(DBFField field, String columnName, DBFDataType type, int length, int decimal) {
// Assert.assertEquals(columnName, field.getName());
// Assert.assertEquals(type, field.getType());
// Assert.assertEquals(length, field.getLength());
// Assert.assertEquals(decimal, field.getDecimalCount());
// }
//
// }
//
// Path: src/test/java/com/linuxense/javadbf/testutils/DbfToTxtTest.java
// public final class DbfToTxtTest {
//
// private DbfToTxtTest() {
// throw new AssertionError("no instances");
// }
//
// public static void export(DBFReader reader, File file) {
//
// PrintWriter writer = null;
// try {
// writer = new PrintWriter(file, "UTF-8");
// Object[] row = null;
//
// while ((row = reader.nextRecord()) != null) {
// for (Object o : row) {
// writer.print(o + ";");
// }
// writer.println("");
// }
// }
// catch (IOException e) {
// // nop
// }
// finally {
// DBFUtils.close(writer);
// }
// }
//
// public static void writeToConsole(File file) throws FileNotFoundException {
// DBFReader reader = null;
// try {
//
//
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
//
// // get the field count if you want for some reasons like the following
//
// int numberOfFields = reader.getFieldCount();
//
// // use this count to fetch all field information
// // if required
//
// for (int i = 0; i < numberOfFields; i++) {
//
// DBFField field = reader.getField(i);
//
// // // do something with it if you want
// // // refer the JavaDoc API reference for more details
// // //
// System.out.println(field.getType() + " (" + field.getLength() + ") "+ field.getName());
// }
//
// // Now, lets us start reading the rows
//
// Object[] rowObjects;
//
// int count = 0;
// System.out.println("-------------------");
//
//
// while ((rowObjects = reader.nextRecord()) != null) {
// count++;
// for (int i = 0; i < rowObjects.length; i++) {
// System.out.println(rowObjects[i]);
// }
// System.out.println("-------------------");
// }
// System.out.println(file.getName() + " count=" + count);
//
// // By now, we have iterated through all of the rows
// }
// finally {
// DBFUtils.close(reader);
// }
// }
//
// public static int parseFileCountRecords(File file) throws FileNotFoundException {
// DBFReader reader = null;
// int count=0;
// try {
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
// while(reader.nextRow() != null) {
// count++;
// }
// }
// finally {
// DBFUtils.close(reader);
// }
// return count;
// }
//
// public static void main(String[] args) throws Exception {
// File f = new File(args[0]);
// writeToConsole(f);
// }
// }
| import java.io.File;
import java.io.FileInputStream;
import org.junit.Assert;
import org.junit.Test;
import com.linuxense.javadbf.testutils.AssertUtils;
import com.linuxense.javadbf.testutils.DbfToTxtTest; | /*
(C) Copyright 2017 Alberto Fernández <infjaf@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
package com.linuxense.javadbf;
public class FixtureDBase30Test {
@Test
public void test30 () throws Exception {
File file = new File("src/test/resources/fixtures/dbase_30.dbf");
DBFReader reader = null;
try {
reader = new DBFReader(new FileInputStream(file));
DBFHeader header = reader.getHeader();
Assert.assertNotNull(header);
Assert.assertEquals(145, header.fieldArray.length);
Assert.assertEquals(34, header.numberOfRecords);
DBFField []fieldArray = header.fieldArray;
int i = 0;
| // Path: src/test/java/com/linuxense/javadbf/testutils/AssertUtils.java
// public class AssertUtils {
//
// public static void assertColumnDefinition(DBFField field, String columnName, DBFDataType type, int length, int decimal) {
// Assert.assertEquals(columnName, field.getName());
// Assert.assertEquals(type, field.getType());
// Assert.assertEquals(length, field.getLength());
// Assert.assertEquals(decimal, field.getDecimalCount());
// }
//
// }
//
// Path: src/test/java/com/linuxense/javadbf/testutils/DbfToTxtTest.java
// public final class DbfToTxtTest {
//
// private DbfToTxtTest() {
// throw new AssertionError("no instances");
// }
//
// public static void export(DBFReader reader, File file) {
//
// PrintWriter writer = null;
// try {
// writer = new PrintWriter(file, "UTF-8");
// Object[] row = null;
//
// while ((row = reader.nextRecord()) != null) {
// for (Object o : row) {
// writer.print(o + ";");
// }
// writer.println("");
// }
// }
// catch (IOException e) {
// // nop
// }
// finally {
// DBFUtils.close(writer);
// }
// }
//
// public static void writeToConsole(File file) throws FileNotFoundException {
// DBFReader reader = null;
// try {
//
//
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
//
// // get the field count if you want for some reasons like the following
//
// int numberOfFields = reader.getFieldCount();
//
// // use this count to fetch all field information
// // if required
//
// for (int i = 0; i < numberOfFields; i++) {
//
// DBFField field = reader.getField(i);
//
// // // do something with it if you want
// // // refer the JavaDoc API reference for more details
// // //
// System.out.println(field.getType() + " (" + field.getLength() + ") "+ field.getName());
// }
//
// // Now, lets us start reading the rows
//
// Object[] rowObjects;
//
// int count = 0;
// System.out.println("-------------------");
//
//
// while ((rowObjects = reader.nextRecord()) != null) {
// count++;
// for (int i = 0; i < rowObjects.length; i++) {
// System.out.println(rowObjects[i]);
// }
// System.out.println("-------------------");
// }
// System.out.println(file.getName() + " count=" + count);
//
// // By now, we have iterated through all of the rows
// }
// finally {
// DBFUtils.close(reader);
// }
// }
//
// public static int parseFileCountRecords(File file) throws FileNotFoundException {
// DBFReader reader = null;
// int count=0;
// try {
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
// while(reader.nextRow() != null) {
// count++;
// }
// }
// finally {
// DBFUtils.close(reader);
// }
// return count;
// }
//
// public static void main(String[] args) throws Exception {
// File f = new File(args[0]);
// writeToConsole(f);
// }
// }
// Path: src/test/java/com/linuxense/javadbf/FixtureDBase30Test.java
import java.io.File;
import java.io.FileInputStream;
import org.junit.Assert;
import org.junit.Test;
import com.linuxense.javadbf.testutils.AssertUtils;
import com.linuxense.javadbf.testutils.DbfToTxtTest;
/*
(C) Copyright 2017 Alberto Fernández <infjaf@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
package com.linuxense.javadbf;
public class FixtureDBase30Test {
@Test
public void test30 () throws Exception {
File file = new File("src/test/resources/fixtures/dbase_30.dbf");
DBFReader reader = null;
try {
reader = new DBFReader(new FileInputStream(file));
DBFHeader header = reader.getHeader();
Assert.assertNotNull(header);
Assert.assertEquals(145, header.fieldArray.length);
Assert.assertEquals(34, header.numberOfRecords);
DBFField []fieldArray = header.fieldArray;
int i = 0;
| AssertUtils.assertColumnDefinition(fieldArray[i++], "ACCESSNO", DBFDataType.fromCode((byte) 'C'), 15 , 0); |
albfernandez/javadbf | src/test/java/com/linuxense/javadbf/EncodingTest.java | // Path: src/test/java/com/linuxense/javadbf/mocks/NullOutputStream.java
// public class NullOutputStream extends OutputStream {
//
// private long count = 0;
//
//
// /**
// * Constructor
// */
// public NullOutputStream() {
// super();
// }
// /**
// * Does nothing - output to <code>/dev/null</code>.
// * @param b The bytes to write
// * @param off The start offset
// * @param len The number of bytes to write
// */
// @Override
// public void write(byte[] b, int off, int len) {
// this.count+= len;
// }
//
// /**
// * Does nothing - output to <code>/dev/null</code>.
// * @param b The byte to write
// */
// @Override
// public void write(int b) {
// this.count++;
// }
//
// /**
// * Does nothing - output to <code>/dev/null</code>.
// * @param b The bytes to write
// * @throws IOException never
// */
// @Override
// public void write(byte[] b) throws IOException {
// if (b != null) {
// this.count += b.length;
// }
// }
//
// public long getCount() {
// return this.count;
// }
//
// }
| import org.junit.Assert;
import org.junit.Test;
import com.linuxense.javadbf.mocks.NullOutputStream;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List; | DBFUtils.close(wr);
byte[] data = baos.toByteArray();
ByteArrayInputStream bais = new ByteArrayInputStream(data);
List<String> names = new ArrayList<String>();
reader = new DBFReader(bais);
reader.setCharset(StandardCharsets.UTF_8);
Object[] rowObject;
while ((rowObject = reader.nextRecord()) != null) {
names.add((String) rowObject[0]);
}
assertNotNull(names.get(0));
assertEquals("Simón", names.get(0).trim());
assertNotNull(names.get(1));
assertEquals("Julián", names.get(1).trim());
}
finally {
DBFUtils.close(reader);
DBFUtils.close(wr);
}
}
@Test
public void testSetEncoding() throws DBFException {
DBFWriter writer = null;
try { | // Path: src/test/java/com/linuxense/javadbf/mocks/NullOutputStream.java
// public class NullOutputStream extends OutputStream {
//
// private long count = 0;
//
//
// /**
// * Constructor
// */
// public NullOutputStream() {
// super();
// }
// /**
// * Does nothing - output to <code>/dev/null</code>.
// * @param b The bytes to write
// * @param off The start offset
// * @param len The number of bytes to write
// */
// @Override
// public void write(byte[] b, int off, int len) {
// this.count+= len;
// }
//
// /**
// * Does nothing - output to <code>/dev/null</code>.
// * @param b The byte to write
// */
// @Override
// public void write(int b) {
// this.count++;
// }
//
// /**
// * Does nothing - output to <code>/dev/null</code>.
// * @param b The bytes to write
// * @throws IOException never
// */
// @Override
// public void write(byte[] b) throws IOException {
// if (b != null) {
// this.count += b.length;
// }
// }
//
// public long getCount() {
// return this.count;
// }
//
// }
// Path: src/test/java/com/linuxense/javadbf/EncodingTest.java
import org.junit.Assert;
import org.junit.Test;
import com.linuxense.javadbf.mocks.NullOutputStream;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
DBFUtils.close(wr);
byte[] data = baos.toByteArray();
ByteArrayInputStream bais = new ByteArrayInputStream(data);
List<String> names = new ArrayList<String>();
reader = new DBFReader(bais);
reader.setCharset(StandardCharsets.UTF_8);
Object[] rowObject;
while ((rowObject = reader.nextRecord()) != null) {
names.add((String) rowObject[0]);
}
assertNotNull(names.get(0));
assertEquals("Simón", names.get(0).trim());
assertNotNull(names.get(1));
assertEquals("Julián", names.get(1).trim());
}
finally {
DBFUtils.close(reader);
DBFUtils.close(wr);
}
}
@Test
public void testSetEncoding() throws DBFException {
DBFWriter writer = null;
try { | writer = new DBFWriter(new NullOutputStream()); |
albfernandez/javadbf | src/test/java/com/linuxense/javadbf/FixtureDBase31Test.java | // Path: src/test/java/com/linuxense/javadbf/testutils/AssertUtils.java
// public class AssertUtils {
//
// public static void assertColumnDefinition(DBFField field, String columnName, DBFDataType type, int length, int decimal) {
// Assert.assertEquals(columnName, field.getName());
// Assert.assertEquals(type, field.getType());
// Assert.assertEquals(length, field.getLength());
// Assert.assertEquals(decimal, field.getDecimalCount());
// }
//
// }
//
// Path: src/test/java/com/linuxense/javadbf/testutils/DbfToTxtTest.java
// public final class DbfToTxtTest {
//
// private DbfToTxtTest() {
// throw new AssertionError("no instances");
// }
//
// public static void export(DBFReader reader, File file) {
//
// PrintWriter writer = null;
// try {
// writer = new PrintWriter(file, "UTF-8");
// Object[] row = null;
//
// while ((row = reader.nextRecord()) != null) {
// for (Object o : row) {
// writer.print(o + ";");
// }
// writer.println("");
// }
// }
// catch (IOException e) {
// // nop
// }
// finally {
// DBFUtils.close(writer);
// }
// }
//
// public static void writeToConsole(File file) throws FileNotFoundException {
// DBFReader reader = null;
// try {
//
//
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
//
// // get the field count if you want for some reasons like the following
//
// int numberOfFields = reader.getFieldCount();
//
// // use this count to fetch all field information
// // if required
//
// for (int i = 0; i < numberOfFields; i++) {
//
// DBFField field = reader.getField(i);
//
// // // do something with it if you want
// // // refer the JavaDoc API reference for more details
// // //
// System.out.println(field.getType() + " (" + field.getLength() + ") "+ field.getName());
// }
//
// // Now, lets us start reading the rows
//
// Object[] rowObjects;
//
// int count = 0;
// System.out.println("-------------------");
//
//
// while ((rowObjects = reader.nextRecord()) != null) {
// count++;
// for (int i = 0; i < rowObjects.length; i++) {
// System.out.println(rowObjects[i]);
// }
// System.out.println("-------------------");
// }
// System.out.println(file.getName() + " count=" + count);
//
// // By now, we have iterated through all of the rows
// }
// finally {
// DBFUtils.close(reader);
// }
// }
//
// public static int parseFileCountRecords(File file) throws FileNotFoundException {
// DBFReader reader = null;
// int count=0;
// try {
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
// while(reader.nextRow() != null) {
// count++;
// }
// }
// finally {
// DBFUtils.close(reader);
// }
// return count;
// }
//
// public static void main(String[] args) throws Exception {
// File f = new File(args[0]);
// writeToConsole(f);
// }
// }
| import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import org.junit.Assert;
import org.junit.Test;
import com.linuxense.javadbf.testutils.AssertUtils;
import com.linuxense.javadbf.testutils.DbfToTxtTest; | /*
(C) Copyright 2017 Alberto Fernández <infjaf@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
package com.linuxense.javadbf;
public class FixtureDBase31Test {
@Test
public void test31 () throws Exception {
File file = new File("src/test/resources/fixtures/dbase_31.dbf");
DBFReader reader = null;
try {
reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
DBFHeader header = reader.getHeader();
Assert.assertNotNull(header);
Assert.assertEquals(11, header.fieldArray.length);
Assert.assertEquals(77, header.numberOfRecords);
DBFField []fieldArray = header.fieldArray;
int i = 0;
| // Path: src/test/java/com/linuxense/javadbf/testutils/AssertUtils.java
// public class AssertUtils {
//
// public static void assertColumnDefinition(DBFField field, String columnName, DBFDataType type, int length, int decimal) {
// Assert.assertEquals(columnName, field.getName());
// Assert.assertEquals(type, field.getType());
// Assert.assertEquals(length, field.getLength());
// Assert.assertEquals(decimal, field.getDecimalCount());
// }
//
// }
//
// Path: src/test/java/com/linuxense/javadbf/testutils/DbfToTxtTest.java
// public final class DbfToTxtTest {
//
// private DbfToTxtTest() {
// throw new AssertionError("no instances");
// }
//
// public static void export(DBFReader reader, File file) {
//
// PrintWriter writer = null;
// try {
// writer = new PrintWriter(file, "UTF-8");
// Object[] row = null;
//
// while ((row = reader.nextRecord()) != null) {
// for (Object o : row) {
// writer.print(o + ";");
// }
// writer.println("");
// }
// }
// catch (IOException e) {
// // nop
// }
// finally {
// DBFUtils.close(writer);
// }
// }
//
// public static void writeToConsole(File file) throws FileNotFoundException {
// DBFReader reader = null;
// try {
//
//
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
//
// // get the field count if you want for some reasons like the following
//
// int numberOfFields = reader.getFieldCount();
//
// // use this count to fetch all field information
// // if required
//
// for (int i = 0; i < numberOfFields; i++) {
//
// DBFField field = reader.getField(i);
//
// // // do something with it if you want
// // // refer the JavaDoc API reference for more details
// // //
// System.out.println(field.getType() + " (" + field.getLength() + ") "+ field.getName());
// }
//
// // Now, lets us start reading the rows
//
// Object[] rowObjects;
//
// int count = 0;
// System.out.println("-------------------");
//
//
// while ((rowObjects = reader.nextRecord()) != null) {
// count++;
// for (int i = 0; i < rowObjects.length; i++) {
// System.out.println(rowObjects[i]);
// }
// System.out.println("-------------------");
// }
// System.out.println(file.getName() + " count=" + count);
//
// // By now, we have iterated through all of the rows
// }
// finally {
// DBFUtils.close(reader);
// }
// }
//
// public static int parseFileCountRecords(File file) throws FileNotFoundException {
// DBFReader reader = null;
// int count=0;
// try {
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
// while(reader.nextRow() != null) {
// count++;
// }
// }
// finally {
// DBFUtils.close(reader);
// }
// return count;
// }
//
// public static void main(String[] args) throws Exception {
// File f = new File(args[0]);
// writeToConsole(f);
// }
// }
// Path: src/test/java/com/linuxense/javadbf/FixtureDBase31Test.java
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import org.junit.Assert;
import org.junit.Test;
import com.linuxense.javadbf.testutils.AssertUtils;
import com.linuxense.javadbf.testutils.DbfToTxtTest;
/*
(C) Copyright 2017 Alberto Fernández <infjaf@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
package com.linuxense.javadbf;
public class FixtureDBase31Test {
@Test
public void test31 () throws Exception {
File file = new File("src/test/resources/fixtures/dbase_31.dbf");
DBFReader reader = null;
try {
reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
DBFHeader header = reader.getHeader();
Assert.assertNotNull(header);
Assert.assertEquals(11, header.fieldArray.length);
Assert.assertEquals(77, header.numberOfRecords);
DBFField []fieldArray = header.fieldArray;
int i = 0;
| AssertUtils.assertColumnDefinition(fieldArray[i++], "PRODUCTID", DBFDataType.fromCode((byte) 'I'), 4 ,0); |
albfernandez/javadbf | src/test/java/com/linuxense/javadbf/DBFWriterStreamTest.java | // Path: src/test/java/com/linuxense/javadbf/mocks/NullOutputStream.java
// public class NullOutputStream extends OutputStream {
//
// private long count = 0;
//
//
// /**
// * Constructor
// */
// public NullOutputStream() {
// super();
// }
// /**
// * Does nothing - output to <code>/dev/null</code>.
// * @param b The bytes to write
// * @param off The start offset
// * @param len The number of bytes to write
// */
// @Override
// public void write(byte[] b, int off, int len) {
// this.count+= len;
// }
//
// /**
// * Does nothing - output to <code>/dev/null</code>.
// * @param b The byte to write
// */
// @Override
// public void write(int b) {
// this.count++;
// }
//
// /**
// * Does nothing - output to <code>/dev/null</code>.
// * @param b The bytes to write
// * @throws IOException never
// */
// @Override
// public void write(byte[] b) throws IOException {
// if (b != null) {
// this.count += b.length;
// }
// }
//
// public long getCount() {
// return this.count;
// }
//
// }
| import java.io.IOException;
import java.util.Date;
import org.junit.Assert;
import org.junit.Test;
import com.linuxense.javadbf.mocks.NullOutputStream; | /*
(C) Copyright 2017 Alberto Fernández <infjaf@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
package com.linuxense.javadbf;
public class DBFWriterStreamTest {
@Test
public void testAllDataTypes() throws IOException { | // Path: src/test/java/com/linuxense/javadbf/mocks/NullOutputStream.java
// public class NullOutputStream extends OutputStream {
//
// private long count = 0;
//
//
// /**
// * Constructor
// */
// public NullOutputStream() {
// super();
// }
// /**
// * Does nothing - output to <code>/dev/null</code>.
// * @param b The bytes to write
// * @param off The start offset
// * @param len The number of bytes to write
// */
// @Override
// public void write(byte[] b, int off, int len) {
// this.count+= len;
// }
//
// /**
// * Does nothing - output to <code>/dev/null</code>.
// * @param b The byte to write
// */
// @Override
// public void write(int b) {
// this.count++;
// }
//
// /**
// * Does nothing - output to <code>/dev/null</code>.
// * @param b The bytes to write
// * @throws IOException never
// */
// @Override
// public void write(byte[] b) throws IOException {
// if (b != null) {
// this.count += b.length;
// }
// }
//
// public long getCount() {
// return this.count;
// }
//
// }
// Path: src/test/java/com/linuxense/javadbf/DBFWriterStreamTest.java
import java.io.IOException;
import java.util.Date;
import org.junit.Assert;
import org.junit.Test;
import com.linuxense.javadbf.mocks.NullOutputStream;
/*
(C) Copyright 2017 Alberto Fernández <infjaf@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
package com.linuxense.javadbf;
public class DBFWriterStreamTest {
@Test
public void testAllDataTypes() throws IOException { | NullOutputStream output = new NullOutputStream(); |
albfernandez/javadbf | src/test/java/com/linuxense/javadbf/NullFlagsTest.java | // Path: src/test/java/com/linuxense/javadbf/testutils/AssertUtils.java
// public class AssertUtils {
//
// public static void assertColumnDefinition(DBFField field, String columnName, DBFDataType type, int length, int decimal) {
// Assert.assertEquals(columnName, field.getName());
// Assert.assertEquals(type, field.getType());
// Assert.assertEquals(length, field.getLength());
// Assert.assertEquals(decimal, field.getDecimalCount());
// }
//
// }
//
// Path: src/test/java/com/linuxense/javadbf/testutils/DbfToTxtTest.java
// public final class DbfToTxtTest {
//
// private DbfToTxtTest() {
// throw new AssertionError("no instances");
// }
//
// public static void export(DBFReader reader, File file) {
//
// PrintWriter writer = null;
// try {
// writer = new PrintWriter(file, "UTF-8");
// Object[] row = null;
//
// while ((row = reader.nextRecord()) != null) {
// for (Object o : row) {
// writer.print(o + ";");
// }
// writer.println("");
// }
// }
// catch (IOException e) {
// // nop
// }
// finally {
// DBFUtils.close(writer);
// }
// }
//
// public static void writeToConsole(File file) throws FileNotFoundException {
// DBFReader reader = null;
// try {
//
//
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
//
// // get the field count if you want for some reasons like the following
//
// int numberOfFields = reader.getFieldCount();
//
// // use this count to fetch all field information
// // if required
//
// for (int i = 0; i < numberOfFields; i++) {
//
// DBFField field = reader.getField(i);
//
// // // do something with it if you want
// // // refer the JavaDoc API reference for more details
// // //
// System.out.println(field.getType() + " (" + field.getLength() + ") "+ field.getName());
// }
//
// // Now, lets us start reading the rows
//
// Object[] rowObjects;
//
// int count = 0;
// System.out.println("-------------------");
//
//
// while ((rowObjects = reader.nextRecord()) != null) {
// count++;
// for (int i = 0; i < rowObjects.length; i++) {
// System.out.println(rowObjects[i]);
// }
// System.out.println("-------------------");
// }
// System.out.println(file.getName() + " count=" + count);
//
// // By now, we have iterated through all of the rows
// }
// finally {
// DBFUtils.close(reader);
// }
// }
//
// public static int parseFileCountRecords(File file) throws FileNotFoundException {
// DBFReader reader = null;
// int count=0;
// try {
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
// while(reader.nextRow() != null) {
// count++;
// }
// }
// finally {
// DBFUtils.close(reader);
// }
// return count;
// }
//
// public static void main(String[] args) throws Exception {
// File f = new File(args[0]);
// writeToConsole(f);
// }
// }
| import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import org.junit.Assert;
import org.junit.Test;
import com.linuxense.javadbf.testutils.AssertUtils;
import com.linuxense.javadbf.testutils.DbfToTxtTest; | package com.linuxense.javadbf;
public class NullFlagsTest {
@Test
public void testNullFlags() throws Exception {
File file = new File("src/test/resources/fixtures/dbase_31.dbf");
DBFReader reader = null;
try {
reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
DBFHeader header = reader.getHeader();
Assert.assertNotNull(header);
Assert.assertEquals(11, header.fieldArray.length);
Assert.assertEquals(77, header.numberOfRecords);
DBFField []fieldArray = header.fieldArray;
int i = 0;
| // Path: src/test/java/com/linuxense/javadbf/testutils/AssertUtils.java
// public class AssertUtils {
//
// public static void assertColumnDefinition(DBFField field, String columnName, DBFDataType type, int length, int decimal) {
// Assert.assertEquals(columnName, field.getName());
// Assert.assertEquals(type, field.getType());
// Assert.assertEquals(length, field.getLength());
// Assert.assertEquals(decimal, field.getDecimalCount());
// }
//
// }
//
// Path: src/test/java/com/linuxense/javadbf/testutils/DbfToTxtTest.java
// public final class DbfToTxtTest {
//
// private DbfToTxtTest() {
// throw new AssertionError("no instances");
// }
//
// public static void export(DBFReader reader, File file) {
//
// PrintWriter writer = null;
// try {
// writer = new PrintWriter(file, "UTF-8");
// Object[] row = null;
//
// while ((row = reader.nextRecord()) != null) {
// for (Object o : row) {
// writer.print(o + ";");
// }
// writer.println("");
// }
// }
// catch (IOException e) {
// // nop
// }
// finally {
// DBFUtils.close(writer);
// }
// }
//
// public static void writeToConsole(File file) throws FileNotFoundException {
// DBFReader reader = null;
// try {
//
//
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
//
// // get the field count if you want for some reasons like the following
//
// int numberOfFields = reader.getFieldCount();
//
// // use this count to fetch all field information
// // if required
//
// for (int i = 0; i < numberOfFields; i++) {
//
// DBFField field = reader.getField(i);
//
// // // do something with it if you want
// // // refer the JavaDoc API reference for more details
// // //
// System.out.println(field.getType() + " (" + field.getLength() + ") "+ field.getName());
// }
//
// // Now, lets us start reading the rows
//
// Object[] rowObjects;
//
// int count = 0;
// System.out.println("-------------------");
//
//
// while ((rowObjects = reader.nextRecord()) != null) {
// count++;
// for (int i = 0; i < rowObjects.length; i++) {
// System.out.println(rowObjects[i]);
// }
// System.out.println("-------------------");
// }
// System.out.println(file.getName() + " count=" + count);
//
// // By now, we have iterated through all of the rows
// }
// finally {
// DBFUtils.close(reader);
// }
// }
//
// public static int parseFileCountRecords(File file) throws FileNotFoundException {
// DBFReader reader = null;
// int count=0;
// try {
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
// while(reader.nextRow() != null) {
// count++;
// }
// }
// finally {
// DBFUtils.close(reader);
// }
// return count;
// }
//
// public static void main(String[] args) throws Exception {
// File f = new File(args[0]);
// writeToConsole(f);
// }
// }
// Path: src/test/java/com/linuxense/javadbf/NullFlagsTest.java
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import org.junit.Assert;
import org.junit.Test;
import com.linuxense.javadbf.testutils.AssertUtils;
import com.linuxense.javadbf.testutils.DbfToTxtTest;
package com.linuxense.javadbf;
public class NullFlagsTest {
@Test
public void testNullFlags() throws Exception {
File file = new File("src/test/resources/fixtures/dbase_31.dbf");
DBFReader reader = null;
try {
reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
DBFHeader header = reader.getHeader();
Assert.assertNotNull(header);
Assert.assertEquals(11, header.fieldArray.length);
Assert.assertEquals(77, header.numberOfRecords);
DBFField []fieldArray = header.fieldArray;
int i = 0;
| AssertUtils.assertColumnDefinition(fieldArray[i++], "PRODUCTID", DBFDataType.fromCode((byte) 'I'), 4 ,0); |
albfernandez/javadbf | src/test/java/com/linuxense/javadbf/NullFlagsTest.java | // Path: src/test/java/com/linuxense/javadbf/testutils/AssertUtils.java
// public class AssertUtils {
//
// public static void assertColumnDefinition(DBFField field, String columnName, DBFDataType type, int length, int decimal) {
// Assert.assertEquals(columnName, field.getName());
// Assert.assertEquals(type, field.getType());
// Assert.assertEquals(length, field.getLength());
// Assert.assertEquals(decimal, field.getDecimalCount());
// }
//
// }
//
// Path: src/test/java/com/linuxense/javadbf/testutils/DbfToTxtTest.java
// public final class DbfToTxtTest {
//
// private DbfToTxtTest() {
// throw new AssertionError("no instances");
// }
//
// public static void export(DBFReader reader, File file) {
//
// PrintWriter writer = null;
// try {
// writer = new PrintWriter(file, "UTF-8");
// Object[] row = null;
//
// while ((row = reader.nextRecord()) != null) {
// for (Object o : row) {
// writer.print(o + ";");
// }
// writer.println("");
// }
// }
// catch (IOException e) {
// // nop
// }
// finally {
// DBFUtils.close(writer);
// }
// }
//
// public static void writeToConsole(File file) throws FileNotFoundException {
// DBFReader reader = null;
// try {
//
//
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
//
// // get the field count if you want for some reasons like the following
//
// int numberOfFields = reader.getFieldCount();
//
// // use this count to fetch all field information
// // if required
//
// for (int i = 0; i < numberOfFields; i++) {
//
// DBFField field = reader.getField(i);
//
// // // do something with it if you want
// // // refer the JavaDoc API reference for more details
// // //
// System.out.println(field.getType() + " (" + field.getLength() + ") "+ field.getName());
// }
//
// // Now, lets us start reading the rows
//
// Object[] rowObjects;
//
// int count = 0;
// System.out.println("-------------------");
//
//
// while ((rowObjects = reader.nextRecord()) != null) {
// count++;
// for (int i = 0; i < rowObjects.length; i++) {
// System.out.println(rowObjects[i]);
// }
// System.out.println("-------------------");
// }
// System.out.println(file.getName() + " count=" + count);
//
// // By now, we have iterated through all of the rows
// }
// finally {
// DBFUtils.close(reader);
// }
// }
//
// public static int parseFileCountRecords(File file) throws FileNotFoundException {
// DBFReader reader = null;
// int count=0;
// try {
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
// while(reader.nextRow() != null) {
// count++;
// }
// }
// finally {
// DBFUtils.close(reader);
// }
// return count;
// }
//
// public static void main(String[] args) throws Exception {
// File f = new File(args[0]);
// writeToConsole(f);
// }
// }
| import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import org.junit.Assert;
import org.junit.Test;
import com.linuxense.javadbf.testutils.AssertUtils;
import com.linuxense.javadbf.testutils.DbfToTxtTest; | AssertUtils.assertColumnDefinition(fieldArray[i++], "PRODUCTNAM", DBFDataType.fromCode((byte) 'C'), 40 ,0);
AssertUtils.assertColumnDefinition(fieldArray[i++], "SUPPLIERID", DBFDataType.fromCode((byte) 'I'), 4 ,0);
AssertUtils.assertColumnDefinition(fieldArray[i++], "CATEGORYID", DBFDataType.fromCode((byte) 'I'), 4 ,0);
AssertUtils.assertColumnDefinition(fieldArray[i++], "QUANTITYPE", DBFDataType.fromCode((byte) 'C'), 20 ,0);
AssertUtils.assertColumnDefinition(fieldArray[i++], "UNITPRICE", DBFDataType.fromCode((byte) 'Y'), 8 ,4);
AssertUtils.assertColumnDefinition(fieldArray[i++], "UNITSINSTO", DBFDataType.fromCode((byte) 'I'), 4 ,0);
AssertUtils.assertColumnDefinition(fieldArray[i++], "UNITSONORD", DBFDataType.fromCode((byte) 'I'), 4 ,0);
AssertUtils.assertColumnDefinition(fieldArray[i++], "REORDERLEV", DBFDataType.fromCode((byte) 'I'), 4 ,0);
AssertUtils.assertColumnDefinition(fieldArray[i++], "DISCONTINU", DBFDataType.fromCode((byte) 'L'), 1 ,0);
AssertUtils.assertColumnDefinition(fieldArray[i++], "_NullFlags", DBFDataType.NULL_FLAGS, 1 ,0);
DBFField nullFlagsField = fieldArray[fieldArray.length -1];
Assert.assertTrue(nullFlagsField.isSystem());
Assert.assertEquals(10, reader.getFieldCount());
// for (DBFField field: fieldArray) {
// System.out.println(field.getName() + ":" + field.isNullable()+ ":" + field.isSystem() + ":" + field.isBinary());
// }
Object[] row = null;
while ((row = reader.nextRecord()) != null) {
Assert.assertEquals(10, row.length);
// Object o = row[row.length-1];
// System.out.println(o);
}
| // Path: src/test/java/com/linuxense/javadbf/testutils/AssertUtils.java
// public class AssertUtils {
//
// public static void assertColumnDefinition(DBFField field, String columnName, DBFDataType type, int length, int decimal) {
// Assert.assertEquals(columnName, field.getName());
// Assert.assertEquals(type, field.getType());
// Assert.assertEquals(length, field.getLength());
// Assert.assertEquals(decimal, field.getDecimalCount());
// }
//
// }
//
// Path: src/test/java/com/linuxense/javadbf/testutils/DbfToTxtTest.java
// public final class DbfToTxtTest {
//
// private DbfToTxtTest() {
// throw new AssertionError("no instances");
// }
//
// public static void export(DBFReader reader, File file) {
//
// PrintWriter writer = null;
// try {
// writer = new PrintWriter(file, "UTF-8");
// Object[] row = null;
//
// while ((row = reader.nextRecord()) != null) {
// for (Object o : row) {
// writer.print(o + ";");
// }
// writer.println("");
// }
// }
// catch (IOException e) {
// // nop
// }
// finally {
// DBFUtils.close(writer);
// }
// }
//
// public static void writeToConsole(File file) throws FileNotFoundException {
// DBFReader reader = null;
// try {
//
//
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
//
// // get the field count if you want for some reasons like the following
//
// int numberOfFields = reader.getFieldCount();
//
// // use this count to fetch all field information
// // if required
//
// for (int i = 0; i < numberOfFields; i++) {
//
// DBFField field = reader.getField(i);
//
// // // do something with it if you want
// // // refer the JavaDoc API reference for more details
// // //
// System.out.println(field.getType() + " (" + field.getLength() + ") "+ field.getName());
// }
//
// // Now, lets us start reading the rows
//
// Object[] rowObjects;
//
// int count = 0;
// System.out.println("-------------------");
//
//
// while ((rowObjects = reader.nextRecord()) != null) {
// count++;
// for (int i = 0; i < rowObjects.length; i++) {
// System.out.println(rowObjects[i]);
// }
// System.out.println("-------------------");
// }
// System.out.println(file.getName() + " count=" + count);
//
// // By now, we have iterated through all of the rows
// }
// finally {
// DBFUtils.close(reader);
// }
// }
//
// public static int parseFileCountRecords(File file) throws FileNotFoundException {
// DBFReader reader = null;
// int count=0;
// try {
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
// while(reader.nextRow() != null) {
// count++;
// }
// }
// finally {
// DBFUtils.close(reader);
// }
// return count;
// }
//
// public static void main(String[] args) throws Exception {
// File f = new File(args[0]);
// writeToConsole(f);
// }
// }
// Path: src/test/java/com/linuxense/javadbf/NullFlagsTest.java
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import org.junit.Assert;
import org.junit.Test;
import com.linuxense.javadbf.testutils.AssertUtils;
import com.linuxense.javadbf.testutils.DbfToTxtTest;
AssertUtils.assertColumnDefinition(fieldArray[i++], "PRODUCTNAM", DBFDataType.fromCode((byte) 'C'), 40 ,0);
AssertUtils.assertColumnDefinition(fieldArray[i++], "SUPPLIERID", DBFDataType.fromCode((byte) 'I'), 4 ,0);
AssertUtils.assertColumnDefinition(fieldArray[i++], "CATEGORYID", DBFDataType.fromCode((byte) 'I'), 4 ,0);
AssertUtils.assertColumnDefinition(fieldArray[i++], "QUANTITYPE", DBFDataType.fromCode((byte) 'C'), 20 ,0);
AssertUtils.assertColumnDefinition(fieldArray[i++], "UNITPRICE", DBFDataType.fromCode((byte) 'Y'), 8 ,4);
AssertUtils.assertColumnDefinition(fieldArray[i++], "UNITSINSTO", DBFDataType.fromCode((byte) 'I'), 4 ,0);
AssertUtils.assertColumnDefinition(fieldArray[i++], "UNITSONORD", DBFDataType.fromCode((byte) 'I'), 4 ,0);
AssertUtils.assertColumnDefinition(fieldArray[i++], "REORDERLEV", DBFDataType.fromCode((byte) 'I'), 4 ,0);
AssertUtils.assertColumnDefinition(fieldArray[i++], "DISCONTINU", DBFDataType.fromCode((byte) 'L'), 1 ,0);
AssertUtils.assertColumnDefinition(fieldArray[i++], "_NullFlags", DBFDataType.NULL_FLAGS, 1 ,0);
DBFField nullFlagsField = fieldArray[fieldArray.length -1];
Assert.assertTrue(nullFlagsField.isSystem());
Assert.assertEquals(10, reader.getFieldCount());
// for (DBFField field: fieldArray) {
// System.out.println(field.getName() + ":" + field.isNullable()+ ":" + field.isSystem() + ":" + field.isBinary());
// }
Object[] row = null;
while ((row = reader.nextRecord()) != null) {
Assert.assertEquals(10, row.length);
// Object o = row[row.length-1];
// System.out.println(o);
}
| DbfToTxtTest.export(reader, File.createTempFile("javadbf-test", ".txt")); |
albfernandez/javadbf | src/test/java/com/linuxense/javadbf/DBFReaderTest.java | // Path: src/test/java/com/linuxense/javadbf/mocks/FailInputStream.java
// public class FailInputStream extends InputStream{
//
// @Override
// public int read() throws IOException {
// throw new IOException ("fail to read");
// }
//
// }
| import static org.junit.Assert.assertNull;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import org.junit.Assert;
import org.junit.Test;
import com.linuxense.javadbf.mocks.FailInputStream; | "TOPIC_ID\n" +
"COPYRIGHT_\n" +
"ISBN_NUMBE\n" +
"PUBLISHER_\n" +
"PURCHASE_P\n" +
"COVERTYPE\n" +
"DATE_PURCH\n" +
"PAGES\n" +
"NOTES\n";
Assert.assertEquals(expected, reader.toString());
}
finally {
DBFUtils.close(reader);
}
}
@Test
public void testReadBooksAddedDeleteField() throws IOException {
ReadDBFAssert.testReadDBFFile("books", 12, 10, true);
}
@Test
public void testReadDBFFileDeletedRecords() throws IOException {
ReadDBFAssert.testReadDBFFileDeletedRecords("test_delete",3,1);
}
@Test(expected=DBFException.class)
public void testFailStream() throws DBFException, IOException{
DBFReader reader = null;
try { | // Path: src/test/java/com/linuxense/javadbf/mocks/FailInputStream.java
// public class FailInputStream extends InputStream{
//
// @Override
// public int read() throws IOException {
// throw new IOException ("fail to read");
// }
//
// }
// Path: src/test/java/com/linuxense/javadbf/DBFReaderTest.java
import static org.junit.Assert.assertNull;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import org.junit.Assert;
import org.junit.Test;
import com.linuxense.javadbf.mocks.FailInputStream;
"TOPIC_ID\n" +
"COPYRIGHT_\n" +
"ISBN_NUMBE\n" +
"PUBLISHER_\n" +
"PURCHASE_P\n" +
"COVERTYPE\n" +
"DATE_PURCH\n" +
"PAGES\n" +
"NOTES\n";
Assert.assertEquals(expected, reader.toString());
}
finally {
DBFUtils.close(reader);
}
}
@Test
public void testReadBooksAddedDeleteField() throws IOException {
ReadDBFAssert.testReadDBFFile("books", 12, 10, true);
}
@Test
public void testReadDBFFileDeletedRecords() throws IOException {
ReadDBFAssert.testReadDBFFileDeletedRecords("test_delete",3,1);
}
@Test(expected=DBFException.class)
public void testFailStream() throws DBFException, IOException{
DBFReader reader = null;
try { | reader = new DBFReader(new FailInputStream()); |
albfernandez/javadbf | src/test/java/com/linuxense/javadbf/FixtureDBase03Test.java | // Path: src/test/java/com/linuxense/javadbf/testutils/AssertUtils.java
// public class AssertUtils {
//
// public static void assertColumnDefinition(DBFField field, String columnName, DBFDataType type, int length, int decimal) {
// Assert.assertEquals(columnName, field.getName());
// Assert.assertEquals(type, field.getType());
// Assert.assertEquals(length, field.getLength());
// Assert.assertEquals(decimal, field.getDecimalCount());
// }
//
// }
//
// Path: src/test/java/com/linuxense/javadbf/testutils/DbfToTxtTest.java
// public final class DbfToTxtTest {
//
// private DbfToTxtTest() {
// throw new AssertionError("no instances");
// }
//
// public static void export(DBFReader reader, File file) {
//
// PrintWriter writer = null;
// try {
// writer = new PrintWriter(file, "UTF-8");
// Object[] row = null;
//
// while ((row = reader.nextRecord()) != null) {
// for (Object o : row) {
// writer.print(o + ";");
// }
// writer.println("");
// }
// }
// catch (IOException e) {
// // nop
// }
// finally {
// DBFUtils.close(writer);
// }
// }
//
// public static void writeToConsole(File file) throws FileNotFoundException {
// DBFReader reader = null;
// try {
//
//
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
//
// // get the field count if you want for some reasons like the following
//
// int numberOfFields = reader.getFieldCount();
//
// // use this count to fetch all field information
// // if required
//
// for (int i = 0; i < numberOfFields; i++) {
//
// DBFField field = reader.getField(i);
//
// // // do something with it if you want
// // // refer the JavaDoc API reference for more details
// // //
// System.out.println(field.getType() + " (" + field.getLength() + ") "+ field.getName());
// }
//
// // Now, lets us start reading the rows
//
// Object[] rowObjects;
//
// int count = 0;
// System.out.println("-------------------");
//
//
// while ((rowObjects = reader.nextRecord()) != null) {
// count++;
// for (int i = 0; i < rowObjects.length; i++) {
// System.out.println(rowObjects[i]);
// }
// System.out.println("-------------------");
// }
// System.out.println(file.getName() + " count=" + count);
//
// // By now, we have iterated through all of the rows
// }
// finally {
// DBFUtils.close(reader);
// }
// }
//
// public static int parseFileCountRecords(File file) throws FileNotFoundException {
// DBFReader reader = null;
// int count=0;
// try {
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
// while(reader.nextRow() != null) {
// count++;
// }
// }
// finally {
// DBFUtils.close(reader);
// }
// return count;
// }
//
// public static void main(String[] args) throws Exception {
// File f = new File(args[0]);
// writeToConsole(f);
// }
// }
| import java.io.File;
import java.io.FileInputStream;
import org.junit.Assert;
import org.junit.Test;
import com.linuxense.javadbf.testutils.AssertUtils;
import com.linuxense.javadbf.testutils.DbfToTxtTest; | /*
(C) Copyright 2017 Alberto Fernández <infjaf@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
package com.linuxense.javadbf;
public class FixtureDBase03Test {
@Test
public void test8b() throws Exception {
File file = new File("src/test/resources/fixtures/dbase_03.dbf");
DBFReader reader = null;
try {
reader = new DBFReader(new FileInputStream(file));
DBFHeader header = reader.getHeader();
Assert.assertNotNull(header);
Assert.assertEquals(31, header.fieldArray.length);
Assert.assertEquals(14, header.numberOfRecords);
DBFField []fieldArray = header.fieldArray;
int i = 0;
| // Path: src/test/java/com/linuxense/javadbf/testutils/AssertUtils.java
// public class AssertUtils {
//
// public static void assertColumnDefinition(DBFField field, String columnName, DBFDataType type, int length, int decimal) {
// Assert.assertEquals(columnName, field.getName());
// Assert.assertEquals(type, field.getType());
// Assert.assertEquals(length, field.getLength());
// Assert.assertEquals(decimal, field.getDecimalCount());
// }
//
// }
//
// Path: src/test/java/com/linuxense/javadbf/testutils/DbfToTxtTest.java
// public final class DbfToTxtTest {
//
// private DbfToTxtTest() {
// throw new AssertionError("no instances");
// }
//
// public static void export(DBFReader reader, File file) {
//
// PrintWriter writer = null;
// try {
// writer = new PrintWriter(file, "UTF-8");
// Object[] row = null;
//
// while ((row = reader.nextRecord()) != null) {
// for (Object o : row) {
// writer.print(o + ";");
// }
// writer.println("");
// }
// }
// catch (IOException e) {
// // nop
// }
// finally {
// DBFUtils.close(writer);
// }
// }
//
// public static void writeToConsole(File file) throws FileNotFoundException {
// DBFReader reader = null;
// try {
//
//
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
//
// // get the field count if you want for some reasons like the following
//
// int numberOfFields = reader.getFieldCount();
//
// // use this count to fetch all field information
// // if required
//
// for (int i = 0; i < numberOfFields; i++) {
//
// DBFField field = reader.getField(i);
//
// // // do something with it if you want
// // // refer the JavaDoc API reference for more details
// // //
// System.out.println(field.getType() + " (" + field.getLength() + ") "+ field.getName());
// }
//
// // Now, lets us start reading the rows
//
// Object[] rowObjects;
//
// int count = 0;
// System.out.println("-------------------");
//
//
// while ((rowObjects = reader.nextRecord()) != null) {
// count++;
// for (int i = 0; i < rowObjects.length; i++) {
// System.out.println(rowObjects[i]);
// }
// System.out.println("-------------------");
// }
// System.out.println(file.getName() + " count=" + count);
//
// // By now, we have iterated through all of the rows
// }
// finally {
// DBFUtils.close(reader);
// }
// }
//
// public static int parseFileCountRecords(File file) throws FileNotFoundException {
// DBFReader reader = null;
// int count=0;
// try {
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
// while(reader.nextRow() != null) {
// count++;
// }
// }
// finally {
// DBFUtils.close(reader);
// }
// return count;
// }
//
// public static void main(String[] args) throws Exception {
// File f = new File(args[0]);
// writeToConsole(f);
// }
// }
// Path: src/test/java/com/linuxense/javadbf/FixtureDBase03Test.java
import java.io.File;
import java.io.FileInputStream;
import org.junit.Assert;
import org.junit.Test;
import com.linuxense.javadbf.testutils.AssertUtils;
import com.linuxense.javadbf.testutils.DbfToTxtTest;
/*
(C) Copyright 2017 Alberto Fernández <infjaf@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
package com.linuxense.javadbf;
public class FixtureDBase03Test {
@Test
public void test8b() throws Exception {
File file = new File("src/test/resources/fixtures/dbase_03.dbf");
DBFReader reader = null;
try {
reader = new DBFReader(new FileInputStream(file));
DBFHeader header = reader.getHeader();
Assert.assertNotNull(header);
Assert.assertEquals(31, header.fieldArray.length);
Assert.assertEquals(14, header.numberOfRecords);
DBFField []fieldArray = header.fieldArray;
int i = 0;
| AssertUtils.assertColumnDefinition(fieldArray[i++], "Point_ID" , DBFDataType.fromCode((byte) 'C'), 12, 0); |
albfernandez/javadbf | src/test/java/com/linuxense/javadbf/FixtureDBase7Test.java | // Path: src/test/java/com/linuxense/javadbf/testutils/DateUtils.java
// public static Date createDate(int year, int month, int day) {
// Calendar c = Calendar.getInstance();
// c.set(Calendar.YEAR, year);
// c.set(Calendar.MONTH, month - 1);
// c.set(Calendar.DAY_OF_MONTH, day);
// c.set(Calendar.HOUR_OF_DAY, 0);
// c.set(Calendar.MINUTE, 0);
// c.set(Calendar.SECOND, 0);
// c.set(Calendar.MILLISECOND, 0);
// return c.getTime();
// }
//
// Path: src/test/java/com/linuxense/javadbf/testutils/AssertUtils.java
// public class AssertUtils {
//
// public static void assertColumnDefinition(DBFField field, String columnName, DBFDataType type, int length, int decimal) {
// Assert.assertEquals(columnName, field.getName());
// Assert.assertEquals(type, field.getType());
// Assert.assertEquals(length, field.getLength());
// Assert.assertEquals(decimal, field.getDecimalCount());
// }
//
// }
| import static com.linuxense.javadbf.testutils.DateUtils.createDate;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import org.junit.Assert;
import org.junit.Test;
import com.linuxense.javadbf.testutils.AssertUtils; | /*
(C) Copyright 2017 Alberto Fernández <infjaf@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
package com.linuxense.javadbf;
public class FixtureDBase7Test {
@Test
public void test7 () throws Exception {
File file = new File("src/test/resources/fixtures/dbase_7.dbf");
DBFReader reader = null;
try {
reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
DBFHeader header = reader.getHeader();
Assert.assertNotNull(header);
Assert.assertEquals(4, header.fieldArray.length);
Assert.assertEquals(3, header.numberOfRecords);
DBFField []fieldArray = header.fieldArray; | // Path: src/test/java/com/linuxense/javadbf/testutils/DateUtils.java
// public static Date createDate(int year, int month, int day) {
// Calendar c = Calendar.getInstance();
// c.set(Calendar.YEAR, year);
// c.set(Calendar.MONTH, month - 1);
// c.set(Calendar.DAY_OF_MONTH, day);
// c.set(Calendar.HOUR_OF_DAY, 0);
// c.set(Calendar.MINUTE, 0);
// c.set(Calendar.SECOND, 0);
// c.set(Calendar.MILLISECOND, 0);
// return c.getTime();
// }
//
// Path: src/test/java/com/linuxense/javadbf/testutils/AssertUtils.java
// public class AssertUtils {
//
// public static void assertColumnDefinition(DBFField field, String columnName, DBFDataType type, int length, int decimal) {
// Assert.assertEquals(columnName, field.getName());
// Assert.assertEquals(type, field.getType());
// Assert.assertEquals(length, field.getLength());
// Assert.assertEquals(decimal, field.getDecimalCount());
// }
//
// }
// Path: src/test/java/com/linuxense/javadbf/FixtureDBase7Test.java
import static com.linuxense.javadbf.testutils.DateUtils.createDate;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import org.junit.Assert;
import org.junit.Test;
import com.linuxense.javadbf.testutils.AssertUtils;
/*
(C) Copyright 2017 Alberto Fernández <infjaf@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
package com.linuxense.javadbf;
public class FixtureDBase7Test {
@Test
public void test7 () throws Exception {
File file = new File("src/test/resources/fixtures/dbase_7.dbf");
DBFReader reader = null;
try {
reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
DBFHeader header = reader.getHeader();
Assert.assertNotNull(header);
Assert.assertEquals(4, header.fieldArray.length);
Assert.assertEquals(3, header.numberOfRecords);
DBFField []fieldArray = header.fieldArray; | AssertUtils.assertColumnDefinition(fieldArray[0], "ACTION", DBFDataType.MEMO, 10, 0); |
albfernandez/javadbf | src/test/java/com/linuxense/javadbf/FixtureDBase7Test.java | // Path: src/test/java/com/linuxense/javadbf/testutils/DateUtils.java
// public static Date createDate(int year, int month, int day) {
// Calendar c = Calendar.getInstance();
// c.set(Calendar.YEAR, year);
// c.set(Calendar.MONTH, month - 1);
// c.set(Calendar.DAY_OF_MONTH, day);
// c.set(Calendar.HOUR_OF_DAY, 0);
// c.set(Calendar.MINUTE, 0);
// c.set(Calendar.SECOND, 0);
// c.set(Calendar.MILLISECOND, 0);
// return c.getTime();
// }
//
// Path: src/test/java/com/linuxense/javadbf/testutils/AssertUtils.java
// public class AssertUtils {
//
// public static void assertColumnDefinition(DBFField field, String columnName, DBFDataType type, int length, int decimal) {
// Assert.assertEquals(columnName, field.getName());
// Assert.assertEquals(type, field.getType());
// Assert.assertEquals(length, field.getLength());
// Assert.assertEquals(decimal, field.getDecimalCount());
// }
//
// }
| import static com.linuxense.javadbf.testutils.DateUtils.createDate;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import org.junit.Assert;
import org.junit.Test;
import com.linuxense.javadbf.testutils.AssertUtils; | /*
(C) Copyright 2017 Alberto Fernández <infjaf@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
package com.linuxense.javadbf;
public class FixtureDBase7Test {
@Test
public void test7 () throws Exception {
File file = new File("src/test/resources/fixtures/dbase_7.dbf");
DBFReader reader = null;
try {
reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
DBFHeader header = reader.getHeader();
Assert.assertNotNull(header);
Assert.assertEquals(4, header.fieldArray.length);
Assert.assertEquals(3, header.numberOfRecords);
DBFField []fieldArray = header.fieldArray;
AssertUtils.assertColumnDefinition(fieldArray[0], "ACTION", DBFDataType.MEMO, 10, 0);
AssertUtils.assertColumnDefinition(fieldArray[1], "DATE", DBFDataType.DATE, 8, 0);
AssertUtils.assertColumnDefinition(fieldArray[2], "USER", DBFDataType.CHARACTER, 20, 0);
AssertUtils.assertColumnDefinition(fieldArray[3], "ID", DBFDataType.CHARACTER, 12, 0);
Object[] row = null;
row = reader.nextRecord(); | // Path: src/test/java/com/linuxense/javadbf/testutils/DateUtils.java
// public static Date createDate(int year, int month, int day) {
// Calendar c = Calendar.getInstance();
// c.set(Calendar.YEAR, year);
// c.set(Calendar.MONTH, month - 1);
// c.set(Calendar.DAY_OF_MONTH, day);
// c.set(Calendar.HOUR_OF_DAY, 0);
// c.set(Calendar.MINUTE, 0);
// c.set(Calendar.SECOND, 0);
// c.set(Calendar.MILLISECOND, 0);
// return c.getTime();
// }
//
// Path: src/test/java/com/linuxense/javadbf/testutils/AssertUtils.java
// public class AssertUtils {
//
// public static void assertColumnDefinition(DBFField field, String columnName, DBFDataType type, int length, int decimal) {
// Assert.assertEquals(columnName, field.getName());
// Assert.assertEquals(type, field.getType());
// Assert.assertEquals(length, field.getLength());
// Assert.assertEquals(decimal, field.getDecimalCount());
// }
//
// }
// Path: src/test/java/com/linuxense/javadbf/FixtureDBase7Test.java
import static com.linuxense.javadbf.testutils.DateUtils.createDate;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import org.junit.Assert;
import org.junit.Test;
import com.linuxense.javadbf.testutils.AssertUtils;
/*
(C) Copyright 2017 Alberto Fernández <infjaf@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
package com.linuxense.javadbf;
public class FixtureDBase7Test {
@Test
public void test7 () throws Exception {
File file = new File("src/test/resources/fixtures/dbase_7.dbf");
DBFReader reader = null;
try {
reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
DBFHeader header = reader.getHeader();
Assert.assertNotNull(header);
Assert.assertEquals(4, header.fieldArray.length);
Assert.assertEquals(3, header.numberOfRecords);
DBFField []fieldArray = header.fieldArray;
AssertUtils.assertColumnDefinition(fieldArray[0], "ACTION", DBFDataType.MEMO, 10, 0);
AssertUtils.assertColumnDefinition(fieldArray[1], "DATE", DBFDataType.DATE, 8, 0);
AssertUtils.assertColumnDefinition(fieldArray[2], "USER", DBFDataType.CHARACTER, 20, 0);
AssertUtils.assertColumnDefinition(fieldArray[3], "ID", DBFDataType.CHARACTER, 12, 0);
Object[] row = null;
row = reader.nextRecord(); | Assert.assertEquals(createDate(2015,2,23), row[1]); |
albfernandez/javadbf | src/test/java/com/linuxense/javadbf/FixtureDBase83Test.java | // Path: src/test/java/com/linuxense/javadbf/testutils/AssertUtils.java
// public class AssertUtils {
//
// public static void assertColumnDefinition(DBFField field, String columnName, DBFDataType type, int length, int decimal) {
// Assert.assertEquals(columnName, field.getName());
// Assert.assertEquals(type, field.getType());
// Assert.assertEquals(length, field.getLength());
// Assert.assertEquals(decimal, field.getDecimalCount());
// }
//
// }
//
// Path: src/test/java/com/linuxense/javadbf/testutils/DbfToTxtTest.java
// public final class DbfToTxtTest {
//
// private DbfToTxtTest() {
// throw new AssertionError("no instances");
// }
//
// public static void export(DBFReader reader, File file) {
//
// PrintWriter writer = null;
// try {
// writer = new PrintWriter(file, "UTF-8");
// Object[] row = null;
//
// while ((row = reader.nextRecord()) != null) {
// for (Object o : row) {
// writer.print(o + ";");
// }
// writer.println("");
// }
// }
// catch (IOException e) {
// // nop
// }
// finally {
// DBFUtils.close(writer);
// }
// }
//
// public static void writeToConsole(File file) throws FileNotFoundException {
// DBFReader reader = null;
// try {
//
//
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
//
// // get the field count if you want for some reasons like the following
//
// int numberOfFields = reader.getFieldCount();
//
// // use this count to fetch all field information
// // if required
//
// for (int i = 0; i < numberOfFields; i++) {
//
// DBFField field = reader.getField(i);
//
// // // do something with it if you want
// // // refer the JavaDoc API reference for more details
// // //
// System.out.println(field.getType() + " (" + field.getLength() + ") "+ field.getName());
// }
//
// // Now, lets us start reading the rows
//
// Object[] rowObjects;
//
// int count = 0;
// System.out.println("-------------------");
//
//
// while ((rowObjects = reader.nextRecord()) != null) {
// count++;
// for (int i = 0; i < rowObjects.length; i++) {
// System.out.println(rowObjects[i]);
// }
// System.out.println("-------------------");
// }
// System.out.println(file.getName() + " count=" + count);
//
// // By now, we have iterated through all of the rows
// }
// finally {
// DBFUtils.close(reader);
// }
// }
//
// public static int parseFileCountRecords(File file) throws FileNotFoundException {
// DBFReader reader = null;
// int count=0;
// try {
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
// while(reader.nextRow() != null) {
// count++;
// }
// }
// finally {
// DBFUtils.close(reader);
// }
// return count;
// }
//
// public static void main(String[] args) throws Exception {
// File f = new File(args[0]);
// writeToConsole(f);
// }
// }
| import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import org.junit.Assert;
import org.junit.Test;
import com.linuxense.javadbf.testutils.AssertUtils;
import com.linuxense.javadbf.testutils.DbfToTxtTest; | /*
(C) Copyright 2017 Alberto Fernández <infjaf@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
package com.linuxense.javadbf;
public class FixtureDBase83Test {
@Test
public void test8b() throws Exception {
File file = new File("src/test/resources/fixtures/dbase_83.dbf");
InputStream inputStream = null;
try {
inputStream = new BufferedInputStream(new FileInputStream(file));
DBFReader reader = new DBFReader(inputStream);
reader.setMemoFile(new File("src/test/resources/fixtures/dbase_83.dbt"));
DBFHeader header = reader.getHeader();
Assert.assertNotNull(header);
Assert.assertEquals(15, header.fieldArray.length);
Assert.assertEquals(67, header.numberOfRecords);
DBFField[] fieldArray = header.fieldArray;
int i = 0;
| // Path: src/test/java/com/linuxense/javadbf/testutils/AssertUtils.java
// public class AssertUtils {
//
// public static void assertColumnDefinition(DBFField field, String columnName, DBFDataType type, int length, int decimal) {
// Assert.assertEquals(columnName, field.getName());
// Assert.assertEquals(type, field.getType());
// Assert.assertEquals(length, field.getLength());
// Assert.assertEquals(decimal, field.getDecimalCount());
// }
//
// }
//
// Path: src/test/java/com/linuxense/javadbf/testutils/DbfToTxtTest.java
// public final class DbfToTxtTest {
//
// private DbfToTxtTest() {
// throw new AssertionError("no instances");
// }
//
// public static void export(DBFReader reader, File file) {
//
// PrintWriter writer = null;
// try {
// writer = new PrintWriter(file, "UTF-8");
// Object[] row = null;
//
// while ((row = reader.nextRecord()) != null) {
// for (Object o : row) {
// writer.print(o + ";");
// }
// writer.println("");
// }
// }
// catch (IOException e) {
// // nop
// }
// finally {
// DBFUtils.close(writer);
// }
// }
//
// public static void writeToConsole(File file) throws FileNotFoundException {
// DBFReader reader = null;
// try {
//
//
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
//
// // get the field count if you want for some reasons like the following
//
// int numberOfFields = reader.getFieldCount();
//
// // use this count to fetch all field information
// // if required
//
// for (int i = 0; i < numberOfFields; i++) {
//
// DBFField field = reader.getField(i);
//
// // // do something with it if you want
// // // refer the JavaDoc API reference for more details
// // //
// System.out.println(field.getType() + " (" + field.getLength() + ") "+ field.getName());
// }
//
// // Now, lets us start reading the rows
//
// Object[] rowObjects;
//
// int count = 0;
// System.out.println("-------------------");
//
//
// while ((rowObjects = reader.nextRecord()) != null) {
// count++;
// for (int i = 0; i < rowObjects.length; i++) {
// System.out.println(rowObjects[i]);
// }
// System.out.println("-------------------");
// }
// System.out.println(file.getName() + " count=" + count);
//
// // By now, we have iterated through all of the rows
// }
// finally {
// DBFUtils.close(reader);
// }
// }
//
// public static int parseFileCountRecords(File file) throws FileNotFoundException {
// DBFReader reader = null;
// int count=0;
// try {
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
// while(reader.nextRow() != null) {
// count++;
// }
// }
// finally {
// DBFUtils.close(reader);
// }
// return count;
// }
//
// public static void main(String[] args) throws Exception {
// File f = new File(args[0]);
// writeToConsole(f);
// }
// }
// Path: src/test/java/com/linuxense/javadbf/FixtureDBase83Test.java
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import org.junit.Assert;
import org.junit.Test;
import com.linuxense.javadbf.testutils.AssertUtils;
import com.linuxense.javadbf.testutils.DbfToTxtTest;
/*
(C) Copyright 2017 Alberto Fernández <infjaf@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
package com.linuxense.javadbf;
public class FixtureDBase83Test {
@Test
public void test8b() throws Exception {
File file = new File("src/test/resources/fixtures/dbase_83.dbf");
InputStream inputStream = null;
try {
inputStream = new BufferedInputStream(new FileInputStream(file));
DBFReader reader = new DBFReader(inputStream);
reader.setMemoFile(new File("src/test/resources/fixtures/dbase_83.dbt"));
DBFHeader header = reader.getHeader();
Assert.assertNotNull(header);
Assert.assertEquals(15, header.fieldArray.length);
Assert.assertEquals(67, header.numberOfRecords);
DBFField[] fieldArray = header.fieldArray;
int i = 0;
| AssertUtils.assertColumnDefinition(fieldArray[i++], "ID", DBFDataType.fromCode('N'), 19, 0); |
albfernandez/javadbf | src/test/java/com/linuxense/javadbf/bug85float/Bug85Test.java | // Path: src/test/java/com/linuxense/javadbf/testutils/DbfToTxtTest.java
// public final class DbfToTxtTest {
//
// private DbfToTxtTest() {
// throw new AssertionError("no instances");
// }
//
// public static void export(DBFReader reader, File file) {
//
// PrintWriter writer = null;
// try {
// writer = new PrintWriter(file, "UTF-8");
// Object[] row = null;
//
// while ((row = reader.nextRecord()) != null) {
// for (Object o : row) {
// writer.print(o + ";");
// }
// writer.println("");
// }
// }
// catch (IOException e) {
// // nop
// }
// finally {
// DBFUtils.close(writer);
// }
// }
//
// public static void writeToConsole(File file) throws FileNotFoundException {
// DBFReader reader = null;
// try {
//
//
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
//
// // get the field count if you want for some reasons like the following
//
// int numberOfFields = reader.getFieldCount();
//
// // use this count to fetch all field information
// // if required
//
// for (int i = 0; i < numberOfFields; i++) {
//
// DBFField field = reader.getField(i);
//
// // // do something with it if you want
// // // refer the JavaDoc API reference for more details
// // //
// System.out.println(field.getType() + " (" + field.getLength() + ") "+ field.getName());
// }
//
// // Now, lets us start reading the rows
//
// Object[] rowObjects;
//
// int count = 0;
// System.out.println("-------------------");
//
//
// while ((rowObjects = reader.nextRecord()) != null) {
// count++;
// for (int i = 0; i < rowObjects.length; i++) {
// System.out.println(rowObjects[i]);
// }
// System.out.println("-------------------");
// }
// System.out.println(file.getName() + " count=" + count);
//
// // By now, we have iterated through all of the rows
// }
// finally {
// DBFUtils.close(reader);
// }
// }
//
// public static int parseFileCountRecords(File file) throws FileNotFoundException {
// DBFReader reader = null;
// int count=0;
// try {
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
// while(reader.nextRow() != null) {
// count++;
// }
// }
// finally {
// DBFUtils.close(reader);
// }
// return count;
// }
//
// public static void main(String[] args) throws Exception {
// File f = new File(args[0]);
// writeToConsole(f);
// }
// }
| import java.io.File;
import java.io.FileNotFoundException;
import org.junit.Assume;
import org.junit.Test;
import com.linuxense.javadbf.testutils.DbfToTxtTest; | package com.linuxense.javadbf.bug85float;
public class Bug85Test {
public Bug85Test() {
super();
}
@Test
public void printFile() throws FileNotFoundException {
File home = new File(System.getProperty("user.home"));
File f = new File(home, "javadbf/PRODUTOS.DBF");
Assume.assumeTrue(f.exists()); | // Path: src/test/java/com/linuxense/javadbf/testutils/DbfToTxtTest.java
// public final class DbfToTxtTest {
//
// private DbfToTxtTest() {
// throw new AssertionError("no instances");
// }
//
// public static void export(DBFReader reader, File file) {
//
// PrintWriter writer = null;
// try {
// writer = new PrintWriter(file, "UTF-8");
// Object[] row = null;
//
// while ((row = reader.nextRecord()) != null) {
// for (Object o : row) {
// writer.print(o + ";");
// }
// writer.println("");
// }
// }
// catch (IOException e) {
// // nop
// }
// finally {
// DBFUtils.close(writer);
// }
// }
//
// public static void writeToConsole(File file) throws FileNotFoundException {
// DBFReader reader = null;
// try {
//
//
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
//
// // get the field count if you want for some reasons like the following
//
// int numberOfFields = reader.getFieldCount();
//
// // use this count to fetch all field information
// // if required
//
// for (int i = 0; i < numberOfFields; i++) {
//
// DBFField field = reader.getField(i);
//
// // // do something with it if you want
// // // refer the JavaDoc API reference for more details
// // //
// System.out.println(field.getType() + " (" + field.getLength() + ") "+ field.getName());
// }
//
// // Now, lets us start reading the rows
//
// Object[] rowObjects;
//
// int count = 0;
// System.out.println("-------------------");
//
//
// while ((rowObjects = reader.nextRecord()) != null) {
// count++;
// for (int i = 0; i < rowObjects.length; i++) {
// System.out.println(rowObjects[i]);
// }
// System.out.println("-------------------");
// }
// System.out.println(file.getName() + " count=" + count);
//
// // By now, we have iterated through all of the rows
// }
// finally {
// DBFUtils.close(reader);
// }
// }
//
// public static int parseFileCountRecords(File file) throws FileNotFoundException {
// DBFReader reader = null;
// int count=0;
// try {
// // create a DBFReader object
// reader = new DBFReader(new BufferedInputStream(new FileInputStream(file)));
// while(reader.nextRow() != null) {
// count++;
// }
// }
// finally {
// DBFUtils.close(reader);
// }
// return count;
// }
//
// public static void main(String[] args) throws Exception {
// File f = new File(args[0]);
// writeToConsole(f);
// }
// }
// Path: src/test/java/com/linuxense/javadbf/bug85float/Bug85Test.java
import java.io.File;
import java.io.FileNotFoundException;
import org.junit.Assume;
import org.junit.Test;
import com.linuxense.javadbf.testutils.DbfToTxtTest;
package com.linuxense.javadbf.bug85float;
public class Bug85Test {
public Bug85Test() {
super();
}
@Test
public void printFile() throws FileNotFoundException {
File home = new File(System.getProperty("user.home"));
File f = new File(home, "javadbf/PRODUTOS.DBF");
Assume.assumeTrue(f.exists()); | int records = DbfToTxtTest.parseFileCountRecords(f); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.