Example usage for com.vaadin.client VTooltip TOOLTIP_EVENTS

List of usage examples for com.vaadin.client VTooltip TOOLTIP_EVENTS

Introduction

In this page you can find the example usage for com.vaadin.client VTooltip TOOLTIP_EVENTS.

Prototype

int TOOLTIP_EVENTS

To view the source code for com.vaadin.client VTooltip TOOLTIP_EVENTS.

Click Source Link

Usage

From source file:com.haulmont.cuba.web.toolkit.ui.client.checkbox.CubaCheckBoxConnector.java

License:Apache License

@Override
public void onStateChanged(StateChangeEvent stateChangeEvent) {
    getWidget().captionManagedByLayout = getState().captionManagedByLayout;

    super.onStateChanged(stateChangeEvent);

    if (!getWidget().captionManagedByLayout && isContextHelpIconEnabled()) {
        if (getWidget().contextHelpIcon == null) {
            getWidget().contextHelpIcon = DOM.createSpan();
            getWidget().contextHelpIcon.setInnerHTML("?");
            getWidget().contextHelpIcon.setClassName(CONTEXT_HELP_CLASSNAME);
            Roles.getTextboxRole().setAriaHiddenState(getWidget().contextHelpIcon, true);

            getWidget().getElement().appendChild(getWidget().contextHelpIcon);
            DOM.sinkEvents(getWidget().contextHelpIcon, VTooltip.TOOLTIP_EVENTS | Event.ONCLICK);
        } else {/*  ww w.j a v  a2 s  .  c o m*/
            getWidget().contextHelpIcon.getStyle().clearDisplay();
        }
    } else if (getWidget().contextHelpIcon != null) {
        getWidget().contextHelpIcon.getStyle().setDisplay(Style.Display.NONE);

        getWidget().setAriaInvalid(false);
    }
}

From source file:com.haulmont.cuba.web.widgets.client.checkbox.CubaCheckBoxConnector.java

License:Apache License

@Override
public void onStateChanged(StateChangeEvent stateChangeEvent) {
    getWidget().captionManagedByLayout = getState().captionManagedByLayout;

    super.onStateChanged(stateChangeEvent);

    if (!getWidget().captionManagedByLayout && isContextHelpIconEnabled()) {
        if (getWidget().contextHelpIcon == null) {
            getWidget().contextHelpIcon = DOM.createSpan();
            getWidget().contextHelpIcon.setInnerHTML("?");
            getWidget().contextHelpIcon.setClassName(CONTEXT_HELP_CLASSNAME);

            if (hasContextHelpIconListeners()) {
                getWidget().contextHelpIcon.addClassName(CONTEXT_HELP_CLICKABLE_CLASSNAME);
            }//w  w  w.jav a  2  s. c  o m

            Roles.getTextboxRole().setAriaHiddenState(getWidget().contextHelpIcon, true);

            getWidget().getElement().appendChild(getWidget().contextHelpIcon);
            DOM.sinkEvents(getWidget().contextHelpIcon, VTooltip.TOOLTIP_EVENTS | Event.ONCLICK);
        } else {
            getWidget().contextHelpIcon.getStyle().clearDisplay();
        }
    } else if (getWidget().contextHelpIcon != null) {
        getWidget().contextHelpIcon.getStyle().setDisplay(Style.Display.NONE);

        getWidget().setAriaInvalid(false);
    }
}

From source file:org.opennms.features.topology.app.internal.gwt.client.TopologyViewImpl.java

License:Open Source License

@Override
protected void onLoad() {
    super.onLoad();
    m_widgetContainer.setSize("100%", "100%");
    sinkEvents(Event.ONCONTEXTMENU | VTooltip.TOOLTIP_EVENTS | Event.ONMOUSEWHEEL);
    m_svg.setId("TopologyComponent");
}