Search in sources :

Example 1 with FlowHandler

use of io.datafx.controller.flow.FlowHandler in project JFoenix by jfoenixadmin.

the class SideMenuController method init.

@PostConstruct
public void init() throws FlowException, VetoException {
    FlowHandler contentFlowHandler = (FlowHandler) context.getRegisteredObject("ContentFlowHandler");
    sideList.propagateMouseEventsToParent();
    sideList.getSelectionModel().selectedItemProperty().addListener((o, oldVal, newVal) -> {
        if (newVal != null) {
            try {
                contentFlowHandler.handle(newVal.getId());
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    });
    Flow contentFlow = (Flow) context.getRegisteredObject("ContentFlow");
    bindNodeToController(button, ButtonController.class, contentFlow, contentFlowHandler);
    bindNodeToController(checkbox, CheckboxController.class, contentFlow, contentFlowHandler);
    bindNodeToController(combobox, ComboBoxController.class, contentFlow, contentFlowHandler);
    bindNodeToController(dialogs, DialogController.class, contentFlow, contentFlowHandler);
    bindNodeToController(icons, IconsController.class, contentFlow, contentFlowHandler);
    bindNodeToController(listview, ListViewController.class, contentFlow, contentFlowHandler);
    bindNodeToController(treetableview, TreeTableViewController.class, contentFlow, contentFlowHandler);
    bindNodeToController(progressbar, ProgressBarController.class, contentFlow, contentFlowHandler);
    bindNodeToController(radiobutton, RadioButtonController.class, contentFlow, contentFlowHandler);
    bindNodeToController(slider, SliderController.class, contentFlow, contentFlowHandler);
    bindNodeToController(spinner, SpinnerController.class, contentFlow, contentFlowHandler);
    bindNodeToController(textfield, TextFieldController.class, contentFlow, contentFlowHandler);
    bindNodeToController(togglebutton, ToggleButtonController.class, contentFlow, contentFlowHandler);
    bindNodeToController(popup, PopupController.class, contentFlow, contentFlowHandler);
    bindNodeToController(svgLoader, SVGLoaderController.class, contentFlow, contentFlowHandler);
    bindNodeToController(pickers, PickersController.class, contentFlow, contentFlowHandler);
    bindNodeToController(masonry, MasonryPaneController.class, contentFlow, contentFlowHandler);
    bindNodeToController(scrollpane, ScrollPaneController.class, contentFlow, contentFlowHandler);
}
Also used : FlowHandler(io.datafx.controller.flow.FlowHandler) FlowException(io.datafx.controller.flow.FlowException) VetoException(io.datafx.controller.util.VetoException) Flow(io.datafx.controller.flow.Flow) PostConstruct(javax.annotation.PostConstruct)

Aggregations

Flow (io.datafx.controller.flow.Flow)1 FlowException (io.datafx.controller.flow.FlowException)1 FlowHandler (io.datafx.controller.flow.FlowHandler)1 VetoException (io.datafx.controller.util.VetoException)1 PostConstruct (javax.annotation.PostConstruct)1