Issue #1578 Code clean up for non-blocking dialogs.
Changes from code review. Change-Id: I9f95dd07736f96af8cb1116030a9fb778fe4b047 Former-commit-id: e3c21436e1186e467daf071bb723a2c31d6d3579
This commit is contained in:
parent
cdafa71827
commit
db818dfd35
4 changed files with 319 additions and 123 deletions
|
@ -41,7 +41,7 @@ import com.raytheon.uf.common.ohd.AppsDefaults;
|
|||
import com.raytheon.viz.hydro.CaveHydroSWTDialog;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Dialog add remove distribution directories.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -50,6 +50,7 @@ import com.raytheon.viz.hydro.CaveHydroSWTDialog;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 28, 2011 mpduff Initial creation
|
||||
* Feb 06, 2013 1578 rferrel Code cleanup for non-blocking dialog.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -64,18 +65,25 @@ public class SendConfigDlg extends CaveHydroSWTDialog {
|
|||
*/
|
||||
private Font font;
|
||||
|
||||
/** Manager for handling the shef xml data. */
|
||||
private ShefIssueMgr shefIssueMgr;
|
||||
|
||||
/** Distribute product check box. */
|
||||
private Button distChk;
|
||||
|
||||
/** Internal directory check box. */
|
||||
private Button directoryChk;
|
||||
|
||||
/** Button to bring up dialog to add a directory . */
|
||||
private Button addBtn;
|
||||
|
||||
/** Button to remove selectted directory. */
|
||||
private Button removeBtn;
|
||||
|
||||
/** Button to remove all directories in the list. */
|
||||
private Button removeAllBtn;
|
||||
|
||||
/** List to display the directories. */
|
||||
private List directoryList;
|
||||
|
||||
/**
|
||||
|
@ -105,12 +113,20 @@ public class SendConfigDlg extends CaveHydroSWTDialog {
|
|||
initializeComponents();
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup layout of dialog.
|
||||
*/
|
||||
private void initializeComponents() {
|
||||
createDistributionGroup();
|
||||
createDirectoryGroup();
|
||||
createBottomButtons();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#constructShellLayout()
|
||||
*/
|
||||
@Override
|
||||
protected Layout constructShellLayout() {
|
||||
// Create the main layout for the shell.
|
||||
|
@ -122,7 +138,8 @@ public class SendConfigDlg extends CaveHydroSWTDialog {
|
|||
}
|
||||
|
||||
private void createDistributionGroup() {
|
||||
String defSelection = AppsDefaults.getInstance().getToken("timeseries_dist_shef", "OFF");
|
||||
String defSelection = AppsDefaults.getInstance().getToken(
|
||||
"timeseries_dist_shef", "OFF");
|
||||
boolean selected = true;
|
||||
if (defSelection.equalsIgnoreCase("OFF")) {
|
||||
selected = false;
|
||||
|
@ -193,10 +210,9 @@ public class SendConfigDlg extends CaveHydroSWTDialog {
|
|||
addBtn.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
System.out.println("Add Pressed");
|
||||
DirectoryDialog fd = new DirectoryDialog(shell, SWT.OPEN);
|
||||
String dir = fd.open();
|
||||
System.out.println("Selected " + dir);
|
||||
if (dir != null) {
|
||||
directoryList.add(dir);
|
||||
String[] items = directoryList.getItems();
|
||||
java.util.Arrays.sort(items);
|
||||
|
@ -205,6 +221,7 @@ public class SendConfigDlg extends CaveHydroSWTDialog {
|
|||
directoryList.add(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
gd = new GridData(buttonWidth, SWT.DEFAULT);
|
||||
|
@ -236,6 +253,9 @@ public class SendConfigDlg extends CaveHydroSWTDialog {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Layout the button at the bottom of the dialog.
|
||||
*/
|
||||
private void createBottomButtons() {
|
||||
Composite buttonComp = new Composite(shell, SWT.NONE);
|
||||
buttonComp.setLayout(new GridLayout(3, true));
|
||||
|
@ -275,7 +295,7 @@ public class SendConfigDlg extends CaveHydroSWTDialog {
|
|||
cancelBtn.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
shell.dispose();
|
||||
close();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -309,6 +329,9 @@ public class SendConfigDlg extends CaveHydroSWTDialog {
|
|||
activateDirectoryWidgets();
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the changes based on dialog selections.
|
||||
*/
|
||||
private void applyChanges() {
|
||||
ShefIssueXML xml = this.shefIssueMgr.getShefIssueXml();
|
||||
if (xml == null) {
|
||||
|
@ -340,6 +363,9 @@ public class SendConfigDlg extends CaveHydroSWTDialog {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set enable status of directory widgets.
|
||||
*/
|
||||
private void activateDirectoryWidgets() {
|
||||
boolean activate = directoryChk.getSelection();
|
||||
|
||||
|
|
|
@ -40,6 +40,8 @@ import org.eclipse.jface.dialogs.MessageDialog;
|
|||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.SelectionAdapter;
|
||||
import org.eclipse.swt.events.SelectionEvent;
|
||||
import org.eclipse.swt.events.ShellAdapter;
|
||||
import org.eclipse.swt.events.ShellEvent;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.graphics.Font;
|
||||
import org.eclipse.swt.graphics.GC;
|
||||
|
@ -122,6 +124,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* Sep 09 2011 9962 lbousaidi reload time series when there is update/insert
|
||||
* and highlight the row that was updated.
|
||||
* Feb 05,2013 1578 rferrel Changes for non-blocking singleton TimeSeriesDlg.
|
||||
* Code clean up for non-blocking dialog.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -134,30 +137,46 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
private final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(TabularTimeSeriesDlg.class);
|
||||
|
||||
/** Location and size to use when opening a new dialog. */
|
||||
private static Rectangle bounds;
|
||||
|
||||
/** Line terminator to use when reading a line from a shef file. */
|
||||
private final String CARRIAGECONTROL = "\r";
|
||||
|
||||
/** Maximum number time series to place in a list. */
|
||||
private final int MAX_TS_ON_LIST = 120;
|
||||
|
||||
/** Default header label */
|
||||
private final String HDRDEFAULT = " Value Time(Z) RV SQ QC Product Time Posted";
|
||||
|
||||
/** Stage header label.. */
|
||||
private final String HDRSTAGE = " Value Flow Time(Z) RV SQ QC Product Time Posted";
|
||||
|
||||
/** Flow header label. */
|
||||
private final String HDRFLOW = " Value Stage Time(Z) RV SQ QC Product Time Posted";
|
||||
|
||||
/** Quality control value for manual "Good" */
|
||||
private final int QC_MANUAL_PASSED = 121;
|
||||
|
||||
/** Quality control value for manual "Quest". */
|
||||
private final int QC_MANUAL_QUEST = 122;
|
||||
|
||||
/** Quality control value for manue "Bad". */
|
||||
private final int QC_MANUAL_FAILED = 123;
|
||||
|
||||
/** Value used for undefined type source. */
|
||||
private final String UNDEFINED_TYPESOURCE = "??";
|
||||
|
||||
/** Default value or product ID. */
|
||||
private final String INSERT_PROD_ID = "CCCCWRKXXX";
|
||||
|
||||
/** The base for all shel file names. */
|
||||
private final String SHEF_FILE_NAME = "shef_product";
|
||||
|
||||
/** Message title to use when invalid product ID error message. */
|
||||
private final String INVALID_PRODUCT_ID = "Invalid Product ID";
|
||||
|
||||
/** the Send configuration dialog. */
|
||||
private SendConfigDlg sendConfigDlg;
|
||||
|
||||
/**
|
||||
|
@ -176,8 +195,10 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
private SimpleDateFormat prodBasisFmt = new SimpleDateFormat(
|
||||
"yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
/** Date format for shef information. */
|
||||
private SimpleDateFormat shefDateFormat = new SimpleDateFormat("yyyyMMdd");
|
||||
|
||||
/** Time format for shef information. */
|
||||
private SimpleDateFormat shefTimeFormat = new SimpleDateFormat("HHmm");
|
||||
|
||||
/**
|
||||
|
@ -234,7 +255,7 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
private Label headerLbl;
|
||||
|
||||
/**
|
||||
* TODO: need to replace this with a real time object.
|
||||
* Dummy time to use; based on the simulated time.
|
||||
*/
|
||||
private Calendar dummyTime;
|
||||
|
||||
|
@ -389,6 +410,7 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
/** Date format for the database */
|
||||
private static SimpleDateFormat dbFormat;
|
||||
|
||||
/* Setup the format static variables. */
|
||||
static {
|
||||
tabularFormat = new SimpleDateFormat("MM/dd HH:mm");
|
||||
tabularFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
|
||||
|
@ -412,24 +434,38 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
/** SHEF broadcast filename */
|
||||
String attachedFilename = null;
|
||||
|
||||
/* Vars used in the printing methods */
|
||||
/** Printer to use. */
|
||||
private Printer printer;
|
||||
|
||||
/** Printer's line height. */
|
||||
private int lineHeight = 0;
|
||||
|
||||
/** Printer's tab width. */
|
||||
private int tabWidth = 0;
|
||||
|
||||
/** Printer's left margin. */
|
||||
private int leftMargin;
|
||||
|
||||
/** Printer's right margin. */
|
||||
private int rightMargin;
|
||||
|
||||
/** Printer's top margin. */
|
||||
private int topMargin;
|
||||
|
||||
/** Printer's bottom margin. */
|
||||
private int bottomMargin;
|
||||
|
||||
private int x, y;
|
||||
/** Printer's horizontal location for printing. */
|
||||
private int x;
|
||||
|
||||
private int index, end;
|
||||
/** Printer's vertical location for printing. */
|
||||
private int y;
|
||||
|
||||
/** Location in the text that is being printed. */
|
||||
private int index;
|
||||
|
||||
/** Number of characters in the text being printed. */
|
||||
private int end;
|
||||
|
||||
private StringBuffer wordBuffer;
|
||||
|
||||
|
@ -475,6 +511,11 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
this.tsDataJobManager = new TimeSeriesDataJobManager();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#constructShellLayout()
|
||||
*/
|
||||
@Override
|
||||
protected Layout constructShellLayout() {
|
||||
// Create the main layout for the shell.
|
||||
|
@ -503,7 +544,31 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialog#preOpened()
|
||||
*/
|
||||
@Override
|
||||
protected void preOpened() {
|
||||
super.preOpened();
|
||||
shell.addShellListener(new ShellAdapter() {
|
||||
@Override
|
||||
public void shellClosed(ShellEvent event) {
|
||||
bounds = shell.getBounds();
|
||||
}
|
||||
});
|
||||
|
||||
if (bounds != null) {
|
||||
shell.setBounds(bounds);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set up to retrieve selection data.
|
||||
*/
|
||||
private void scheduleDataRetrieval() {
|
||||
shell.setCursor(shell.getDisplay().getSystemCursor(SWT.CURSOR_WAIT));
|
||||
this.topDataList.setEnabled(false);
|
||||
String selection = this.extractFormInformation();
|
||||
tsDataJobManager.scheduleGetTableData(this, this, selection);
|
||||
|
@ -1055,7 +1120,7 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
closeBtn.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
close();
|
||||
disposeDialog();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -1203,12 +1268,17 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
|
||||
scheduleDataRetrieval();
|
||||
} catch (VizException ve) {
|
||||
ve.printStackTrace();
|
||||
statusHandler.handle(Priority.PROBLEM, "Time Series Load", ve);
|
||||
} catch (ClassNotFoundException ex) {
|
||||
ex.printStackTrace();
|
||||
statusHandler.handle(Priority.PROBLEM, "Time Series Load", ex);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get table data for the selection.
|
||||
*
|
||||
* @param selection
|
||||
*/
|
||||
public void getDataForTable(String selection) {
|
||||
TimeSeriesDataManager dataManager = TimeSeriesDataManager.getInstance();
|
||||
|
||||
|
@ -1240,9 +1310,9 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
ts, dur, ext, beginningTime, endingTime, basisTime,
|
||||
forecast);
|
||||
} catch (ClassNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
statusHandler.handle(Priority.PROBLEM, "Getting Table Data: ", e);
|
||||
} catch (VizException e) {
|
||||
e.printStackTrace();
|
||||
statusHandler.handle(Priority.PROBLEM, "Getting Table Data: ", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1389,6 +1459,7 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
}
|
||||
}
|
||||
|
||||
shell.setCursor(null);
|
||||
this.topDataList.setEnabled(true);
|
||||
this.parentDialog.enableTableButton();
|
||||
this.parentDialog.enableBothButton();
|
||||
|
@ -1491,8 +1562,7 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
Date defaultDate = dbFormat.parse(productTimeLbl.getText());
|
||||
dr.setProductTime(defaultDate);
|
||||
} catch (ParseException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
statusHandler.error("Parse Error", e);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1513,8 +1583,7 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
dr.setProductId(INSERT_PROD_ID);
|
||||
|
||||
} catch (ParseException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
statusHandler.handle(Priority.PROBLEM, "Parse Error: " + e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1561,8 +1630,7 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
scheduleDataRetrieval();
|
||||
|
||||
} catch (VizException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
statusHandler.handle(Priority.PROBLEM, "", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1636,7 +1704,7 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
dr.setProductTime(newDateTime);
|
||||
dr.setBasisTime(newDefaultTime);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
statusHandler.handle(Priority.PROBLEM, "Parse error: ", e);
|
||||
}
|
||||
|
||||
newDateTime = now;
|
||||
|
@ -1660,8 +1728,7 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
dr.setProductId(INSERT_PROD_ID);
|
||||
|
||||
} catch (ParseException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
statusHandler.handle(Priority.PROBLEM, "Parse error: ", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1749,8 +1816,7 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
}
|
||||
} catch (VizException e) {
|
||||
statusHandler.handle(Priority.PROBLEM, "Data Query:"
|
||||
+ " Error inserting forecast data.");
|
||||
e.printStackTrace();
|
||||
+ " Error inserting forecast data.", e);
|
||||
}
|
||||
|
||||
/* call Load Max Forecast if update or insert of H or Q PE's */
|
||||
|
@ -1759,9 +1825,8 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
try {
|
||||
LoadMaxFcst.loadMaxFcstItem(lid, pe, ts);
|
||||
} catch (VizException e) {
|
||||
e.printStackTrace();
|
||||
statusHandler.handle(Priority.PROBLEM, "Data Query:"
|
||||
+ " Error inserting max forecast record.");
|
||||
+ " Error inserting max forecast record.", e);
|
||||
}
|
||||
}
|
||||
} // end if fcst
|
||||
|
@ -2116,7 +2181,8 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
throw new VizException("Error Updating QC value");
|
||||
}
|
||||
} catch (VizException e) {
|
||||
e.printStackTrace();
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Updating QC value: ", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2150,8 +2216,8 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
status = dataManager.insertRejectedData(dr);
|
||||
}
|
||||
} catch (VizException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Inserted Rejected Data: ", e);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2202,8 +2268,7 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
out.write(text);
|
||||
out.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
// TODO Log error here
|
||||
statusHandler.handle(Priority.PROBLEM, "Saving Table: ", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2250,24 +2315,16 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
Rectangle clientArea = printer.getClientArea();
|
||||
Rectangle trim = printer.computeTrim(0, 0, 0, 0);
|
||||
Point dpi = printer.getDPI();
|
||||
leftMargin = dpi.x + trim.x; // one inch from left side of paper
|
||||
rightMargin = clientArea.width - dpi.x + trim.x + trim.width; // one
|
||||
// inch
|
||||
// from
|
||||
// right
|
||||
// side
|
||||
// of
|
||||
// paper
|
||||
topMargin = dpi.y + trim.y; // one inch from top edge of paper
|
||||
bottomMargin = clientArea.height - dpi.y + trim.y + trim.height; // one
|
||||
// inch
|
||||
// from
|
||||
// bottom
|
||||
// edge
|
||||
// of
|
||||
// paper
|
||||
// one inch from left side of paper
|
||||
leftMargin = dpi.x + trim.x;
|
||||
// one inch from right side of paper
|
||||
rightMargin = clientArea.width - dpi.x + trim.x + trim.width;
|
||||
// one inch from top edge of paper
|
||||
topMargin = dpi.y + trim.y;
|
||||
// one inch from bottom edge of paper
|
||||
bottomMargin = clientArea.height - dpi.y + trim.y + trim.height;
|
||||
|
||||
/* Create a buffer for computing tab width. */
|
||||
// Create a buffer for computing tab width.
|
||||
int tabSize = 4; // is tab width a user setting in your UI?
|
||||
StringBuffer tabBuffer = new StringBuffer(tabSize);
|
||||
for (int i = 0; i < tabSize; i++) {
|
||||
|
@ -2435,8 +2492,7 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
|
||||
return sb.toString();
|
||||
} catch (VizException e) {
|
||||
e.printStackTrace();
|
||||
// TODO log error message
|
||||
statusHandler.handle(Priority.PROBLEM, "", e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -2481,6 +2537,7 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
if (y + lineHeight <= bottomMargin) {
|
||||
printer.endPage();
|
||||
}
|
||||
wordBuffer = null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2491,12 +2548,12 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
String word = wordBuffer.toString();
|
||||
int wordWidth = gc.stringExtent(word).x;
|
||||
if (x + wordWidth > rightMargin) {
|
||||
/* word doesn't fit on current line, so wrap */
|
||||
// word doesn't fit on current line, so wrap
|
||||
newline();
|
||||
}
|
||||
gc.drawString(word, x, y, false);
|
||||
x += wordWidth;
|
||||
wordBuffer = new StringBuffer();
|
||||
wordBuffer.setLength(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2606,7 +2663,7 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
siteLabel = selectedLid;
|
||||
}
|
||||
} catch (VizException e) {
|
||||
e.printStackTrace();
|
||||
statusHandler.handle(Priority.INFO, "Uable to get site: ", e);
|
||||
siteLabel = selectedLid;
|
||||
}
|
||||
|
||||
|
@ -2631,6 +2688,9 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the flood stage label based on selection.
|
||||
*/
|
||||
private void updateFloodStageLabel() {
|
||||
TimeSeriesDataManager dataManager = TimeSeriesDataManager.getInstance();
|
||||
String selection = topDataList.getItem(topDataList.getSelectionIndex());
|
||||
|
@ -2643,8 +2703,8 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
floodList = (ArrayList<Object[]>) dataManager
|
||||
.getFloodStage(selectedLid);
|
||||
} catch (VizException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Unable to get Flood Stage List: ", e);
|
||||
}
|
||||
|
||||
/* Should only be one here, lid is primary key */
|
||||
|
@ -2793,24 +2853,23 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
|
||||
}
|
||||
|
||||
/* report on any duplicates which are ignored */
|
||||
// TODO print this to log
|
||||
// report on any duplicates which are ignored
|
||||
if (duplicateCnt > 0) {
|
||||
System.out.println(duplicateCnt
|
||||
statusHandler.handle(Priority.INFO, duplicateCnt
|
||||
+ " records detected in copy operation.");
|
||||
}
|
||||
|
||||
int selection = topDataList.getSelectionIndex();
|
||||
|
||||
/* reload list of timeseries */
|
||||
// reload list of timeseries
|
||||
tabularLoadTimeseries();
|
||||
topDataList.select(selection);
|
||||
|
||||
}
|
||||
} catch (ParseException pe) {
|
||||
pe.printStackTrace();
|
||||
statusHandler.handle(Priority.PROBLEM, "Parse eror: ", pe);
|
||||
} catch (VizException ve) {
|
||||
ve.printStackTrace();
|
||||
statusHandler.handle(Priority.PROBLEM, "", ve);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2939,14 +2998,14 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
|
||||
out.write(aRec + "\n");
|
||||
} catch (VizException e) {
|
||||
e.printStackTrace();
|
||||
statusHandler.handle(Priority.PROBLEM, "", e);
|
||||
} catch (ClassNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
statusHandler.handle(Priority.PROBLEM, "", e);
|
||||
}
|
||||
}
|
||||
out.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
statusHandler.handle(Priority.PROBLEM, "", e);
|
||||
showMessage(shell, SWT.ERROR | SWT.OK, "Unable to Save File",
|
||||
"File: " + SHEF_FILE_NAME + "." + getPid()
|
||||
+ "\nUser does NOT have write permission.");
|
||||
|
@ -3047,12 +3106,10 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
}
|
||||
}
|
||||
} catch (VizException e) {
|
||||
e.printStackTrace();
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Error transmitting text product", e);
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Error transmitting text product", e);
|
||||
}
|
||||
|
@ -3094,6 +3151,11 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
return retVal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the text from the shef file.
|
||||
*
|
||||
* @return text
|
||||
*/
|
||||
private String getFileText() {
|
||||
if (shefFileName != null) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
@ -3135,6 +3197,16 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update bounds then close the dialog.
|
||||
*/
|
||||
public void disposeDialog() {
|
||||
if (isOpen()) {
|
||||
bounds = shell.getBounds();
|
||||
}
|
||||
close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a dialog message.
|
||||
*
|
||||
|
@ -3256,6 +3328,13 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements
|
|||
this.currentTabInfo = currentTabInfo;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.hydro.timeseries.ForecastDataAttributeListener#notifyUpdate
|
||||
* (com.raytheon.viz.hydro.timeseries.FcstAttUpdateEvent)
|
||||
*/
|
||||
@Override
|
||||
public void notifyUpdate(FcstAttUpdateEvent faue) {
|
||||
fcstAtt = faue.getFcstAttributes();
|
||||
|
|
|
@ -26,10 +26,10 @@ import java.util.List;
|
|||
|
||||
import org.eclipse.jface.dialogs.MessageDialog;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.DisposeEvent;
|
||||
import org.eclipse.swt.events.DisposeListener;
|
||||
import org.eclipse.swt.events.SelectionAdapter;
|
||||
import org.eclipse.swt.events.SelectionEvent;
|
||||
import org.eclipse.swt.events.ShellAdapter;
|
||||
import org.eclipse.swt.events.ShellEvent;
|
||||
import org.eclipse.swt.graphics.GC;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.graphics.ImageData;
|
||||
|
@ -51,6 +51,9 @@ import org.eclipse.swt.widgets.MessageBox;
|
|||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
import com.raytheon.uf.common.ohd.AppsDefaults;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.common.util.FileUtil;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.viz.hydro.timeseries.util.GraphData;
|
||||
|
@ -89,6 +92,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* 23 Jul 2012 15195 mpduff Fix dates for displaying groups
|
||||
* 06 Dec 2012 15066 wkwock Fix "ctrl+r" not work in group mode
|
||||
* 30 Jan 2012 15459 mpduff Redmine 1560 - Make graph canvases redraw on page up/down.
|
||||
* 06 Feb 2013 1578 rferrel Code cleanup for non-blocking dialogs.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -98,6 +102,12 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
*/
|
||||
public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
||||
|
||||
private final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(TimeSeriesDisplayDlg.class);
|
||||
|
||||
/** Location and size of dialog. */
|
||||
private static Rectangle bounds = null;
|
||||
|
||||
/**
|
||||
* Time Series Control menu item.
|
||||
*/
|
||||
|
@ -365,12 +375,13 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
*/
|
||||
private Composite mainComp = null;
|
||||
|
||||
/** Canvas to display graph on. */
|
||||
private Composite canvasComp = null;
|
||||
|
||||
private Rectangle bounds = null;
|
||||
|
||||
/** parent dialog for this display */
|
||||
private TimeSeriesDlg parentDialog = null;
|
||||
|
||||
/** Application default value used to enable widgets in the dialog. */
|
||||
private int showCatValue = 0;
|
||||
|
||||
/**
|
||||
|
@ -387,16 +398,19 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
* @param parent
|
||||
* Parent shell.
|
||||
*/
|
||||
public TimeSeriesDisplayDlg(Shell parent, Rectangle bounds,
|
||||
TimeSeriesDlg parentDialog) {
|
||||
public TimeSeriesDisplayDlg(Shell parent, TimeSeriesDlg parentDialog) {
|
||||
super(parent, SWT.DIALOG_TRIM | SWT.MIN | SWT.RESIZE, CAVE.DO_NOT_BLOCK
|
||||
| CAVE.INDEPENDENT_SHELL);
|
||||
setText("Time Series Display");
|
||||
|
||||
this.bounds = bounds;
|
||||
this.parentDialog = parentDialog;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#constructShellLayout()
|
||||
*/
|
||||
@Override
|
||||
protected Layout constructShellLayout() {
|
||||
// Create the main layout for the shell.
|
||||
|
@ -407,16 +421,24 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
return mainLayout;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#constructShellLayoutData()
|
||||
*/
|
||||
@Override
|
||||
protected Object constructShellLayoutData() {
|
||||
return new GridData(SWT.FILL, SWT.FILL, true, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void disposed() {
|
||||
setReturnValue(bounds);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#initializeComponents(org
|
||||
* .eclipse.swt.widgets.Shell)
|
||||
*/
|
||||
@Override
|
||||
protected void initializeComponents(final Shell shell) {
|
||||
// Get default values from Apps Defaults
|
||||
|
@ -447,24 +469,33 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
shell.setMinimumSize(new Point(900, 900));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void opened() {
|
||||
shell.addDisposeListener(new DisposeListener() {
|
||||
@Override
|
||||
public void widgetDisposed(DisposeEvent e) {
|
||||
bounds = shell.getBounds();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialog#preOpened()
|
||||
*/
|
||||
@Override
|
||||
protected void preOpened() {
|
||||
super.preOpened();
|
||||
|
||||
shell.addShellListener(new ShellAdapter() {
|
||||
|
||||
@Override
|
||||
public void shellClosed(ShellEvent e) {
|
||||
bounds = shell.getBounds();
|
||||
}
|
||||
});
|
||||
|
||||
if (bounds != null) {
|
||||
shell.setBounds(bounds);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This dialog's parent dialog.
|
||||
*
|
||||
* @return parentDialog
|
||||
*/
|
||||
public TimeSeriesDlg getParentDialog() {
|
||||
return this.parentDialog;
|
||||
}
|
||||
|
@ -825,9 +856,8 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
dataManager.delete(deleteList);
|
||||
updateMaxFcst(deleteList);
|
||||
} catch (VizException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
System.err.println("Error deleting points");
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Error deleting points: ", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -836,8 +866,11 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
dataManager.insert(insertList);
|
||||
updateMaxFcst(insertList);
|
||||
} catch (VizException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
if (statusHandler.isPriorityEnabled(Priority.DEBUG)) {
|
||||
statusHandler.handle(Priority.DEBUG,
|
||||
"Insert Error: ", e);
|
||||
}
|
||||
|
||||
MessageBox mb = new MessageBox(shell,
|
||||
SWT.ICON_ERROR | SWT.OK);
|
||||
mb.setText("Insert Error");
|
||||
|
@ -852,9 +885,8 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
dataManager.edit(editList);
|
||||
updateMaxFcst(editList);
|
||||
} catch (VizException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
System.err.println("Error editing points");
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Error editing points: ", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1199,29 +1231,38 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* From Apps defaults get the showCatValue.
|
||||
*/
|
||||
private void loadAppsDefaults() {
|
||||
AppsDefaults appsDefaults = AppsDefaults.getInstance();
|
||||
this.showCatValue = appsDefaults.getInt("timeseries_showcat", 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* If pointList is for a Max Forecast perform an update.
|
||||
*
|
||||
* @param pointList
|
||||
*/
|
||||
private void updateMaxFcst(List<ForecastData> pointList) {
|
||||
ForecastData point = pointList.get(0);
|
||||
String pe = point.getPe();
|
||||
String ts = point.getTs();
|
||||
|
||||
if (ts.startsWith("F") || ts.startsWith("C")) {
|
||||
/* call Load Max Forecast if update or insert of H or Q PE's */
|
||||
// call Load Max Forecast if update or insert of H or Q PE's
|
||||
if (pe.toUpperCase().startsWith("H")
|
||||
|| pe.toUpperCase().startsWith("Q")) {
|
||||
String lid = point.getLid();
|
||||
|
||||
/* call Load Max Forecast if update or insert of H or Q PE's */
|
||||
// call Load Max Forecast if update or insert of H or Q PE's
|
||||
if (pe.toUpperCase().startsWith("H")
|
||||
|| pe.toUpperCase().startsWith("Q")) {
|
||||
try {
|
||||
LoadMaxFcst.loadMaxFcstItem(lid, pe, ts);
|
||||
} catch (VizException e) {
|
||||
e.printStackTrace();
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Error updating MaxFcst: " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1669,6 +1710,9 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
destBytesPerLine, destDataArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear and redraw the graph.
|
||||
*/
|
||||
public void createNewGraph() {
|
||||
if (stackGridComp != null) {
|
||||
stackGridComp.dispose();
|
||||
|
@ -1686,6 +1730,9 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
shell.update();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adjust view up a page.
|
||||
*/
|
||||
protected void pageUpAction() {
|
||||
if (currentPage == 0) {
|
||||
currentPage = groupInfo.getPageInfoList().size() - 1;
|
||||
|
@ -1709,6 +1756,9 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adjust view down a page.
|
||||
*/
|
||||
protected void pageDownAction() {
|
||||
if (currentPage == groupInfo.getPageInfoList().size() - 1) {
|
||||
currentPage = 0;
|
||||
|
@ -1730,6 +1780,9 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
|
||||
/**
|
||||
* Redraw each Canvas in the list.
|
||||
*
|
||||
* @param getData
|
||||
* - when true fetch the data.
|
||||
*/
|
||||
private void redrawCanvases(boolean getData) {
|
||||
for (TimeSeriesDisplayCanvas c : canvasList) {
|
||||
|
@ -1738,6 +1791,9 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Redraw each Canvas without fetching the data.
|
||||
*/
|
||||
private void redrawCanvases() {
|
||||
redrawCanvases(false);
|
||||
}
|
||||
|
@ -1753,6 +1809,8 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
}
|
||||
|
||||
/**
|
||||
* Return the location ID.
|
||||
*
|
||||
* @return the lid
|
||||
*/
|
||||
public String getLid() {
|
||||
|
@ -1760,6 +1818,8 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the Location ID.
|
||||
*
|
||||
* @param lid
|
||||
* the lid to set
|
||||
*/
|
||||
|
@ -1768,13 +1828,17 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
}
|
||||
|
||||
/**
|
||||
* @return the beginDate
|
||||
* Get the being date.
|
||||
*
|
||||
* @return the begin date
|
||||
*/
|
||||
public Date getBeginDate() {
|
||||
return beginDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the being date.
|
||||
*
|
||||
* @param beginDate
|
||||
* the beginDate to set
|
||||
*/
|
||||
|
@ -1783,6 +1847,8 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the end date.
|
||||
*
|
||||
* @return the endDate
|
||||
*/
|
||||
public Date getEndDate() {
|
||||
|
@ -1790,6 +1856,8 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the end date.
|
||||
*
|
||||
* @param endDate
|
||||
* the endDate to set
|
||||
*/
|
||||
|
@ -1798,6 +1866,8 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the site name.
|
||||
*
|
||||
* @return the siteName
|
||||
*/
|
||||
public String getSiteName() {
|
||||
|
@ -1805,6 +1875,8 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the site name.
|
||||
*
|
||||
* @param siteName
|
||||
* the siteName to set
|
||||
*/
|
||||
|
@ -1813,6 +1885,8 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the group information.
|
||||
*
|
||||
* @return the groupInfo
|
||||
*/
|
||||
public GroupInfo getGroupInfo() {
|
||||
|
@ -1820,6 +1894,8 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the group information.
|
||||
*
|
||||
* @param groupInfo
|
||||
* the groupInfo to set
|
||||
*/
|
||||
|
@ -1828,6 +1904,8 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the points' menu item.
|
||||
*
|
||||
* @return the pointsMI
|
||||
*/
|
||||
public MenuItem getPointsMI() {
|
||||
|
@ -1835,6 +1913,8 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the lines menu item.
|
||||
*
|
||||
* @return the linesMI
|
||||
*/
|
||||
public MenuItem getLinesMI() {
|
||||
|
@ -1842,6 +1922,8 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the points and line menu item.
|
||||
*
|
||||
* @return the bothMI
|
||||
*/
|
||||
public MenuItem getBothMI() {
|
||||
|
@ -1856,6 +1938,8 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the Batch Data Only, Show Categories menu item.
|
||||
*
|
||||
* @return the batchDataOnlyShowCatMI
|
||||
*/
|
||||
public MenuItem getBatchDataOnlyShowCatMI() {
|
||||
|
@ -1869,14 +1953,27 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
return batchDataAndCategoriesMI;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the data only menu item.
|
||||
*
|
||||
* @return dataOnlyMI
|
||||
*/
|
||||
public MenuItem getScaleStagesDataOnlyMI() {
|
||||
return dataOnlyMI;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return dataOnlyShowCatMI
|
||||
*/
|
||||
public MenuItem getScaleStagesDataOnlyShowCategoreMI() {
|
||||
return dataOnlyShowCatMI;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Data and Categories menu item.
|
||||
*
|
||||
* @return dataAndCategoriesMI
|
||||
*/
|
||||
public MenuItem getScaleStagesDataAndCategoriesMI() {
|
||||
return dataAndCategoriesMI;
|
||||
}
|
||||
|
@ -2227,16 +2324,14 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
return showLatestFcstMI.getSelection();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update bounds then close the dialog.
|
||||
*/
|
||||
public void disposeDialog() {
|
||||
shell.dispose();
|
||||
}
|
||||
|
||||
public Rectangle getDialogBounds() {
|
||||
if (shell.isDisposed()) {
|
||||
return bounds;
|
||||
} else {
|
||||
return shell.getBounds();
|
||||
if (isOpen()) {
|
||||
bounds = shell.getBounds();
|
||||
}
|
||||
close();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -46,7 +46,6 @@ import org.eclipse.swt.events.SelectionAdapter;
|
|||
import org.eclipse.swt.events.SelectionEvent;
|
||||
import org.eclipse.swt.graphics.Cursor;
|
||||
import org.eclipse.swt.graphics.Font;
|
||||
import org.eclipse.swt.graphics.Rectangle;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.layout.RowData;
|
||||
|
@ -473,8 +472,6 @@ public class TimeSeriesDlg extends CaveHydroSWTDialog {
|
|||
*/
|
||||
private boolean displayGraph = false;
|
||||
|
||||
private Rectangle bounds = null;
|
||||
|
||||
private TabularTimeSeriesDlg tabularDlg;
|
||||
|
||||
/**
|
||||
|
@ -2045,7 +2042,7 @@ public class TimeSeriesDlg extends CaveHydroSWTDialog {
|
|||
tabInfoList.clear();
|
||||
|
||||
if ((tabularDlg != null) && tabularDlg.isOpen()) {
|
||||
tabularDlg.close();
|
||||
tabularDlg.disposeDialog();
|
||||
}
|
||||
|
||||
tabularDlg = new TabularTimeSeriesDlg(shell, beginCal.getTime(),
|
||||
|
@ -2133,11 +2130,10 @@ public class TimeSeriesDlg extends CaveHydroSWTDialog {
|
|||
} else {
|
||||
|
||||
if (timeSeriesDisplayDlg != null) {
|
||||
bounds = timeSeriesDisplayDlg.getDialogBounds();
|
||||
timeSeriesDisplayDlg.disposeDialog();
|
||||
}
|
||||
|
||||
timeSeriesDisplayDlg = new TimeSeriesDisplayDlg(shell, bounds, this);
|
||||
timeSeriesDisplayDlg = new TimeSeriesDisplayDlg(shell, this);
|
||||
|
||||
PageInfo pageInfo = new PageInfo();
|
||||
LIDData firstLidData = new LIDData();
|
||||
|
|
Loading…
Add table
Reference in a new issue