use of jsinterop.annotations.JsOverlay in project flow by vaadin.
the class TestElementTemplateNode method doGetAttributes.
@JsOverlay
default JsonObject doGetAttributes() {
JsonObject attributes = getAttributes();
if (attributes == null) {
attributes = Json.createObject();
setAttributes(attributes);
}
return attributes;
}
use of jsinterop.annotations.JsOverlay in project flow by vaadin.
the class TestElementTemplateNode method addEventHandler.
@JsOverlay
default void addEventHandler(String name, String handler) {
JsonObject eventHandlers = getEventHandlers();
if (eventHandlers == null) {
eventHandlers = Json.createObject();
setEventHandlers(eventHandlers);
}
eventHandlers.put(name, handler);
}
use of jsinterop.annotations.JsOverlay in project kie-wb-common by kiegroup.
the class CustomGroupItem method createAnchor.
@JsOverlay
public static CustomGroupItem createAnchor(final String text, final IconType iconType, final Command command) {
final CustomGroupItem anchor = (CustomGroupItem) Window.getDocument().createElement("a");
anchor.setClassName(Styles.LIST_GROUP_ITEM);
if (iconType != null) {
final HTMLElement icon = Window.getDocument().createElement("i");
icon.getClassList().add("fa");
icon.getClassList().add(iconType.getCssName());
anchor.setInnerHTML(icon.getOuterHTML() + " " + text);
} else {
anchor.setTextContent(checkNotEmpty("text", text));
}
anchor.setHref("#");
// can't use lambda here; GWT limitation (bug!)!
anchor.setOnclick(new EventListener() {
@Override
public void call(final Event event) {
command.execute();
}
});
return anchor;
}
use of jsinterop.annotations.JsOverlay in project gwt-cs by iSergio.
the class EllipsoidSurfaceAppearance method create.
@JsOverlay
public static EllipsoidSurfaceAppearance create(boolean aboveGround) {
EllipsoidSurfaceAppearanceOptions options = new EllipsoidSurfaceAppearanceOptions();
options.aboveGround = aboveGround;
return new EllipsoidSurfaceAppearance(options);
}
use of jsinterop.annotations.JsOverlay in project gwt-cs by iSergio.
the class EllipsoidSurfaceAppearance method create.
@JsOverlay
public static EllipsoidSurfaceAppearance create(Material material) {
EllipsoidSurfaceAppearanceOptions options = new EllipsoidSurfaceAppearanceOptions();
options.material = material;
return new EllipsoidSurfaceAppearance(options);
}
Aggregations