Search in sources :

Example 1 with HasContextHelpConnector

use of com.vaadin.client.ui.HasContextHelpConnector in project cuba by cuba-platform.

the class CubaFieldGroupLayoutComponentSlot method onBrowserEvent.

@Override
public void onBrowserEvent(Event event) {
    if (DOM.eventGetType(event) == Event.ONCLICK) {
        Element target = Element.as(event.getEventTarget());
        ComponentConnector componentConnector = Util.findConnectorFor(getWidget());
        if (target == contextHelpIndicatorElement && componentConnector instanceof HasContextHelpConnector) {
            HasContextHelpConnector connector = (HasContextHelpConnector) componentConnector;
            if (hasContextHelpIconListeners(componentConnector.getState())) {
                connector.contextHelpIconClick(event);
            }
        }
    }
}
Also used : HasContextHelpConnector(com.vaadin.client.ui.HasContextHelpConnector) ComponentConnector(com.vaadin.client.ComponentConnector) Element(com.google.gwt.dom.client.Element)

Example 2 with HasContextHelpConnector

use of com.vaadin.client.ui.HasContextHelpConnector in project cuba by cuba-platform.

the class CubaOrderedLayoutSlot method onClick.

@Override
public void onClick(ClickEvent event) {
    Element target = Element.as(event.getNativeEvent().getEventTarget());
    ComponentConnector componentConnector = Util.findConnectorFor(getWidget());
    if (target == contextHelpIcon && componentConnector instanceof HasContextHelpConnector) {
        HasContextHelpConnector connector = (HasContextHelpConnector) componentConnector;
        if (hasContextHelpIconListeners(componentConnector.getState())) {
            connector.contextHelpIconClick(event);
        }
    }
}
Also used : HasContextHelpConnector(com.vaadin.client.ui.HasContextHelpConnector) ComponentConnector(com.vaadin.client.ComponentConnector) Element(com.google.gwt.dom.client.Element)

Aggregations

Element (com.google.gwt.dom.client.Element)2 ComponentConnector (com.vaadin.client.ComponentConnector)2 HasContextHelpConnector (com.vaadin.client.ui.HasContextHelpConnector)2