Issue #1560 - TS Graphs refresh data on page up/down.
Former-commit-id: 272894304774c8446ac6476cd9edcb8e212ffb19
This commit is contained in:
parent
b765544b40
commit
f03e9cc5ce
1 changed files with 83 additions and 76 deletions
|
@ -51,7 +51,6 @@ import org.eclipse.swt.widgets.MessageBox;
|
|||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
import com.raytheon.uf.common.ohd.AppsDefaults;
|
||||
import com.raytheon.uf.common.time.SimulatedTime;
|
||||
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 +88,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* 30 May 2012 14967 wkwock fix insert deleted data to rejecteddata table
|
||||
* 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.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -316,10 +316,10 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
/**
|
||||
* Display Canvas List.
|
||||
*/
|
||||
private ArrayList<TimeSeriesDisplayCanvas> canvasList = new ArrayList<TimeSeriesDisplayCanvas>();
|
||||
private final ArrayList<TimeSeriesDisplayCanvas> canvasList = new ArrayList<TimeSeriesDisplayCanvas>();
|
||||
|
||||
/** List of page composites */
|
||||
private ArrayList<Composite> pageCompList = new ArrayList<Composite>();
|
||||
private final ArrayList<Composite> pageCompList = new ArrayList<Composite>();
|
||||
|
||||
/**
|
||||
* The page currently displayed.
|
||||
|
@ -329,7 +329,7 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
/**
|
||||
* A flag if Zoom In or not .
|
||||
*/
|
||||
private boolean zoomIn= false;
|
||||
private boolean zoomIn = false;
|
||||
|
||||
/** Flag for inverse printing */
|
||||
private boolean inverseVideo = false;
|
||||
|
@ -353,7 +353,7 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
/**
|
||||
* Holds the list of deleted points.
|
||||
*/
|
||||
private List<ForecastData> deleteList = new ArrayList<ForecastData>();
|
||||
private final List<ForecastData> deleteList = new ArrayList<ForecastData>();
|
||||
|
||||
/**
|
||||
* Holds the list of inserted points.
|
||||
|
@ -376,8 +376,8 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
/**
|
||||
* Zoom reset flag
|
||||
*
|
||||
* true when click the zoom reset menu, then false
|
||||
* when a graph has been reset
|
||||
* true when click the zoom reset menu, then false when a graph has been
|
||||
* reset
|
||||
*/
|
||||
private boolean reset = false;
|
||||
|
||||
|
@ -389,7 +389,8 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
*/
|
||||
public TimeSeriesDisplayDlg(Shell parent, Rectangle bounds,
|
||||
TimeSeriesDlg parentDialog) {
|
||||
super(parent, SWT.DIALOG_TRIM | SWT.MIN | SWT.RESIZE, CAVE.DO_NOT_BLOCK | CAVE.INDEPENDENT_SHELL);
|
||||
super(parent, SWT.DIALOG_TRIM | SWT.MIN | SWT.RESIZE, CAVE.DO_NOT_BLOCK
|
||||
| CAVE.INDEPENDENT_SHELL);
|
||||
setText("Time Series Display");
|
||||
|
||||
this.bounds = bounds;
|
||||
|
@ -948,16 +949,16 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
||||
if (zoomIn == false) {
|
||||
setZoom(false);
|
||||
setZoomAction(true);
|
||||
setSelectZoom(true);
|
||||
zoomIn=true;
|
||||
} else {
|
||||
setZoom(true);
|
||||
setZoomAction(true);
|
||||
setSelectZoom(true);
|
||||
}
|
||||
if (zoomIn == false) {
|
||||
setZoom(false);
|
||||
setZoomAction(true);
|
||||
setSelectZoom(true);
|
||||
zoomIn = true;
|
||||
} else {
|
||||
setZoom(true);
|
||||
setZoomAction(true);
|
||||
setSelectZoom(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -967,18 +968,18 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
resetMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
if (groupInfo.isGroupSelected()) {
|
||||
setZoom(false);
|
||||
setZoomAction(false);
|
||||
setSelectZoom(false);
|
||||
if (groupInfo.isGroupSelected()) {
|
||||
setZoom(false);
|
||||
setZoomAction(false);
|
||||
setSelectZoom(false);
|
||||
reset = true;
|
||||
for (TimeSeriesDisplayCanvas dc :canvasList){
|
||||
dc.setZoomed(false);
|
||||
dc.redraw();
|
||||
for (TimeSeriesDisplayCanvas dc : canvasList) {
|
||||
dc.setZoomed(false);
|
||||
dc.redraw();
|
||||
}
|
||||
} else {
|
||||
displayCanvas.resetTS();
|
||||
}
|
||||
} else {
|
||||
displayCanvas.resetTS();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -1321,31 +1322,32 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
dataAndCategoriesMI.setSelection(false);
|
||||
dataOnlyShowCatMI.setSelection(false);
|
||||
} else {
|
||||
String showCat = AppsDefaults.getInstance().getToken("timeseries_showcat");
|
||||
int sc = Integer.parseInt(showCat);
|
||||
System.out.println(showCat);
|
||||
if (sc == 1) {
|
||||
String showCat = AppsDefaults.getInstance().getToken(
|
||||
"timeseries_showcat");
|
||||
int sc = Integer.parseInt(showCat);
|
||||
System.out.println(showCat);
|
||||
if (sc == 1) {
|
||||
batchDataOnlyShowCatMI.setSelection(false);
|
||||
batchDataOnlyMI.setSelection(true);
|
||||
batchDataAndCategoriesMI.setSelection(false);
|
||||
dataOnlyShowCatMI.setSelection(false);
|
||||
dataOnlyMI.setSelection(true);
|
||||
dataAndCategoriesMI.setSelection(false);
|
||||
} else if (sc == 2) {
|
||||
} else if (sc == 2) {
|
||||
batchDataOnlyShowCatMI.setSelection(true);
|
||||
batchDataOnlyMI.setSelection(false);
|
||||
batchDataAndCategoriesMI.setSelection(false);
|
||||
dataOnlyShowCatMI.setSelection(true);
|
||||
dataOnlyMI.setSelection(false);
|
||||
dataAndCategoriesMI.setSelection(false);
|
||||
} else {
|
||||
batchDataOnlyShowCatMI.setSelection(false);
|
||||
batchDataOnlyMI.setSelection(false);
|
||||
batchDataAndCategoriesMI.setSelection(true);
|
||||
dataOnlyShowCatMI.setSelection(false);
|
||||
dataOnlyMI.setSelection(false);
|
||||
dataAndCategoriesMI.setSelection(true);
|
||||
}
|
||||
} else {
|
||||
batchDataOnlyShowCatMI.setSelection(false);
|
||||
batchDataOnlyMI.setSelection(false);
|
||||
batchDataAndCategoriesMI.setSelection(true);
|
||||
dataOnlyShowCatMI.setSelection(false);
|
||||
dataOnlyMI.setSelection(false);
|
||||
dataAndCategoriesMI.setSelection(true);
|
||||
}
|
||||
}
|
||||
|
||||
String traceMode = groupInfo.getTraceMode().trim();
|
||||
|
@ -1364,8 +1366,8 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
}
|
||||
|
||||
displayCanvas = new TimeSeriesDisplayCanvas(this,
|
||||
canvasComp, gd, beginDate,
|
||||
endDate, groupInfo.isGroupSelected());
|
||||
canvasComp, gd, beginDate, endDate,
|
||||
groupInfo.isGroupSelected());
|
||||
displayCanvas.setHorizontalSpan(gd.getXsize());
|
||||
displayCanvas.setVerticalSpan(gd.getYsize());
|
||||
displayCanvas.showGridLines(groupInfo.isGridLines());
|
||||
|
@ -1693,6 +1695,10 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
for (int i = 0; i < pageCompList.size(); i++) {
|
||||
if (currentPage == i) {
|
||||
((GridData) pageCompList.get(i).getLayoutData()).exclude = false;
|
||||
canvasList.get(i).setGetAgain(true);
|
||||
canvasList.get(i).redraw();
|
||||
canvasList.get(i).update();
|
||||
|
||||
pageCompList.get(i).setVisible(true);
|
||||
} else {
|
||||
((GridData) pageCompList.get(i).getLayoutData()).exclude = true;
|
||||
|
@ -2233,17 +2239,18 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param reset the reset to set
|
||||
*/
|
||||
public void setReset(boolean reset) {
|
||||
this.reset = reset;
|
||||
}
|
||||
/**
|
||||
* @param reset
|
||||
* the reset to set
|
||||
*/
|
||||
public void setReset(boolean reset) {
|
||||
this.reset = reset;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the reset
|
||||
*/
|
||||
public boolean isReset() {
|
||||
return reset;
|
||||
}
|
||||
/**
|
||||
* @return the reset
|
||||
*/
|
||||
public boolean isReset() {
|
||||
return reset;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue