Search in sources :

Example 21 with Subscribe

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[]
}
Also used : UiReportRunContext(io.jmix.reportsui.runner.UiReportRunContext) Report(io.jmix.reports.entity.Report) Subscribe(io.jmix.ui.screen.Subscribe)

Example 22 with Subscribe

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);
}
Also used : Point(org.locationtech.jts.geom.Point) Subscribe(io.jmix.ui.screen.Subscribe)

Example 23 with Subscribe

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[]
}
Also used : Order(maps.ex1.entity.Order) Subscribe(io.jmix.ui.screen.Subscribe)

Example 24 with Subscribe

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[]
}
Also used : Order(maps.ex1.entity.Order) Subscribe(io.jmix.ui.screen.Subscribe)

Example 25 with Subscribe

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));
}
Also used : PolygonStyle(io.jmix.mapsui.component.layer.style.PolygonStyle) Subscribe(io.jmix.ui.screen.Subscribe)

Aggregations

Subscribe (io.jmix.ui.screen.Subscribe)79 Report (io.jmix.reports.entity.Report)8 Screen (io.jmix.ui.screen.Screen)8 ListDataProvider (io.jmix.ui.data.impl.ListDataProvider)5 UiController (io.jmix.ui.screen.UiController)5 UiDescriptor (io.jmix.ui.screen.UiDescriptor)5 UUID (java.util.UUID)5 Autowired (org.springframework.beans.factory.annotation.Autowired)5 ReportOutputDocument (com.haulmont.yarg.reporting.ReportOutputDocument)4 FileRef (io.jmix.core.FileRef)4 BigDecimal (java.math.BigDecimal)4 Date (java.util.Date)4 List (java.util.List)4 Order (test_support.entity.sales.Order)4 Metadata (io.jmix.core.Metadata)3 Visit (io.jmix.petclinic.entity.visit.Visit)3 UiReportRunContext (io.jmix.reportsui.runner.UiReportRunContext)3 FilterCondition (io.jmix.ui.entity.FilterCondition)3 GroupFilterCondition (io.jmix.ui.entity.GroupFilterCondition)3 LogicalFilterCondition (io.jmix.ui.entity.LogicalFilterCondition)3