use of de.alpharogroup.bundle.app.panels.dashboard.ApplicationDashboardBean in project bundle-app-ui by astrapi69.
the class OverviewResourceBundleAddEntryPanel method onDelete.
protected void onDelete(ActionEvent e) {
int dialogResult = JOptionPane.showConfirmDialog(null, "This will delete this resource bundle and is not recoverable?(cannot be undone)", "Warning", JOptionPane.YES_NO_OPTION);
if (dialogResult == JOptionPane.YES_OPTION) {
SpringApplicationContext.getInstance().getResourcebundlesService().delete(getModelObject().getSelectedBundleName());
final Model<ApplicationDashboardBean> baModel = MainFrame.getInstance().getSelectedBundleApplicationPropertyModel();
final ApplicationDashboardContentPanel component = new ApplicationDashboardContentPanel(baModel);
MainFrame.getInstance().replaceInternalFrame("Dashboard of " + baModel.getObject().getBundleApplication().getName() + " bundle app", component);
}
}
use of de.alpharogroup.bundle.app.panels.dashboard.ApplicationDashboardBean in project bundle-app-ui by astrapi69.
the class NewBundleApplicationPanel method newCmbDefaultLocale.
protected javax.swing.JComboBox<Locale> newCmbDefaultLocale(final Model<ApplicationDashboardBean> model) {
ApplicationDashboardBean bean = model.getObject();
BundleApplications bundleApplication = bean.getBundleApplication();
LocalesComboBoxModel cmbModel = LocalesComboBoxModel.get();
Locale dl = Locale.getDefault();
if (bundleApplication != null) {
LanguageLocales defaultLocale = bundleApplication.getDefaultLocale();
if (defaultLocale != null) {
dl = SpringApplicationContext.getInstance().getLanguageLocalesService().resolveLocale(defaultLocale);
}
}
cmbModel.setSelectedItem(dl);
final javax.swing.JComboBox<Locale> cmbDefaultLocale = new javax.swing.JComboBox<>(cmbModel);
cmbDefaultLocale.addItemListener(e -> onChangeDefaultLocale(e));
final Model<Locale> defaultLocaleModel = model(from(getModel()).getDefaultLocale());
cmbDefaultLocale.setRenderer(new LocalesComboBoxRenderer(defaultLocaleModel));
return cmbDefaultLocale;
}
use of de.alpharogroup.bundle.app.panels.dashboard.ApplicationDashboardBean in project bundle-app-ui by astrapi69.
the class ReturnToDashboardAction method now.
public void now() {
final Model<ApplicationDashboardBean> baModel = MainFrame.getInstance().getSelectedBundleApplicationPropertyModel();
if (baModel.getObject().getBundleApplication() != null) {
final ApplicationDashboardContentPanel component = new ApplicationDashboardContentPanel(baModel);
MainFrame.getInstance().replaceInternalFrame("Dashboard of " + baModel.getObject().getBundleApplication().getName() + " bundle app", component);
} else {
final List<BundleApplications> bundleApplications = SpringApplicationContext.getInstance().getBundleApplicationsService().findAll();
MainFrame.getInstance().getModelObject().setBundleApplications(bundleApplications);
MainFrame.getInstance().replaceInternalFrame("Overview bundle apps", new MainDashboardPanel(PropertyModel.<MainDashboardBean>of(MainFrame.getInstance(), "model.object")));
}
}
Aggregations