Issue #1353 Changes for non-blocking FFFGDlg, AboutDlg, AcknowledgmentsDlg and HelpDlg dialogs.
Change-Id: Id72c6a0c0329f485fe7a9ca115c3f029019145e6 Former-commit-id:7e77a02b95
[formerly9832e2dbb0
] [formerly64a78503b2
] [formerly7e77a02b95
[formerly9832e2dbb0
] [formerly64a78503b2
] [formerlyf3b83e02b4
[formerly64a78503b2
[formerly 372417c1d355e3c5eef327f14be9b72dfe1e0f08]]]] Former-commit-id:f3b83e02b4
Former-commit-id:cc2d52af32
[formerly1533fda1e3
] [formerly 7aae9102eeaa2b1c0c643c122b7d3101a82c87ad [formerly391f07ea69
]] Former-commit-id: 5cdc1987feec65383ba51407300250bcf067e1f4 [formerly49bdfb071c
] Former-commit-id:7e243e872c
This commit is contained in:
parent
5179a6a261
commit
4edf63d2c4
5 changed files with 225 additions and 155 deletions
|
@ -32,6 +32,23 @@ import org.eclipse.swt.widgets.Shell;
|
||||||
|
|
||||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Displays the FFFG About information
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
*
|
||||||
|
* SOFTWARE HISTORY
|
||||||
|
*
|
||||||
|
* Date Ticket# Engineer Description
|
||||||
|
* ------------ ---------- ----------- --------------------------
|
||||||
|
* Initial creation
|
||||||
|
* Nov 29, 2012 1353 rferrel Made dialog non-blocking.
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @author rferrel
|
||||||
|
* @version 1.0
|
||||||
|
*/
|
||||||
public class AboutDlg extends CaveSWTDialog {
|
public class AboutDlg extends CaveSWTDialog {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -39,6 +56,7 @@ public class AboutDlg extends CaveSWTDialog{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private Label aboutLbl;
|
private Label aboutLbl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
|
@ -46,9 +64,10 @@ public class AboutDlg extends CaveSWTDialog{
|
||||||
* Parent shell.
|
* Parent shell.
|
||||||
*/
|
*/
|
||||||
public AboutDlg(Shell parent) {
|
public AboutDlg(Shell parent) {
|
||||||
super(parent);
|
super(parent, SWT.DIALOG_TRIM, CAVE.DO_NOT_BLOCK);
|
||||||
setText("About ForcedFFG");
|
setText("About ForcedFFG");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
*
|
*
|
||||||
|
@ -60,7 +79,6 @@ public class AboutDlg extends CaveSWTDialog{
|
||||||
protected void initializeComponents(final Shell shell) {
|
protected void initializeComponents(final Shell shell) {
|
||||||
setReturnValue(false);
|
setReturnValue(false);
|
||||||
|
|
||||||
|
|
||||||
// Initialize layout
|
// Initialize layout
|
||||||
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
|
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
|
||||||
gd.widthHint = 400;
|
gd.widthHint = 400;
|
||||||
|
@ -91,15 +109,16 @@ public class AboutDlg extends CaveSWTDialog{
|
||||||
}
|
}
|
||||||
|
|
||||||
private void populateDlg() {
|
private void populateDlg() {
|
||||||
String aboutText = " The ForceFFG GUI was closely followed FFMP, LSR,\n"+
|
String aboutText = " The ForceFFG GUI was closely followed FFMP, LSR,\n"
|
||||||
" ForcedFFG applications and was based on input from\n"+
|
+ " ForcedFFG applications and was based on input from\n"
|
||||||
" the AWIPS User Interface Working Group. Visit \n"+
|
+ " the AWIPS User Interface Working Group. Visit \n"
|
||||||
" http://www.nws.noaa.gov/mdl/ffmp/ for more details\n"+
|
+ " http://www.nws.noaa.gov/mdl/ffmp/ for more details\n"
|
||||||
" regarding this ForcedFFG GUI.";
|
+ " regarding this ForcedFFG GUI.";
|
||||||
|
|
||||||
this.aboutLbl.setText(aboutText);
|
this.aboutLbl.setText(aboutText);
|
||||||
this.shell.pack();
|
this.shell.pack();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
*
|
*
|
||||||
|
@ -111,4 +130,3 @@ public class AboutDlg extends CaveSWTDialog{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,23 @@ import org.eclipse.swt.widgets.Shell;
|
||||||
|
|
||||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dialog to dispaly FFFG Acknowledgments.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
*
|
||||||
|
* SOFTWARE HISTORY
|
||||||
|
*
|
||||||
|
* Date Ticket# Engineer Description
|
||||||
|
* ------------ ---------- ----------- --------------------------
|
||||||
|
* Initial creation
|
||||||
|
* Nov 29, 2012 1353 rferrel Made dialog non-blocking.
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @author rferrel
|
||||||
|
* @version 1.0
|
||||||
|
*/
|
||||||
public class AcknowledgmentsDlg extends CaveSWTDialog {
|
public class AcknowledgmentsDlg extends CaveSWTDialog {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -46,9 +63,10 @@ public class AcknowledgmentsDlg extends CaveSWTDialog{
|
||||||
* Parent shell.
|
* Parent shell.
|
||||||
*/
|
*/
|
||||||
public AcknowledgmentsDlg(Shell parent) {
|
public AcknowledgmentsDlg(Shell parent) {
|
||||||
super(parent);
|
super(parent, SWT.DIALOG_TRIM, CAVE.DO_NOT_BLOCK);
|
||||||
setText("Acknowledgments");
|
setText("Acknowledgments");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
*
|
*
|
||||||
|
@ -91,14 +109,15 @@ public class AcknowledgmentsDlg extends CaveSWTDialog{
|
||||||
}
|
}
|
||||||
|
|
||||||
private void populateDlg() {
|
private void populateDlg() {
|
||||||
String acknowledgementsText = " Special thanks to Lingyan Xin, Tom Filiaggi, Qinglu Lin,\n" +
|
String acknowledgementsText = " Special thanks to Lingyan Xin, Tom Filiaggi, Qinglu Lin,\n"
|
||||||
" Mike Churma, Arthur Taylor, Xuning Tan, Bei Wang and\n" +
|
+ " Mike Churma, Arthur Taylor, Xuning Tan, Bei Wang and\n"
|
||||||
" others in MDL for their many valuable help for their\n"+
|
+ " others in MDL for their many valuable help for their\n"
|
||||||
" many valuable help and suggestions!";
|
+ " many valuable help and suggestions!";
|
||||||
|
|
||||||
this.acknowledgmentsLbl.setText(acknowledgementsText);
|
this.acknowledgmentsLbl.setText(acknowledgementsText);
|
||||||
this.shell.pack();
|
this.shell.pack();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
*
|
*
|
||||||
|
@ -109,4 +128,3 @@ public class AcknowledgmentsDlg extends CaveSWTDialog{
|
||||||
super.disposed();
|
super.disposed();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,13 +79,18 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Mar 10, 2010 #4517 lvenable Initial creation
|
* Mar 10, 2010 #4517 lvenable Initial creation
|
||||||
* Dec 12, 2011 #11225 gzhang Large font for FFG value,expiration time
|
* Dec 12, 2011 #11225 gzhang Large font for FFG value,expiration time
|
||||||
|
* Nov 29, 2012 #1353 rferrel Make dialog non-blocking.
|
||||||
|
* Changes for non-blocking AboutDlg.
|
||||||
|
* Changes for non-blocking AcknowledgmentsDlg.
|
||||||
|
* Changes for non-blocking HelpDlg.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author lvenable
|
* @author lvenable
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
public class FFFGDlg extends CaveSWTDialog implements ISourceCompAction, IFFFGData {
|
public class FFFGDlg extends CaveSWTDialog implements ISourceCompAction,
|
||||||
|
IFFFGData {
|
||||||
private final String MODIFIED = "Modified";
|
private final String MODIFIED = "Modified";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -196,7 +201,7 @@ public class FFFGDlg extends CaveSWTDialog implements ISourceCompAction, IFFFGDa
|
||||||
/**
|
/**
|
||||||
* Array of source composites on the display.
|
* Array of source composites on the display.
|
||||||
*/
|
*/
|
||||||
private ArrayList<SourceComp> sourceCompArray;
|
private java.util.List<SourceComp> sourceCompArray;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Maximum number of source columns that can be displayed.
|
* Maximum number of source columns that can be displayed.
|
||||||
|
@ -277,7 +282,8 @@ public class FFFGDlg extends CaveSWTDialog implements ISourceCompAction, IFFFGDa
|
||||||
* Parent shell.
|
* Parent shell.
|
||||||
*/
|
*/
|
||||||
public FFFGDlg(Shell parentShell) {
|
public FFFGDlg(Shell parentShell) {
|
||||||
super(parentShell, SWT.DIALOG_TRIM, CAVE.INDEPENDENT_SHELL);
|
super(parentShell, SWT.DIALOG_TRIM, CAVE.INDEPENDENT_SHELL
|
||||||
|
| CAVE.DO_NOT_BLOCK);
|
||||||
this.getParent().setCursor(
|
this.getParent().setCursor(
|
||||||
this.getParent().getDisplay().getSystemCursor(SWT.CURSOR_WAIT));
|
this.getParent().getDisplay().getSystemCursor(SWT.CURSOR_WAIT));
|
||||||
setText("Forced Flash Flood Guidance");
|
setText("Forced Flash Flood Guidance");
|
||||||
|
@ -777,14 +783,14 @@ public class FFFGDlg extends CaveSWTDialog implements ISourceCompAction, IFFFGDa
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
getParent().setCursor(
|
getParent().setCursor(
|
||||||
getParent().getDisplay()
|
getParent().getDisplay().getSystemCursor(
|
||||||
.getSystemCursor(SWT.CURSOR_WAIT));
|
SWT.CURSOR_WAIT));
|
||||||
shell.setCursor(getDisplay().getSystemCursor(SWT.CURSOR_WAIT));
|
shell.setCursor(getDisplay().getSystemCursor(SWT.CURSOR_WAIT));
|
||||||
applyDataAction();
|
applyDataAction();
|
||||||
updateFileStatusLabel(false);
|
updateFileStatusLabel(false);
|
||||||
getParent().setCursor(
|
getParent().setCursor(
|
||||||
getParent().getDisplay()
|
getParent().getDisplay().getSystemCursor(
|
||||||
.getSystemCursor(SWT.CURSOR_ARROW));
|
SWT.CURSOR_ARROW));
|
||||||
shell.setCursor(getDisplay().getSystemCursor(SWT.CURSOR_ARROW));
|
shell.setCursor(getDisplay().getSystemCursor(SWT.CURSOR_ARROW));
|
||||||
|
|
||||||
saveFileAs();
|
saveFileAs();
|
||||||
|
@ -1139,7 +1145,6 @@ public class FFFGDlg extends CaveSWTDialog implements ISourceCompAction, IFFFGDa
|
||||||
|
|
||||||
for (SourceComp sc : sourceCompArray) {
|
for (SourceComp sc : sourceCompArray) {
|
||||||
if (sc.hasData() == true) {
|
if (sc.hasData() == true) {
|
||||||
// sc.getSourceData().printData(); // TODO - remove print statement
|
|
||||||
srcCompData.add(sc.getSourceData());
|
srcCompData.add(sc.getSourceData());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1473,8 +1478,8 @@ public class FFFGDlg extends CaveSWTDialog implements ISourceCompAction, IFFFGDa
|
||||||
FFMPBasinMetaData basinMetaData;
|
FFMPBasinMetaData basinMetaData;
|
||||||
|
|
||||||
for (FFMPCounty county : countyArray) {
|
for (FFMPCounty county : countyArray) {
|
||||||
pfafArray = templates.getAllAggregatePfafs(
|
pfafArray = templates.getAllAggregatePfafs(county.getGid(),
|
||||||
county.getGid(), "COUNTY");
|
"COUNTY");
|
||||||
|
|
||||||
for (Long pfaf : pfafArray) {
|
for (Long pfaf : pfafArray) {
|
||||||
basinMetaData = templates.getBasin(pfaf);
|
basinMetaData = templates.getBasin(pfaf);
|
||||||
|
@ -1704,16 +1709,19 @@ public class FFFGDlg extends CaveSWTDialog implements ISourceCompAction, IFFFGDa
|
||||||
* Help menu popup.
|
* Help menu popup.
|
||||||
*/
|
*/
|
||||||
private void callHelpDlg() {
|
private void callHelpDlg() {
|
||||||
|
if (helpDlg == null) {
|
||||||
helpDlg = new HelpDlg(shell);
|
helpDlg = new HelpDlg(shell);
|
||||||
|
}
|
||||||
helpDlg.open();
|
helpDlg.open();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* About menu popup
|
* About menu popup
|
||||||
*/
|
*/
|
||||||
private void callAboutDlg() {
|
private void callAboutDlg() {
|
||||||
|
if (aboutDlg == null) {
|
||||||
aboutDlg = new AboutDlg(shell);
|
aboutDlg = new AboutDlg(shell);
|
||||||
|
}
|
||||||
aboutDlg.open();
|
aboutDlg.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1721,7 +1729,9 @@ public class FFFGDlg extends CaveSWTDialog implements ISourceCompAction, IFFFGDa
|
||||||
* Acknowledgments menu popup
|
* Acknowledgments menu popup
|
||||||
*/
|
*/
|
||||||
private void callAcknowledgmentsDlg() {
|
private void callAcknowledgmentsDlg() {
|
||||||
|
if (acknowledgmentsDlg == null) {
|
||||||
acknowledgmentsDlg = new AcknowledgmentsDlg(shell);
|
acknowledgmentsDlg = new AcknowledgmentsDlg(shell);
|
||||||
|
}
|
||||||
acknowledgmentsDlg.open();
|
acknowledgmentsDlg.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1787,7 +1797,8 @@ public class FFFGDlg extends CaveSWTDialog implements ISourceCompAction, IFFFGDa
|
||||||
}
|
}
|
||||||
basinList.add(list);
|
basinList.add(list);
|
||||||
}
|
}
|
||||||
fdm.saveUpdateUserXML(calculateExpTimeInMillis(), srcCompData, basinList);
|
fdm.saveUpdateUserXML(calculateExpTimeInMillis(), srcCompData,
|
||||||
|
basinList);
|
||||||
|
|
||||||
// Update the File name label
|
// Update the File name label
|
||||||
fileNameLbl.setText(fdm.getUserFileName());
|
fileNameLbl.setText(fdm.getUserFileName());
|
||||||
|
@ -2101,8 +2112,7 @@ public class FFFGDlg extends CaveSWTDialog implements ISourceCompAction, IFFFGDa
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* populate the dialog with the data retrieved
|
* populate the dialog with the data retrieved via FFFGData.
|
||||||
* via FFFGData.
|
|
||||||
*/
|
*/
|
||||||
private void populateDialog() {
|
private void populateDialog() {
|
||||||
populateCountyLists();
|
populateCountyLists();
|
||||||
|
@ -2113,7 +2123,8 @@ public class FFFGDlg extends CaveSWTDialog implements ISourceCompAction, IFFFGDa
|
||||||
sc.populateSourceComp();
|
sc.populateSourceComp();
|
||||||
|
|
||||||
statusLbl.setText("");
|
statusLbl.setText("");
|
||||||
this.getParent().setCursor(
|
this.getParent()
|
||||||
|
.setCursor(
|
||||||
this.getParent().getDisplay()
|
this.getParent().getDisplay()
|
||||||
.getSystemCursor(SWT.CURSOR_ARROW));
|
.getSystemCursor(SWT.CURSOR_ARROW));
|
||||||
}
|
}
|
||||||
|
@ -2142,7 +2153,9 @@ public class FFFGDlg extends CaveSWTDialog implements ISourceCompAction, IFFFGDa
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
*
|
||||||
* @see com.raytheon.uf.viz.monitor.ffmp.fffg.IFFFGData#setCounties()
|
* @see com.raytheon.uf.viz.monitor.ffmp.fffg.IFFFGData#setCounties()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -2150,7 +2163,9 @@ public class FFFGDlg extends CaveSWTDialog implements ISourceCompAction, IFFFGDa
|
||||||
this.counties = counties;
|
this.counties = counties;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
*
|
||||||
* @see com.raytheon.uf.viz.monitor.ffmp.fffg.IFFFGData#setTemplates()
|
* @see com.raytheon.uf.viz.monitor.ffmp.fffg.IFFFGData#setTemplates()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -2158,8 +2173,12 @@ public class FFFGDlg extends CaveSWTDialog implements ISourceCompAction, IFFFGDa
|
||||||
this.templates = templates;
|
this.templates = templates;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/*
|
||||||
* @see com.raytheon.uf.viz.monitor.ffmp.fffg.IFFFGData#setGuidances(java.util.LinkedHashMap)
|
* (non-Javadoc)
|
||||||
|
*
|
||||||
|
* @see
|
||||||
|
* com.raytheon.uf.viz.monitor.ffmp.fffg.IFFFGData#setGuidances(java.util
|
||||||
|
* .LinkedHashMap)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setGuidances(
|
public void setGuidances(
|
||||||
|
@ -2167,8 +2186,12 @@ public class FFFGDlg extends CaveSWTDialog implements ISourceCompAction, IFFFGDa
|
||||||
this.guidances = guidances;
|
this.guidances = guidances;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/*
|
||||||
* @see com.raytheon.uf.viz.monitor.ffmp.fffg.IFFFGData#setDataLoadComplete(boolean)
|
* (non-Javadoc)
|
||||||
|
*
|
||||||
|
* @see
|
||||||
|
* com.raytheon.uf.viz.monitor.ffmp.fffg.IFFFGData#setDataLoadComplete(boolean
|
||||||
|
* )
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void dataLoadComplete() {
|
public void dataLoadComplete() {
|
||||||
|
@ -2180,18 +2203,18 @@ public class FFFGDlg extends CaveSWTDialog implements ISourceCompAction, IFFFGDa
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FFFG GUI large font for:
|
* FFFG GUI large font for: Text ffgValueTF and Spinner expireTimeSpnr.
|
||||||
* Text ffgValueTF and Spinner expireTimeSpnr.
|
|
||||||
*
|
*
|
||||||
* @param ctrl: Control to change Font
|
* @param ctrl
|
||||||
|
* : Control to change Font
|
||||||
* @return: large Font
|
* @return: large Font
|
||||||
*/
|
*/
|
||||||
private Font getLargeFont(org.eclipse.swt.widgets.Control ctrl) {
|
private Font getLargeFont(org.eclipse.swt.widgets.Control ctrl) {
|
||||||
|
|
||||||
if (ctrl == null)
|
if (ctrl == null)
|
||||||
return new Font(getDisplay(), new org.eclipse.swt.graphics.FontData());
|
return new Font(getDisplay(),
|
||||||
|
new org.eclipse.swt.graphics.FontData());
|
||||||
|
|
||||||
Font font = ctrl.getFont();
|
Font font = ctrl.getFont();
|
||||||
org.eclipse.swt.graphics.FontData[] fontData = font.getFontData();
|
org.eclipse.swt.graphics.FontData[] fontData = font.getFontData();
|
||||||
|
|
|
@ -32,6 +32,23 @@ import org.eclipse.swt.widgets.Shell;
|
||||||
|
|
||||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dialog to dispaly FFFG help.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
*
|
||||||
|
* SOFTWARE HISTORY
|
||||||
|
*
|
||||||
|
* Date Ticket# Engineer Description
|
||||||
|
* ------------ ---------- ----------- --------------------------
|
||||||
|
* Initial creation
|
||||||
|
* Nov 29, 2012 1353 rferrel Made dialog non-blocking.
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @author rferrel
|
||||||
|
* @version 1.0
|
||||||
|
*/
|
||||||
public class HelpDlg extends CaveSWTDialog {
|
public class HelpDlg extends CaveSWTDialog {
|
||||||
/**
|
/**
|
||||||
* Create the label object.
|
* Create the label object.
|
||||||
|
@ -46,9 +63,10 @@ public class HelpDlg extends CaveSWTDialog{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public HelpDlg(Shell parent) {
|
public HelpDlg(Shell parent) {
|
||||||
super(parent);
|
super(parent, SWT.DIALOG_TRIM, CAVE.DO_NOT_BLOCK);
|
||||||
setText("Help for ForcedFFG");
|
setText("Help for ForcedFFG");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
*
|
*
|
||||||
|
@ -88,26 +106,27 @@ public class HelpDlg extends CaveSWTDialog{
|
||||||
}
|
}
|
||||||
|
|
||||||
private void populateDlg() {
|
private void populateDlg() {
|
||||||
String helpText = " - To add FFG to counties: Left click on the county name \n"+
|
String helpText = " - To add FFG to counties: Left click on the county name \n"
|
||||||
" in the leftmost column and click on the button \n"+
|
+ " in the leftmost column and click on the button \n"
|
||||||
" 'Add/Update selected County(ies)' \n"+
|
+ " 'Add/Update selected County(ies)' \n"
|
||||||
" - To add FFG to basins: Left click on the basin name \n"+
|
+ " - To add FFG to basins: Left click on the basin name \n"
|
||||||
" in the leftmost column and click on the button \n"+
|
+ " in the leftmost column and click on the button \n"
|
||||||
" 'Add/Update selected Basin(s)' \n"+
|
+ " 'Add/Update selected Basin(s)' \n"
|
||||||
" - To remove FFG from counties: Left click on the county name \n"+
|
+ " - To remove FFG from counties: Left click on the county name \n"
|
||||||
" in the rightmost column and click on the button \n"+
|
+ " in the rightmost column and click on the button \n"
|
||||||
" 'Remove County(ies)' \n"+
|
+ " 'Remove County(ies)' \n"
|
||||||
" - To remove FFG from basins: Left click on the basin name \n"+
|
+ " - To remove FFG from basins: Left click on the basin name \n"
|
||||||
" in the rightmost column and click on the button \n"+
|
+ " in the rightmost column and click on the button \n"
|
||||||
" 'Remove Basin(s)' \n"+
|
+ " 'Remove Basin(s)' \n"
|
||||||
" - Basin value override county value.\n"+
|
+ " - Basin value override county value.\n"
|
||||||
" - County value override CWA value.\n"+
|
+ " - County value override CWA value.\n"
|
||||||
" - Visit http://www.nws.noaa.gov/mdl/ffmp/ \n"+
|
+ " - Visit http://www.nws.noaa.gov/mdl/ffmp/ \n"
|
||||||
" for more details.";
|
+ " for more details.";
|
||||||
|
|
||||||
this.helpLbl.setText(helpText);
|
this.helpLbl.setText(helpText);
|
||||||
this.shell.pack();
|
this.shell.pack();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
*
|
*
|
||||||
|
@ -118,4 +137,3 @@ public class HelpDlg extends CaveSWTDialog{
|
||||||
super.disposed();
|
super.disposed();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.eclipse.core.commands.ExecutionException;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.ui.PlatformUI;
|
import org.eclipse.ui.PlatformUI;
|
||||||
|
|
||||||
import com.raytheon.uf.viz.core.VizApp;
|
|
||||||
import com.raytheon.uf.viz.monitor.ffmp.fffg.FFFGDlg;
|
import com.raytheon.uf.viz.monitor.ffmp.fffg.FFFGDlg;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -38,6 +37,7 @@ import com.raytheon.uf.viz.monitor.ffmp.fffg.FFFGDlg;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* 1/27/09 dhladky Initial Creation.
|
* 1/27/09 dhladky Initial Creation.
|
||||||
|
* 1/29/2012 1353 rferrel Changes for non-blocking FFFGDlg.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -50,21 +50,14 @@ public class FFFGAction extends AbstractHandler {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
||||||
|
// Independent dialog is disposed on close and cannot be reopened.
|
||||||
if (fffgDlg == null) {
|
if (fffgDlg == null || fffgDlg.getShell() == null
|
||||||
|
|| fffgDlg.isDisposed()) {
|
||||||
VizApp.runAsync(new Runnable() {
|
Shell fshell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||||
@Override
|
.getShell();
|
||||||
public void run() {
|
|
||||||
|
|
||||||
Shell fshell = PlatformUI.getWorkbench()
|
|
||||||
.getActiveWorkbenchWindow().getShell();
|
|
||||||
fffgDlg = new FFFGDlg(fshell);
|
fffgDlg = new FFFGDlg(fshell);
|
||||||
|
}
|
||||||
fffgDlg.open();
|
fffgDlg.open();
|
||||||
fffgDlg = null;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue