Search in sources :

Example 1 with TextArea

use of org.gwtbootstrap3.client.ui.TextArea in project drools-wb by kiegroup.

the class AbstractTextBoxSingletonDOMElementFactory method createWidget.

@Override
public TextArea createWidget() {
    final TextArea textArea = GWT.create(TextArea.class);
    /* Don't propagate MouseWheel and RightClick events to the Grid */
    textArea.addDomHandler(MouseWheelEvent::stopPropagation, MouseWheelEvent.getType());
    textArea.addDomHandler(event -> {
        event.stopPropagation();
        event.preventDefault();
    }, ContextMenuEvent.getType());
    return textArea;
}
Also used : MouseWheelEvent(com.google.gwt.event.dom.client.MouseWheelEvent) TextArea(org.gwtbootstrap3.client.ui.TextArea)

Example 2 with TextArea

use of org.gwtbootstrap3.client.ui.TextArea in project drools-wb by kiegroup.

the class ScenarioExpressionCellTextAreaSingletonDOMElementFactory method createWidget.

@Override
public TextArea createWidget() {
    TextArea textArea = super.createWidget();
    DOM.sinkBitlessEvent(textArea.getElement(), ConstantHolder.INPUT);
    textArea.addHandler(scenarioInputEvent -> checkExpressionSyntax(), ScenarioInputEvent.getType());
    textArea.addFocusHandler(focusEvent -> checkExpressionSyntax());
    textArea.addBlurHandler(blurEvent -> checkEmptyExpression());
    textArea.addKeyDownHandler(this::checkEmptyExpression);
    return textArea;
}
Also used : TextArea(org.gwtbootstrap3.client.ui.TextArea)

Aggregations

TextArea (org.gwtbootstrap3.client.ui.TextArea)2 MouseWheelEvent (com.google.gwt.event.dom.client.MouseWheelEvent)1