Issue #1520 - Change delete notifications to hide.

Remove accelerators

Change-Id: I2954c1324cbdf1bc4e5577925dbcd10e5faa6156

Former-commit-id: bbc998d372 [formerly ddcd0f8222] [formerly bbc998d372 [formerly ddcd0f8222] [formerly 8efd37da79 [formerly 0378ff80cc3592379ec3d49efc895adafa05109a]]]
Former-commit-id: 8efd37da79
Former-commit-id: 14bfeb0732 [formerly 243c1e15e9]
Former-commit-id: ad1c7c604d
This commit is contained in:
Mike Duff 2013-01-23 08:13:35 -06:00
parent 4cec3d4356
commit a14438b10a
3 changed files with 80 additions and 75 deletions

View file

@ -95,6 +95,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
* Oct 22, 2012 1284 mpduff Code Cleanup.
* Dec 03, 2012 1285 bgonzale Added implementation of the tableLock method.
* Update title bar text when paused.
* Jan 22, 2013 1520 mpduff Change delete menus to hide.
*
* </pre>
*
@ -272,7 +273,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
MenuItem setDefaultMI = new MenuItem(fileMenu, SWT.NONE);
lockableMenuItems.add(setDefaultMI);
setDefaultMI.setText("&Set as Default");
setDefaultMI.setText("Set as Default");
setDefaultMI.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
@ -282,7 +283,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
MenuItem loadConfigMI = new MenuItem(fileMenu, SWT.NONE);
lockableMenuItems.add(loadConfigMI);
loadConfigMI.setText("&Load Configuration...");
loadConfigMI.setText("Load Configuration...");
loadConfigMI.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
@ -298,7 +299,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
MenuItem saveConfigMI = new MenuItem(fileMenu, SWT.NONE);
lockableMenuItems.add(saveConfigMI);
saveConfigMI.setText("&Save Configuration");
saveConfigMI.setText("Save Configuration");
saveConfigMI.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
@ -308,7 +309,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
MenuItem saveConfigAsMI = new MenuItem(fileMenu, SWT.NONE);
lockableMenuItems.add(saveConfigAsMI);
saveConfigAsMI.setText("&Save Configuration As...");
saveConfigAsMI.setText("Save Configuration As...");
saveConfigAsMI.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
@ -318,7 +319,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
MenuItem deleteConfigMI = new MenuItem(fileMenu, SWT.NONE);
lockableMenuItems.add(deleteConfigMI);
deleteConfigMI.setText("&Delete Configuration...");
deleteConfigMI.setText("Delete Configuration...");
deleteConfigMI.addSelectionListener(new SelectionAdapter() {
@Override
@ -330,7 +331,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
new MenuItem(fileMenu, SWT.SEPARATOR);
MenuItem exitMI = new MenuItem(fileMenu, SWT.NONE);
exitMI.setText("&Exit");
exitMI.setText("Exit");
exitMI.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
@ -348,7 +349,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
// Find Menu
MenuItem findMI = new MenuItem(editMenu, SWT.CASCADE);
lockableMenuItems.add(findMI);
findMI.setText("&Find...");
findMI.setText("Find...");
findMI.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
@ -356,10 +357,10 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
}
});
MenuItem delPriorityMI = new MenuItem(editMenu, SWT.CASCADE);
lockableMenuItems.add(delPriorityMI);
delPriorityMI.setText("&Delete by Priority");
delPriorityMI.addSelectionListener(new SelectionAdapter() {
MenuItem hidePriorityMI = new MenuItem(editMenu, SWT.CASCADE);
lockableMenuItems.add(hidePriorityMI);
hidePriorityMI.setText("Hide by Priority");
hidePriorityMI.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
@ -367,14 +368,14 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
});
Menu subMenu = new Menu(menuBar);
delPriorityMI.setMenu(subMenu);
hidePriorityMI.setMenu(subMenu);
createPriorityMenus(subMenu);
MenuItem deleteOlderMI = new MenuItem(editMenu, SWT.NONE);
lockableMenuItems.add(deleteOlderMI);
deleteOlderMI.setText("&Delete Older Than Selected");
deleteOlderMI.addSelectionListener(new SelectionAdapter() {
MenuItem hideOlderMI = new MenuItem(editMenu, SWT.NONE);
lockableMenuItems.add(hideOlderMI);
hideOlderMI.setText("Hide Older Than Selected");
hideOlderMI.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
tableComp.handleDeleteOlderThan();
@ -382,10 +383,10 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
});
MenuItem deleteMI = new MenuItem(editMenu, SWT.NONE);
lockableMenuItems.add(deleteMI);
deleteMI.setText("&Delete Notification(s)");
deleteMI.addSelectionListener(new SelectionAdapter() {
MenuItem hideMI = new MenuItem(editMenu, SWT.NONE);
lockableMenuItems.add(hideMI);
hideMI.setText("Hide Notification(s)");
hideMI.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
tableComp.handleDeleteNotification();
@ -401,7 +402,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
MenuItem configureMI = new MenuItem(settingsMenu, SWT.NONE);
lockableMenuItems.add(configureMI);
configureMI.setText("&Configure Table...");
configureMI.setText("Configure Table...");
configureMI.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
@ -411,7 +412,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
MenuItem filterMI = new MenuItem(settingsMenu, SWT.NONE);
lockableMenuItems.add(filterMI);
filterMI.setText("&Filter Table...");
filterMI.setText("Filter Table...");
filterMI.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
@ -420,7 +421,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
});
tooltipMI = new MenuItem(settingsMenu, SWT.CHECK);
tooltipMI.setText("&Tooltips");
tooltipMI.setText("Tooltips");
tooltipMI.setSelection(false);
tooltipMI.addSelectionListener(new SelectionAdapter() {
@Override
@ -438,7 +439,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
helpMenuItem.setMenu(helpMenu);
MenuItem helpNotTableMI = new MenuItem(helpMenu, SWT.NONE);
helpNotTableMI.setText("&About Notification Center...");
helpNotTableMI.setText("About Notification Center...");
helpNotTableMI.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {

View file

@ -75,7 +75,7 @@ import com.raytheon.uf.viz.datadelivery.utils.NotificationHandler;
* Sep 06, 2012 687 mpduff Call the table selection method of the ITableChanged interface.
* Oct 22, 2012 1284 mpduff Fix the start/end index for pagination of new records, code cleanup.
* Nov 29, 2012 1285 bgonzale Added a refresh pause button to the Notification Center Dialog.
*
* Jan 22, 2013 1520 mpduff Update javadoc.
* </pre>
*
* @author lvenable
@ -287,6 +287,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
+ " not refresh, re-sort, or allow user modification"
+ " until unchecked.");
pauseButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
boolean isLocked = pauseButton.getSelection();
@ -359,7 +360,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
// Recalculate start/end indices for visible page
if (numRows > endIndex && endIndex - startIndex < pageConfig) {
endIndex = startIndex + pageConfig - 1;//numRows -1;
endIndex = startIndex + pageConfig - 1;// numRows -1;
if (endIndex - startIndex > pageConfig - 1) {
startIndex = ((pageConfig * selectedPage) - (pageConfig - 1)) - 1;
}
@ -432,7 +433,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
}
/**
* Action taken when deleting a notification.
* Action taken when deleting a notification from view.
*/
public void handleDeleteNotification() {
@ -612,7 +613,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
}
/**
* Action taken when deleted notifications by time.
* Action taken when deleted notifications from view by time.
*/
public void handleDeleteOlderThan() {
@ -689,7 +690,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
}
/**
* Action taken to delete notifications by priority.
* Action taken to delete notifications from view by priority.
*
* @param priority
* priority indicator

View file

@ -114,6 +114,7 @@ import com.raytheon.viz.ui.presenter.IDisplay;
* and SubscriptionConfigurationManager.
* Jan 21, 2013 1501 djohnson Only send notification if subscription was actually activated/deactivated,
* remove race condition of GUI thread updating the table after notification.
* Jan 22, 2013 1520 mpduff Removed menu accelerators.
* </pre>
*
* @author mpduff
@ -317,7 +318,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
fileMenuItem.setMenu(fileMenu);
MenuItem newMI = new MenuItem(fileMenu, SWT.NONE);
newMI.setText("&New Subscription...");
newMI.setText("New Subscription...");
newMI.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
@ -326,7 +327,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
});
MenuItem groupMI = new MenuItem(fileMenu, SWT.NONE);
groupMI.setText("&New Group...");
groupMI.setText("New Group...");
groupMI.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
@ -358,7 +359,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
new MenuItem(fileMenu, SWT.SEPARATOR);
MenuItem exitMI = new MenuItem(fileMenu, SWT.NONE);
exitMI.setText("&Exit");
exitMI.setText("Exit");
exitMI.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
@ -376,7 +377,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
settingsMenuItem.setMenu(settingsMenu);
MenuItem configureMI = new MenuItem(settingsMenu, SWT.NONE);
configureMI.setText("&Configure Table...");
configureMI.setText("Configure Table...");
configureMI.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
@ -385,7 +386,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
});
tooltipMI = new MenuItem(settingsMenu, SWT.CHECK);
tooltipMI.setText("&Tooltips");
tooltipMI.setText("Tooltips");
tooltipMI.setSelection(false);
tooltipMI.addSelectionListener(new SelectionAdapter() {
@Override
@ -403,7 +404,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
helpMenuItem.setMenu(helpMenu);
MenuItem helpNotTableMI = new MenuItem(helpMenu, SWT.NONE);
helpNotTableMI.setText("&About Subscription Manager...");
helpNotTableMI.setText("About Subscription Manager...");
helpNotTableMI.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
@ -423,7 +424,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
editMenuItem.setMenu(editMenu);
MenuItem editMI = new MenuItem(editMenu, SWT.NONE);
editMI.setText("&Edit Subscription...");
editMI.setText("Edit Subscription...");
editMI.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
@ -432,7 +433,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
});
MenuItem copyMI = new MenuItem(editMenu, SWT.NONE);
copyMI.setText("&Copy Subscription...");
copyMI.setText("Copy Subscription...");
copyMI.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
@ -441,7 +442,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
});
MenuItem deleteMI = new MenuItem(editMenu, SWT.NONE);
deleteMI.setText("&Delete Subscription");
deleteMI.setText("Delete Subscription");
deleteMI.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
@ -591,8 +592,8 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
String msg = user.uniqueId()
+ " is not authorized to create subscriptions";
try {
if (DataDeliveryServices.getPermissionsService().checkPermission(user, msg, permission)
.isAuthorized()) {
if (DataDeliveryServices.getPermissionsService()
.checkPermission(user, msg, permission).isAuthorized()) {
DataBrowserAction action = new DataBrowserAction();
Map<String, String> params = new HashMap<String, String>();
ExecutionEvent ee = new ExecutionEvent(null, params, null, null);
@ -622,8 +623,8 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
+ permission;
try {
if (DataDeliveryServices.getPermissionsService().checkPermission(user, msg, permission)
.isAuthorized()) {
if (DataDeliveryServices.getPermissionsService()
.checkPermission(user, msg, permission).isAuthorized()) {
if (create) {
if (createGroupDlg == null) {
createGroupDlg = new CreateGroupDefinitionDlg(
@ -744,8 +745,8 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
+ permission;
try {
if (DataDeliveryServices.getPermissionsService().checkPermission(user, msg, permission)
.isAuthorized()) {
if (DataDeliveryServices.getPermissionsService()
.checkPermission(user, msg, permission).isAuthorized()) {
String message = null;
if (selectionCount > 1) {
@ -831,8 +832,8 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
+ " Subscriptions\nPermission: " + permission;
try {
if (DataDeliveryServices.getPermissionsService().checkPermission(user, msg, permission)
.isAuthorized()) {
if (DataDeliveryServices.getPermissionsService()
.checkPermission(user, msg, permission).isAuthorized()) {
final List<Subscription> updatedList = new ArrayList<Subscription>();
int count = tableComp.getTable().getSelectionCount();
@ -1055,7 +1056,9 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
String msg = user.uniqueId()
+ " is not authorized to access Subscription Approval";
return DataDeliveryServices.getPermissionsService().checkPermissions(user, msg,
return DataDeliveryServices
.getPermissionsService()
.checkPermissions(user, msg,
DataDeliveryPermission.SUBSCRIPTION_APPROVE_SITE,
DataDeliveryPermission.SUBSCRIPTION_APPROVE_USER,
DataDeliveryPermission.SUBSCRIPTION_APPROVE_VIEW)
@ -1088,8 +1091,8 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
for (Subscription subscription : subscriptions) {
subscriptionNotificationService
.sendDeletedSubscriptionNotification(
subscription, username);
.sendDeletedSubscriptionNotification(subscription,
username);
}
} catch (RegistryHandlerException e) {
exceptions.add(e);