Issue #2143. Changes for non-blocking SCAN dialogs.
Change-Id: I0afcaced20e0cc76cbcb2d64a24fcfc3022dc1d1 Former-commit-id: 5539da3d19fa0c174eba1a8733e946ca10e5f4bb
This commit is contained in:
parent
08f1021c6d
commit
4afde7addb
22 changed files with 1271 additions and 376 deletions
|
@ -113,6 +113,7 @@ import com.vividsolutions.jts.io.WKBReader;
|
|||
* to avoid !TimeStamp.equals(Date) issue
|
||||
* Apr 26, 2013 1926 njensen Optimized getAvailableUris()
|
||||
* Jul 24, 2013 2218 mpduff Improved error handling, optimizations
|
||||
* Jul 30, 2013 2143 skorolev Changes for non-blocking dialogs.
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
|
@ -753,48 +754,54 @@ public class ScanMonitor extends ResourceMonitor implements IScanDialogListener
|
|||
if (cellDialogs.isEmpty()) {
|
||||
getScanConfig().reload(ScanTables.CELL);
|
||||
}
|
||||
if (cellDialogs.get(icao) == null) {
|
||||
if (cellDialogs.get(icao) == null||cellDialogs.get(icao).isDisposed()) {
|
||||
SCANCellTableDlg cellDialog = new SCANCellTableDlg(shell, icao,
|
||||
new SCANTableData(ScanTables.CELL));
|
||||
cellDialogs.put(icao, cellDialog);
|
||||
monitor.addMonitorListener(cellDialog);
|
||||
cellDialog.addMonitorControlListener(monitor);
|
||||
} else {
|
||||
cellDialogs.get(icao).bringToTop();
|
||||
}
|
||||
} else if (table.equals(ScanTables.DMD)) {
|
||||
if (dmdDialogs.isEmpty()) {
|
||||
getScanConfig().reload(ScanTables.DMD);
|
||||
}
|
||||
if (dmdDialogs.get(icao) == null) {
|
||||
if (dmdDialogs.get(icao) == null||dmdDialogs.get(icao).isDisposed()) {
|
||||
SCANDmdTableDlg dmdDialog = new SCANDmdTableDlg(shell, icao,
|
||||
new SCANTableData(ScanTables.DMD));
|
||||
dmdDialogs.put(icao, dmdDialog);
|
||||
monitor.addMonitorListener(dmdDialog);
|
||||
dmdDialog.addMonitorControlListener(monitor);
|
||||
}else{
|
||||
dmdDialogs.get(icao).bringToTop();
|
||||
}
|
||||
} else if (table.equals(ScanTables.MESO)) {
|
||||
if (mesoDialogs.isEmpty()) {
|
||||
getScanConfig().reload(ScanTables.MESO);
|
||||
}
|
||||
if (mesoDialogs.get(icao) == null) {
|
||||
if (mesoDialogs.get(icao) == null || mesoDialogs.get(icao).isDisposed()) {
|
||||
SCANMesoTableDlg mesoDialog = new SCANMesoTableDlg(shell, icao,
|
||||
new SCANTableData(ScanTables.MESO));
|
||||
mesoDialogs.put(icao, mesoDialog);
|
||||
monitor.addMonitorListener(mesoDialog);
|
||||
mesoDialog.addMonitorControlListener(monitor);
|
||||
} else {
|
||||
mesoDialogs.get(icao).bringToTop();
|
||||
return;
|
||||
}
|
||||
} else if (table.equals(ScanTables.TVS)) {
|
||||
if (tvsDialogs.isEmpty()) {
|
||||
getScanConfig().reload(ScanTables.TVS);
|
||||
}
|
||||
if (tvsDialogs.get(icao) == null) {
|
||||
if (tvsDialogs.get(icao) == null||tvsDialogs.get(icao).isDisposed()) {
|
||||
SCANTvsTableDlg tvsDialog = new SCANTvsTableDlg(shell, icao,
|
||||
new SCANTableData(ScanTables.TVS));
|
||||
tvsDialogs.put(icao, tvsDialog);
|
||||
monitor.addMonitorListener(tvsDialog);
|
||||
tvsDialog.addMonitorControlListener(monitor);
|
||||
} else {
|
||||
tvsDialogs.get(icao).bringToTop();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,6 +39,7 @@ import com.raytheon.uf.common.monitor.scan.config.SCANConfigEnums.ScanTables;
|
|||
import com.raytheon.uf.common.monitor.scan.xml.SCANAttributesXML;
|
||||
import com.raytheon.uf.common.monitor.scan.xml.SCANConfigDmdXML;
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialogBase.CAVE;
|
||||
|
||||
/**
|
||||
* This class displays the DMD Display Filter Control dialog.
|
||||
|
@ -49,6 +50,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 12, 2009 3039 lvenable Initial creation.
|
||||
* 24 Jul 2013 #2143 skorolev Changes for non-blocking dialog.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -102,12 +104,17 @@ public class DmdDisplayFilterDlg extends CaveSWTDialog implements
|
|||
* Callback that is called when changes are made.
|
||||
*/
|
||||
public DmdDisplayFilterDlg(Shell parentShell, IDisplayFilterUpdate cb) {
|
||||
super(parentShell);
|
||||
super(parentShell, SWT.DIALOG_TRIM | SWT.RESIZE, CAVE.DO_NOT_BLOCK);
|
||||
setText("DMD Display Filter Control");
|
||||
|
||||
displayFilterUpdateCB = cb;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#constructShellLayout()
|
||||
*/
|
||||
@Override
|
||||
protected Layout constructShellLayout() {
|
||||
// Create the main layout for the shell.
|
||||
|
@ -117,12 +124,24 @@ public class DmdDisplayFilterDlg extends CaveSWTDialog implements
|
|||
return mainLayout;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#disposed()
|
||||
*/
|
||||
@Override
|
||||
protected void disposed() {
|
||||
lrgLabelFont.dispose();
|
||||
smLabelFont.dispose();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#initializeComponents(org
|
||||
* .eclipse.swt.widgets.Shell)
|
||||
*/
|
||||
@Override
|
||||
protected void initializeComponents(Shell shell) {
|
||||
// Initialize all of the controls and layouts
|
||||
|
@ -241,7 +260,7 @@ public class DmdDisplayFilterDlg extends CaveSWTDialog implements
|
|||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
applyAction();
|
||||
shell.dispose();
|
||||
close();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -364,9 +383,15 @@ public class DmdDisplayFilterDlg extends CaveSWTDialog implements
|
|||
displayFilterUpdateCB.displayFilterUpdated();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.uf.viz.monitor.scan.commondialogs.ICommonDialogAction#
|
||||
* closeDialog()
|
||||
*/
|
||||
@Override
|
||||
public void closeDialog() {
|
||||
shell.dispose();
|
||||
close();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -41,6 +41,7 @@ import com.raytheon.uf.common.monitor.scan.config.SCANConfig;
|
|||
import com.raytheon.uf.common.monitor.scan.config.TrendSetConfigMgr;
|
||||
import com.raytheon.uf.common.monitor.scan.config.SCANConfigEnums.ScanTables;
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialogBase.CAVE;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -52,6 +53,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Dec 3, 2009 #3039 lvenable Initial creation
|
||||
* 24 Jul 2013 #2143 skorolev Changes for non-blocking dialog.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -135,12 +137,15 @@ public class EditCreateTrendDlg extends CaveSWTDialog implements
|
|||
* SCAN table identifier.
|
||||
*/
|
||||
public EditCreateTrendDlg(Shell parentShell, ScanTables scanTable) {
|
||||
super(parentShell);
|
||||
super(parentShell, SWT.DIALOG_TRIM | SWT.RESIZE, CAVE.DO_NOT_BLOCK);
|
||||
setText("Edit/Create Trend Sets");
|
||||
|
||||
this.scanTable = scanTable;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#constructShellLayout()
|
||||
*/
|
||||
@Override
|
||||
protected Layout constructShellLayout() {
|
||||
// Create the main layout for the shell.
|
||||
|
@ -150,6 +155,9 @@ public class EditCreateTrendDlg extends CaveSWTDialog implements
|
|||
return mainLayout;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#initializeComponents(org.eclipse.swt.widgets.Shell)
|
||||
*/
|
||||
@Override
|
||||
protected void initializeComponents(Shell shell) {
|
||||
/*
|
||||
|
@ -565,7 +573,7 @@ public class EditCreateTrendDlg extends CaveSWTDialog implements
|
|||
scanCfg.getTrendConfigMgr(scanTable).saveTrendSets();
|
||||
|
||||
okSelected = true;
|
||||
shell.dispose();
|
||||
close();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -642,7 +650,7 @@ public class EditCreateTrendDlg extends CaveSWTDialog implements
|
|||
@Override
|
||||
public void closeDialog() {
|
||||
handleCancelAction();
|
||||
shell.dispose();
|
||||
close();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -45,35 +45,60 @@ import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
|
|||
import com.raytheon.uf.common.monitor.scan.config.SCANConfig;
|
||||
import com.raytheon.uf.common.monitor.scan.config.SCANConfigEnums.ScanTables;
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialogBase.CAVE;
|
||||
|
||||
/**
|
||||
* Open and Save Dialog for configuration files.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 24 Jul 2013 #2143 skorolev Changes for non-blocking dialogs.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author
|
||||
* @version 1.0
|
||||
*/
|
||||
public class LoadSaveConfigDlg extends CaveSWTDialog {
|
||||
|
||||
public static enum DialogType {
|
||||
OPEN, SAVE_AS
|
||||
};
|
||||
|
||||
/* Type of dialog */
|
||||
private DialogType dialogType;
|
||||
|
||||
/* Font type */
|
||||
private Font controlFont;
|
||||
|
||||
/* File list control */
|
||||
private List cfgFileList;
|
||||
|
||||
/* LocalizationFile */
|
||||
private LocalizationFile selectedFile;
|
||||
|
||||
/* Localization Files */
|
||||
private LocalizationFile[] locFiles;
|
||||
|
||||
/* Tree map of localization files */
|
||||
private TreeMap<String, LocalizationFile> locFileMap;
|
||||
|
||||
/* Name of new file */
|
||||
private Text newFileNameTF;
|
||||
|
||||
/* Action button */
|
||||
private Button actionBtn;
|
||||
|
||||
/* SCAN Table */
|
||||
private ScanTables scanTable;
|
||||
|
||||
/* SCAN configuration */
|
||||
private SCANConfig scanCfg;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param parent
|
||||
* @param type
|
||||
* @param scanTable
|
||||
*/
|
||||
public LoadSaveConfigDlg(Shell parent, DialogType type, ScanTables scanTable) {
|
||||
super(parent, SWT.TITLE);
|
||||
super(parent, SWT.DIALOG_TRIM | SWT.RESIZE, CAVE.DO_NOT_BLOCK);
|
||||
if (type == DialogType.OPEN) {
|
||||
setText("Load " + scanTable.name() + " Configuration");
|
||||
} else {
|
||||
|
@ -85,6 +110,9 @@ public class LoadSaveConfigDlg extends CaveSWTDialog {
|
|||
scanCfg = SCANConfig.getInstance();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#constructShellLayout()
|
||||
*/
|
||||
@Override
|
||||
protected Layout constructShellLayout() {
|
||||
// Create the main layout for the shell.
|
||||
|
@ -95,12 +123,18 @@ public class LoadSaveConfigDlg extends CaveSWTDialog {
|
|||
return mainLayout;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#disposed()
|
||||
*/
|
||||
@Override
|
||||
protected void disposed() {
|
||||
controlFont.dispose();
|
||||
setReturnValue(selectedFile);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#initializeComponents(org.eclipse.swt.widgets.Shell)
|
||||
*/
|
||||
@Override
|
||||
protected void initializeComponents(Shell shell) {
|
||||
locFileMap = new TreeMap<String, LocalizationFile>();
|
||||
|
@ -114,6 +148,9 @@ public class LoadSaveConfigDlg extends CaveSWTDialog {
|
|||
getAvailableConfigFiles();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create List control.
|
||||
*/
|
||||
private void createListControl() {
|
||||
GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
|
||||
Composite controlComp = new Composite(shell, SWT.NONE);
|
||||
|
@ -161,6 +198,9 @@ public class LoadSaveConfigDlg extends CaveSWTDialog {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create bottom buttons.
|
||||
*/
|
||||
private void createBottomButtons() {
|
||||
GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
|
||||
Composite mainButtonComp = new Composite(shell, SWT.NONE);
|
||||
|
@ -189,7 +229,7 @@ public class LoadSaveConfigDlg extends CaveSWTDialog {
|
|||
public void widgetSelected(SelectionEvent event) {
|
||||
if (validateFileName() == true) {
|
||||
saveAction();
|
||||
shell.dispose();
|
||||
close();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -202,18 +242,26 @@ public class LoadSaveConfigDlg extends CaveSWTDialog {
|
|||
cancelBtn.addSelectionListener(new SelectionAdapter() {
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
selectedFile = null;
|
||||
shell.dispose();
|
||||
setReturnValue(null);
|
||||
close();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Open action.
|
||||
*/
|
||||
private void openAction() {
|
||||
int selectedIndex = cfgFileList.getSelectionIndex();
|
||||
String str = cfgFileList.getItem(selectedIndex);
|
||||
selectedFile = locFileMap.get(str);
|
||||
shell.dispose();
|
||||
setReturnValue(selectedFile);
|
||||
close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Save action.
|
||||
*/
|
||||
private void saveAction() {
|
||||
// TODO : need to save a file
|
||||
|
||||
|
@ -224,10 +272,15 @@ public class LoadSaveConfigDlg extends CaveSWTDialog {
|
|||
LocalizationType.COMMON_STATIC, LocalizationLevel.SITE);
|
||||
String newFileName = getConfigPath() + fileName;
|
||||
selectedFile = pm.getLocalizationFile(context, newFileName);
|
||||
|
||||
shell.dispose();
|
||||
setReturnValue(selectedFile);
|
||||
close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate file.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private boolean validateFileName() {
|
||||
StringBuffer strBuf = new StringBuffer(newFileNameTF.getText().trim());
|
||||
|
||||
|
@ -278,6 +331,9 @@ public class LoadSaveConfigDlg extends CaveSWTDialog {
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get available configuration files.
|
||||
*/
|
||||
private void getAvailableConfigFiles() {
|
||||
String[] extensions = new String[] { ".xml" };
|
||||
locFiles = PathManagerFactory.getPathManager().listStaticFiles(
|
||||
|
@ -288,11 +344,6 @@ public class LoadSaveConfigDlg extends CaveSWTDialog {
|
|||
}
|
||||
|
||||
for (int i = 0; i < locFiles.length; i++) {
|
||||
System.out.println("Get file, get name --- "
|
||||
+ locFiles[i].getFile().getName());
|
||||
System.out.println("Get name *** "
|
||||
+ locFiles[i].getName());
|
||||
// locFileMap.put(locFiles[i].getName(), locFiles[i]);
|
||||
locFileMap.put(locFiles[i].getFile().getName(), locFiles[i]);
|
||||
}
|
||||
|
||||
|
@ -305,10 +356,20 @@ public class LoadSaveConfigDlg extends CaveSWTDialog {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get path.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private String getConfigPath() {
|
||||
return scanCfg.getConfigurationPath(scanTable);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get localization file.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public LocalizationFile getSelectedFile() {
|
||||
return selectedFile;
|
||||
}
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
**/
|
||||
package com.raytheon.uf.viz.monitor.scan.commondialogs;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.FocusAdapter;
|
||||
import org.eclipse.swt.events.FocusEvent;
|
||||
|
@ -45,49 +43,71 @@ import com.raytheon.uf.common.monitor.scan.config.SCANConfigEnums.ScanTables;
|
|||
import com.raytheon.uf.viz.monitor.scan.ScanMonitor;
|
||||
import com.raytheon.uf.viz.monitor.scan.tables.AbstractTableDlg;
|
||||
import com.raytheon.uf.viz.monitor.scan.tables.SCANAlarmAlertManager;
|
||||
import com.raytheon.uf.viz.monitor.scan.tables.SCANCellTableDlg;
|
||||
import com.raytheon.uf.viz.monitor.scan.tables.SCANAlarmAlertManager.AlarmType;
|
||||
import com.raytheon.uf.viz.monitor.scan.tables.SCANAlarmAlertManager.AlertedAlarms;
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||
|
||||
/**
|
||||
* SCAN Alarm Threshold Dialog.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 24 Jul 2013 #2143 skorolev Changes for non-blocking dialogs.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author
|
||||
* @version 1.0
|
||||
*/
|
||||
public class SCANAlarmThreshDlg extends CaveSWTDialog implements
|
||||
ICommonDialogAction {
|
||||
|
||||
/* SCAN Table */
|
||||
private ScanTables scanTable;
|
||||
|
||||
/* SCAN Configuration */
|
||||
private SCANConfig scanCfg;
|
||||
|
||||
/* Attribute combo control */
|
||||
private Combo attributeCbo;
|
||||
|
||||
/* Disable All Alarms Checkbox */
|
||||
private Button disableAllAlarmChk;
|
||||
|
||||
/* Absolute Value Rdo */
|
||||
private Button absValueRdo;
|
||||
|
||||
/* Rate Of Change Rdo */
|
||||
private Button rateOfChangeRdo;
|
||||
|
||||
/* Selected Choice Label */
|
||||
private Label selectedChoiceLbl;
|
||||
|
||||
/* Time Frame Value */
|
||||
private Text valueTF;
|
||||
|
||||
/* Unit Label */
|
||||
private Label unitsLbl;
|
||||
|
||||
/* "Absolute Value" */
|
||||
private final String absValStr = "Absolute Value";
|
||||
|
||||
/* "Rate of Change" */
|
||||
private final String rocStr = "Rate of Change";
|
||||
|
||||
/* Bell Checkbox */
|
||||
private Button bellChk;
|
||||
|
||||
/* SCAN Alarm Alert Manager */
|
||||
private SCANAlarmAlertManager mgr;
|
||||
|
||||
/* Alarm Type */
|
||||
private AlarmType type;
|
||||
|
||||
/* prevAttr */
|
||||
private String prevAttr;
|
||||
|
||||
/* Site */
|
||||
private String site = null;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param site
|
||||
* @param parentShell
|
||||
* @param scanTable
|
||||
*/
|
||||
public SCANAlarmThreshDlg(String site, Shell parentShell,
|
||||
ScanTables scanTable) {
|
||||
super(parentShell);
|
||||
super(parentShell, SWT.DIALOG_TRIM | SWT.RESIZE, CAVE.DO_NOT_BLOCK);
|
||||
if (scanTable == ScanTables.CELL) {
|
||||
setText("CELL Alarm Thresh");
|
||||
} else {
|
||||
|
@ -99,6 +119,9 @@ public class SCANAlarmThreshDlg extends CaveSWTDialog implements
|
|||
this.site = site;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#constructShellLayout()
|
||||
*/
|
||||
@Override
|
||||
protected Layout constructShellLayout() {
|
||||
// Create the main layout for the shell.
|
||||
|
@ -108,6 +131,9 @@ public class SCANAlarmThreshDlg extends CaveSWTDialog implements
|
|||
return mainLayout;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#initializeComponents(org.eclipse.swt.widgets.Shell)
|
||||
*/
|
||||
@Override
|
||||
protected void initializeComponents(Shell shell) {
|
||||
// Initialize all of the controls and layouts
|
||||
|
@ -119,6 +145,9 @@ public class SCANAlarmThreshDlg extends CaveSWTDialog implements
|
|||
attributeChanged();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Dialog Controls
|
||||
*/
|
||||
private void createControls() {
|
||||
Composite controlComp = new Composite(shell, SWT.NONE);
|
||||
controlComp.setLayout(new GridLayout(3, false));
|
||||
|
@ -230,6 +259,9 @@ public class SCANAlarmThreshDlg extends CaveSWTDialog implements
|
|||
unitsLbl.setLayoutData(gd);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Bottom Buttons.
|
||||
*/
|
||||
private void createBottomButtons() {
|
||||
Composite buttonComp = new Composite(shell, SWT.NONE);
|
||||
buttonComp.setLayout(new GridLayout(2, true));
|
||||
|
@ -255,7 +287,7 @@ public class SCANAlarmThreshDlg extends CaveSWTDialog implements
|
|||
} else {
|
||||
tableDlg.turnOnAlarm();
|
||||
}
|
||||
shell.dispose();
|
||||
close();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -272,6 +304,11 @@ public class SCANAlarmThreshDlg extends CaveSWTDialog implements
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Add Separator.
|
||||
*
|
||||
* @param parentComp
|
||||
*/
|
||||
private void addSeparator(Composite parentComp) {
|
||||
GridLayout gl = (GridLayout) parentComp.getLayout();
|
||||
|
||||
|
@ -281,6 +318,9 @@ public class SCANAlarmThreshDlg extends CaveSWTDialog implements
|
|||
sepLbl.setLayoutData(gd);
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate Attribute Combo control.
|
||||
*/
|
||||
private void populateAttributeCombo() {
|
||||
AbsConfigMgr absCfgMgr = scanCfg.getAbsConfigMgr(scanTable);
|
||||
|
||||
|
@ -293,17 +333,12 @@ public class SCANAlarmThreshDlg extends CaveSWTDialog implements
|
|||
attributeCbo.select(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Attribute Changed.
|
||||
*/
|
||||
private void attributeChanged() {
|
||||
String attrName = attributeCbo
|
||||
.getItem(attributeCbo.getSelectionIndex());
|
||||
/*
|
||||
* Check if the alarm is disabled and enable/disable the controls.
|
||||
*/
|
||||
// boolean alarmDisabled = scanCfg.getAlarmsDisabled(scanTable);
|
||||
// System.out.println("alarmDisabled = " + alarmDisabled);
|
||||
// disableAllAlarmChk.setSelection(alarmDisabled);
|
||||
//
|
||||
// disableSelectedAttributeAlarm(alarmDisabled);
|
||||
|
||||
/*
|
||||
* Set the value text control with the proper abs/roc value.
|
||||
|
@ -316,15 +351,12 @@ public class SCANAlarmThreshDlg extends CaveSWTDialog implements
|
|||
unitsLbl.setText(scanCfg.getAbsConfigMgr(scanTable).getUnit(attrName));
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable Selected Attribute Alarm.
|
||||
*
|
||||
* @param alarmDisabled
|
||||
*/
|
||||
private void disableSelectedAttributeAlarm(boolean alarmDisabled) {
|
||||
// String attrName =
|
||||
// attributeCbo.getItem(attributeCbo.getSelectionIndex());
|
||||
// boolean alarmEnabled = !disableAlarmChk.getSelection();
|
||||
//
|
||||
// scanCfg.getAbsConfigMgr(scanTable).setAlarmDisabled(attrName,
|
||||
// alarmEnabled);
|
||||
|
||||
System.out.println("alarmDisabled = " + alarmDisabled);
|
||||
|
||||
absValueRdo.setEnabled(!alarmDisabled);
|
||||
|
||||
|
@ -341,6 +373,9 @@ public class SCANAlarmThreshDlg extends CaveSWTDialog implements
|
|||
valueTF.setEnabled(!alarmDisabled);
|
||||
}
|
||||
|
||||
/**
|
||||
* Alarm Choice Changed.
|
||||
*/
|
||||
private void alarmChoiceChanged() {
|
||||
if (!valueTF.getText().isEmpty()) {
|
||||
mgr.updateScheduledAlarm(site, scanTable, prevAttr, type,
|
||||
|
@ -366,6 +401,9 @@ public class SCANAlarmThreshDlg extends CaveSWTDialog implements
|
|||
prevAttr = attrName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate And Set Time Frame Value.
|
||||
*/
|
||||
private void validateAndSetValue() {
|
||||
int newValue = 0;
|
||||
String valueStr = valueTF.getText().trim();
|
||||
|
@ -406,8 +444,11 @@ public class SCANAlarmThreshDlg extends CaveSWTDialog implements
|
|||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.commondialogs.ICommonDialogAction#closeDialog()
|
||||
*/
|
||||
@Override
|
||||
public void closeDialog() {
|
||||
shell.dispose();
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@ import com.raytheon.uf.common.monitor.scan.config.SCANConfigEnums.ScanTables;
|
|||
import com.raytheon.uf.common.monitor.scan.xml.ScanAlarmXML;
|
||||
import com.raytheon.uf.common.serialization.SerializationUtil;
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialogBase.CAVE;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -53,6 +54,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 22, 2010 lvenable Initial creation
|
||||
* 24 Jul 2013 #2143 skorolev Changes for non-blocking dialogs.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -62,30 +64,64 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
public class SCANAlarmTimeLimitDlg extends CaveSWTDialog implements
|
||||
ICommonDialogAction {
|
||||
|
||||
/**
|
||||
* Scan Tables
|
||||
*/
|
||||
private ScanTables scanTable;
|
||||
|
||||
/**
|
||||
* Cell Spinner
|
||||
*/
|
||||
private Spinner cellSpnr;
|
||||
|
||||
/**
|
||||
* Meso Spinner
|
||||
*/
|
||||
private Spinner mesoSpnr;
|
||||
|
||||
/**
|
||||
* TVS Spinner
|
||||
*/
|
||||
private Spinner tvsSpnr;
|
||||
|
||||
/**
|
||||
* DMD Spinner
|
||||
*/
|
||||
private Spinner dmdSpnr;
|
||||
|
||||
/**
|
||||
* Label Width
|
||||
*/
|
||||
private int labelWidth = 80;
|
||||
|
||||
/**
|
||||
* Width Spinner
|
||||
*/
|
||||
private int spinnerWidth = 70;
|
||||
|
||||
/**
|
||||
* SCAN Alarm XML
|
||||
*/
|
||||
private ScanAlarmXML dataXML;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param parentShell
|
||||
* @param scanTable
|
||||
* @param site
|
||||
*/
|
||||
public SCANAlarmTimeLimitDlg(Shell parentShell, ScanTables scanTable,
|
||||
String site) {
|
||||
super(parentShell);
|
||||
super(parentShell, SWT.DIALOG_TRIM | SWT.RESIZE, CAVE.DO_NOT_BLOCK);
|
||||
setText("Alarm Time Limit for: " + site);
|
||||
|
||||
this.scanTable = scanTable;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#constructShellLayout()
|
||||
*/
|
||||
@Override
|
||||
protected Layout constructShellLayout() {
|
||||
// Create the main layout for the shell.
|
||||
|
@ -95,6 +131,9 @@ public class SCANAlarmTimeLimitDlg extends CaveSWTDialog implements
|
|||
return mainLayout;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#initializeComponents(org.eclipse.swt.widgets.Shell)
|
||||
*/
|
||||
@Override
|
||||
protected void initializeComponents(Shell shell) {
|
||||
|
||||
|
@ -114,6 +153,9 @@ public class SCANAlarmTimeLimitDlg extends CaveSWTDialog implements
|
|||
createBottomButtons();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create CELL, MESO, TVS Controls.
|
||||
*/
|
||||
private void createCellMesoTvsControls() {
|
||||
Composite controlComp = new Composite(shell, SWT.NONE);
|
||||
GridLayout gl = new GridLayout(3, false);
|
||||
|
@ -195,6 +237,9 @@ public class SCANAlarmTimeLimitDlg extends CaveSWTDialog implements
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create DMD Controls
|
||||
*/
|
||||
private void createDmdControls() {
|
||||
Composite controlComp = new Composite(shell, SWT.NONE);
|
||||
GridLayout gl = new GridLayout(3, false);
|
||||
|
@ -231,6 +276,9 @@ public class SCANAlarmTimeLimitDlg extends CaveSWTDialog implements
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Bottom Buttons.
|
||||
*/
|
||||
private void createBottomButtons() {
|
||||
Composite buttonComp = new Composite(shell, SWT.NONE);
|
||||
buttonComp.setLayout(new GridLayout(2, true));
|
||||
|
@ -247,7 +295,7 @@ public class SCANAlarmTimeLimitDlg extends CaveSWTDialog implements
|
|||
public void widgetSelected(SelectionEvent e) {
|
||||
|
||||
saveAlarmData();
|
||||
shell.dispose();
|
||||
close();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -259,16 +307,22 @@ public class SCANAlarmTimeLimitDlg extends CaveSWTDialog implements
|
|||
cancelBtn.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
shell.dispose();
|
||||
close();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.commondialogs.ICommonDialogAction#closeDialog()
|
||||
*/
|
||||
@Override
|
||||
public void closeDialog() {
|
||||
shell.dispose();
|
||||
close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Read Alarm Data.
|
||||
*/
|
||||
private void readAlarmData()
|
||||
{
|
||||
try
|
||||
|
@ -281,12 +335,14 @@ public class SCANAlarmTimeLimitDlg extends CaveSWTDialog implements
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// e.printStackTrace();
|
||||
System.out.println("*** ScanAlarms.xml not available.");
|
||||
dataXML = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Save Alarm Data.
|
||||
*/
|
||||
private void saveAlarmData()
|
||||
{
|
||||
if (dataXML == null)
|
||||
|
@ -329,6 +385,11 @@ public class SCANAlarmTimeLimitDlg extends CaveSWTDialog implements
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Full Path And File Name.
|
||||
*
|
||||
* @return file name
|
||||
*/
|
||||
public String getFullPathAndFileName()
|
||||
{
|
||||
String fs = String.valueOf(File.separatorChar);
|
||||
|
|
|
@ -35,25 +35,61 @@ import org.eclipse.swt.widgets.Shell;
|
|||
import com.raytheon.uf.common.monitor.scan.config.SCANConfig;
|
||||
import com.raytheon.uf.common.monitor.scan.config.SCANConfigEnums.ScanTables;
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialogBase.CAVE;
|
||||
|
||||
/**
|
||||
* SCAN Attributes Dialog.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 24 Jul 2013 #2143 skorolev Changes for non-blocking dialogs.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author
|
||||
* @version 1.0
|
||||
*/
|
||||
public class SCANAttributesDlg extends CaveSWTDialog implements
|
||||
ICommonDialogAction {
|
||||
|
||||
/**
|
||||
* Attribute checkboxes.
|
||||
*/
|
||||
private ArrayList<Button> attributeChkBtns;
|
||||
|
||||
/**
|
||||
* Attribute Update Checkboxes.
|
||||
*/
|
||||
private IAttributeUpdate attributeUpdateCb;
|
||||
|
||||
/**
|
||||
* SCAN Tables.
|
||||
*/
|
||||
private ScanTables scanTable;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param parent
|
||||
* @param scanTable
|
||||
* @param attributeUpdateCb
|
||||
*/
|
||||
public SCANAttributesDlg(Shell parent, ScanTables scanTable,
|
||||
IAttributeUpdate attributeUpdateCb) {
|
||||
super(parent);
|
||||
super(parent, SWT.DIALOG_TRIM | SWT.RESIZE, CAVE.DO_NOT_BLOCK);
|
||||
setText("Attributes");
|
||||
|
||||
this.scanTable = scanTable;
|
||||
this.attributeUpdateCb = attributeUpdateCb;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#constructShellLayout()
|
||||
*/
|
||||
@Override
|
||||
protected Layout constructShellLayout() {
|
||||
// Create the main layout for the shell.
|
||||
|
@ -63,6 +99,9 @@ public class SCANAttributesDlg extends CaveSWTDialog implements
|
|||
return mainLayout;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#initializeComponents(org.eclipse.swt.widgets.Shell)
|
||||
*/
|
||||
@Override
|
||||
protected void initializeComponents(Shell shell) {
|
||||
attributeChkBtns = new ArrayList<Button>();
|
||||
|
@ -70,6 +109,9 @@ public class SCANAttributesDlg extends CaveSWTDialog implements
|
|||
createBottomButtons();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Attribute Controls.
|
||||
*/
|
||||
private void createAttributeControls() {
|
||||
SCANConfig scanCfg = SCANConfig.getInstance();
|
||||
|
||||
|
@ -87,6 +129,9 @@ public class SCANAttributesDlg extends CaveSWTDialog implements
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Bottom Buttons.
|
||||
*/
|
||||
private void createBottomButtons() {
|
||||
Composite buttonComp = new Composite(shell, SWT.NONE);
|
||||
buttonComp.setLayout(new GridLayout(2, false));
|
||||
|
@ -119,6 +164,9 @@ public class SCANAttributesDlg extends CaveSWTDialog implements
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Action.
|
||||
*/
|
||||
private void updateAction() {
|
||||
boolean[] selectedCols = new boolean[attributeChkBtns.size()];
|
||||
Arrays.fill(selectedCols, true);
|
||||
|
@ -131,9 +179,12 @@ public class SCANAttributesDlg extends CaveSWTDialog implements
|
|||
attributeUpdateCb.attributeUpdates(selectedCols);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.commondialogs.ICommonDialogAction#closeDialog()
|
||||
*/
|
||||
@Override
|
||||
public void closeDialog() {
|
||||
shell.dispose();
|
||||
close();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@ import com.raytheon.uf.common.monitor.scan.config.SCANConfig;
|
|||
import com.raytheon.uf.common.monitor.scan.config.SCANConfigEnums.ScanTables;
|
||||
import com.raytheon.uf.common.monitor.scan.config.SCANConfigEnums.ScanThresholdColor;
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialogBase.CAVE;
|
||||
|
||||
/**
|
||||
* Displays the Color threshold dialog used by CELL, DMD, MESO, and TVS.
|
||||
|
@ -51,6 +52,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Dec 2, 2009 #3039 lvenable Initial creation
|
||||
* 24 Jul 2013 #2143 skorolev Changes non-blocking dialogs.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -127,13 +129,16 @@ public class SCANColorThreshDlg extends CaveSWTDialog implements
|
|||
*/
|
||||
public SCANColorThreshDlg(Shell parentShell, ScanTables scanTable,
|
||||
IThresholdUpdate thresholdCB) {
|
||||
super(parentShell);
|
||||
super(parentShell, SWT.DIALOG_TRIM | SWT.RESIZE, CAVE.DO_NOT_BLOCK);
|
||||
setText(scanTable.name() + " Color Threshold");
|
||||
|
||||
this.thresholdCB = thresholdCB;
|
||||
this.scanTable = scanTable;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#constructShellLayout()
|
||||
*/
|
||||
@Override
|
||||
protected Layout constructShellLayout() {
|
||||
// Create the main layout for the shell.
|
||||
|
@ -143,6 +148,9 @@ public class SCANColorThreshDlg extends CaveSWTDialog implements
|
|||
return mainLayout;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#initializeComponents(org.eclipse.swt.widgets.Shell)
|
||||
*/
|
||||
@Override
|
||||
protected void initializeComponents(Shell shell) {
|
||||
createAttributeControls();
|
||||
|
@ -437,7 +445,7 @@ public class SCANColorThreshDlg extends CaveSWTDialog implements
|
|||
*/
|
||||
@Override
|
||||
public void closeDialog() {
|
||||
shell.dispose();
|
||||
close();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -33,177 +33,157 @@ import org.eclipse.swt.layout.GridLayout;
|
|||
import org.eclipse.swt.widgets.Canvas;
|
||||
import org.eclipse.swt.widgets.Dialog;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.swt.widgets.Layout;
|
||||
import org.eclipse.swt.widgets.Monitor;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
import com.raytheon.uf.common.localization.IPathManager;
|
||||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||
|
||||
/**
|
||||
* SCAN Splash.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 24 Jul 2013 #2143 skorolev Changes for non-blocking dialogs.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author
|
||||
* @version 1.0
|
||||
*/
|
||||
public class SCANSplash extends CaveSWTDialog {
|
||||
|
||||
public class SCANSplash extends Dialog
|
||||
{
|
||||
/**
|
||||
* Dialog shell.
|
||||
*/
|
||||
private Shell shell;
|
||||
|
||||
/**
|
||||
* The display control.
|
||||
*/
|
||||
private Display display;
|
||||
|
||||
/**
|
||||
* Canvas to display the information.
|
||||
*/
|
||||
private Canvas canvas;
|
||||
|
||||
|
||||
private Font textFont;
|
||||
|
||||
|
||||
/**
|
||||
* Canvas width.
|
||||
*/
|
||||
private int canvasWidth = 300;
|
||||
|
||||
|
||||
/**
|
||||
* Canvas height.
|
||||
*/
|
||||
private int canvasHeight = 200;
|
||||
|
||||
|
||||
private Image loadImage = null;
|
||||
|
||||
public SCANSplash(Shell parent)
|
||||
{
|
||||
super(parent, 0);
|
||||
|
||||
open();
|
||||
}
|
||||
|
||||
|
||||
private Display display;
|
||||
|
||||
/**
|
||||
* Open method to show the dialog.
|
||||
* @return Null.
|
||||
* Constructor
|
||||
*
|
||||
* @param parent
|
||||
*/
|
||||
public Object open()
|
||||
{
|
||||
Shell parent = getParent();
|
||||
display = parent.getDisplay();
|
||||
// shell = new Shell(parent, SWT.NO_TRIM | SWT.ON_TOP);
|
||||
shell = new Shell(parent, SWT.NO_TRIM);
|
||||
|
||||
public SCANSplash(Shell parent) {
|
||||
super(parent, SWT.NO_TRIM, CAVE.DO_NOT_BLOCK);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Layout constructShellLayout() {
|
||||
// Create the main layout for the shell.
|
||||
GridLayout mainLayout = new GridLayout(1, false);
|
||||
mainLayout.marginHeight = 0;
|
||||
mainLayout.marginWidth = 0;
|
||||
shell.setLayout(mainLayout);
|
||||
|
||||
|
||||
// Initialize all of the controls and layouts
|
||||
initializeComponents();
|
||||
|
||||
shell.pack();
|
||||
|
||||
centerOnScreen();
|
||||
|
||||
shell.setVisible(true);
|
||||
|
||||
return null;
|
||||
return mainLayout;
|
||||
}
|
||||
|
||||
private void initializeComponents()
|
||||
{
|
||||
|
||||
@Override
|
||||
protected void initializeComponents(Shell parentShell) {
|
||||
// Initialize all of the controls and layouts
|
||||
display = shell.getDisplay();
|
||||
centerOnScreen();
|
||||
textFont = new Font(display, "Monospace", 50, SWT.BOLD);
|
||||
String imageName = loadImage();
|
||||
|
||||
if (imageName != null)
|
||||
{
|
||||
loadImage = new Image(display, imageName);
|
||||
if (imageName != null) {
|
||||
loadImage = new Image(display, imageName);
|
||||
}
|
||||
|
||||
// Make the calculation for the canvas.
|
||||
// makeCalculations();
|
||||
|
||||
// Create the canvas.
|
||||
|
||||
createCanvas();
|
||||
}
|
||||
|
||||
private void createCanvas()
|
||||
{
|
||||
|
||||
private void createCanvas() {
|
||||
canvas = new Canvas(shell, SWT.DOUBLE_BUFFERED);
|
||||
GridData gd = new GridData(SWT.DEFAULT, SWT.TOP, false, true);
|
||||
gd.heightHint = canvasHeight;
|
||||
gd.widthHint = canvasWidth;
|
||||
|
||||
gd.widthHint = canvasWidth;
|
||||
|
||||
canvas.setSize(canvasWidth, canvasHeight);
|
||||
|
||||
|
||||
canvas.setLayoutData(gd);
|
||||
canvas.addPaintListener(new PaintListener()
|
||||
{
|
||||
public void paintControl(PaintEvent e)
|
||||
{
|
||||
canvas.addPaintListener(new PaintListener() {
|
||||
public void paintControl(PaintEvent e) {
|
||||
drawCanvas(e.gc);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void drawCanvas(GC gc)
|
||||
{
|
||||
|
||||
private void drawCanvas(GC gc) {
|
||||
gc.setFont(textFont);
|
||||
gc.setTextAntialias(SWT.ON);
|
||||
|
||||
if (loadImage != null)
|
||||
{
|
||||
|
||||
if (loadImage != null) {
|
||||
gc.drawImage(loadImage, 0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
gc.setBackground(display.getSystemColor(SWT.COLOR_BLUE));
|
||||
gc.fillRectangle(0, 0, canvasWidth, canvasHeight);
|
||||
}
|
||||
|
||||
gc.setForeground(display.getSystemColor(SWT.COLOR_WHITE));
|
||||
|
||||
gc.setForeground(display.getSystemColor(SWT.COLOR_WHITE));
|
||||
gc.setLineWidth(3);
|
||||
gc.drawRectangle(1, 1, canvasWidth-3, canvasHeight-3);
|
||||
gc.drawRectangle(1, 1, canvasWidth - 3, canvasHeight - 3);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Center on the screen that CAVE is on.
|
||||
*/
|
||||
private void centerOnScreen()
|
||||
{
|
||||
private void centerOnScreen() {
|
||||
Shell tmpShell = getParent().getShell();
|
||||
|
||||
|
||||
Monitor[] monitors = getParent().getDisplay().getMonitors();
|
||||
int displayMonitor = 0;
|
||||
|
||||
for (int i = 0; i < monitors.length; i++)
|
||||
{
|
||||
|
||||
for (int i = 0; i < monitors.length; i++) {
|
||||
displayMonitor = i;
|
||||
int rightEdge = monitors[i].getBounds().x + monitors[i].getBounds().width;
|
||||
if (tmpShell.getBounds().x < rightEdge)
|
||||
{
|
||||
int rightEdge = monitors[i].getBounds().x
|
||||
+ monitors[i].getBounds().width;
|
||||
if (tmpShell.getBounds().x < rightEdge) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Monitor monitor = monitors[displayMonitor];
|
||||
Rectangle monRect = monitor.getBounds();
|
||||
|
||||
|
||||
int xCoord = ((monRect.x + (monRect.width / 2)) - (canvasWidth / 2));
|
||||
int yCoord = (monRect.height / 2) - (canvasHeight / 2);
|
||||
|
||||
|
||||
shell.setLocation(xCoord, yCoord);
|
||||
}
|
||||
|
||||
private String loadImage()
|
||||
{
|
||||
|
||||
private String loadImage() {
|
||||
IPathManager pm = PathManagerFactory.getPathManager();
|
||||
String path = pm.getStaticFile("scan" + File.separatorChar + "images" +
|
||||
File.separatorChar + "ScanLoading.png").getAbsolutePath();
|
||||
String path = pm.getStaticFile(
|
||||
"scan" + File.separatorChar + "images" + File.separatorChar
|
||||
+ "ScanLoading.png").getAbsolutePath();
|
||||
return path;
|
||||
}
|
||||
|
||||
public void disposeDialog()
|
||||
{
|
||||
|
||||
public void disposeDialog() {
|
||||
textFont.dispose();
|
||||
loadImage.dispose();
|
||||
shell.dispose();
|
||||
close();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@ import com.raytheon.uf.common.monitor.scan.config.SCANConfig;
|
|||
import com.raytheon.uf.common.monitor.scan.config.UnwarnedConfig;
|
||||
import com.raytheon.uf.common.monitor.scan.config.SCANConfigEnums.ScanColors;
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialogBase.CAVE;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -50,7 +51,8 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 25, 2009 lvenable Initial creation
|
||||
* Oct 25, 2009 lvenable Initial creation
|
||||
* 24 Jul 2013 #2143 skorolev Changes non-blocking dialogs.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -151,10 +153,13 @@ public class SCANUnwarnedDlg extends CaveSWTDialog implements
|
|||
* Parent shell.
|
||||
*/
|
||||
public SCANUnwarnedDlg(Shell parentShell) {
|
||||
super(parentShell, SWT.DIALOG_TRIM, CAVE.MODE_INDEPENDENT);
|
||||
super(parentShell, SWT.DIALOG_TRIM | SWT.RESIZE, CAVE.DO_NOT_BLOCK);
|
||||
setText("Unwarned Alarm Control");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#constructShellLayout()
|
||||
*/
|
||||
@Override
|
||||
protected Layout constructShellLayout() {
|
||||
// Create the main layout for the shell.
|
||||
|
@ -164,11 +169,17 @@ public class SCANUnwarnedDlg extends CaveSWTDialog implements
|
|||
return mainLayout;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#disposed()
|
||||
*/
|
||||
@Override
|
||||
protected void disposed() {
|
||||
topLabelFont.dispose();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#initializeComponents(org.eclipse.swt.widgets.Shell)
|
||||
*/
|
||||
@Override
|
||||
protected void initializeComponents(Shell shell) {
|
||||
setReturnValue(false);
|
||||
|
@ -206,8 +217,6 @@ public class SCANUnwarnedDlg extends CaveSWTDialog implements
|
|||
gd = new GridData(SWT.CENTER, SWT.DEFAULT, true, false);
|
||||
gd.horizontalSpan = 4;
|
||||
|
||||
// TODO
|
||||
|
||||
createInfoString();
|
||||
Label msgLbl = new Label(controlComp, SWT.NONE);
|
||||
msgLbl.setText(infoText.toString());
|
||||
|
@ -544,6 +553,9 @@ public class SCANUnwarnedDlg extends CaveSWTDialog implements
|
|||
mb.open();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Info String.
|
||||
*/
|
||||
private void createInfoString() {
|
||||
infoText = new StringBuilder();
|
||||
|
||||
|
@ -579,6 +591,11 @@ public class SCANUnwarnedDlg extends CaveSWTDialog implements
|
|||
.append("magenta for TOR warnings and yellow for SVR warnings.");
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup Button Mouse Listeners.
|
||||
*
|
||||
* @param btn
|
||||
*/
|
||||
private void setupButtonMouseListeners(final Button btn) {
|
||||
btn.addMouseMoveListener(new MouseMoveListener() {
|
||||
@Override
|
||||
|
@ -604,8 +621,11 @@ public class SCANUnwarnedDlg extends CaveSWTDialog implements
|
|||
});
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.commondialogs.ICommonDialogAction#closeDialog()
|
||||
*/
|
||||
@Override
|
||||
public void closeDialog() {
|
||||
shell.dispose();
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,69 +44,170 @@ import com.raytheon.uf.common.monitor.scan.config.SCANConfigEnums.ScanTables;
|
|||
import com.raytheon.uf.common.monitor.scan.xml.SCANAttributesXML;
|
||||
import com.raytheon.uf.common.monitor.scan.xml.SCANConfigCellXML;
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialogBase.CAVE;
|
||||
|
||||
/**
|
||||
* Storm Cell ID Display Dialog
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 24 Jul 2013 #2143 skorolev Changes for non-blocking dialogs.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author
|
||||
* @version 1.0
|
||||
*/
|
||||
public class StormCellIdDisplayDlg extends CaveSWTDialog implements
|
||||
ICommonDialogAction {
|
||||
|
||||
/**
|
||||
* Large Label Font
|
||||
*/
|
||||
private Font lrgLabelFont;
|
||||
|
||||
/**
|
||||
* Small Label Font
|
||||
*/
|
||||
private Font smLabelFont;
|
||||
|
||||
/**
|
||||
* High Hexagon Checkbox
|
||||
*/
|
||||
private Button highHexagonChk;
|
||||
|
||||
/**
|
||||
* Middle Hexagon Checkbox
|
||||
*/
|
||||
private Button midHexagonChk;
|
||||
|
||||
/**
|
||||
* Low Hexagon Checkbox
|
||||
*/
|
||||
private Button lowHexagonChk;
|
||||
|
||||
/**
|
||||
* Future Tracks Checkbox
|
||||
*/
|
||||
private Button futureTracksChk;
|
||||
|
||||
/**
|
||||
* Past Traks Checkbox
|
||||
*/
|
||||
private Button pastTracksChk;
|
||||
|
||||
/**
|
||||
* Low Arrow Checkbox
|
||||
*/
|
||||
private Button lowArrowsChk;
|
||||
|
||||
/**
|
||||
* Middle Arrow Checkbox
|
||||
*/
|
||||
private Button midArrowsChk;
|
||||
|
||||
/**
|
||||
* High Arrow Checkbox
|
||||
*/
|
||||
private Button highArrowsChk;
|
||||
|
||||
/**
|
||||
* High ID Checkbox
|
||||
*/
|
||||
private Button highIdsChk;
|
||||
|
||||
/**
|
||||
* Middle ID Checkbox
|
||||
*/
|
||||
private Button midIdsChk;
|
||||
|
||||
/**
|
||||
* Low ID Checkbox
|
||||
*/
|
||||
private Button lowIdsChk;
|
||||
|
||||
/**
|
||||
* Radius Ring Two Value Slider
|
||||
*/
|
||||
private TwoValueSliderCanvas radiusRngSlider;
|
||||
|
||||
/**
|
||||
* Radius Interpolation Two Value Slider
|
||||
*/
|
||||
private TwoValueSliderCanvas radiusInterpolSlider;
|
||||
|
||||
/**
|
||||
* Clutter Three Value Slider
|
||||
*/
|
||||
private ThreeValueSliderCanvas clutterSlider;
|
||||
|
||||
/**
|
||||
* Radius Interpolation Combo Control
|
||||
*/
|
||||
private Combo radInterpolCbo;
|
||||
|
||||
/**
|
||||
* Unit Label Width
|
||||
*/
|
||||
private final int unitLabelWidth = 100;
|
||||
|
||||
/**
|
||||
* Attribute Unit Map
|
||||
*/
|
||||
private LinkedHashMap<String, String> attrUnitMap;
|
||||
|
||||
/**
|
||||
* Radius Interpolation Unit Label
|
||||
*/
|
||||
private Label raduisInterpolUnitLbl;
|
||||
|
||||
/**
|
||||
* SCAN Configuration
|
||||
*/
|
||||
private SCANConfig scanCfg;
|
||||
|
||||
/**
|
||||
* Full Shaft Checkbox
|
||||
*/
|
||||
private Button fullShaftChk;
|
||||
|
||||
/**
|
||||
* Conversion
|
||||
*/
|
||||
private Spinner conversionSpnr;
|
||||
|
||||
/**
|
||||
* Clutter combo control
|
||||
*/
|
||||
private Combo clutterThreshCbo;
|
||||
|
||||
/**
|
||||
* Threshold Unit Label
|
||||
*/
|
||||
private Label thresholdUnitLbl;
|
||||
|
||||
private final IStormCellDisplayUpdate stormCellCB;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param parentShell
|
||||
* @param cb
|
||||
*/
|
||||
public StormCellIdDisplayDlg(Shell parentShell, IStormCellDisplayUpdate cb) {
|
||||
super(parentShell);
|
||||
super(parentShell, SWT.DIALOG_TRIM | SWT.RESIZE, CAVE.DO_NOT_BLOCK);
|
||||
setText("Storm Cell Identification Display Parameters");
|
||||
|
||||
stormCellCB = cb;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#constructShellLayout()
|
||||
*/
|
||||
@Override
|
||||
protected Layout constructShellLayout() {
|
||||
// Create the main layout for the shell.
|
||||
|
@ -116,12 +217,18 @@ public class StormCellIdDisplayDlg extends CaveSWTDialog implements
|
|||
return mainLayout;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#disposed()
|
||||
*/
|
||||
@Override
|
||||
protected void disposed() {
|
||||
lrgLabelFont.dispose();
|
||||
smLabelFont.dispose();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#initializeComponents(org.eclipse.swt.widgets.Shell)
|
||||
*/
|
||||
@Override
|
||||
protected void initializeComponents(Shell shell) {
|
||||
// Initialize all of the controls and layouts
|
||||
|
@ -144,6 +251,9 @@ public class StormCellIdDisplayDlg extends CaveSWTDialog implements
|
|||
clutterAction();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Symbols Controls
|
||||
*/
|
||||
private void createSymbolsControls() {
|
||||
SCANConfigCellXML cellCfgXML = ((CellConfigMgr) scanCfg
|
||||
.getAbsConfigMgr(ScanTables.CELL)).getScanCellCfgXML();
|
||||
|
@ -240,6 +350,9 @@ public class StormCellIdDisplayDlg extends CaveSWTDialog implements
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Hexagon Controls
|
||||
*/
|
||||
private void createHexagonControls() {
|
||||
SCANConfigCellXML cellCfgXML = ((CellConfigMgr) scanCfg
|
||||
.getAbsConfigMgr(ScanTables.CELL)).getScanCellCfgXML();
|
||||
|
@ -312,6 +425,9 @@ public class StormCellIdDisplayDlg extends CaveSWTDialog implements
|
|||
raduisInterpolUnitLbl.setLayoutData(gd);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Arrow Controls
|
||||
*/
|
||||
private void createArrowControls() {
|
||||
SCANConfigCellXML cellCfgXML = ((CellConfigMgr) scanCfg
|
||||
.getAbsConfigMgr(ScanTables.CELL)).getScanCellCfgXML();
|
||||
|
@ -362,6 +478,9 @@ public class StormCellIdDisplayDlg extends CaveSWTDialog implements
|
|||
conversionUnitsLbl.setLayoutData(gd);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Clutter Controls
|
||||
*/
|
||||
private void createClutterControls() {
|
||||
SCANConfigCellXML cellCfgXML = ((CellConfigMgr) scanCfg
|
||||
.getAbsConfigMgr(ScanTables.CELL)).getScanCellCfgXML();
|
||||
|
@ -409,6 +528,9 @@ public class StormCellIdDisplayDlg extends CaveSWTDialog implements
|
|||
thresholdUnitLbl.setLayoutData(gd);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Bottom Buttons
|
||||
*/
|
||||
private void createBottomButtons() {
|
||||
Composite buttonComp = new Composite(shell, SWT.NONE);
|
||||
buttonComp.setLayout(new GridLayout(3, true));
|
||||
|
@ -453,6 +575,11 @@ public class StormCellIdDisplayDlg extends CaveSWTDialog implements
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate Attribute Combo Box
|
||||
*
|
||||
* @param cellCfgXML
|
||||
*/
|
||||
private void populateAttributeCombo(SCANConfigCellXML cellCfgXML) {
|
||||
Set<String> keys = attrUnitMap.keySet();
|
||||
|
||||
|
@ -467,6 +594,11 @@ public class StormCellIdDisplayDlg extends CaveSWTDialog implements
|
|||
radInterpolCbo.select(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate Clutter Combo Box
|
||||
*
|
||||
* @param cellCfgXML
|
||||
*/
|
||||
private void populateClutterCombo(SCANConfigCellXML cellCfgXML) {
|
||||
Set<String> keys = attrUnitMap.keySet();
|
||||
|
||||
|
@ -481,6 +613,11 @@ public class StormCellIdDisplayDlg extends CaveSWTDialog implements
|
|||
clutterThreshCbo.select(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* Radius Interpolation Action
|
||||
*
|
||||
* @param startup
|
||||
*/
|
||||
private void radiusInterpolationAction(boolean startup) {
|
||||
String attribute = radInterpolCbo.getItem(radInterpolCbo
|
||||
.getSelectionIndex());
|
||||
|
@ -550,6 +687,9 @@ public class StormCellIdDisplayDlg extends CaveSWTDialog implements
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clutter Action
|
||||
*/
|
||||
private void clutterAction() {
|
||||
String attribute = clutterThreshCbo.getItem(clutterThreshCbo
|
||||
.getSelectionIndex());
|
||||
|
@ -609,6 +749,12 @@ public class StormCellIdDisplayDlg extends CaveSWTDialog implements
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Increment
|
||||
*
|
||||
* @param attribute
|
||||
* @return
|
||||
*/
|
||||
private double getIncrement(String attribute) {
|
||||
if (CELLTable.HSIZE.getColName().compareTo(attribute) == 0) {
|
||||
return 0.25;
|
||||
|
@ -619,6 +765,11 @@ public class StormCellIdDisplayDlg extends CaveSWTDialog implements
|
|||
return 1.0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add Separator
|
||||
*
|
||||
* @param parentComp
|
||||
*/
|
||||
private void addSeparator(Composite parentComp) {
|
||||
GridLayout gl = (GridLayout) parentComp.getLayout();
|
||||
|
||||
|
@ -628,6 +779,9 @@ public class StormCellIdDisplayDlg extends CaveSWTDialog implements
|
|||
sepLbl.setLayoutData(gd);
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply Action
|
||||
*/
|
||||
private void applyAction() {
|
||||
/*
|
||||
* TODO : set all of the configuration variables
|
||||
|
@ -690,9 +844,12 @@ public class StormCellIdDisplayDlg extends CaveSWTDialog implements
|
|||
stormCellCB.stormCellUpdated();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.commondialogs.ICommonDialogAction#closeDialog()
|
||||
*/
|
||||
@Override
|
||||
public void closeDialog() {
|
||||
shell.dispose();
|
||||
close();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -41,6 +41,8 @@ import com.raytheon.uf.common.monitor.scan.config.SCANConfig;
|
|||
import com.raytheon.uf.common.monitor.scan.config.SCANConfigEnums;
|
||||
import com.raytheon.uf.common.monitor.scan.config.SCANConfigEnums.ScanTables;
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||
import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialogBase.CAVE;
|
||||
|
||||
/**
|
||||
* Time-Height Graph dialog.
|
||||
|
@ -53,7 +55,8 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* Mar 10, 2010 lvenable Initial creation
|
||||
* Dec 23, 2011 13608 mgamazay Updated populateIdentCombo so the drop down menu
|
||||
* shows the current feature ident instead of being blank.
|
||||
*
|
||||
* 24 Jul 2013 #2143 skorolev Changes for non-blocking dialogs.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author lvenable
|
||||
|
@ -158,7 +161,7 @@ public class TimeHeightDlg extends CaveSWTDialog implements ITimeHeightInfo {
|
|||
*/
|
||||
public TimeHeightDlg(Shell parentShell, ScanTables scanTable, String ident, String attrName, String[] identArray,
|
||||
TreeMap<Long, DMDTableDataRow> graphData, IRequestTimeHeightData timeHeightCB) {
|
||||
super(parentShell, SWT.DIALOG_TRIM, CAVE.DO_NOT_BLOCK | CAVE.INDEPENDENT_SHELL);
|
||||
super(parentShell, SWT.DIALOG_TRIM | SWT.RESIZE, CAVE.DO_NOT_BLOCK);
|
||||
setText("DMD Time-Height Trend");
|
||||
|
||||
this.scanTable = scanTable;
|
||||
|
@ -169,11 +172,17 @@ public class TimeHeightDlg extends CaveSWTDialog implements ITimeHeightInfo {
|
|||
this.timeHeightCB = timeHeightCB;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#constructShellLayout()
|
||||
*/
|
||||
@Override
|
||||
protected Layout constructShellLayout() {
|
||||
return new GridLayout(1, false);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#initializeComponents(org.eclipse.swt.widgets.Shell)
|
||||
*/
|
||||
@Override
|
||||
protected void initializeComponents(Shell shell) {
|
||||
createTopControls();
|
||||
|
@ -278,7 +287,7 @@ public class TimeHeightDlg extends CaveSWTDialog implements ITimeHeightInfo {
|
|||
closeBtn.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
shell.dispose();
|
||||
close();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -418,13 +427,26 @@ public class TimeHeightDlg extends CaveSWTDialog implements ITimeHeightInfo {
|
|||
* is no longer valid.
|
||||
*/
|
||||
public void displayMessage() {
|
||||
if (this.msgBox == null) {
|
||||
if (this.msgBox == null || msgBox.isDisposed()) {
|
||||
msgBox = new TimeHeightMsgBox(getShell(), this.ident);
|
||||
Object action = msgBox.open();
|
||||
if (action.toString().equalsIgnoreCase("OK")) {
|
||||
shell.dispose();
|
||||
}
|
||||
msgBox = null;
|
||||
msgBox.setCloseCallback(new ICloseCallback(){
|
||||
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
if (returnValue instanceof String) {
|
||||
if (returnValue.equals("OK")) {
|
||||
close();
|
||||
}else{
|
||||
return;
|
||||
}
|
||||
}
|
||||
msgBox = null;
|
||||
}
|
||||
|
||||
});
|
||||
msgBox.open();
|
||||
}else{
|
||||
msgBox.bringToTop();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 25, 2011 mpduff Initial creation
|
||||
* Dec 23, 2011 13608 mgamazay Added initialization of ident to the constructor
|
||||
* 24 Jul 2013 #2143 skorolev Changes for non-blocking dialogs.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -64,18 +65,24 @@ public class TimeHeightMsgBox extends CaveSWTDialog implements
|
|||
* @param swtStyle
|
||||
*/
|
||||
protected TimeHeightMsgBox(Shell parentShell, String ident) {
|
||||
super(parentShell, SWT.DIALOG_TRIM | SWT.MODELESS);
|
||||
super(parentShell, SWT.DIALOG_TRIM | SWT.MODELESS, CAVE.DO_NOT_BLOCK);
|
||||
setText("Unavailable T-H Trend");
|
||||
this.ident = ident;
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#initializeComponents(org.eclipse.swt.widgets.Shell)
|
||||
*/
|
||||
@Override
|
||||
protected void initializeComponents(Shell shell) {
|
||||
createMessage();
|
||||
createButtons();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Message.
|
||||
*/
|
||||
private void createMessage() {
|
||||
Image img = Display.getCurrent().getSystemImage(SWT.ICON_QUESTION);
|
||||
|
||||
|
@ -94,6 +101,9 @@ public class TimeHeightMsgBox extends CaveSWTDialog implements
|
|||
msgLabel.setText(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Buttons.
|
||||
*/
|
||||
private void createButtons() {
|
||||
Composite buttonComp = new Composite(shell, SWT.NONE);
|
||||
buttonComp.setLayout(new GridLayout(2, false));
|
||||
|
@ -129,8 +139,11 @@ public class TimeHeightMsgBox extends CaveSWTDialog implements
|
|||
});
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.commondialogs.ICommonDialogAction#closeDialog()
|
||||
*/
|
||||
@Override
|
||||
public void closeDialog() {
|
||||
shell.dispose();
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -153,7 +153,7 @@ public class TrendGraphDlg extends CaveSWTDialog {
|
|||
closeBtn.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
shell.dispose();
|
||||
close();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -179,7 +179,7 @@ public class TrendSetsGraphDlg extends CaveSWTDialog {
|
|||
closeBtn.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
shell.dispose();
|
||||
close();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -29,8 +29,6 @@ import java.util.Timer;
|
|||
import java.util.TimerTask;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.DisposeEvent;
|
||||
import org.eclipse.swt.events.DisposeListener;
|
||||
import org.eclipse.swt.events.MouseEvent;
|
||||
import org.eclipse.swt.events.MouseMoveListener;
|
||||
import org.eclipse.swt.events.MouseTrackAdapter;
|
||||
|
@ -40,8 +38,8 @@ import org.eclipse.swt.graphics.Color;
|
|||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Button;
|
||||
import org.eclipse.swt.widgets.Dialog;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.swt.widgets.Layout;
|
||||
import org.eclipse.swt.widgets.Menu;
|
||||
import org.eclipse.swt.widgets.MenuItem;
|
||||
import org.eclipse.swt.widgets.MessageBox;
|
||||
|
@ -65,6 +63,8 @@ import com.raytheon.uf.viz.monitor.scan.commondialogs.ICommonDialogAction;
|
|||
import com.raytheon.uf.viz.monitor.scan.commondialogs.IRequestTrendGraphData;
|
||||
import com.raytheon.uf.viz.monitor.scan.commondialogs.LoadSaveConfigDlg;
|
||||
import com.raytheon.uf.viz.monitor.scan.commondialogs.LoadSaveConfigDlg.DialogType;
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||
import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||
|
||||
/**
|
||||
* Abstract dialog class used for the CALL, DND, MESO, and TVS table dialogs.
|
||||
|
@ -79,24 +79,20 @@ import com.raytheon.uf.viz.monitor.scan.commondialogs.LoadSaveConfigDlg.DialogTy
|
|||
* 06 Jun 2013 #2065 lvenable Added convenience method to alert the user to use the clear
|
||||
* button if they want to close the dialog.
|
||||
* Jul 24, 2013 #2218 mpduff Changed method signature.
|
||||
* Jul 26, 2013 #2143 skorolev Changes for non-blocking dialog.
|
||||
* </pre>
|
||||
*
|
||||
* @author lvenable
|
||||
* @version 1.0
|
||||
*/
|
||||
public abstract class AbstractTableDlg extends Dialog implements IMonitor,
|
||||
IMonitorListener, IMonitorControlListener, ITableAction,
|
||||
public abstract class AbstractTableDlg extends CaveSWTDialog implements
|
||||
IMonitor, IMonitorListener, IMonitorControlListener, ITableAction,
|
||||
IRequestTrendGraphData {
|
||||
/**
|
||||
* The display object.
|
||||
*/
|
||||
protected Display display;
|
||||
|
||||
/**
|
||||
* Shell object.
|
||||
*/
|
||||
protected Shell shell;
|
||||
|
||||
/**
|
||||
* Array listening monitors
|
||||
*/
|
||||
|
@ -144,6 +140,10 @@ public abstract class AbstractTableDlg extends Dialog implements IMonitor,
|
|||
|
||||
protected SCANAlarmAlertManager mgr = null;
|
||||
|
||||
private LoadSaveConfigDlg loadDlg = null;
|
||||
|
||||
private LoadSaveConfigDlg saveDlg = null;
|
||||
|
||||
/**
|
||||
* Abstract constructor.
|
||||
*
|
||||
|
@ -151,36 +151,47 @@ public abstract class AbstractTableDlg extends Dialog implements IMonitor,
|
|||
* Parent shell.
|
||||
*/
|
||||
public AbstractTableDlg(Shell parentShell) {
|
||||
super(parentShell);
|
||||
super(parentShell, SWT.DIALOG_TRIM | SWT.RESIZE, CAVE.DO_NOT_BLOCK);
|
||||
|
||||
scanCfg = SCANConfig.getInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
* Open the dialog.
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#constructShellLayout()
|
||||
*/
|
||||
protected void open() {
|
||||
Shell parent = getParent();
|
||||
display = parent.getDisplay();
|
||||
|
||||
/*
|
||||
* The shell is being created off of the display
|
||||
*/
|
||||
shell = new Shell(display, SWT.DIALOG_TRIM | SWT.RESIZE);
|
||||
parent.addDisposeListener(new DisposeListener() {
|
||||
@Override
|
||||
public void widgetDisposed(DisposeEvent e) {
|
||||
shell.dispose();
|
||||
}
|
||||
});
|
||||
@Override
|
||||
protected Layout constructShellLayout() {
|
||||
|
||||
GridLayout mainLayout = new GridLayout(1, false);
|
||||
mainLayout.marginHeight = 0;
|
||||
mainLayout.marginWidth = 2;
|
||||
mainLayout.verticalSpacing = 2;
|
||||
shell.setLayout(mainLayout);
|
||||
shell.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true, false));
|
||||
return (mainLayout);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#constructShellLayoutData()
|
||||
*/
|
||||
@Override
|
||||
protected Object constructShellLayoutData() {
|
||||
return new GridData(SWT.FILL, SWT.DEFAULT, true, false);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#initializeComponents(org
|
||||
* .eclipse.swt.widgets.Shell)
|
||||
*/
|
||||
@Override
|
||||
protected void initializeComponents(Shell parentShell) {
|
||||
display = shell.getDisplay();
|
||||
initData();
|
||||
|
||||
setShellText();
|
||||
|
@ -188,9 +199,6 @@ public abstract class AbstractTableDlg extends Dialog implements IMonitor,
|
|||
setTableType();
|
||||
initComponents();
|
||||
shellDisposeAction();
|
||||
|
||||
shell.pack();
|
||||
shell.setVisible(true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -298,21 +306,26 @@ public abstract class AbstractTableDlg extends Dialog implements IMonitor,
|
|||
return;
|
||||
}
|
||||
|
||||
LoadSaveConfigDlg loadDlg = new LoadSaveConfigDlg(shell,
|
||||
DialogType.OPEN, scanTable);
|
||||
LocalizationFile fileName = (LocalizationFile) loadDlg.open();
|
||||
|
||||
if (fileName == null) {
|
||||
System.out.println("FileName is null...");
|
||||
return;
|
||||
if (loadDlg == null || loadDlg.isDisposed()) {
|
||||
loadDlg = new LoadSaveConfigDlg(shell, DialogType.OPEN, scanTable);
|
||||
loadDlg.setCloseCallback(new ICloseCallback() {
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
if (returnValue instanceof LocalizationFile) {
|
||||
LocalizationFile fileName = (LocalizationFile) returnValue;
|
||||
scanCfg.loadNewConfigFileName(scanTable, fileName
|
||||
.getFile().getName());
|
||||
updateAfterConfigLoad();
|
||||
updateFileButton();
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
loadDlg.open();
|
||||
} else {
|
||||
loadDlg.bringToTop();
|
||||
}
|
||||
|
||||
scanCfg.loadNewConfigFileName(scanTable, fileName.getFile().getName());
|
||||
|
||||
System.out.println(fileName.getFile().getAbsolutePath());
|
||||
|
||||
updateAfterConfigLoad();
|
||||
updateFileButton();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -359,34 +372,41 @@ public abstract class AbstractTableDlg extends Dialog implements IMonitor,
|
|||
*
|
||||
* do not need to update the display...
|
||||
*/
|
||||
String defCfgName = scanCfg.getDefaultConfigName(scanTable);
|
||||
if (saveDlg == null || saveDlg.isDisposed()) {
|
||||
saveDlg = new LoadSaveConfigDlg(shell, DialogType.SAVE_AS,
|
||||
scanTable);
|
||||
saveDlg.setCloseCallback(new ICloseCallback() {
|
||||
|
||||
LoadSaveConfigDlg loadDlg = new LoadSaveConfigDlg(shell,
|
||||
DialogType.SAVE_AS, scanTable);
|
||||
LocalizationFile fileName = (LocalizationFile) loadDlg.open();
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
if (returnValue instanceof LocalizationFile) {
|
||||
String defCfgName = scanCfg
|
||||
.getDefaultConfigName(scanTable);
|
||||
LocalizationFile fileName = (LocalizationFile) returnValue;
|
||||
if (defCfgName.compareTo(fileName.getFile().getName()) == 0) {
|
||||
MessageBox mb = new MessageBox(shell,
|
||||
SWT.ICON_WARNING | SWT.OK | SWT.CANCEL);
|
||||
mb.setText("Overwrite");
|
||||
mb.setMessage("The Save As name is the same as the default configuration name. Saving "
|
||||
+ "will overwrite the default configuration.\n"
|
||||
+ "Do you wish to continue?");
|
||||
int result = mb.open();
|
||||
|
||||
if (fileName == null) {
|
||||
System.out.println("FileName is null...");
|
||||
return;
|
||||
// If the user selected Cancel then return.
|
||||
if (result == SWT.CANCEL) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
scanCfg.saveConfigurationFileAs(scanTable, fileName
|
||||
.getFile().getName());
|
||||
}
|
||||
updateFileButton();
|
||||
}
|
||||
});
|
||||
saveDlg.open();
|
||||
} else {
|
||||
saveDlg.bringToTop();
|
||||
}
|
||||
|
||||
if (defCfgName.compareTo(fileName.getFile().getName()) == 0) {
|
||||
MessageBox mb = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK
|
||||
| SWT.CANCEL);
|
||||
mb.setText("Overwrite");
|
||||
mb.setMessage("The Save As name is the same as the default configuration name. Saving "
|
||||
+ "will overwrite the default configuration.\n"
|
||||
+ "Do you wish to continue?");
|
||||
int result = mb.open();
|
||||
|
||||
// If the user selected Cancel then return.
|
||||
if (result == SWT.CANCEL) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
scanCfg.saveConfigurationFileAs(scanTable, fileName.getFile().getName());
|
||||
updateFileButton();
|
||||
}
|
||||
|
||||
protected void resetButtonForegroundColor(Button btn) {
|
||||
|
|
|
@ -47,9 +47,10 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Dec 2, 2010 mnash Initial creation
|
||||
* Dec 2, 2010 mnash Initial creation
|
||||
*
|
||||
* 03/15/2012 13939 Mike Duff For a SCAN Alarms issue
|
||||
* 03/15/2012 13939 Mike Duff For a SCAN Alarms issue
|
||||
* 24 Jul 2013 #2143 skorolev Changes for non-blocking dialog.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -59,30 +60,56 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
|
||||
public class SCANAlarmsDlg extends CaveSWTDialog {
|
||||
|
||||
/**
|
||||
* Scrolled Composite
|
||||
*/
|
||||
private ScrolledComposite sc;
|
||||
|
||||
/**
|
||||
* Button Composite
|
||||
*/
|
||||
private Composite btnComp;
|
||||
|
||||
/**
|
||||
* Button Width
|
||||
*/
|
||||
private int buttonWidth = 150;
|
||||
|
||||
/**
|
||||
* SCAN Alarm Alert Manager
|
||||
*/
|
||||
private SCANAlarmAlertManager mgr;
|
||||
|
||||
/**
|
||||
* SCAN Tables
|
||||
*/
|
||||
private ScanTables type;
|
||||
|
||||
/**
|
||||
* Clear All Button
|
||||
*/
|
||||
private Button clearAllBtn;
|
||||
|
||||
/**
|
||||
* Site
|
||||
*/
|
||||
private String site;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param parentShell
|
||||
*/
|
||||
protected SCANAlarmsDlg(Shell parentShell, ScanTables scanTable, String site) {
|
||||
super(parentShell, SWT.DIALOG_TRIM | SWT.RESIZE);
|
||||
super(parentShell, SWT.DIALOG_TRIM | SWT.RESIZE, CAVE.DO_NOT_BLOCK);
|
||||
this.site = site;
|
||||
type = scanTable;
|
||||
mgr = SCANAlarmAlertManager.getInstance(site);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#initializeComponents(org.eclipse.swt.widgets.Shell)
|
||||
*/
|
||||
@Override
|
||||
protected void initializeComponents(Shell shell) {
|
||||
if (type == ScanTables.CELL) {
|
||||
|
@ -96,6 +123,11 @@ public class SCANAlarmsDlg extends CaveSWTDialog {
|
|||
createClearAllButton(shell);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Alarm Buttons.
|
||||
*
|
||||
* @param shell
|
||||
*/
|
||||
private void createAlarmButtons(final Shell shell) {
|
||||
Composite comp = new Composite(shell, SWT.NONE);
|
||||
GridLayout gl = new GridLayout(1, false);
|
||||
|
@ -168,7 +200,7 @@ public class SCANAlarmsDlg extends CaveSWTDialog {
|
|||
btn.dispose();
|
||||
btnComp.layout();
|
||||
if (mgr.getAlertedAlarms(site, type).size() <= 0) {
|
||||
shell.dispose();
|
||||
close();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -190,6 +222,11 @@ public class SCANAlarmsDlg extends CaveSWTDialog {
|
|||
sc.layout();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create "Clear All" Button
|
||||
*
|
||||
* @param shell
|
||||
*/
|
||||
private void createClearAllButton(final Shell shell) {
|
||||
GridData gd = new GridData(SWT.CENTER, SWT.DEFAULT, true, false);
|
||||
gd.widthHint = buttonWidth + 30;
|
||||
|
@ -208,12 +245,8 @@ public class SCANAlarmsDlg extends CaveSWTDialog {
|
|||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
mgr.clearAlertedAlarms(site, type);
|
||||
shell.dispose();
|
||||
close();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void closeDisplay() {
|
||||
shell.dispose();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,6 +76,7 @@ import com.raytheon.uf.viz.monitor.scan.data.UnwarnedCell;
|
|||
import com.raytheon.uf.viz.monitor.scan.tables.SCANAlarmAlertManager.AlarmType;
|
||||
import com.raytheon.uf.viz.monitor.scan.tables.SCANAlarmAlertManager.AlertedAlarms;
|
||||
import com.raytheon.viz.ui.EditorUtil;
|
||||
import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||
|
||||
/**
|
||||
* This class displays the CELL table dialog.
|
||||
|
@ -92,7 +93,8 @@ import com.raytheon.viz.ui.EditorUtil;
|
|||
* some bad code, and some code cleanup.
|
||||
* 06 Jun 2013 #2065 lvenable Added code to alert the user to use the clear
|
||||
* button if they want to close the dialog.
|
||||
* Jul 24, 2013 2218 mpduff Method signature changed.
|
||||
* Jul 24, 2013 #2218 mpduff Method signature changed.
|
||||
* Jul 26, 2013 #2143 skorolev Changes for non-blocking dialogs.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -488,11 +490,22 @@ public class SCANCellTableDlg extends AbstractTableDlg implements
|
|||
alarmBtn.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
if(alarmDlg==null || alarmDlg.isDisposed()){
|
||||
alarmDlg = new SCANAlarmsDlg(shell, ScanTables.CELL, site);
|
||||
alarmDlg.setCloseCallback(new ICloseCallback(){
|
||||
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
if (!alarmBtn.isDisposed()
|
||||
&& (mgr.getAlertedAlarmCount(site, scanTable) == 0)) {
|
||||
turnOffAlarm();
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
alarmDlg.open();
|
||||
if (!alarmBtn.isDisposed()
|
||||
&& (mgr.getAlertedAlarmCount(site, scanTable) == 0)) {
|
||||
turnOffAlarm();
|
||||
} else {
|
||||
alarmDlg.bringToTop();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -755,13 +768,22 @@ public class SCANCellTableDlg extends AbstractTableDlg implements
|
|||
* Display the Attributes dialog.
|
||||
*/
|
||||
private void displayAttributesDialog() {
|
||||
if ((attributeDlg == null)
|
||||
|| (attributeDlg.getParent().isDisposed() == true)) {
|
||||
if (attributeDlg == null
|
||||
|| attributeDlg.getParent().isDisposed() == true) {
|
||||
attributeDlg = new SCANAttributesDlg(shell, scanTable, this);
|
||||
attributeDlg.setCloseCallback(new ICloseCallback() {
|
||||
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
unregisterDialog(attributeDlg);
|
||||
attributeDlg = null;
|
||||
}
|
||||
|
||||
});
|
||||
registerDialog(attributeDlg);
|
||||
attributeDlg.open();
|
||||
attributeDlg = null;
|
||||
unregisterDialog(attributeDlg);
|
||||
} else {
|
||||
attributeDlg.bringToTop();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -771,10 +793,19 @@ public class SCANCellTableDlg extends AbstractTableDlg implements
|
|||
private void displayColorThresholdDialog() {
|
||||
if (colorThresholdDlg == null) {
|
||||
colorThresholdDlg = new SCANColorThreshDlg(shell, scanTable, this);
|
||||
colorThresholdDlg.setCloseCallback(new ICloseCallback() {
|
||||
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
unregisterDialog(colorThresholdDlg);
|
||||
colorThresholdDlg = null;
|
||||
}
|
||||
|
||||
});
|
||||
registerDialog(colorThresholdDlg);
|
||||
colorThresholdDlg.open();
|
||||
unregisterDialog(colorThresholdDlg);
|
||||
colorThresholdDlg = null;
|
||||
} else {
|
||||
colorThresholdDlg.bringToTop();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -782,12 +813,21 @@ public class SCANCellTableDlg extends AbstractTableDlg implements
|
|||
* Display the Storm Cell dialog.
|
||||
*/
|
||||
private void displayStormCellDialog() {
|
||||
if (scidDlg == null) {
|
||||
if (scidDlg == null || scidDlg.isDisposed()) {
|
||||
scidDlg = new StormCellIdDisplayDlg(shell, this);
|
||||
scidDlg.setCloseCallback(new ICloseCallback() {
|
||||
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
unregisterDialog(scidDlg);
|
||||
scidDlg = null;
|
||||
}
|
||||
|
||||
});
|
||||
registerDialog(scidDlg);
|
||||
scidDlg.open();
|
||||
unregisterDialog(scidDlg);
|
||||
scidDlg = null;
|
||||
} else {
|
||||
scidDlg.bringToTop();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -795,12 +835,21 @@ public class SCANCellTableDlg extends AbstractTableDlg implements
|
|||
* Display the Alarm threshold dialog.
|
||||
*/
|
||||
private void displayAlarmThresholdDialog() {
|
||||
if (alarmThreshDlg == null) {
|
||||
if (alarmThreshDlg == null || alarmThreshDlg.isDisposed()) {
|
||||
alarmThreshDlg = new SCANAlarmThreshDlg(site, shell, scanTable);
|
||||
alarmThreshDlg.setCloseCallback(new ICloseCallback() {
|
||||
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
unregisterDialog(alarmThreshDlg);
|
||||
alarmThreshDlg = null;
|
||||
}
|
||||
});
|
||||
registerDialog(alarmThreshDlg);
|
||||
alarmThreshDlg.open();
|
||||
unregisterDialog(alarmThreshDlg);
|
||||
alarmThreshDlg = null;
|
||||
|
||||
} else {
|
||||
alarmThreshDlg.bringToTop();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -808,13 +857,22 @@ public class SCANCellTableDlg extends AbstractTableDlg implements
|
|||
* Display the Alarm Time Limit dialog.
|
||||
*/
|
||||
private void displayAlarmTimeLimitDialog() {
|
||||
if (alarmTimeLimitDlg == null) {
|
||||
if (alarmTimeLimitDlg == null || alarmTimeLimitDlg.isDisposed()) {
|
||||
alarmTimeLimitDlg = new SCANAlarmTimeLimitDlg(shell, scanTable,
|
||||
this.site);
|
||||
alarmTimeLimitDlg.setCloseCallback(new ICloseCallback() {
|
||||
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
unregisterDialog(alarmTimeLimitDlg);
|
||||
alarmTimeLimitDlg = null;
|
||||
}
|
||||
|
||||
});
|
||||
registerDialog(alarmTimeLimitDlg);
|
||||
alarmTimeLimitDlg.open();
|
||||
unregisterDialog(alarmTimeLimitDlg);
|
||||
alarmTimeLimitDlg = null;
|
||||
} else {
|
||||
alarmTimeLimitDlg.bringToTop();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -822,36 +880,50 @@ public class SCANCellTableDlg extends AbstractTableDlg implements
|
|||
* Display the Unwarned Alarm dialog.
|
||||
*/
|
||||
private void displayUnwarnedAlarmDialog() {
|
||||
if (unwarnedAlarmDlg == null) {
|
||||
if (unwarnedAlarmDlg == null || unwarnedAlarmDlg.isDisposed()) {
|
||||
unwarnedAlarmDlg = new SCANUnwarnedDlg(shell);
|
||||
registerDialog(unwarnedAlarmDlg);
|
||||
Boolean okSelected = (Boolean) unwarnedAlarmDlg.open();
|
||||
unwarnedAlarmDlg.setCloseCallback(new ICloseCallback() {
|
||||
|
||||
// The check box is a toggle... so capture the toggled state.
|
||||
Boolean isEnabled = unwarnedChk.getEnabled();
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
// The check box is a toggle... so capture the toggled
|
||||
// state.
|
||||
Boolean isEnabled = unwarnedChk.getEnabled();
|
||||
if (returnValue instanceof Boolean) {
|
||||
Boolean okSelected = (Boolean) returnValue;
|
||||
if (okSelected) {
|
||||
if ((scanCfg.getUnwarnedConfig().getUnwarnedTor() == false)
|
||||
&& (scanCfg.getUnwarnedConfig()
|
||||
.getUnwarnedSvr() == false)) {
|
||||
unwarnedChk.setSelection(false);
|
||||
} else {
|
||||
unwarnedChk.setSelection(true);
|
||||
}
|
||||
} else if ((scanCfg.getUnwarnedConfig()
|
||||
.getUnwarnedTor() == true)
|
||||
&& (scanCfg.getUnwarnedConfig()
|
||||
.getUnwarnedSvr() == true)) {
|
||||
unwarnedChk.setSelection(true);
|
||||
} else {
|
||||
// If the checkbox should not change state, reverse
|
||||
// the effect
|
||||
// of the toggle behavior inherent to the checkbox.
|
||||
unwarnedChk.setSelection(!isEnabled);
|
||||
}
|
||||
}
|
||||
unregisterDialog(unwarnedAlarmDlg);
|
||||
unwarnedAlarmDlg = null;
|
||||
|
||||
if (okSelected == true) {
|
||||
if ((scanCfg.getUnwarnedConfig().getUnwarnedTor() == false)
|
||||
&& (scanCfg.getUnwarnedConfig().getUnwarnedSvr() == false)) {
|
||||
unwarnedChk.setSelection(false);
|
||||
} else {
|
||||
unwarnedChk.setSelection(true);
|
||||
IMonitorConfigurationEvent imce = new IMonitorConfigurationEvent(
|
||||
SCANCellTableDlg.this);
|
||||
SCANCellTableDlg.this.fireConfigUpdate(imce);
|
||||
}
|
||||
} else if ((scanCfg.getUnwarnedConfig().getUnwarnedTor() == true)
|
||||
&& (scanCfg.getUnwarnedConfig().getUnwarnedSvr() == true)) {
|
||||
unwarnedChk.setSelection(true);
|
||||
} else {
|
||||
// If the checkbox should not change state, reverse the effect
|
||||
// of the toggle behavior inherent to the checkbox.
|
||||
unwarnedChk.setSelection(!isEnabled);
|
||||
}
|
||||
});
|
||||
|
||||
unwarnedAlarmDlg = null;
|
||||
unregisterDialog(unwarnedAlarmDlg);
|
||||
|
||||
IMonitorConfigurationEvent imce = new IMonitorConfigurationEvent(
|
||||
this);
|
||||
this.fireConfigUpdate(imce);
|
||||
registerDialog(unwarnedAlarmDlg);
|
||||
unwarnedAlarmDlg.open();
|
||||
} else {
|
||||
unwarnedAlarmDlg.bringToTop();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -859,13 +931,21 @@ public class SCANCellTableDlg extends AbstractTableDlg implements
|
|||
* Display the Create and Edit Trend Set dialog.
|
||||
*/
|
||||
private void displayCreateEditTrendDialog() {
|
||||
if (editTrendDlg == null) {
|
||||
if (editTrendDlg == null || editTrendDlg.isDisposed()) {
|
||||
editTrendDlg = new EditCreateTrendDlg(shell, scanTable);
|
||||
editTrendDlg.setCloseCallback(new ICloseCallback() {
|
||||
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
updateDefineActiveTrendMenu();
|
||||
editTrendDlg = null;
|
||||
unregisterDialog(editTrendDlg);
|
||||
}
|
||||
});
|
||||
registerDialog(editTrendDlg);
|
||||
editTrendDlg.open();
|
||||
updateDefineActiveTrendMenu();
|
||||
editTrendDlg = null;
|
||||
unregisterDialog(editTrendDlg);
|
||||
} else {
|
||||
editTrendDlg.bringToTop();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1010,7 +1090,7 @@ public class SCANCellTableDlg extends AbstractTableDlg implements
|
|||
@Override
|
||||
public void shellDisposeDialog() {
|
||||
killDialog = true;
|
||||
shell.dispose();
|
||||
close();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1223,6 +1303,9 @@ public class SCANCellTableDlg extends AbstractTableDlg implements
|
|||
// nop op
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.ITableAction#centerByStormId(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void centerByStormId(String stormId) {
|
||||
fireRecenter(stormId, scanTable, site);
|
||||
|
@ -1280,6 +1363,12 @@ public class SCANCellTableDlg extends AbstractTableDlg implements
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.AbstractTableDlg#
|
||||
* displayTrendSetGraphs(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void displayTrendSetGraphs(String ident) {
|
||||
scanTableComp.displayTrendSetGraphFromMap(ident);
|
||||
|
|
|
@ -59,6 +59,7 @@ import com.raytheon.uf.viz.monitor.scan.commondialogs.TimeHeightDlg;
|
|||
* Jun 04, 2013 #1984 lvenable Save images instead of disposing them when setting
|
||||
* the table column images. This is to fix the Windows
|
||||
* issue on the images being blank and throwing errors.
|
||||
* Jul 30, 2013 #2143 skorolev Changes for non-blocking dialogs.
|
||||
* </pre>
|
||||
*
|
||||
* @author lvenable
|
||||
|
@ -278,6 +279,7 @@ public class SCANDmdTableComp extends SCANTableTrendGraphLayer implements
|
|||
timeHeightDlg.open();
|
||||
} else {
|
||||
timeHeightDlg.setGraphData(graphData, ident, attrName);
|
||||
timeHeightDlg.bringToTop();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -77,6 +77,7 @@ import com.raytheon.uf.viz.monitor.scan.commondialogs.SCANColorThreshDlg;
|
|||
import com.raytheon.uf.viz.monitor.scan.data.ScanDataGenerator;
|
||||
import com.raytheon.uf.viz.monitor.scan.tables.SCANAlarmAlertManager.AlarmType;
|
||||
import com.raytheon.viz.ui.EditorUtil;
|
||||
import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||
|
||||
/**
|
||||
* Main dialog for the SCAN DMD table.
|
||||
|
@ -94,6 +95,7 @@ import com.raytheon.viz.ui.EditorUtil;
|
|||
* 06 Jun 2013 #2065 lvenable Added code to alert the user to use the clear
|
||||
* button if they want to close the dialog.
|
||||
* Jul 24, 2013 2218 mpduff Change method signature.
|
||||
* Jul 26, 2013 #2143 skorolev Changes for non-blocking dialogs.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -517,15 +519,24 @@ public class SCANDmdTableDlg extends AbstractTableDlg implements
|
|||
alarmBtn.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
if ((alarmsDlg != null) && alarmsDlg.isOpen()) {
|
||||
if(alarmsDlg==null || alarmsDlg.isDisposed()){
|
||||
alarmsDlg = new SCANAlarmsDlg(shell, ScanTables.DMD, site);
|
||||
alarmsDlg.setCloseCallback(new ICloseCallback(){
|
||||
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
if (!alarmBtn.isDisposed()
|
||||
&& mgr.getAlertedAlarms(site, scanTable).isEmpty()) {
|
||||
turnOffAlarm();
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
alarmsDlg.open();
|
||||
} else {
|
||||
alarmsDlg.close();
|
||||
}
|
||||
alarmsDlg = new SCANAlarmsDlg(shell, ScanTables.DMD, site);
|
||||
alarmsDlg.open();
|
||||
if (!alarmBtn.isDisposed()
|
||||
&& mgr.getAlertedAlarms(site, scanTable).isEmpty()) {
|
||||
turnOffAlarm();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -690,13 +701,21 @@ public class SCANDmdTableDlg extends AbstractTableDlg implements
|
|||
* Display the Create/Edit trend dialog.
|
||||
*/
|
||||
private void displayCreateEditTrendDialog() {
|
||||
if (editTrendDlg == null) {
|
||||
if (editTrendDlg == null || editTrendDlg.isDisposed()) {
|
||||
editTrendDlg = new EditCreateTrendDlg(shell, scanTable);
|
||||
editTrendDlg.setCloseCallback(new ICloseCallback() {
|
||||
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
updateDefineActiveTrendMenu();
|
||||
unregisterDialog(editTrendDlg);
|
||||
editTrendDlg = null;
|
||||
}
|
||||
});
|
||||
registerDialog(editTrendDlg);
|
||||
editTrendDlg.open();
|
||||
updateDefineActiveTrendMenu();
|
||||
unregisterDialog(editTrendDlg);
|
||||
editTrendDlg = null;
|
||||
} else {
|
||||
editTrendDlg.bringToTop();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -707,10 +726,19 @@ public class SCANDmdTableDlg extends AbstractTableDlg implements
|
|||
if (alarmTimeLimitDlg == null) {
|
||||
alarmTimeLimitDlg = new SCANAlarmTimeLimitDlg(shell, scanTable,
|
||||
this.site);
|
||||
alarmTimeLimitDlg.setCloseCallback(new ICloseCallback() {
|
||||
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
unregisterDialog(alarmTimeLimitDlg);
|
||||
alarmTimeLimitDlg = null;
|
||||
}
|
||||
|
||||
});
|
||||
registerDialog(alarmTimeLimitDlg);
|
||||
alarmTimeLimitDlg.open();
|
||||
unregisterDialog(alarmTimeLimitDlg);
|
||||
alarmTimeLimitDlg = null;
|
||||
} else {
|
||||
alarmTimeLimitDlg.bringToTop();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -720,10 +748,18 @@ public class SCANDmdTableDlg extends AbstractTableDlg implements
|
|||
private void displayAlarmThresholdDialog() {
|
||||
if (alarmThreshDlg == null) {
|
||||
alarmThreshDlg = new SCANAlarmThreshDlg(site, shell, scanTable);
|
||||
alarmThreshDlg.setCloseCallback(new ICloseCallback() {
|
||||
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
unregisterDialog(alarmThreshDlg);
|
||||
alarmThreshDlg = null;
|
||||
}
|
||||
});
|
||||
registerDialog(alarmThreshDlg);
|
||||
alarmThreshDlg.open();
|
||||
unregisterDialog(alarmThreshDlg);
|
||||
alarmThreshDlg = null;
|
||||
} else {
|
||||
alarmThreshDlg.bringToTop();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -731,12 +767,20 @@ public class SCANDmdTableDlg extends AbstractTableDlg implements
|
|||
* Display the filter dialog.
|
||||
*/
|
||||
private void displayFilterDialog() {
|
||||
if (displayFilterDlg == null) {
|
||||
if (displayFilterDlg == null || displayFilterDlg.isDisposed()) {
|
||||
displayFilterDlg = new DmdDisplayFilterDlg(shell, this);
|
||||
displayFilterDlg.setCloseCallback(new ICloseCallback() {
|
||||
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
unregisterDialog(displayFilterDlg);
|
||||
displayFilterDlg = null;
|
||||
}
|
||||
});
|
||||
registerDialog(displayFilterDlg);
|
||||
displayFilterDlg.open();
|
||||
unregisterDialog(displayFilterDlg);
|
||||
displayFilterDlg = null;
|
||||
} else {
|
||||
displayFilterDlg.bringToTop();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -861,13 +905,22 @@ public class SCANDmdTableDlg extends AbstractTableDlg implements
|
|||
* Display the attributes dialog.
|
||||
*/
|
||||
private void displayAttributesDialog() {
|
||||
if ((attributeDlg == null)
|
||||
if ((attributeDlg == null || attributeDlg.isDisposed())
|
||||
|| (attributeDlg.getParent().isDisposed() == true)) {
|
||||
attributeDlg = new SCANAttributesDlg(shell, scanTable, this);
|
||||
attributeDlg.setCloseCallback(new ICloseCallback() {
|
||||
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
unregisterDialog(attributeDlg);
|
||||
attributeDlg = null;
|
||||
}
|
||||
|
||||
});
|
||||
registerDialog(attributeDlg);
|
||||
attributeDlg.open();
|
||||
unregisterDialog(attributeDlg);
|
||||
attributeDlg = null;
|
||||
} else {
|
||||
attributeDlg.bringToTop();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -875,12 +928,21 @@ public class SCANDmdTableDlg extends AbstractTableDlg implements
|
|||
* Display the color threshold dialog.
|
||||
*/
|
||||
private void displayColorThresholdDialog() {
|
||||
if (colorThresholdDlg == null) {
|
||||
if (colorThresholdDlg == null || colorThresholdDlg.isDisposed()) {
|
||||
colorThresholdDlg = new SCANColorThreshDlg(shell, scanTable, this);
|
||||
colorThresholdDlg.setCloseCallback(new ICloseCallback() {
|
||||
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
unregisterDialog(colorThresholdDlg);
|
||||
colorThresholdDlg = null;
|
||||
}
|
||||
|
||||
});
|
||||
registerDialog(colorThresholdDlg);
|
||||
colorThresholdDlg.open();
|
||||
unregisterDialog(colorThresholdDlg);
|
||||
colorThresholdDlg = null;
|
||||
} else {
|
||||
colorThresholdDlg.bringToTop();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -912,7 +974,7 @@ public class SCANDmdTableDlg extends AbstractTableDlg implements
|
|||
public void shellDisposeDialog() {
|
||||
killDialog = true;
|
||||
|
||||
shell.dispose();
|
||||
close();
|
||||
elevationLabelColor.dispose();
|
||||
}
|
||||
|
||||
|
@ -1040,6 +1102,13 @@ public class SCANDmdTableDlg extends AbstractTableDlg implements
|
|||
fireRecenter(ident, scanTable, site);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.viz.monitor.scan.tables.ITableAction#centerByStormId(
|
||||
* java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void centerByStormId(String stormId) {
|
||||
// no op
|
||||
|
@ -1241,11 +1310,22 @@ public class SCANDmdTableDlg extends AbstractTableDlg implements
|
|||
return ScanMonitor.getInstance().getGraphData(type, site, field, ident);
|
||||
}
|
||||
|
||||
/**
|
||||
* Alarm Selection
|
||||
*
|
||||
* @param ident
|
||||
*/
|
||||
public void alarmSelection(String ident) {
|
||||
dmdTableComp.alarmSelection(ident);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.viz.monitor.scan.tables.AbstractTableDlg#turnOffAlarm()
|
||||
*/
|
||||
@Override
|
||||
public void turnOffAlarm() {
|
||||
if (alarmBtn != null && !alarmBtn.isDisposed()) {
|
||||
|
@ -1254,6 +1334,12 @@ public class SCANDmdTableDlg extends AbstractTableDlg implements
|
|||
mgr.setRing(false);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.viz.monitor.scan.tables.AbstractTableDlg#turnOnAlarm()
|
||||
*/
|
||||
@Override
|
||||
public void turnOnAlarm() {
|
||||
if (alarmBtn != null && !alarmBtn.isDisposed()) {
|
||||
|
|
|
@ -59,6 +59,7 @@ import com.raytheon.uf.viz.monitor.scan.commondialogs.SCANAlarmTimeLimitDlg;
|
|||
import com.raytheon.uf.viz.monitor.scan.commondialogs.SCANAttributesDlg;
|
||||
import com.raytheon.uf.viz.monitor.scan.commondialogs.SCANColorThreshDlg;
|
||||
import com.raytheon.uf.viz.monitor.scan.data.ScanDataGenerator;
|
||||
import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -71,6 +72,7 @@ import com.raytheon.uf.viz.monitor.scan.data.ScanDataGenerator;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 29, 2013 #1945 lvenable Code cleanup for SCAN performance.
|
||||
* 24 Jul 2013 #2143 skorolev Changes non-blocking dialogs.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -135,11 +137,17 @@ public class SCANMesoTableDlg extends AbstractTableDlg implements
|
|||
open();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.AbstractTableDlg#setTableType()
|
||||
*/
|
||||
@Override
|
||||
protected void setTableType() {
|
||||
scanTable = ScanTables.MESO;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.AbstractTableDlg#initComponents()
|
||||
*/
|
||||
@Override
|
||||
protected void initComponents() {
|
||||
createTopControls();
|
||||
|
@ -152,6 +160,9 @@ public class SCANMesoTableDlg extends AbstractTableDlg implements
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Top Controls.
|
||||
*/
|
||||
private void createTopControls() {
|
||||
SCANConfig scanCfg = SCANConfig.getInstance();
|
||||
MesoConfigMgr mesoCfgMgr = (MesoConfigMgr) scanCfg
|
||||
|
@ -273,12 +284,8 @@ public class SCANMesoTableDlg extends AbstractTableDlg implements
|
|||
tipsChk.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
System.out.println(tipsChk.getSelection());
|
||||
SCANConfig.getInstance().setShowTips(scanTable,
|
||||
tipsChk.getSelection());
|
||||
System.out
|
||||
.println(SCANConfig.getInstance().showTips(scanTable));
|
||||
System.out.println(scanTable.name());
|
||||
scanTableComp.updateColumnTips();
|
||||
}
|
||||
});
|
||||
|
@ -291,6 +298,9 @@ public class SCANMesoTableDlg extends AbstractTableDlg implements
|
|||
timeLbl.setLayoutData(gd);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Meso Table
|
||||
*/
|
||||
private void createMesoTable() {
|
||||
scanTableComp = new SCANMesoTableComp(shell, tableData, this, site);
|
||||
}
|
||||
|
@ -305,6 +315,9 @@ public class SCANMesoTableDlg extends AbstractTableDlg implements
|
|||
rankPopupMenu = new Menu(rankBtn);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create File Popup Menu
|
||||
*/
|
||||
private void createFilePopupMenu() {
|
||||
filePopupMenu = new Menu(fileBtn);
|
||||
|
||||
|
@ -358,6 +371,9 @@ public class SCANMesoTableDlg extends AbstractTableDlg implements
|
|||
fileBtn.setMenu(filePopupMenu);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Configurations Popup Menu
|
||||
*/
|
||||
private void createConfigurationsPopupMenu() {
|
||||
configPopupMenu = new Menu(configBtn);
|
||||
|
||||
|
@ -388,38 +404,77 @@ public class SCANMesoTableDlg extends AbstractTableDlg implements
|
|||
configBtn.setMenu(configPopupMenu);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display Attributes Dialog.
|
||||
*/
|
||||
private void displayAttributesDialog() {
|
||||
if ((attributeDlg == null)
|
||||
|| (attributeDlg.getParent().isDisposed() == true)) {
|
||||
attributeDlg = new SCANAttributesDlg(shell, scanTable, this);
|
||||
attributeDlg.setCloseCallback(new ICloseCallback(){
|
||||
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
unregisterDialog(attributeDlg);
|
||||
attributeDlg = null;
|
||||
}
|
||||
|
||||
});
|
||||
registerDialog(attributeDlg);
|
||||
attributeDlg.open();
|
||||
unregisterDialog(attributeDlg);
|
||||
attributeDlg = null;
|
||||
} else {
|
||||
attributeDlg.bringToTop();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Display Alarm Time LimitDialog
|
||||
*/
|
||||
private void displayAlarmTimeLimitDialog() {
|
||||
if (alarmTimeLimitDlg == null) {
|
||||
alarmTimeLimitDlg = new SCANAlarmTimeLimitDlg(shell, scanTable,
|
||||
this.site);
|
||||
alarmTimeLimitDlg.setCloseCallback(new ICloseCallback(){
|
||||
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
unregisterDialog(alarmTimeLimitDlg);
|
||||
alarmTimeLimitDlg = null;
|
||||
}
|
||||
|
||||
});
|
||||
registerDialog(alarmTimeLimitDlg);
|
||||
alarmTimeLimitDlg.open();
|
||||
unregisterDialog(alarmTimeLimitDlg);
|
||||
alarmTimeLimitDlg = null;
|
||||
} else {
|
||||
alarmTimeLimitDlg.bringToTop();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Display Color Threshold Dialog.
|
||||
*/
|
||||
private void displayColorThresholdDialog() {
|
||||
if (colorThresholdDlg == null) {
|
||||
colorThresholdDlg = new SCANColorThreshDlg(shell, scanTable, this);
|
||||
colorThresholdDlg.setCloseCallback(new ICloseCallback(){
|
||||
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
unregisterDialog(colorThresholdDlg);
|
||||
colorThresholdDlg = null;
|
||||
}
|
||||
|
||||
});
|
||||
registerDialog(colorThresholdDlg);
|
||||
colorThresholdDlg.open();
|
||||
unregisterDialog(colorThresholdDlg);
|
||||
colorThresholdDlg = null;
|
||||
} else {
|
||||
colorThresholdDlg.bringToTop();
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.AbstractTableDlg#handleRankMenuEvent(org.eclipse.swt.events.SelectionEvent)
|
||||
*/
|
||||
@Override
|
||||
protected void handleRankMenuEvent(SelectionEvent event) {
|
||||
String rank = ((MenuItem) event.getSource()).getText();
|
||||
|
@ -436,6 +491,9 @@ public class SCANMesoTableDlg extends AbstractTableDlg implements
|
|||
scanTableComp.sortTableColumnByIndex(colIndex);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Time Label.
|
||||
*/
|
||||
private void updateTimeLabel() {
|
||||
if (currentTime == null) {
|
||||
timeLbl.setText("*** NO TIME ***");
|
||||
|
@ -449,26 +507,37 @@ public class SCANMesoTableDlg extends AbstractTableDlg implements
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregister Dialog From Monitor.
|
||||
*/
|
||||
private void unregisterDialogFromMonitor() {
|
||||
this.fireDialogShutdown(this);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.AbstractTableDlg#shellDisposeAction()
|
||||
*/
|
||||
@Override
|
||||
protected void shellDisposeAction() {
|
||||
shell.addDisposeListener(new DisposeListener() {
|
||||
@Override
|
||||
public void widgetDisposed(DisposeEvent e) {
|
||||
System.out.println("MESO dialog DISPOSED");
|
||||
unregisterDialogFromMonitor();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.AbstractTableDlg#shellDisposeDialog()
|
||||
*/
|
||||
@Override
|
||||
public void shellDisposeDialog() {
|
||||
shell.dispose();
|
||||
close();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.AbstractTableDlg#setShellText()
|
||||
*/
|
||||
@Override
|
||||
protected void setShellText() {
|
||||
if (!shell.isDisposed()) {
|
||||
|
@ -476,11 +545,17 @@ public class SCANMesoTableDlg extends AbstractTableDlg implements
|
|||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.ITableAction#sortedColumn(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void sortedColumn(String columnName) {
|
||||
rankBtn.setText("Rank: " + columnName);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.AbstractTableDlg#notify(com.raytheon.uf.viz.monitor.events.IMonitorEvent)
|
||||
*/
|
||||
@Override
|
||||
public void notify(IMonitorEvent me) {
|
||||
if (me.getSource() instanceof IMonitor) {
|
||||
|
@ -511,27 +586,42 @@ public class SCANMesoTableDlg extends AbstractTableDlg implements
|
|||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.ITableAction#centerByIdent(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void centerByIdent(String ident) {
|
||||
fireRecenter(ident, ScanTables.MESO, site);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.ITableAction#centerByStormId(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void centerByStormId(String stormId) {
|
||||
fireRecenter(stormId, ScanTables.CELL, site);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.commondialogs.IRequestTrendGraphData#getCurrentDate()
|
||||
*/
|
||||
@Override
|
||||
public Date getCurrentDate() {
|
||||
return currentTime;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.ITableAction#getTrendSetName()
|
||||
*/
|
||||
@Override
|
||||
public String getTrendSetName() {
|
||||
// Not used...
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.commondialogs.IAttributeUpdate#attributeUpdates(boolean[])
|
||||
*/
|
||||
@Override
|
||||
public void attributeUpdates(boolean[] visibleAttrs) {
|
||||
SCANConfig scanCfg = SCANConfig.getInstance();
|
||||
|
@ -541,6 +631,9 @@ public class SCANMesoTableDlg extends AbstractTableDlg implements
|
|||
createRankPopupMenu(rankPopupMenu, rankBtn);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.commondialogs.IThresholdUpdate#thresholdsUpdated(java.lang.String, double, double, double)
|
||||
*/
|
||||
@Override
|
||||
public void thresholdsUpdated(String attrName, double upper, double mid,
|
||||
double lower) {
|
||||
|
@ -572,6 +665,9 @@ public class SCANMesoTableDlg extends AbstractTableDlg implements
|
|||
fireThresholdUpdate(new IMonitorThresholdEvent(this));
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.AbstractTableDlg#updateAfterConfigLoad()
|
||||
*/
|
||||
@Override
|
||||
protected void updateAfterConfigLoad() {
|
||||
/*
|
||||
|
@ -593,6 +689,9 @@ public class SCANMesoTableDlg extends AbstractTableDlg implements
|
|||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.AbstractTableDlg#displayTrendSetGraphs(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void displayTrendSetGraphs(String ident) {
|
||||
// NOT USED
|
||||
|
@ -618,11 +717,17 @@ public class SCANMesoTableDlg extends AbstractTableDlg implements
|
|||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.AbstractTableDlg#turnOffAlarm()
|
||||
*/
|
||||
@Override
|
||||
public void turnOffAlarm() {
|
||||
mgr.setRing(false);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.AbstractTableDlg#turnOnAlarm()
|
||||
*/
|
||||
@Override
|
||||
public void turnOnAlarm() {
|
||||
mgr.setRing(true);
|
||||
|
|
|
@ -58,6 +58,7 @@ import com.raytheon.uf.viz.monitor.scan.commondialogs.SCANAlarmTimeLimitDlg;
|
|||
import com.raytheon.uf.viz.monitor.scan.commondialogs.SCANAttributesDlg;
|
||||
import com.raytheon.uf.viz.monitor.scan.commondialogs.SCANColorThreshDlg;
|
||||
import com.raytheon.uf.viz.monitor.scan.data.ScanDataGenerator;
|
||||
import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -70,6 +71,7 @@ import com.raytheon.uf.viz.monitor.scan.data.ScanDataGenerator;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 29, 2013 #1945 lvenable Code cleanup for SCAN performance.
|
||||
* 24 Jul 2013 #2143 skorolev Changes for non-blocking dialogs.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -127,11 +129,17 @@ public class SCANTvsTableDlg extends AbstractTableDlg implements
|
|||
open();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.AbstractTableDlg#setTableType()
|
||||
*/
|
||||
@Override
|
||||
protected void setTableType() {
|
||||
scanTable = ScanTables.TVS;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.AbstractTableDlg#initComponents()
|
||||
*/
|
||||
@Override
|
||||
protected void initComponents() {
|
||||
createTopControls();
|
||||
|
@ -143,6 +151,9 @@ public class SCANTvsTableDlg extends AbstractTableDlg implements
|
|||
createRankPopupMenu(rankPopupMenu, rankBtn);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Top Controls.
|
||||
*/
|
||||
private void createTopControls() {
|
||||
SCANConfig scanCfg = SCANConfig.getInstance();
|
||||
TvsConfigMgr tvsCfgMgr = (TvsConfigMgr) scanCfg
|
||||
|
@ -264,12 +275,8 @@ public class SCANTvsTableDlg extends AbstractTableDlg implements
|
|||
tipsChk.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
System.out.println(tipsChk.getSelection());
|
||||
SCANConfig.getInstance().setShowTips(scanTable,
|
||||
tipsChk.getSelection());
|
||||
System.out
|
||||
.println(SCANConfig.getInstance().showTips(scanTable));
|
||||
System.out.println(scanTable.name());
|
||||
scanTableComp.updateColumnTips();
|
||||
}
|
||||
});
|
||||
|
@ -282,6 +289,9 @@ public class SCANTvsTableDlg extends AbstractTableDlg implements
|
|||
timeLbl.setLayoutData(gd);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create TVS Table.
|
||||
*/
|
||||
private void createTvsTable() {
|
||||
scanTableComp = new SCANTvsTableComp(shell, tableData, this, site);
|
||||
}
|
||||
|
@ -296,6 +306,9 @@ public class SCANTvsTableDlg extends AbstractTableDlg implements
|
|||
rankPopupMenu = new Menu(rankBtn);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create File Popup Menu.
|
||||
*/
|
||||
private void createFilePopupMenu() {
|
||||
filePopupMenu = new Menu(fileBtn);
|
||||
|
||||
|
@ -349,6 +362,9 @@ public class SCANTvsTableDlg extends AbstractTableDlg implements
|
|||
fileBtn.setMenu(filePopupMenu);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Configurations Popup Menu.
|
||||
*/
|
||||
private void createConfigurationsPopupMenu() {
|
||||
configPopupMenu = new Menu(configBtn);
|
||||
|
||||
|
@ -379,38 +395,77 @@ public class SCANTvsTableDlg extends AbstractTableDlg implements
|
|||
configBtn.setMenu(configPopupMenu);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display Attributes Dialog.
|
||||
*/
|
||||
private void displayAttributesDialog() {
|
||||
if ((attributeDlg == null)
|
||||
|| (attributeDlg.getParent().isDisposed() == true)) {
|
||||
attributeDlg = new SCANAttributesDlg(shell, scanTable, this);
|
||||
attributeDlg.setCloseCallback(new ICloseCallback(){
|
||||
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
unregisterDialog(attributeDlg);
|
||||
attributeDlg = null;
|
||||
}
|
||||
|
||||
});
|
||||
registerDialog(attributeDlg);
|
||||
attributeDlg.open();
|
||||
unregisterDialog(attributeDlg);
|
||||
attributeDlg = null;
|
||||
} else {
|
||||
attributeDlg.bringToTop();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Display Alarm Time Limit Dialog.
|
||||
*/
|
||||
private void displayAlarmTimeLimitDialog() {
|
||||
if (alarmTimeLimitDlg == null) {
|
||||
alarmTimeLimitDlg = new SCANAlarmTimeLimitDlg(shell, scanTable,
|
||||
this.site);
|
||||
alarmTimeLimitDlg.setCloseCallback(new ICloseCallback(){
|
||||
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
unregisterDialog(alarmTimeLimitDlg);
|
||||
alarmTimeLimitDlg = null;
|
||||
}
|
||||
|
||||
});
|
||||
registerDialog(alarmTimeLimitDlg);
|
||||
alarmTimeLimitDlg.open();
|
||||
unregisterDialog(alarmTimeLimitDlg);
|
||||
alarmTimeLimitDlg = null;
|
||||
} else {
|
||||
alarmTimeLimitDlg.bringToTop();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Display Color Threshold Dialog.
|
||||
*/
|
||||
private void displayColorThresholdDialog() {
|
||||
if (colorThresholdDlg == null) {
|
||||
colorThresholdDlg = new SCANColorThreshDlg(shell, scanTable, this);
|
||||
colorThresholdDlg.setCloseCallback(new ICloseCallback(){
|
||||
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
unregisterDialog(colorThresholdDlg);
|
||||
colorThresholdDlg = null;
|
||||
}
|
||||
|
||||
});
|
||||
registerDialog(colorThresholdDlg);
|
||||
colorThresholdDlg.open();
|
||||
unregisterDialog(colorThresholdDlg);
|
||||
colorThresholdDlg = null;
|
||||
} else {
|
||||
colorThresholdDlg.bringToTop();
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.AbstractTableDlg#handleRankMenuEvent(org.eclipse.swt.events.SelectionEvent)
|
||||
*/
|
||||
@Override
|
||||
protected void handleRankMenuEvent(SelectionEvent event) {
|
||||
String rank = ((MenuItem) event.getSource()).getText();
|
||||
|
@ -427,6 +482,9 @@ public class SCANTvsTableDlg extends AbstractTableDlg implements
|
|||
scanTableComp.sortTableColumnByIndex(colIndex);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Time Label.
|
||||
*/
|
||||
private void updateTimeLabel() {
|
||||
if (currentTime == null) {
|
||||
timeLbl.setText("*** NO TIME ***");
|
||||
|
@ -438,10 +496,16 @@ public class SCANTvsTableDlg extends AbstractTableDlg implements
|
|||
timeLbl.setText(dateFmt.format(currentTime));
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregister Dialog From Monitor.
|
||||
*/
|
||||
private void unregisterDialogFromMonitor() {
|
||||
this.fireDialogShutdown(this);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.AbstractTableDlg#shellDisposeAction()
|
||||
*/
|
||||
@Override
|
||||
protected void shellDisposeAction() {
|
||||
shell.addDisposeListener(new DisposeListener() {
|
||||
|
@ -459,11 +523,17 @@ public class SCANTvsTableDlg extends AbstractTableDlg implements
|
|||
});
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.AbstractTableDlg#shellDisposeDialog()
|
||||
*/
|
||||
@Override
|
||||
public void shellDisposeDialog() {
|
||||
shell.dispose();
|
||||
close();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.AbstractTableDlg#setShellText()
|
||||
*/
|
||||
@Override
|
||||
protected void setShellText() {
|
||||
if (!shell.isDisposed()) {
|
||||
|
@ -471,11 +541,17 @@ public class SCANTvsTableDlg extends AbstractTableDlg implements
|
|||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.ITableAction#sortedColumn(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void sortedColumn(String columnName) {
|
||||
rankBtn.setText("Rank: " + columnName);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.AbstractTableDlg#notify(com.raytheon.uf.viz.monitor.events.IMonitorEvent)
|
||||
*/
|
||||
@Override
|
||||
public void notify(IMonitorEvent me) {
|
||||
if (me.getSource() instanceof IMonitor) {
|
||||
|
@ -520,27 +596,42 @@ public class SCANTvsTableDlg extends AbstractTableDlg implements
|
|||
ScanTables.TVS, site, time)));
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.ITableAction#centerByIdent(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void centerByIdent(String ident) {
|
||||
fireRecenter(ident, ScanTables.TVS, site);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.ITableAction#centerByStormId(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void centerByStormId(String stormId) {
|
||||
fireRecenter(stormId, ScanTables.CELL, site);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.commondialogs.IRequestTrendGraphData#getCurrentDate()
|
||||
*/
|
||||
@Override
|
||||
public Date getCurrentDate() {
|
||||
return currentTime;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.ITableAction#getTrendSetName()
|
||||
*/
|
||||
@Override
|
||||
public String getTrendSetName() {
|
||||
// Not used...
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.commondialogs.IAttributeUpdate#attributeUpdates(boolean[])
|
||||
*/
|
||||
@Override
|
||||
public void attributeUpdates(boolean[] visibleAttrs) {
|
||||
SCANConfig scanCfg = SCANConfig.getInstance();
|
||||
|
@ -550,6 +641,9 @@ public class SCANTvsTableDlg extends AbstractTableDlg implements
|
|||
createRankPopupMenu(rankPopupMenu, rankBtn);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.commondialogs.IThresholdUpdate#thresholdsUpdated(java.lang.String, double, double, double)
|
||||
*/
|
||||
@Override
|
||||
public void thresholdsUpdated(String attrName, double upper, double mid,
|
||||
double lower) {
|
||||
|
@ -560,6 +654,9 @@ public class SCANTvsTableDlg extends AbstractTableDlg implements
|
|||
fireThresholdUpdate(new IMonitorThresholdEvent(this));
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.AbstractTableDlg#updateAfterConfigLoad()
|
||||
*/
|
||||
@Override
|
||||
protected void updateAfterConfigLoad() {
|
||||
/*
|
||||
|
@ -580,6 +677,9 @@ public class SCANTvsTableDlg extends AbstractTableDlg implements
|
|||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.AbstractTableDlg#displayTrendSetGraphs(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void displayTrendSetGraphs(String ident) {
|
||||
// NOT USED
|
||||
|
@ -607,11 +707,17 @@ public class SCANTvsTableDlg extends AbstractTableDlg implements
|
|||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.AbstractTableDlg#turnOffAlarm()
|
||||
*/
|
||||
@Override
|
||||
public void turnOffAlarm() {
|
||||
mgr.setRing(false);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.scan.tables.AbstractTableDlg#turnOnAlarm()
|
||||
*/
|
||||
@Override
|
||||
public void turnOnAlarm() {
|
||||
mgr.setRing(true);
|
||||
|
|
Loading…
Add table
Reference in a new issue