use of io.jmix.dashboardsui.component.impl.PaletteButton in project jmix by jmix-framework.
the class PaletteComponentsFactoryImpl method createCssLayoutButton.
@Override
public PaletteButton createCssLayoutButton() {
PaletteButton button = createCommonButton();
button.setCaption(messages.getMessage(PaletteComponentsFactoryImpl.class, "cssLayout"));
button.setIconFromSet(DashboardIcon.CSS_LAYOUT_ICON);
button.setLayout(metadata.create(CssLayout.class));
button.getLayout().setId(null);
button.setDescription(messages.getMessage(PaletteComponentsFactoryImpl.class, "cssLayout"));
return button;
}
use of io.jmix.dashboardsui.component.impl.PaletteButton in project jmix by jmix-framework.
the class PaletteComponentsFactoryImpl method createGridLayoutButton.
public PaletteButton createGridLayoutButton() {
PaletteButton button = createCommonButton();
button.setCaption(messages.getMessage(PaletteComponentsFactoryImpl.class, "gridLayout"));
button.setIconFromSet(DashboardIcon.GRID_LAYOUT_ICON);
button.setLayout(metadata.create(GridLayout.class));
button.getLayout().setId(null);
button.setDescription(messages.getMessage(PaletteComponentsFactoryImpl.class, "gridLayout"));
return button;
}
use of io.jmix.dashboardsui.component.impl.PaletteButton in project jmix by jmix-framework.
the class PaletteComponentsFactoryImpl method createWidgetButton.
public PaletteButton createWidgetButton(Widget widget) {
WidgetLayout layout = metadata.create(WidgetLayout.class);
layout.setWidget(widget);
PaletteButton button = createCommonButton();
button.setCaption(widgetRepository.getLocalizedWidgetName(widget));
button.setDescription(widget.getDescription());
button.setLayout(layout);
button.getLayout().setId(null);
return button;
}
use of io.jmix.dashboardsui.component.impl.PaletteButton in project jmix by jmix-framework.
the class PaletteComponentsFactoryImpl method createHorizontalLayoutButton.
public PaletteButton createHorizontalLayoutButton() {
PaletteButton button = createCommonButton();
button.setCaption(messages.getMessage(PaletteComponentsFactoryImpl.class, "horizontalLayout"));
button.setIconFromSet(DashboardIcon.HORIZONTAL_LAYOUT_ICON);
button.setLayout(metadata.create(HorizontalLayout.class));
button.getLayout().setId(null);
button.setDescription(messages.getMessage(PaletteComponentsFactoryImpl.class, "horizontalLayout"));
return button;
}
use of io.jmix.dashboardsui.component.impl.PaletteButton in project jmix by jmix-framework.
the class PaletteComponentsFactoryImpl method createWidgetTemplateButton.
public PaletteButton createWidgetTemplateButton(WidgetTemplate wt) {
Widget widget = converter.widgetFromJson(wt.getWidgetModel());
widget.setName(widgetUtils.getWidgetType(widget.getFragmentId()));
WidgetTemplateLayout layout = metadata.create(WidgetTemplateLayout.class);
layout.setWidget(widget);
PaletteButton button = createCommonButton();
button.setCaption(String.format("%s (%s)", wt.getName(), widgetRepository.getLocalizedWidgetName(widget)));
button.setLayout(layout);
button.getLayout().setId(null);
return button;
}
Aggregations