use of elemental2.dom.Event in project mvp4g2-examples by mvp4g.
the class DetailView method createView.
public void createView() {
container = div().add(div().style("width: 100%;").add(div().css("headline").textContent("Details")).add(detailFirstName = new TextField("Firstname")).add(detailName = new TextField("Name")).add(detailStreet = new TextField("Street")).add(detailZip = new TextField("Zip")).add(detailCity = new TextField("City")).add(div().css("buttonBar").add(button().css("button").textContent("Save").on(click, event -> {
updateDetailForm();
getPresenter().doUpdate(person);
})).add(button().css("button").textContent("Revert").on(click, event -> {
getPresenter().doRevert();
})))).asElement();
}
use of elemental2.dom.Event in project domino-ui-demo by DominoKit.
the class CardsViewImpl method cardsWithHeaders.
private void cardsWithHeaders() {
element.appendChild(BlockHeader.create("CARDS WITH HEADERS", "cards can have a header that has a Title and an optional description.").asElement());
Column column = Column.create().onLarge(OnLarge.four).onMedium(OnMedium.four).onSmall(OnSmall.twelve).onXSmall(OnXSmall.twelve);
element.appendChild(Row.create().addColumn(column.addElement(Card.create("Card Title", "Description text here...").appendContent(new Text(SAMPLE_CONTENT)).addHeaderAction(Icons.ALL.more_vert(), event -> DomGlobal.console.info("More action selected")).asElement())).addColumn(column.copy().addElement(Card.create("Card Title", "Description text here...").appendContent(new Text(SAMPLE_CONTENT)).addHeaderAction(Icons.AV_ICONS.mic(), event -> DomGlobal.console.info("Play sound")).asElement())).addColumn(column.copy().addElement(Card.create("Card Title", "Description text here...").appendContent(new Text(SAMPLE_CONTENT)).addHeaderAction(Icons.AV_ICONS.mic(), event -> DomGlobal.console.info("Play sound")).addHeaderAction(Icons.NAVIGATION_ICONS.more_vert(), event -> DomGlobal.console.info("More action selected")).asElement())).asElement());
element.appendChild(Card.createCodeCard(CodeResource.INSTANCE.cardsWithHeaders()).asElement());
}
use of elemental2.dom.Event in project gwt-react-examples by GWTReact.
the class StatefulExample method doChange.
private void doChange(FormEvent event) {
HTMLInputElement e = (HTMLInputElement) event.target;
String val = e.value;
setState(State.make(val));
}
use of elemental2.dom.Event in project kie-wb-common by kiegroup.
the class DataTypeShortcuts method tabContentContainsTarget.
boolean tabContentContainsTarget(final Event event) {
final Element target = getTarget(event);
final Element tabContent = getTabContent();
return $.contains(tabContent, target);
}
use of elemental2.dom.Event in project kie-wb-common by kiegroup.
the class DragAndDropHelper method onDragAreaMouseMove.
Object onDragAreaMouseMove(final Event e) {
if (Objects.isNull(getDragging())) {
return this;
}
final MouseEvent event = (MouseEvent) e;
final int delta = getDelta(event);
final int newPosition = getNewPosition();
final int oldPosition = position(getDragging());
if (newPosition != oldPosition) {
swapElements(findElementByPosition(newPosition), getDragging());
}
setTop(getDragging(), startYPosition + delta);
return this;
}
Aggregations