use of io.jmix.ui.widget.JmixButton in project jmix by jmix-framework.
the class PaletteComponentsFactoryImpl method createCommonButton.
protected PaletteButton createCommonButton() {
PaletteButton button = factory.create(PaletteButton.class);
button.setWidth("100%");
button.setHeight("50px");
button.setStyleName(DashboardStyleConstants.DASHBOARD_BUTTON);
DragSourceExtension<JmixButton> dragSourceExtension = new DragSourceExtension<>(button.unwrap(JmixButton.class));
dragSourceExtension.setEffectAllowed(EffectAllowed.COPY);
dragSourceExtension.addDragStartListener(e -> dragSourceExtension.setDragData(button.getLayout()));
dragSourceExtension.addDragEndListener(e -> dragSourceExtension.setDragData(null));
return button;
}
Aggregations