use of io.jmix.ui.screen.Subscribe in project jmix-docs by Haulmont.
the class RunReportScreen method onUrrBtn1Click.
// end::rr-btn2-end[]
@Subscribe("urrBtn1")
protected void onUrrBtn1Click(Button.ClickEvent event) {
Report report = getReportByCode("BOOK_COUNT");
// tag::run-and-show[]
uiReportRunner.runAndShow(new UiReportRunContext(report));
// end::run-and-show[]
}
use of io.jmix.ui.screen.Subscribe in project jmix-docs by Haulmont.
the class Canvas method onShowOrderClick.
// tag::show-order[]
@Subscribe("showOrder")
public void onShowOrderClick(Button.ClickEvent event) {
CanvasLayer canvasLayer = map.getCanvas();
Point point = ordersTable.getSingleSelected().getLocation();
canvasLayer.addPoint(point);
}
use of io.jmix.ui.screen.Subscribe in project jmix-docs by Haulmont.
the class Canvas method onShowPopupClick.
// end::show-order[]
@Subscribe("showPopup")
public void onShowPopupClick(Button.ClickEvent event) {
// tag::popup[]
Order order = ordersTable.getSingleSelected();
CanvasLayer canvasLayer = map.getCanvas();
CanvasLayer.Point location = canvasLayer.addPoint(order.getLocation());
PopupWindowOptions popupWindowOptions = new PopupWindowOptions().setCloseOnClick(true).setMaxWidth(400);
location.setPopupContent(order.getProduct()).setPopupOptions(popupWindowOptions);
// end::popup[]
}
use of io.jmix.ui.screen.Subscribe in project jmix-docs by Haulmont.
the class Canvas method onShowTooltipClick.
// end::popup-window[]
@Subscribe("showTooltip")
public void onShowTooltipClick(Button.ClickEvent event) {
// tag::tooltip[]
Order order = ordersTable.getSingleSelected();
CanvasLayer canvasLayer = map.getCanvas();
CanvasLayer.Point point = canvasLayer.addPoint(order.getLocation());
TooltipOptions tooltipOptions = new TooltipOptions().setPermanent(true).setOpacity(0.7);
point.setTooltipContent(order.getProduct()).setTooltipOptions(tooltipOptions);
// end::tooltip[]
}
use of io.jmix.ui.screen.Subscribe in project jmix-docs by Haulmont.
the class Canvas method onDrawPolygonClick.
@Subscribe("drawPolygon")
private void onDrawPolygonClick(Button.ClickEvent event) {
CanvasLayer canvasLayer = map.getCanvas();
PolygonStyle style = new PolygonStyle().setFillColor("#08a343").setStrokeColor("#004912");
canvasLayer.drawPolygon(polygon -> polygon.setStyle(style));
}
Aggregations