use of org.eclipse.kapua.app.console.client.widget.dialog.InfoDialog.InfoDialogType in project kapua by eclipse.
the class DeviceTabPackages method openUninstallDialog.
private void openUninstallDialog() {
final GwtDeploymentPackage selectedDeploymentPackage = installedPackageTab.getSelectedDeploymentPackage();
if (selectedDeploymentPackage != null) {
toolBar.disable();
final PackageUninstallDialog packageUninstallDialog = new PackageUninstallDialog(selectedDevice.getScopeId(), selectedDevice.getId(), selectedDeploymentPackage);
packageUninstallDialog.addListener(Events.Hide, new Listener<BaseEvent>() {
@Override
public void handleEvent(BaseEvent be) {
toolBar.enable();
Boolean exitStatus = packageUninstallDialog.getExitStatus();
if (exitStatus == null) {
// Operation Aborted
return;
} else {
InfoDialogType exitDialogType;
String exitMessage = packageUninstallDialog.getExitMessage();
if (exitStatus == true) {
// Operation Success
exitDialogType = InfoDialogType.INFO;
} else {
// Operaton Failed
exitDialogType = InfoDialogType.ERROR;
}
//
// Exit dialog
InfoDialog exitDialog = new InfoDialog(exitDialogType, exitMessage);
exitDialog.show();
m_uninstallButton.disable();
m_deviceTabs.setDevice(selectedDevice);
}
}
});
packageUninstallDialog.show();
}
}
use of org.eclipse.kapua.app.console.client.widget.dialog.InfoDialog.InfoDialogType in project kapua by eclipse.
the class DeviceTabPackages method openInstallDialog.
//
// ACTIONS DIALOGS
//
private void openInstallDialog() {
toolBar.disable();
final PackageInstallDialog packageInstallDialog = new PackageInstallDialog(selectedDevice.getScopeId(), selectedDevice.getId());
packageInstallDialog.addListener(Events.Hide, new Listener<BaseEvent>() {
@Override
public void handleEvent(BaseEvent be) {
toolBar.enable();
Boolean exitStatus = packageInstallDialog.getExitStatus();
if (exitStatus == null) {
// Operation Aborted
return;
} else {
InfoDialogType exitDialogType;
String exitMessage = packageInstallDialog.getExitMessage();
if (exitStatus == true) {
// Operation Success
exitDialogType = InfoDialogType.INFO;
} else {
// Operaton Failed
exitDialogType = InfoDialogType.ERROR;
}
//
// Exit dialog
InfoDialog exitDialog = new InfoDialog(exitDialogType, exitMessage);
exitDialog.show();
m_uninstallButton.disable();
m_deviceTabs.setDevice(selectedDevice);
}
}
});
packageInstallDialog.show();
}
Aggregations