use of org.jboss.errai.ui.shared.api.annotations.EventHandler in project drools by kiegroup.
the class FEELShowcase method onTextChange.
@EventHandler("text")
public void onTextChange(final KeyUpEvent e) {
final FEEL_1_1Parser parser = FEELParser.parse(null, text.getValue(), Collections.emptyMap(), Collections.emptyMap(), Collections.emptyList(), Collections.emptyList(), null);
final ParseTree tree = parser.expression();
final ASTBuilderVisitor astBuilderVisitor = new ASTBuilderVisitor(emptyMap(), null);
final BaseNode baseNode = astBuilderVisitor.visit(tree);
nodes.setValue(getNodesString(baseNode));
evaluation.setValue(getEvaluation(baseNode));
}
use of org.jboss.errai.ui.shared.api.annotations.EventHandler in project kie-wb-common by kiegroup.
the class DecisionComponentsItemView method decisionComponentItemMouseDown.
@EventHandler("decision-component-item")
public void decisionComponentItemMouseDown(final MouseDownEvent mouseDownEvent) {
final DRGElement drgElement = presenter.getDrgElement();
final ShapeFactory factory = dmnShapeSet.getShapeFactory();
final Glyph glyph = factory.getGlyph(drgElement.getClass().getName());
final ShapeGlyphDragHandler.Item item = makeDragHandler(glyph);
final Callback proxy = makeDragProxyCallbackImpl(drgElement, factory);
shapeGlyphDragHandler.show(item, mouseDownEvent.getX(), mouseDownEvent.getY(), proxy);
}
use of org.jboss.errai.ui.shared.api.annotations.EventHandler in project kie-wb-common by kiegroup.
the class DRDNameChangerView method onClickReturnToDRG.
@EventHandler("returnToDRG")
void onClickReturnToDRG(final ClickEvent event) {
hideDRDNameChanger();
selectedEvent.fire(new DMNDiagramSelected(dmnDiagramsSession.getDRGDiagramElement()));
}
use of org.jboss.errai.ui.shared.api.annotations.EventHandler in project kie-wb-common by kiegroup.
the class ValueAndDataTypePopoverViewImpl method onValueEditorKeyDown.
@SuppressWarnings("unused")
@EventHandler("valueEditor")
public void onValueEditorKeyDown(final KeyDownEvent event) {
if (isEnter(event)) {
hide(true);
onClosedByKeyboard();
} else if (isEsc(event)) {
reset();
hide(false);
onClosedByKeyboard();
} else if (event.isShiftKeyDown() && isTab(event)) {
final Button typeSelectorButton = getTypeSelectorButton();
typeSelectorButton.focus();
event.preventDefault();
}
}
use of org.jboss.errai.ui.shared.api.annotations.EventHandler in project kie-wb-common by kiegroup.
the class DataTypeSelectView method onTypeTextClick.
@EventHandler("type-text")
public void onTypeTextClick(final ClickEvent event) {
final String type = presenter.getDataType().getType();
final HTMLElement element = getElement();
if (!isBuiltInType(type)) {
structureTypesTooltip.show(element, type);
}
skipClickListeners(event);
}
Aggregations