Search in sources :

Example 6 with JsOverlay

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;
}
Also used : JsonObject(elemental.json.JsonObject) JsOverlay(jsinterop.annotations.JsOverlay)

Example 7 with JsOverlay

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);
}
Also used : JsonObject(elemental.json.JsonObject) JsOverlay(jsinterop.annotations.JsOverlay)

Example 8 with JsOverlay

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;
}
Also used : HTMLElement(org.jboss.errai.common.client.dom.HTMLElement) Event(org.jboss.errai.common.client.dom.Event) EventListener(org.jboss.errai.common.client.dom.EventListener) JsOverlay(jsinterop.annotations.JsOverlay)

Example 9 with JsOverlay

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);
}
Also used : EllipsoidSurfaceAppearanceOptions(org.cesiumjs.cs.scene.apperances.options.EllipsoidSurfaceAppearanceOptions) JsOverlay(jsinterop.annotations.JsOverlay)

Example 10 with JsOverlay

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);
}
Also used : EllipsoidSurfaceAppearanceOptions(org.cesiumjs.cs.scene.apperances.options.EllipsoidSurfaceAppearanceOptions) JsOverlay(jsinterop.annotations.JsOverlay)

Aggregations

JsOverlay (jsinterop.annotations.JsOverlay)19 JsonObject (elemental.json.JsonObject)4 PropOptions (com.axellience.vuegwt.core.client.component.options.props.PropOptions)3 JsPropertyMap (jsinterop.base.JsPropertyMap)3 JsObject (elemental2.core.JsObject)2 EllipsoidSurfaceAppearanceOptions (org.cesiumjs.cs.scene.apperances.options.EllipsoidSurfaceAppearanceOptions)2 ComputedOptions (com.axellience.vuegwt.core.client.component.options.computed.ComputedOptions)1 HandlerRegistration (com.google.gwt.event.shared.HandlerRegistration)1 Function (elemental2.core.Function)1 Date (java.util.Date)1 RecordUpdate (org.activityinfo.model.resource.RecordUpdate)1 PolylineGlowMaterialPropertyOptions (org.cesiumjs.cs.datasources.properties.options.PolylineGlowMaterialPropertyOptions)1 PerInstanceColorAppearanceOptions (org.cesiumjs.cs.scene.apperances.options.PerInstanceColorAppearanceOptions)1 ParticleBurstOptions (org.cesiumjs.cs.scene.particle.options.ParticleBurstOptions)1 Event (org.jboss.errai.common.client.dom.Event)1 EventListener (org.jboss.errai.common.client.dom.EventListener)1 HTMLElement (org.jboss.errai.common.client.dom.HTMLElement)1