Issue #1520 - Change delete notifications to hide.
Remove accelerators Change-Id: I2954c1324cbdf1bc4e5577925dbcd10e5faa6156 Former-commit-id:ddcd0f8222
[formerlyddcd0f8222
[formerly 0378ff80cc3592379ec3d49efc895adafa05109a]] Former-commit-id:8efd37da79
Former-commit-id:243c1e15e9
This commit is contained in:
parent
7918b009ff
commit
ad1c7c604d
3 changed files with 80 additions and 75 deletions
|
@ -95,6 +95,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||||
* Oct 22, 2012 1284 mpduff Code Cleanup.
|
* Oct 22, 2012 1284 mpduff Code Cleanup.
|
||||||
* Dec 03, 2012 1285 bgonzale Added implementation of the tableLock method.
|
* Dec 03, 2012 1285 bgonzale Added implementation of the tableLock method.
|
||||||
* Update title bar text when paused.
|
* Update title bar text when paused.
|
||||||
|
* Jan 22, 2013 1520 mpduff Change delete menus to hide.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -272,7 +273,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
||||||
|
|
||||||
MenuItem setDefaultMI = new MenuItem(fileMenu, SWT.NONE);
|
MenuItem setDefaultMI = new MenuItem(fileMenu, SWT.NONE);
|
||||||
lockableMenuItems.add(setDefaultMI);
|
lockableMenuItems.add(setDefaultMI);
|
||||||
setDefaultMI.setText("&Set as Default");
|
setDefaultMI.setText("Set as Default");
|
||||||
setDefaultMI.addSelectionListener(new SelectionAdapter() {
|
setDefaultMI.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent event) {
|
public void widgetSelected(SelectionEvent event) {
|
||||||
|
@ -282,7 +283,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
||||||
|
|
||||||
MenuItem loadConfigMI = new MenuItem(fileMenu, SWT.NONE);
|
MenuItem loadConfigMI = new MenuItem(fileMenu, SWT.NONE);
|
||||||
lockableMenuItems.add(loadConfigMI);
|
lockableMenuItems.add(loadConfigMI);
|
||||||
loadConfigMI.setText("&Load Configuration...");
|
loadConfigMI.setText("Load Configuration...");
|
||||||
loadConfigMI.addSelectionListener(new SelectionAdapter() {
|
loadConfigMI.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent event) {
|
public void widgetSelected(SelectionEvent event) {
|
||||||
|
@ -298,7 +299,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
||||||
|
|
||||||
MenuItem saveConfigMI = new MenuItem(fileMenu, SWT.NONE);
|
MenuItem saveConfigMI = new MenuItem(fileMenu, SWT.NONE);
|
||||||
lockableMenuItems.add(saveConfigMI);
|
lockableMenuItems.add(saveConfigMI);
|
||||||
saveConfigMI.setText("&Save Configuration");
|
saveConfigMI.setText("Save Configuration");
|
||||||
saveConfigMI.addSelectionListener(new SelectionAdapter() {
|
saveConfigMI.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent event) {
|
public void widgetSelected(SelectionEvent event) {
|
||||||
|
@ -308,7 +309,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
||||||
|
|
||||||
MenuItem saveConfigAsMI = new MenuItem(fileMenu, SWT.NONE);
|
MenuItem saveConfigAsMI = new MenuItem(fileMenu, SWT.NONE);
|
||||||
lockableMenuItems.add(saveConfigAsMI);
|
lockableMenuItems.add(saveConfigAsMI);
|
||||||
saveConfigAsMI.setText("&Save Configuration As...");
|
saveConfigAsMI.setText("Save Configuration As...");
|
||||||
saveConfigAsMI.addSelectionListener(new SelectionAdapter() {
|
saveConfigAsMI.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent event) {
|
public void widgetSelected(SelectionEvent event) {
|
||||||
|
@ -318,7 +319,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
||||||
|
|
||||||
MenuItem deleteConfigMI = new MenuItem(fileMenu, SWT.NONE);
|
MenuItem deleteConfigMI = new MenuItem(fileMenu, SWT.NONE);
|
||||||
lockableMenuItems.add(deleteConfigMI);
|
lockableMenuItems.add(deleteConfigMI);
|
||||||
deleteConfigMI.setText("&Delete Configuration...");
|
deleteConfigMI.setText("Delete Configuration...");
|
||||||
deleteConfigMI.addSelectionListener(new SelectionAdapter() {
|
deleteConfigMI.addSelectionListener(new SelectionAdapter() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -330,7 +331,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
||||||
new MenuItem(fileMenu, SWT.SEPARATOR);
|
new MenuItem(fileMenu, SWT.SEPARATOR);
|
||||||
|
|
||||||
MenuItem exitMI = new MenuItem(fileMenu, SWT.NONE);
|
MenuItem exitMI = new MenuItem(fileMenu, SWT.NONE);
|
||||||
exitMI.setText("&Exit");
|
exitMI.setText("Exit");
|
||||||
exitMI.addSelectionListener(new SelectionAdapter() {
|
exitMI.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent event) {
|
public void widgetSelected(SelectionEvent event) {
|
||||||
|
@ -348,7 +349,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
||||||
// Find Menu
|
// Find Menu
|
||||||
MenuItem findMI = new MenuItem(editMenu, SWT.CASCADE);
|
MenuItem findMI = new MenuItem(editMenu, SWT.CASCADE);
|
||||||
lockableMenuItems.add(findMI);
|
lockableMenuItems.add(findMI);
|
||||||
findMI.setText("&Find...");
|
findMI.setText("Find...");
|
||||||
findMI.addSelectionListener(new SelectionAdapter() {
|
findMI.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent event) {
|
public void widgetSelected(SelectionEvent event) {
|
||||||
|
@ -356,10 +357,10 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
MenuItem delPriorityMI = new MenuItem(editMenu, SWT.CASCADE);
|
MenuItem hidePriorityMI = new MenuItem(editMenu, SWT.CASCADE);
|
||||||
lockableMenuItems.add(delPriorityMI);
|
lockableMenuItems.add(hidePriorityMI);
|
||||||
delPriorityMI.setText("&Delete by Priority");
|
hidePriorityMI.setText("Hide by Priority");
|
||||||
delPriorityMI.addSelectionListener(new SelectionAdapter() {
|
hidePriorityMI.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent event) {
|
public void widgetSelected(SelectionEvent event) {
|
||||||
|
|
||||||
|
@ -367,14 +368,14 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
||||||
});
|
});
|
||||||
|
|
||||||
Menu subMenu = new Menu(menuBar);
|
Menu subMenu = new Menu(menuBar);
|
||||||
delPriorityMI.setMenu(subMenu);
|
hidePriorityMI.setMenu(subMenu);
|
||||||
|
|
||||||
createPriorityMenus(subMenu);
|
createPriorityMenus(subMenu);
|
||||||
|
|
||||||
MenuItem deleteOlderMI = new MenuItem(editMenu, SWT.NONE);
|
MenuItem hideOlderMI = new MenuItem(editMenu, SWT.NONE);
|
||||||
lockableMenuItems.add(deleteOlderMI);
|
lockableMenuItems.add(hideOlderMI);
|
||||||
deleteOlderMI.setText("&Delete Older Than Selected");
|
hideOlderMI.setText("Hide Older Than Selected");
|
||||||
deleteOlderMI.addSelectionListener(new SelectionAdapter() {
|
hideOlderMI.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
tableComp.handleDeleteOlderThan();
|
tableComp.handleDeleteOlderThan();
|
||||||
|
@ -382,10 +383,10 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
MenuItem deleteMI = new MenuItem(editMenu, SWT.NONE);
|
MenuItem hideMI = new MenuItem(editMenu, SWT.NONE);
|
||||||
lockableMenuItems.add(deleteMI);
|
lockableMenuItems.add(hideMI);
|
||||||
deleteMI.setText("&Delete Notification(s)");
|
hideMI.setText("Hide Notification(s)");
|
||||||
deleteMI.addSelectionListener(new SelectionAdapter() {
|
hideMI.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent event) {
|
public void widgetSelected(SelectionEvent event) {
|
||||||
tableComp.handleDeleteNotification();
|
tableComp.handleDeleteNotification();
|
||||||
|
@ -401,7 +402,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
||||||
|
|
||||||
MenuItem configureMI = new MenuItem(settingsMenu, SWT.NONE);
|
MenuItem configureMI = new MenuItem(settingsMenu, SWT.NONE);
|
||||||
lockableMenuItems.add(configureMI);
|
lockableMenuItems.add(configureMI);
|
||||||
configureMI.setText("&Configure Table...");
|
configureMI.setText("Configure Table...");
|
||||||
configureMI.addSelectionListener(new SelectionAdapter() {
|
configureMI.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent event) {
|
public void widgetSelected(SelectionEvent event) {
|
||||||
|
@ -411,7 +412,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
||||||
|
|
||||||
MenuItem filterMI = new MenuItem(settingsMenu, SWT.NONE);
|
MenuItem filterMI = new MenuItem(settingsMenu, SWT.NONE);
|
||||||
lockableMenuItems.add(filterMI);
|
lockableMenuItems.add(filterMI);
|
||||||
filterMI.setText("&Filter Table...");
|
filterMI.setText("Filter Table...");
|
||||||
filterMI.addSelectionListener(new SelectionAdapter() {
|
filterMI.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent event) {
|
public void widgetSelected(SelectionEvent event) {
|
||||||
|
@ -420,7 +421,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
||||||
});
|
});
|
||||||
|
|
||||||
tooltipMI = new MenuItem(settingsMenu, SWT.CHECK);
|
tooltipMI = new MenuItem(settingsMenu, SWT.CHECK);
|
||||||
tooltipMI.setText("&Tooltips");
|
tooltipMI.setText("Tooltips");
|
||||||
tooltipMI.setSelection(false);
|
tooltipMI.setSelection(false);
|
||||||
tooltipMI.addSelectionListener(new SelectionAdapter() {
|
tooltipMI.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -438,7 +439,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
||||||
helpMenuItem.setMenu(helpMenu);
|
helpMenuItem.setMenu(helpMenu);
|
||||||
|
|
||||||
MenuItem helpNotTableMI = new MenuItem(helpMenu, SWT.NONE);
|
MenuItem helpNotTableMI = new MenuItem(helpMenu, SWT.NONE);
|
||||||
helpNotTableMI.setText("&About Notification Center...");
|
helpNotTableMI.setText("About Notification Center...");
|
||||||
helpNotTableMI.addSelectionListener(new SelectionAdapter() {
|
helpNotTableMI.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent event) {
|
public void widgetSelected(SelectionEvent event) {
|
||||||
|
|
|
@ -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.
|
* 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.
|
* 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.
|
* Nov 29, 2012 1285 bgonzale Added a refresh pause button to the Notification Center Dialog.
|
||||||
*
|
* Jan 22, 2013 1520 mpduff Update javadoc.
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author lvenable
|
* @author lvenable
|
||||||
|
@ -197,12 +197,12 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
* Note: For the super class we are passing in a false for the notification
|
* Note: For the super class we are passing in a false for the notification
|
||||||
* flag. This is turned off because the notification dialog is using the
|
* flag. This is turned off because the notification dialog is using the
|
||||||
* NotificationHandler and it contains the necessary code that needs to be
|
* NotificationHandler and it contains the necessary code that needs to be
|
||||||
* executed.
|
* executed.
|
||||||
*
|
*
|
||||||
* @param parent
|
* @param parent
|
||||||
* @param tableConfig
|
* @param tableConfig
|
||||||
* @param callback
|
* @param callback
|
||||||
|
@ -287,6 +287,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
||||||
+ " not refresh, re-sort, or allow user modification"
|
+ " not refresh, re-sort, or allow user modification"
|
||||||
+ " until unchecked.");
|
+ " until unchecked.");
|
||||||
pauseButton.addSelectionListener(new SelectionAdapter() {
|
pauseButton.addSelectionListener(new SelectionAdapter() {
|
||||||
|
@Override
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
boolean isLocked = pauseButton.getSelection();
|
boolean isLocked = pauseButton.getSelection();
|
||||||
|
|
||||||
|
@ -320,7 +321,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the entire table list.
|
* Get the entire table list.
|
||||||
*
|
*
|
||||||
* @return TableDataManager obj
|
* @return TableDataManager obj
|
||||||
*/
|
*/
|
||||||
public TableDataManager<NotificationRowData> getMasterTableList() {
|
public TableDataManager<NotificationRowData> getMasterTableList() {
|
||||||
|
@ -329,7 +330,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the table list with filters applied.
|
* Get the table list with filters applied.
|
||||||
*
|
*
|
||||||
* @return TableDataManager obj
|
* @return TableDataManager obj
|
||||||
*/
|
*/
|
||||||
public TableDataManager<NotificationRowData> getFilteredTableList() {
|
public TableDataManager<NotificationRowData> getFilteredTableList() {
|
||||||
|
@ -338,7 +339,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the table list for display.
|
* Get the table list for display.
|
||||||
*
|
*
|
||||||
* @return TableDataManager obj
|
* @return TableDataManager obj
|
||||||
*/
|
*/
|
||||||
public ArrayList<NotificationRowData> getVisibleTableList() {
|
public ArrayList<NotificationRowData> getVisibleTableList() {
|
||||||
|
@ -347,7 +348,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the rows of data to display.
|
* Get the rows of data to display.
|
||||||
*
|
*
|
||||||
* @return list of Notification Row Data objects
|
* @return list of Notification Row Data objects
|
||||||
*/
|
*/
|
||||||
private ArrayList<NotificationRowData> getTableRows() {
|
private ArrayList<NotificationRowData> getTableRows() {
|
||||||
|
@ -359,7 +360,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
||||||
|
|
||||||
// Recalculate start/end indices for visible page
|
// Recalculate start/end indices for visible page
|
||||||
if (numRows > endIndex && endIndex - startIndex < pageConfig) {
|
if (numRows > endIndex && endIndex - startIndex < pageConfig) {
|
||||||
endIndex = startIndex + pageConfig - 1;//numRows -1;
|
endIndex = startIndex + pageConfig - 1;// numRows -1;
|
||||||
if (endIndex - startIndex > pageConfig - 1) {
|
if (endIndex - startIndex > pageConfig - 1) {
|
||||||
startIndex = ((pageConfig * selectedPage) - (pageConfig - 1)) - 1;
|
startIndex = ((pageConfig * selectedPage) - (pageConfig - 1)) - 1;
|
||||||
}
|
}
|
||||||
|
@ -390,7 +391,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete table rows.
|
* Delete table rows.
|
||||||
*
|
*
|
||||||
* @param deleteRecordIds
|
* @param deleteRecordIds
|
||||||
*/
|
*/
|
||||||
public void deleteTableDataRows(ArrayList<Integer> deleteRecordIds) {
|
public void deleteTableDataRows(ArrayList<Integer> deleteRecordIds) {
|
||||||
|
@ -408,7 +409,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the table obj.
|
* Get the table obj.
|
||||||
*
|
*
|
||||||
* @return the table obj.
|
* @return the table obj.
|
||||||
*/
|
*/
|
||||||
public Table getTable() {
|
public Table getTable() {
|
||||||
|
@ -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() {
|
public void handleDeleteNotification() {
|
||||||
|
|
||||||
|
@ -472,7 +473,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Action taken when tool tip is selected.
|
* Action taken when tool tip is selected.
|
||||||
*
|
*
|
||||||
* @param showToolTips
|
* @param showToolTips
|
||||||
* true when tooltips are on
|
* true when tooltips are on
|
||||||
*/
|
*/
|
||||||
|
@ -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() {
|
public void handleDeleteOlderThan() {
|
||||||
|
|
||||||
|
@ -689,8 +690,8 @@ 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
|
* @param priority
|
||||||
* priority indicator
|
* priority indicator
|
||||||
*/
|
*/
|
||||||
|
@ -726,7 +727,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the start index.
|
* Get the start index.
|
||||||
*
|
*
|
||||||
* @return start index
|
* @return start index
|
||||||
*/
|
*/
|
||||||
public int getStartIndex() {
|
public int getStartIndex() {
|
||||||
|
@ -735,7 +736,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the end index.
|
* Get the end index.
|
||||||
*
|
*
|
||||||
* @return end index
|
* @return end index
|
||||||
*/
|
*/
|
||||||
public int getEndIndex() {
|
public int getEndIndex() {
|
||||||
|
@ -744,7 +745,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the selected index.
|
* Get the selected index.
|
||||||
*
|
*
|
||||||
* @return selected index
|
* @return selected index
|
||||||
*/
|
*/
|
||||||
public int getSelectedIndex() {
|
public int getSelectedIndex() {
|
||||||
|
@ -753,7 +754,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the table cell text.
|
* Get the table cell text.
|
||||||
*
|
*
|
||||||
* @param name
|
* @param name
|
||||||
* The column name
|
* The column name
|
||||||
* @param rd
|
* @param rd
|
||||||
|
@ -782,7 +783,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Populate the NotificationRowData objects
|
* Populate the NotificationRowData objects
|
||||||
*
|
*
|
||||||
* @param notificationRecords
|
* @param notificationRecords
|
||||||
* list of notification records
|
* list of notification records
|
||||||
*/
|
*/
|
||||||
|
@ -857,7 +858,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pass filter information.
|
* Pass filter information.
|
||||||
*
|
*
|
||||||
* @param username
|
* @param username
|
||||||
* user name table data
|
* user name table data
|
||||||
* @param priority
|
* @param priority
|
||||||
|
@ -915,11 +916,11 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pass filter information.
|
* Pass filter information.
|
||||||
*
|
*
|
||||||
* @param records
|
* @param records
|
||||||
* Notification record
|
* Notification record
|
||||||
* @return boolean true if passes filter
|
* @return boolean true if passes filter
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public boolean passesFilter(List<NotificationRecord> records) {
|
public boolean passesFilter(List<NotificationRecord> records) {
|
||||||
for (NotificationRecord record : records) {
|
for (NotificationRecord record : records) {
|
||||||
|
@ -933,10 +934,10 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the column data.
|
* Get the column data.
|
||||||
*
|
*
|
||||||
* @param colName
|
* @param colName
|
||||||
* The column name of interest
|
* The column name of interest
|
||||||
*
|
*
|
||||||
* @return The populated ColumnXML object
|
* @return The populated ColumnXML object
|
||||||
*/
|
*/
|
||||||
private ColumnXML getColumnData(String colName) {
|
private ColumnXML getColumnData(String colName) {
|
||||||
|
@ -1144,7 +1145,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
*
|
*
|
||||||
* @see
|
* @see
|
||||||
* com.raytheon.uf.viz.datadelivery.common.ui.TableComp#handleTableMouseClick
|
* com.raytheon.uf.viz.datadelivery.common.ui.TableComp#handleTableMouseClick
|
||||||
* (org.eclipse.swt.events.MouseEvent)
|
* (org.eclipse.swt.events.MouseEvent)
|
||||||
|
@ -1156,7 +1157,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
*
|
*
|
||||||
* @see com.raytheon.uf.viz.datadelivery.common.ui.TableComp#
|
* @see com.raytheon.uf.viz.datadelivery.common.ui.TableComp#
|
||||||
* handleTableSelectionChange(org.eclipse.swt.events.SelectionEvent)
|
* handleTableSelectionChange(org.eclipse.swt.events.SelectionEvent)
|
||||||
*/
|
*/
|
||||||
|
@ -1169,7 +1170,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
*
|
*
|
||||||
* @see com.raytheon.uf.viz.core.notification.INotificationObserver#
|
* @see com.raytheon.uf.viz.core.notification.INotificationObserver#
|
||||||
* notificationArrived
|
* notificationArrived
|
||||||
* (com.raytheon.uf.viz.core.notification.NotificationMessage[])
|
* (com.raytheon.uf.viz.core.notification.NotificationMessage[])
|
||||||
|
|
|
@ -114,6 +114,7 @@ import com.raytheon.viz.ui.presenter.IDisplay;
|
||||||
* and SubscriptionConfigurationManager.
|
* and SubscriptionConfigurationManager.
|
||||||
* Jan 21, 2013 1501 djohnson Only send notification if subscription was actually activated/deactivated,
|
* 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.
|
* remove race condition of GUI thread updating the table after notification.
|
||||||
|
* Jan 22, 2013 1520 mpduff Removed menu accelerators.
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author mpduff
|
* @author mpduff
|
||||||
|
@ -317,7 +318,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
||||||
fileMenuItem.setMenu(fileMenu);
|
fileMenuItem.setMenu(fileMenu);
|
||||||
|
|
||||||
MenuItem newMI = new MenuItem(fileMenu, SWT.NONE);
|
MenuItem newMI = new MenuItem(fileMenu, SWT.NONE);
|
||||||
newMI.setText("&New Subscription...");
|
newMI.setText("New Subscription...");
|
||||||
newMI.addSelectionListener(new SelectionAdapter() {
|
newMI.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent event) {
|
public void widgetSelected(SelectionEvent event) {
|
||||||
|
@ -326,7 +327,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
||||||
});
|
});
|
||||||
|
|
||||||
MenuItem groupMI = new MenuItem(fileMenu, SWT.NONE);
|
MenuItem groupMI = new MenuItem(fileMenu, SWT.NONE);
|
||||||
groupMI.setText("&New Group...");
|
groupMI.setText("New Group...");
|
||||||
groupMI.addSelectionListener(new SelectionAdapter() {
|
groupMI.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent event) {
|
public void widgetSelected(SelectionEvent event) {
|
||||||
|
@ -358,7 +359,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
||||||
new MenuItem(fileMenu, SWT.SEPARATOR);
|
new MenuItem(fileMenu, SWT.SEPARATOR);
|
||||||
|
|
||||||
MenuItem exitMI = new MenuItem(fileMenu, SWT.NONE);
|
MenuItem exitMI = new MenuItem(fileMenu, SWT.NONE);
|
||||||
exitMI.setText("&Exit");
|
exitMI.setText("Exit");
|
||||||
exitMI.addSelectionListener(new SelectionAdapter() {
|
exitMI.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent event) {
|
public void widgetSelected(SelectionEvent event) {
|
||||||
|
@ -376,7 +377,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
||||||
settingsMenuItem.setMenu(settingsMenu);
|
settingsMenuItem.setMenu(settingsMenu);
|
||||||
|
|
||||||
MenuItem configureMI = new MenuItem(settingsMenu, SWT.NONE);
|
MenuItem configureMI = new MenuItem(settingsMenu, SWT.NONE);
|
||||||
configureMI.setText("&Configure Table...");
|
configureMI.setText("Configure Table...");
|
||||||
configureMI.addSelectionListener(new SelectionAdapter() {
|
configureMI.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent event) {
|
public void widgetSelected(SelectionEvent event) {
|
||||||
|
@ -385,7 +386,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
||||||
});
|
});
|
||||||
|
|
||||||
tooltipMI = new MenuItem(settingsMenu, SWT.CHECK);
|
tooltipMI = new MenuItem(settingsMenu, SWT.CHECK);
|
||||||
tooltipMI.setText("&Tooltips");
|
tooltipMI.setText("Tooltips");
|
||||||
tooltipMI.setSelection(false);
|
tooltipMI.setSelection(false);
|
||||||
tooltipMI.addSelectionListener(new SelectionAdapter() {
|
tooltipMI.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -403,7 +404,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
||||||
helpMenuItem.setMenu(helpMenu);
|
helpMenuItem.setMenu(helpMenu);
|
||||||
|
|
||||||
MenuItem helpNotTableMI = new MenuItem(helpMenu, SWT.NONE);
|
MenuItem helpNotTableMI = new MenuItem(helpMenu, SWT.NONE);
|
||||||
helpNotTableMI.setText("&About Subscription Manager...");
|
helpNotTableMI.setText("About Subscription Manager...");
|
||||||
helpNotTableMI.addSelectionListener(new SelectionAdapter() {
|
helpNotTableMI.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent event) {
|
public void widgetSelected(SelectionEvent event) {
|
||||||
|
@ -423,7 +424,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
||||||
editMenuItem.setMenu(editMenu);
|
editMenuItem.setMenu(editMenu);
|
||||||
|
|
||||||
MenuItem editMI = new MenuItem(editMenu, SWT.NONE);
|
MenuItem editMI = new MenuItem(editMenu, SWT.NONE);
|
||||||
editMI.setText("&Edit Subscription...");
|
editMI.setText("Edit Subscription...");
|
||||||
editMI.addSelectionListener(new SelectionAdapter() {
|
editMI.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent event) {
|
public void widgetSelected(SelectionEvent event) {
|
||||||
|
@ -432,7 +433,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
||||||
});
|
});
|
||||||
|
|
||||||
MenuItem copyMI = new MenuItem(editMenu, SWT.NONE);
|
MenuItem copyMI = new MenuItem(editMenu, SWT.NONE);
|
||||||
copyMI.setText("&Copy Subscription...");
|
copyMI.setText("Copy Subscription...");
|
||||||
copyMI.addSelectionListener(new SelectionAdapter() {
|
copyMI.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent event) {
|
public void widgetSelected(SelectionEvent event) {
|
||||||
|
@ -441,7 +442,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
||||||
});
|
});
|
||||||
|
|
||||||
MenuItem deleteMI = new MenuItem(editMenu, SWT.NONE);
|
MenuItem deleteMI = new MenuItem(editMenu, SWT.NONE);
|
||||||
deleteMI.setText("&Delete Subscription");
|
deleteMI.setText("Delete Subscription");
|
||||||
deleteMI.addSelectionListener(new SelectionAdapter() {
|
deleteMI.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent event) {
|
public void widgetSelected(SelectionEvent event) {
|
||||||
|
@ -591,8 +592,8 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
||||||
String msg = user.uniqueId()
|
String msg = user.uniqueId()
|
||||||
+ " is not authorized to create subscriptions";
|
+ " is not authorized to create subscriptions";
|
||||||
try {
|
try {
|
||||||
if (DataDeliveryServices.getPermissionsService().checkPermission(user, msg, permission)
|
if (DataDeliveryServices.getPermissionsService()
|
||||||
.isAuthorized()) {
|
.checkPermission(user, msg, permission).isAuthorized()) {
|
||||||
DataBrowserAction action = new DataBrowserAction();
|
DataBrowserAction action = new DataBrowserAction();
|
||||||
Map<String, String> params = new HashMap<String, String>();
|
Map<String, String> params = new HashMap<String, String>();
|
||||||
ExecutionEvent ee = new ExecutionEvent(null, params, null, null);
|
ExecutionEvent ee = new ExecutionEvent(null, params, null, null);
|
||||||
|
@ -622,8 +623,8 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
||||||
+ permission;
|
+ permission;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (DataDeliveryServices.getPermissionsService().checkPermission(user, msg, permission)
|
if (DataDeliveryServices.getPermissionsService()
|
||||||
.isAuthorized()) {
|
.checkPermission(user, msg, permission).isAuthorized()) {
|
||||||
if (create) {
|
if (create) {
|
||||||
if (createGroupDlg == null) {
|
if (createGroupDlg == null) {
|
||||||
createGroupDlg = new CreateGroupDefinitionDlg(
|
createGroupDlg = new CreateGroupDefinitionDlg(
|
||||||
|
@ -744,8 +745,8 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
||||||
+ permission;
|
+ permission;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (DataDeliveryServices.getPermissionsService().checkPermission(user, msg, permission)
|
if (DataDeliveryServices.getPermissionsService()
|
||||||
.isAuthorized()) {
|
.checkPermission(user, msg, permission).isAuthorized()) {
|
||||||
String message = null;
|
String message = null;
|
||||||
|
|
||||||
if (selectionCount > 1) {
|
if (selectionCount > 1) {
|
||||||
|
@ -831,8 +832,8 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
||||||
+ " Subscriptions\nPermission: " + permission;
|
+ " Subscriptions\nPermission: " + permission;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (DataDeliveryServices.getPermissionsService().checkPermission(user, msg, permission)
|
if (DataDeliveryServices.getPermissionsService()
|
||||||
.isAuthorized()) {
|
.checkPermission(user, msg, permission).isAuthorized()) {
|
||||||
final List<Subscription> updatedList = new ArrayList<Subscription>();
|
final List<Subscription> updatedList = new ArrayList<Subscription>();
|
||||||
|
|
||||||
int count = tableComp.getTable().getSelectionCount();
|
int count = tableComp.getTable().getSelectionCount();
|
||||||
|
@ -1055,10 +1056,12 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
||||||
String msg = user.uniqueId()
|
String msg = user.uniqueId()
|
||||||
+ " is not authorized to access Subscription Approval";
|
+ " is not authorized to access Subscription Approval";
|
||||||
|
|
||||||
return DataDeliveryServices.getPermissionsService().checkPermissions(user, msg,
|
return DataDeliveryServices
|
||||||
DataDeliveryPermission.SUBSCRIPTION_APPROVE_SITE,
|
.getPermissionsService()
|
||||||
DataDeliveryPermission.SUBSCRIPTION_APPROVE_USER,
|
.checkPermissions(user, msg,
|
||||||
DataDeliveryPermission.SUBSCRIPTION_APPROVE_VIEW)
|
DataDeliveryPermission.SUBSCRIPTION_APPROVE_SITE,
|
||||||
|
DataDeliveryPermission.SUBSCRIPTION_APPROVE_USER,
|
||||||
|
DataDeliveryPermission.SUBSCRIPTION_APPROVE_VIEW)
|
||||||
.isAuthorized();
|
.isAuthorized();
|
||||||
} catch (VizException e) {
|
} catch (VizException e) {
|
||||||
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e);
|
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e);
|
||||||
|
@ -1088,8 +1091,8 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
||||||
|
|
||||||
for (Subscription subscription : subscriptions) {
|
for (Subscription subscription : subscriptions) {
|
||||||
subscriptionNotificationService
|
subscriptionNotificationService
|
||||||
.sendDeletedSubscriptionNotification(
|
.sendDeletedSubscriptionNotification(subscription,
|
||||||
subscription, username);
|
username);
|
||||||
}
|
}
|
||||||
} catch (RegistryHandlerException e) {
|
} catch (RegistryHandlerException e) {
|
||||||
exceptions.add(e);
|
exceptions.add(e);
|
||||||
|
|
Loading…
Add table
Reference in a new issue