Search in sources :

Example 1 with ShortcutPresenter

use of org.kie.workbench.common.screens.home.client.widgets.shortcut.ShortcutPresenter in project kie-wb-common by kiegroup.

the class HomePresenter method setup.

public void setup() {
    profilePreferences.load(loadedProfilePreferences -> {
        modelProvider.initialize(() -> {
            final HomeModel model = modelProvider.get(loadedProfilePreferences);
            view.setWelcome(model.getWelcome());
            view.setDescription(model.getDescription());
            view.setBackgroundImageUrl(model.getBackgroundImageUrl());
            model.getShortcuts().forEach(shortcut -> {
                final ShortcutPresenter shortcutPresenter = shortcutPresenters.get();
                shortcutPresenter.setup(shortcut);
                view.addShortcut(shortcutPresenter);
            });
        });
    }, RuntimeException::new);
}
Also used : HomeModel(org.kie.workbench.common.screens.home.model.HomeModel) ShortcutPresenter(org.kie.workbench.common.screens.home.client.widgets.shortcut.ShortcutPresenter)

Aggregations

ShortcutPresenter (org.kie.workbench.common.screens.home.client.widgets.shortcut.ShortcutPresenter)1 HomeModel (org.kie.workbench.common.screens.home.model.HomeModel)1