diff --git a/cave/com.raytheon.viz.gfe/localization/gfe/userPython/procedures/BOIVerifySave.py b/cave/com.raytheon.viz.gfe/localization/gfe/userPython/procedures/BOIVerifySave.py index fed18747c5..a7d401890b 100644 --- a/cave/com.raytheon.viz.gfe/localization/gfe/userPython/procedures/BOIVerifySave.py +++ b/cave/com.raytheon.viz.gfe/localization/gfe/userPython/procedures/BOIVerifySave.py @@ -836,7 +836,7 @@ class Procedure (SmartScript.SmartScript): # different values from getComposite after IFPS16. # def getBetterComposite(self,parmName, timeRange): - from com.raytheon.uf.common.dataplugin.gfe.db.objects import GFERecord_GridType as GridType + from com.raytheon.uf.common.dataplugin.gfe.db.objects import GridParmInfo_GridType as GridType # # Get the type, rateParm flag, and limits # for the parameter name passed in. diff --git a/cave/com.raytheon.viz.gfe/localization/gfe/userPython/utilities/GridInfo.py b/cave/com.raytheon.viz.gfe/localization/gfe/userPython/utilities/GridInfo.py index 3125983816..574fce853d 100644 --- a/cave/com.raytheon.viz.gfe/localization/gfe/userPython/utilities/GridInfo.py +++ b/cave/com.raytheon.viz.gfe/localization/gfe/userPython/utilities/GridInfo.py @@ -92,7 +92,7 @@ class GridInfo(object): ## # Return the grid type. # @return: the grid type - # @rtype: com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType + # @rtype: com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType def type(self): return self.gridParmInfo.getGridType() diff --git a/cave/com.raytheon.viz.gfe/localization/gfe/userPython/utilities/ISC_Utility.py b/cave/com.raytheon.viz.gfe/localization/gfe/userPython/utilities/ISC_Utility.py index 7ddcc9e51a..79d68ca881 100644 --- a/cave/com.raytheon.viz.gfe/localization/gfe/userPython/utilities/ISC_Utility.py +++ b/cave/com.raytheon.viz.gfe/localization/gfe/userPython/utilities/ISC_Utility.py @@ -54,7 +54,7 @@ import numpy import SmartScript import time import TimeRange -from com.raytheon.uf.common.dataplugin.gfe.db.objects import GFERecord_GridType as GridType +from com.raytheon.uf.common.dataplugin.gfe.db.objects import GridParmInfo_GridType as GridType class ISC_Utility(SmartScript.SmartScript): def __init__(self, dbss, eaMgr, mdMode=None, toolType="numeric"): diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/BaseGfePyController.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/BaseGfePyController.java index 9f5597f5a6..bd16802056 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/BaseGfePyController.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/BaseGfePyController.java @@ -27,7 +27,7 @@ import java.util.Map; import jep.JepException; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.grid.Grid2DByte; import com.raytheon.uf.common.dataplugin.gfe.grid.Grid2DFloat; import com.raytheon.uf.common.python.controller.PythonScriptController; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/actions/AbstractSetDiscretePickupAction.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/actions/AbstractSetDiscretePickupAction.java index 27cdcf1721..db85fcdc93 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/actions/AbstractSetDiscretePickupAction.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/actions/AbstractSetDiscretePickupAction.java @@ -31,7 +31,7 @@ import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.MenuItem; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteDefinition; import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteKey; @@ -41,9 +41,7 @@ import com.raytheon.uf.common.dataplugin.gfe.weather.WxDefinition; 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.viz.gfe.Activator; import com.raytheon.viz.gfe.GFEServerException; -import com.raytheon.viz.gfe.constants.StatusConstants; import com.raytheon.viz.gfe.core.DataManager; import com.raytheon.viz.gfe.core.parm.Parm; import com.raytheon.viz.gfe.core.wxvalue.DiscreteWxValue; @@ -66,7 +64,8 @@ import com.raytheon.viz.gfe.core.wxvalue.WxValue; */ public abstract class AbstractSetDiscretePickupAction extends BaseSetDiscretePickupAction { - private static final transient IUFStatusHandler statusHandler = UFStatus.getHandler(AbstractSetDiscretePickupAction.class); + private static final transient IUFStatusHandler statusHandler = UFStatus + .getHandler(AbstractSetDiscretePickupAction.class); protected static final String DELIMITER = "|"; @@ -177,8 +176,8 @@ public abstract class AbstractSetDiscretePickupAction extends try { createCommonMenuItems(); } catch (GFEServerException e) { - statusHandler.handle(Priority.PROBLEM, - "Unable to create menu", e); + statusHandler.handle(Priority.PROBLEM, "Unable to create menu", + e); } } @@ -253,7 +252,7 @@ public abstract class AbstractSetDiscretePickupAction extends int i = 0; for (String subKey : subKeys) { v.append(dd.keyDesc(compositeName, subKey)); - if (i != subKeys.size() - 1) { + if (i != (subKeys.size() - 1)) { v.append(','); } i++; @@ -287,13 +286,13 @@ public abstract class AbstractSetDiscretePickupAction extends int j = 0; for (String attr : attributes) { v.append(wdef.attributeDesc(subKey.getType(), attr)); - if (j != attributes.size() - 1) { + if (j != (attributes.size() - 1)) { v.append(','); } } v.append(']'); } - if (i != sk.size() - 1) { + if (i != (sk.size() - 1)) { v.append(','); } i++; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/actions/ChangeColorTableAction.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/actions/ChangeColorTableAction.java index 136c96fa18..7f6cd031c7 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/actions/ChangeColorTableAction.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/actions/ChangeColorTableAction.java @@ -27,7 +27,7 @@ import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.MenuItem; import com.raytheon.uf.common.colormap.prefs.ColorMapParameters; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.viz.core.rsc.capabilities.ColorMapCapability; import com.raytheon.viz.gfe.core.parm.Parm; import com.raytheon.viz.ui.cmenu.AbstractRightClickAction; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/actions/ChangeCombineMode.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/actions/ChangeCombineMode.java index b2bbfafb48..283a66528b 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/actions/ChangeCombineMode.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/actions/ChangeCombineMode.java @@ -26,7 +26,7 @@ import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Menu; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.viz.gfe.core.DataManager; import com.raytheon.viz.gfe.core.parm.Parm; import com.raytheon.viz.gfe.core.parm.ParmState; @@ -163,8 +163,7 @@ public class ChangeCombineMode extends AbstractRightClickAction implements public CombineModeChange(ParmState.CombineMode combineMode) { this.combineMode = combineMode; - this - .setChecked(parm.getParmState().getCombineMode() == combineMode); + this.setChecked(parm.getParmState().getCombineMode() == combineMode); } @Override diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/AbstractGridData.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/AbstractGridData.java index cd6a9cf383..620415a7ac 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/AbstractGridData.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/AbstractGridData.java @@ -29,9 +29,9 @@ import org.opengis.referencing.FactoryException; import org.opengis.referencing.operation.TransformException; import com.raytheon.uf.common.dataplugin.gfe.GridDataHistory; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridLocation; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.grid.Grid2DBit; import com.raytheon.uf.common.dataplugin.gfe.grid.Grid2DFloat; import com.raytheon.uf.common.dataplugin.gfe.grid.Op; @@ -70,7 +70,7 @@ import com.vividsolutions.jts.geom.Coordinate; * 04/15/2013 1892 randerso Adding logging to help determine what is different in the gridInfos * Changed how gridInfo is retrieved which seems to have fixed the problem * 04/23/2013 1949 rjpeter Removed validation on copy, source is verified on store. - + * * * * @author chammack @@ -447,9 +447,9 @@ public abstract class AbstractGridData implements IGridData { return; } - if (edgeCount / editAreaCount > 0.9) { + if ((edgeCount / editAreaCount) > 0.9) { return; - } else if (edgeCount / editAreaCount < 0.5) { + } else if ((edgeCount / editAreaCount) < 0.5) { edge = edge.or(fringe(editArea.xor(edge))); } @@ -503,14 +503,14 @@ public abstract class AbstractGridData implements IGridData { Point delta = new Point(); delta.x = edge.x - center.x; delta.y = edge.y - center.y; - float totalDist = (float) Math.sqrt(delta.x * delta.x + delta.y - * delta.y); + float totalDist = (float) Math.sqrt((delta.x * delta.x) + + (delta.y * delta.y)); // Get the distance from the edge to current location delta.x = i - edge.x; delta.y = j - edge.y; - float dist = (float) Math.sqrt(delta.x * delta.x + delta.y - * delta.y); + float dist = (float) Math.sqrt((delta.x * delta.x) + + (delta.y * delta.y)); // Taper value is the ratio of dist to total if (totalDist == 0.0) { @@ -650,8 +650,8 @@ public abstract class AbstractGridData implements IGridData { if ((i == 0) || (i == xMax) || (j == 0) || (j == yMax)) { edge.set(i, j); } else { - for (int k = i - 1; k <= i + 1; k++) { - for (int m = j - 1; m <= j + 1; m++) { + for (int k = i - 1; k <= (i + 1); k++) { + for (int m = j - 1; m <= (j + 1); m++) { if (points.get(k, m) == 0) { edge.set(i, j); break; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/DiscreteGridData.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/DiscreteGridData.java index 5ffaa186c7..7cb4f1f9e3 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/DiscreteGridData.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/DiscreteGridData.java @@ -34,8 +34,8 @@ import org.opengis.referencing.FactoryException; import org.opengis.referencing.operation.TransformException; import com.raytheon.uf.common.dataplugin.gfe.RemapGrid; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridLocation; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteKey; import com.raytheon.uf.common.dataplugin.gfe.grid.Grid2DBit; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/WeatherGridData.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/WeatherGridData.java index 7edfd6c84d..f93f594c9e 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/WeatherGridData.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/WeatherGridData.java @@ -33,8 +33,8 @@ import org.opengis.referencing.FactoryException; import org.opengis.referencing.operation.TransformException; import com.raytheon.uf.common.dataplugin.gfe.RemapGrid; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridLocation; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.grid.Grid2DBit; import com.raytheon.uf.common.dataplugin.gfe.grid.Grid2DByte; import com.raytheon.uf.common.dataplugin.gfe.grid.Op; @@ -68,7 +68,7 @@ import com.vividsolutions.jts.geom.MultiPolygon; * Jan 30, 2013 #15719 jdynina Allowed more than 128 chars in wx * strings * 02/19/2013 1637 randerso Added throws declarations to translateDataFrom - * 04/01/2014 17187 randerso (code checked in by zhao) To allow over 128 wx lements + * 04/01/2014 17187 randerso (code checked in by zhao) To allow over 128 wx lements * * * @@ -103,8 +103,8 @@ public class WeatherGridData extends AbstractGridData implements INumpyable { WeatherGridSlice thisSlice = getWeatherSlice(); Grid2DByte grid = thisSlice.getWeatherGrid(); - if (grid.getXdim() != pointsToSmooth.getXdim() - || grid.getYdim() != pointsToSmooth.getYdim()) { + if ((grid.getXdim() != pointsToSmooth.getXdim()) + || (grid.getYdim() != pointsToSmooth.getYdim())) { statusHandler.handle( Priority.ERROR, "Dimension mismatch in doSmooth: " + getGrid().getXdim() @@ -151,8 +151,8 @@ public class WeatherGridData extends AbstractGridData implements INumpyable { // uses fewer than nine points if near grid edge, // but always has at least four values to average. Arrays.fill(histo, (short) 0); - for (int newx = i - ss; newx <= i + ss; newx++) { - for (int newy = j - ss; newy <= j + ss; newy++) { + for (int newx = i - ss; newx <= (i + ss); newx++) { + for (int newy = j - ss; newy <= (j + ss); newy++) { // if inside grid limits, make a // smoothed value if (originalGrid.isValid(newx, newy)) { @@ -330,8 +330,8 @@ public class WeatherGridData extends AbstractGridData implements INumpyable { protected Grid2DBit doPencilStretch(Date time, WxValue value, Coordinate[] path, Grid2DBit editArea) { Grid2DByte grid = getGrid(); - if (grid.getXdim() != editArea.getXdim() - || grid.getYdim() != editArea.getYdim()) { + if ((grid.getXdim() != editArea.getXdim()) + || (grid.getYdim() != editArea.getYdim())) { statusHandler.handle(Priority.ERROR, "Dimension mismatch in doPencilStretch: " + grid.getXdim() + ',' + grid.getYdim() + ' ' + editArea.getXdim() @@ -676,8 +676,8 @@ public class WeatherGridData extends AbstractGridData implements INumpyable { boolean done = false; while (!done) { // Check for bounds - if (coord.x < 0 || coord.x >= gridCells.getXdim() - || coord.y < 0 || coord.y >= gridCells.getYdim()) { + if ((coord.x < 0) || (coord.x >= gridCells.getXdim()) + || (coord.y < 0) || (coord.y >= gridCells.getYdim())) { done = true; } // Check for bit set @@ -718,8 +718,8 @@ public class WeatherGridData extends AbstractGridData implements INumpyable { protected Grid2DBit doCopy(Date time, Grid2DBit pointsToCopy, Point delta) { WeatherGridSlice thisSlice = getWeatherSlice(); Grid2DByte sliceGrid = thisSlice.getWeatherGrid(); - if (sliceGrid.getXdim() != pointsToCopy.getXdim() - || sliceGrid.getYdim() != pointsToCopy.getYdim()) { + if ((sliceGrid.getXdim() != pointsToCopy.getXdim()) + || (sliceGrid.getYdim() != pointsToCopy.getYdim())) { throw new IllegalArgumentException("Dimension mismatch in doCopy: " + sliceGrid.getXdim() + ',' + sliceGrid.getYdim() + ' ' + pointsToCopy.getXdim() + ',' + pointsToCopy.getYdim()); @@ -860,8 +860,8 @@ public class WeatherGridData extends AbstractGridData implements INumpyable { Grid2DBit points) { Grid2DByte grid = getGrid(); Point dim = new Point(grid.getXdim(), grid.getYdim()); - if (values.getXdim() != dim.x || values.getYdim() != dim.y - || points.getXdim() != dim.x || points.getYdim() != dim.y) { + if ((values.getXdim() != dim.x) || (values.getYdim() != dim.y) + || (points.getXdim() != dim.x) || (points.getYdim() != dim.y)) { throw new IllegalArgumentException( "bad values/points dimensions for grid for: " + this.getParm().getParmID() + " gridDim=" @@ -881,7 +881,7 @@ public class WeatherGridData extends AbstractGridData implements INumpyable { int numValues = values.getXdim() * values.getYdim(); byte[] bp = values.getBuffer().array(); for (int i = 0; i < numValues; i++) { - if ((0xFF & bp[i]) > key.size() - 1) { + if ((0xFF & bp[i]) > (key.size() - 1)) { throw new IllegalArgumentException( "Illegal weather grid (bad values) in gridSet()"); } @@ -903,19 +903,19 @@ public class WeatherGridData extends AbstractGridData implements INumpyable { } } } - // COMBINE mode is more difficult, have to do each one - else { - for (int i = 0; i < dim.x; i++) { - for (int j = 0; j < dim.y; j++) { - if (points.get(i, j) == 1) { - WeatherKey combined = new WeatherKey( - key.get(0xFF & values.get(i, j))); - combined.addAll(doGetWeatherValue(i, j)); - grid.set(i, j, lookupKeyValue(combined)); - } - } - } - } + // COMBINE mode is more difficult, have to do each one + else { + for (int i = 0; i < dim.x; i++) { + for (int j = 0; j < dim.y; j++) { + if (points.get(i, j) == 1) { + WeatherKey combined = new WeatherKey( + key.get(0xFF & values.get(i, j))); + combined.addAll(doGetWeatherValue(i, j)); + grid.set(i, j, lookupKeyValue(combined)); + } + } + } + } setGrid(grid); } @@ -1006,8 +1006,8 @@ public class WeatherGridData extends AbstractGridData implements INumpyable { protected boolean doValid() { String emsg = "Grid contains data which exceeds limits for this parm. "; - if (!getGridTime().isValid() || getParm() == null - || getGridSlice() == null) { + if (!getGridTime().isValid() || (getParm() == null) + || (getGridSlice() == null)) { statusHandler.handle(Priority.PROBLEM, "Invalid grid time, bad parm or data slice"); return false; // time, parm, or data slice not valid diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/internal/ISCDataAccess.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/internal/ISCDataAccess.java index b35c715a6a..746d4fc6a6 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/internal/ISCDataAccess.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/internal/ISCDataAccess.java @@ -30,8 +30,8 @@ import java.util.Map.Entry; import org.opengis.metadata.spatial.PixelOrientation; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridLocation; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteKey; import com.raytheon.uf.common.dataplugin.gfe.grid.Grid2D; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/DbParm.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/DbParm.java index b05c7944b2..eae2dd4356 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/DbParm.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/DbParm.java @@ -33,7 +33,7 @@ import org.eclipse.core.runtime.Status; import com.raytheon.uf.common.dataplugin.gfe.GridDataHistory; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridLocation; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo; import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/Parm.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/Parm.java index e18387a9f4..3611a54fbe 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/Parm.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/Parm.java @@ -42,9 +42,8 @@ import org.opengis.coverage.grid.GridEnvelope; import com.raytheon.uf.common.dataplugin.gfe.GridDataHistory; import com.raytheon.uf.common.dataplugin.gfe.db.objects.DatabaseID; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; import com.raytheon.uf.common.dataplugin.gfe.db.objects.TimeConstraints; import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteDefinition; @@ -3182,10 +3181,10 @@ public abstract class Parm implements Comparable { // that our setValue really zeros the grid. ParmState.VectorMode cVectorMode = this.parmState.getVectorMode(); ParmState.CombineMode cCombineMode = this.parmState.getCombineMode(); - if (this.gridInfo.getGridType() == GFERecord.GridType.VECTOR) { + if (this.gridInfo.getGridType() == GridType.VECTOR) { this.parmState.setVectorMode(ParmState.VectorMode.BOTH); - } else if ((this.gridInfo.getGridType() == GFERecord.GridType.WEATHER) - || (this.gridInfo.getGridType() == GFERecord.GridType.DISCRETE)) { + } else if ((this.gridInfo.getGridType() == GridType.WEATHER) + || (this.gridInfo.getGridType() == GridType.DISCRETE)) { this.parmState.setCombineMode(ParmState.CombineMode.REPLACE); } @@ -3200,10 +3199,10 @@ public abstract class Parm implements Comparable { boolean endOkay = endParmEdit(); // restore the edit modes - if (this.gridInfo.getGridType() == GFERecord.GridType.VECTOR) { + if (this.gridInfo.getGridType() == GridType.VECTOR) { this.parmState.setVectorMode(cVectorMode); - } else if ((this.gridInfo.getGridType() == GFERecord.GridType.WEATHER) - || (this.gridInfo.getGridType() == GFERecord.GridType.DISCRETE)) { + } else if ((this.gridInfo.getGridType() == GridType.WEATHER) + || (this.gridInfo.getGridType() == GridType.DISCRETE)) { this.parmState.setCombineMode(cCombineMode); } diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/ParmDisplayAttributes.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/ParmDisplayAttributes.java index e8e5c151f4..33d0cbb0b7 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/ParmDisplayAttributes.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/ParmDisplayAttributes.java @@ -29,7 +29,7 @@ import java.util.Set; import org.eclipse.swt.graphics.RGB; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.grid.Grid2DBit; import com.raytheon.uf.common.dataplugin.gfe.reference.ReferenceData; import com.raytheon.uf.common.dataplugin.gfe.reference.ReferenceData.RefType; @@ -44,7 +44,6 @@ import com.raytheon.uf.viz.core.rsc.capabilities.ColorableCapability; import com.raytheon.uf.viz.core.rsc.capabilities.OutlineCapability; import com.raytheon.viz.gfe.Activator; import com.raytheon.viz.gfe.PythonPreferenceStore; -import com.raytheon.viz.gfe.constants.StatusConstants; import com.raytheon.viz.gfe.rsc.GFEResource; import com.raytheon.viz.pointdata.PointWindDisplay.DisplayType; @@ -63,7 +62,8 @@ import com.raytheon.viz.pointdata.PointWindDisplay.DisplayType; * @version 1.0 */ public class ParmDisplayAttributes { - private static final transient IUFStatusHandler statusHandler = UFStatus.getHandler(ParmDisplayAttributes.class); + private static final transient IUFStatusHandler statusHandler = UFStatus + .getHandler(ParmDisplayAttributes.class); private static PythonPreferenceStore prefs = Activator.getDefault() .getPreferenceStore(); @@ -232,7 +232,7 @@ public class ParmDisplayAttributes { // check for contourInterval from config file float interval = prefs.getFloat(pn + "_contourInterval"); - if (contourValueObj != null && contourValueObj.length > 0) { + if ((contourValueObj != null) && (contourValueObj.length > 0)) { baseContourValues = new float[contourValueObj.length]; for (int i = 0; i < contourValueObj.length; i++) { baseContourValues[i] = contourValueObj[i].floatValue(); @@ -242,7 +242,7 @@ public class ParmDisplayAttributes { } // do automatic calculation - if (baseContourValues == null || baseContourValues.length == 0) { + if ((baseContourValues == null) || (baseContourValues.length == 0)) { // compute the interval final float multStep[] = { 1, 2, 5 }; @@ -328,11 +328,11 @@ public class ParmDisplayAttributes { // increased number of contours ArrayList ret = new ArrayList(); if (contourDensity > 0) { - for (int i = 0; i < baseValues.length - 1; i++) { + for (int i = 0; i < (baseValues.length - 1); i++) { float interval = baseValues[i + 1] - baseValues[i]; float delta = interval / (contourDensity + 1); - for (int j = 0; j < contourDensity + 1; j++) { - ret.add((baseValues[i] + delta * j)); + for (int j = 0; j < (contourDensity + 1); j++) { + ret.add((baseValues[i] + (delta * j))); } } ret.add(baseValues[baseValues.length - 1]); @@ -342,7 +342,7 @@ public class ParmDisplayAttributes { else { double skip = -contourDensity + 1; for (int i = 0; i < baseValues.length; i++) { - if (i % skip == 0) { + if ((i % skip) == 0) { ret.add(baseValues[i]); } } @@ -957,13 +957,12 @@ public class ParmDisplayAttributes { for (VisualizationType type : visualType) { if (!available.contains(type)) { - statusHandler.handle( - Priority.PROBLEM, - parm.getParmID().toString() - + " Attempt to setVisualizationType to invalid: " - + type.toString() - + "\nAllowable vis types are: " - + Arrays.toString(available.toArray())); + statusHandler.handle(Priority.PROBLEM, parm.getParmID() + .toString() + + " Attempt to setVisualizationType to invalid: " + + type.toString() + + "\nAllowable vis types are: " + + Arrays.toString(available.toArray())); return; // no action performed } } @@ -1070,8 +1069,9 @@ public class ParmDisplayAttributes { * @param mask */ public void setDisplayMask(final Grid2DBit bits) { - if (bits.getXdim() != parm.getGridInfo().getGridLoc().gridSize().x - || bits.getYdim() != parm.getGridInfo().getGridLoc().gridSize().y) { + if ((bits.getXdim() != parm.getGridInfo().getGridLoc().gridSize().x) + || (bits.getYdim() != parm.getGridInfo().getGridLoc() + .gridSize().y)) { statusHandler.handle( Priority.PROBLEM, "ParmDspAttr::setMask(): mask dimensions [" @@ -1148,8 +1148,10 @@ public class ParmDisplayAttributes { } } - statusHandler.handle(Priority.PROBLEM, - "Attempt to setDisplayMask on unknown ReferenceID [" + id + ']'); + statusHandler + .handle(Priority.PROBLEM, + "Attempt to setDisplayMask on unknown ReferenceID [" + + id + ']'); } public void setEmptyMask() { diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/vcparm/VCModule.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/vcparm/VCModule.java index 2dcce03fc3..e68ecea674 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/vcparm/VCModule.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/vcparm/VCModule.java @@ -34,8 +34,8 @@ import com.raytheon.uf.common.dataplugin.gfe.GridDataHistory; import com.raytheon.uf.common.dataplugin.gfe.GridDataHistory.OriginType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.DatabaseID; import com.raytheon.uf.common.dataplugin.gfe.db.objects.DatabaseID.DataType; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; import com.raytheon.uf.common.dataplugin.gfe.db.objects.TimeConstraints; import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteKey; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/vcparm/VCModuleController.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/vcparm/VCModuleController.java index 0071e5983e..d690d41d40 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/vcparm/VCModuleController.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/vcparm/VCModuleController.java @@ -26,7 +26,7 @@ import java.util.Map; import jep.JepException; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.python.GfePyIncludeUtil; import com.raytheon.uf.common.python.PyConstants; import com.raytheon.viz.gfe.BaseGfePyController; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/vcparm/VCModuleRequest.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/vcparm/VCModuleRequest.java index 252ce5bcab..d0b3f7b9b8 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/vcparm/VCModuleRequest.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/vcparm/VCModuleRequest.java @@ -23,7 +23,7 @@ import java.util.HashMap; import java.util.Map; import java.util.concurrent.Semaphore; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.viz.core.jobs.QueueJobRequest; /** diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/wxvalue/DiscreteWxValue.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/wxvalue/DiscreteWxValue.java index 0c064eb814..da9e5795d7 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/wxvalue/DiscreteWxValue.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/wxvalue/DiscreteWxValue.java @@ -19,7 +19,7 @@ **/ package com.raytheon.viz.gfe.core.wxvalue; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteKey; import com.raytheon.viz.gfe.Activator; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/wxvalue/WeatherWxValue.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/wxvalue/WeatherWxValue.java index 4943b55556..713e7e571d 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/wxvalue/WeatherWxValue.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/wxvalue/WeatherWxValue.java @@ -22,7 +22,7 @@ package com.raytheon.viz.gfe.core.wxvalue; import java.util.Arrays; import java.util.List; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.weather.WeatherKey; import com.raytheon.viz.gfe.Activator; import com.raytheon.viz.gfe.core.parm.Parm; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/EditActionsDialog.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/EditActionsDialog.java index 2dea7eb792..7ea38b5c1f 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/EditActionsDialog.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/EditActionsDialog.java @@ -37,7 +37,7 @@ import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.MenuItem; import org.eclipse.swt.widgets.Shell; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.viz.core.VizApp; import com.raytheon.viz.gfe.GFEPreference; import com.raytheon.viz.gfe.core.DataManager; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/GridInfoDialog.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/GridInfoDialog.java index b65494f1bb..49e03d4f17 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/GridInfoDialog.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/GridInfoDialog.java @@ -42,7 +42,7 @@ import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; import com.raytheon.uf.common.dataplugin.gfe.GridDataHistory; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.TimeConstraints; import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteKey; import com.raytheon.uf.common.dataplugin.gfe.grid.Grid2DByte; @@ -671,10 +671,10 @@ public class GridInfoDialog extends CaveJFACEDialog implements if (tdiff < 60) { return "(< 1 minute ago)"; } else if (tdiff < 3600) { - return "(" + (int) tdiff / 60 + " minutes ago)"; + return "(" + ((int) tdiff / 60) + " minutes ago)"; } else if (tdiff < 86400) { int hours = (int) (tdiff / 3600); - int minutes = (int) (tdiff % 3600 / 60); + int minutes = (int) ((tdiff % 3600) / 60); return "(" + hours + " hours " + minutes + " minutes ago)"; } else { diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/MaskDialog.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/MaskDialog.java index 7124230297..2ac404b59c 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/MaskDialog.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/MaskDialog.java @@ -34,7 +34,7 @@ import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Shell; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteDefinition; import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteKey; import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteKeyDef; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/SetInterpolationAlgorithmDialog.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/SetInterpolationAlgorithmDialog.java index 1903983fde..eb73df58e5 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/SetInterpolationAlgorithmDialog.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/SetInterpolationAlgorithmDialog.java @@ -35,7 +35,7 @@ import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Shell; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.viz.gfe.core.DataManager; import com.raytheon.viz.gfe.core.IParmManager; import com.raytheon.viz.gfe.core.parm.Parm; @@ -104,7 +104,7 @@ public class SetInterpolationAlgorithmDialog extends CaveJFACEDialog { parmMap = new HashMap(parms.length); for (Parm parm : parms) { if (parm.isMutable() - && parm.getGridInfo().getGridType() == GridType.SCALAR) { + && (parm.getGridInfo().getGridType() == GridType.SCALAR)) { Button button = new Button(elementGroup, SWT.RADIO); parmMap.put(button, parm); if (parmMap.size() == 1) { diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/SetValueDialog.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/SetValueDialog.java index 5420a7f4c1..d76792e0db 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/SetValueDialog.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/SetValueDialog.java @@ -35,7 +35,7 @@ import org.eclipse.swt.widgets.Monitor; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.PlatformUI; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.viz.core.VizApp; import com.raytheon.viz.gfe.core.DataManager; import com.raytheon.viz.gfe.core.DataManagerUIFactory; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/edittool/PencilTool.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/edittool/PencilTool.java index 6e42c16143..b2e6e24bac 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/edittool/PencilTool.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/edittool/PencilTool.java @@ -32,9 +32,9 @@ import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Menu; import org.opengis.metadata.spatial.PixelOrientation; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridLocation; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.grid.Grid2DBit; import com.raytheon.uf.common.geospatial.MapUtil; import com.raytheon.uf.common.status.IUFStatusHandler; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/edittool/contour/ContourTool.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/edittool/contour/ContourTool.java index de88952b25..8ab55591ff 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/edittool/contour/ContourTool.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/edittool/contour/ContourTool.java @@ -48,9 +48,9 @@ import org.opengis.referencing.operation.TransformException; import com.raytheon.uf.common.dataplugin.gfe.GridDataHistory; import com.raytheon.uf.common.dataplugin.gfe.GridDataHistory.OriginType; import com.raytheon.uf.common.dataplugin.gfe.RemapGrid; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridLocation; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; import com.raytheon.uf.common.dataplugin.gfe.grid.Grid2DBit; import com.raytheon.uf.common.dataplugin.gfe.grid.Grid2DFloat; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/gridmanager/GridCanvas.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/gridmanager/GridCanvas.java index 830f1adeb9..ebf073bc94 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/gridmanager/GridCanvas.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/gridmanager/GridCanvas.java @@ -51,7 +51,7 @@ import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Menu; import org.eclipse.ui.progress.UIJob; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.TimeConstraints; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; @@ -152,9 +152,9 @@ public class GridCanvas extends Canvas implements IMessageClient { @Override public IStatus runInUIThread(IProgressMonitor monitor) { Point p = scrolledComp.getOrigin(); - if ((increment < 0 && p.y > 0) - || (increment > 0 && p.y < (getSize().y - scrolledComp - .getClientArea().height))) { + if (((increment < 0) && (p.y > 0)) + || ((increment > 0) && (p.y < (getSize().y - scrolledComp + .getClientArea().height)))) { p.y += increment; scrolledComp.setOrigin(p); @@ -201,7 +201,7 @@ public class GridCanvas extends Canvas implements IMessageClient { @Override public IStatus runInUIThread(IProgressMonitor monitor) { - if (!GridCanvas.this.isDisposed() && dirtyRect != null) { + if (!GridCanvas.this.isDisposed() && (dirtyRect != null)) { Rectangle rect; synchronized (this) { rect = dirtyRect; @@ -386,7 +386,7 @@ public class GridCanvas extends Canvas implements IMessageClient { if (e.y < p.y) { scrollJob.setIncrement(-30); scrollJob.schedule(); - } else if (e.y > p.y + r.height) { + } else if (e.y > (p.y + r.height)) { scrollJob.setIncrement(30); scrollJob.schedule(); } else { @@ -438,7 +438,8 @@ public class GridCanvas extends Canvas implements IMessageClient { public void mouseClick(MouseEvent e) { super.mouseClick(e); - if (e.stateMask == SWT.BUTTON1 || e.stateMask == SWT.BUTTON2) { + if ((e.stateMask == SWT.BUTTON1) + || (e.stateMask == SWT.BUTTON2)) { processClickEvent(e); } } @@ -455,8 +456,8 @@ public class GridCanvas extends Canvas implements IMessageClient { super.mouseDown(e); GridBar gridBar = findClickedBar(e.x, e.y); - if (e.button == 1 && (e.stateMask & SWT.MODIFIER_MASK) == 0 - && gridBar != null) { + if ((e.button == 1) && ((e.stateMask & SWT.MODIFIER_MASK) == 0) + && (gridBar != null)) { if (!gridBar.inSelectionBox(e.x, e.y)) { selectOnly(gridBar); Date clickTime = gridManager.getUtil().pixelToDate(e.x); @@ -523,7 +524,7 @@ public class GridCanvas extends Canvas implements IMessageClient { } WxValue defaultValue = WxValue.defaultValue(parm); - if (defaultValue != null + if ((defaultValue != null) && !defaultValue.equals(parm.getParmState() .getPickUpValue())) { menuMgr.add(new AssignAction(parm, overGrid @@ -673,9 +674,9 @@ public class GridCanvas extends Canvas implements IMessageClient { gid = new GridID(grid.getParm(), grid.getGridTime().getStart()); } - if (gid != null && gid.equals(quickviewGrid)) { + if ((gid != null) && gid.equals(quickviewGrid)) { return; - } else if (gid == null && quickviewGrid == null) { + } else if ((gid == null) && (quickviewGrid == null)) { return; } @@ -720,7 +721,7 @@ public class GridCanvas extends Canvas implements IMessageClient { int vPos = 0; separatorPosition = -1; for (GridBar gridBar : gridBarList) { - if (separatorPosition == -1 && !gridBar.getParm().isMutable()) { + if ((separatorPosition == -1) && !gridBar.getParm().isMutable()) { separatorPosition = vPos; vPos += SEPARATOR_HEIGHT + GRIDBAR_SPACING; } @@ -880,9 +881,9 @@ public class GridCanvas extends Canvas implements IMessageClient { if (gridBarList.size() > 0) { rect = gridBarList.get(gridBarList.size() - 1).getBounds(); return new Point(hint, rect.y + rect.height + SEPARATOR_HEIGHT - + GRIDBAR_SPACING * 2); + + (GRIDBAR_SPACING * 2)); } else { - return new Point(hint, SEPARATOR_HEIGHT + GRIDBAR_SPACING * 2); + return new Point(hint, SEPARATOR_HEIGHT + (GRIDBAR_SPACING * 2)); } } @@ -930,7 +931,7 @@ public class GridCanvas extends Canvas implements IMessageClient { // make it active, make it inactive depending upon okToEdit try { - if (clickGridID.grid() != null && clickGridID.grid().isOkToEdit()) { + if ((clickGridID.grid() != null) && clickGridID.grid().isOkToEdit()) { gridManager.getDataManager().getSpatialDisplayManager() .activateParm(parm); } else { @@ -1009,8 +1010,8 @@ public class GridCanvas extends Canvas implements IMessageClient { scrolledComp.setOrigin(p); } else { Rectangle ca = scrolledComp.getClientArea(); - if (rect.y + rect.height > p.y + ca.height) { - p.y = rect.y + rect.height - ca.height; + if ((rect.y + rect.height) > (p.y + ca.height)) { + p.y = (rect.y + rect.height) - ca.height; scrolledComp.setOrigin(p); } } diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/rsc/DiscreteDisplayUtil.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/rsc/DiscreteDisplayUtil.java index 03ba0ce9b1..d774d51197 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/rsc/DiscreteDisplayUtil.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/rsc/DiscreteDisplayUtil.java @@ -28,8 +28,8 @@ import com.raytheon.uf.common.colormap.IColorMap; import com.raytheon.uf.common.colormap.prefs.ColorMapParameters; import com.raytheon.uf.common.colormap.prefs.DataMappingPreferences; import com.raytheon.uf.common.colormap.prefs.DataMappingPreferences.DataMappingEntry; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus.Priority; @@ -54,17 +54,17 @@ import com.raytheon.viz.gfe.core.wxvalue.WxValue; /** * Utilities for displaying GFEResources correctly. Determines the fill color * and/or pattern for discrete data (Weather or Hazard grids). - * + * *
- *
+ * 
  * SOFTWARE HISTORY
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
  * Apr 9, 2009            njensen     Initial creation
  * Jan 9, 2013  15648     ryu         Update colormap when new discrete colrmap is selected.
- *
+ * 
  * 
- * + * * @author njensen * @version 1.0 */ @@ -101,7 +101,7 @@ public class DiscreteDisplayUtil { * Delete the discrete color map for parm. This should be done whenever the * color map in the resource is changed (to make getFillColor() load the new * color map), or when the parm is destroyed (to conserve storage). - * + * * @param parm * The discrete parm whose color map is to be deleted. */ @@ -115,7 +115,7 @@ public class DiscreteDisplayUtil { /** * Given a parm, build a ColorMapParameters object for it. - * + * * @param aparm * The parm for which color map parameters should be built. * @return the ColorMapParameters for the parm. @@ -215,18 +215,18 @@ public class DiscreteDisplayUtil { if (info.getGridType() == GridType.DISCRETE) { List keys = info.getDiscreteKeys(); DataMappingPreferences dataMap = new DataMappingPreferences(); - for (int i=0; i < keys.size(); i++) { + for (int i = 0; i < keys.size(); i++) { DataMappingEntry entry = new DataMappingEntry(); - entry.setPixelValue((double) i+0.5); + entry.setPixelValue(i + 0.5); entry.setLabel(keys.get(i)); entry.setOperator("<"); dataMap.addEntry(entry); } colorMP.setDataMapping(dataMap); colorMP.setDataMin(0); - colorMP.setDataMax(keys.size()-1); + colorMP.setDataMax(keys.size() - 1); colorMP.setColorMapMin(0); - colorMP.setColorMapMax(keys.size()-1); + colorMP.setColorMapMax(keys.size() - 1); } deleteParmColorMap(aparm); diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/rsc/colorbar/ContinuousColorbar.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/rsc/colorbar/ContinuousColorbar.java index bf780a8a41..f40c1e65e9 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/rsc/colorbar/ContinuousColorbar.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/rsc/colorbar/ContinuousColorbar.java @@ -22,7 +22,7 @@ package com.raytheon.viz.gfe.rsc.colorbar; import org.eclipse.swt.graphics.RGB; import com.raytheon.uf.common.colormap.prefs.ColorMapParameters; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.viz.core.DrawableColorMap; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/rsc/colorbar/DiscreteColorbar.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/rsc/colorbar/DiscreteColorbar.java index 530d98dcb7..6d24c56ea8 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/rsc/colorbar/DiscreteColorbar.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/rsc/colorbar/DiscreteColorbar.java @@ -34,7 +34,7 @@ import org.eclipse.swt.graphics.RGB; import com.raytheon.uf.common.colormap.ColorMap; import com.raytheon.uf.common.colormap.prefs.ColorMapParameters; import com.raytheon.uf.common.colormap.prefs.IColorMapParametersListener; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteKey; import com.raytheon.uf.common.dataplugin.gfe.grid.Grid2DBit; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/rsc/colorbar/GFEColorbarResource.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/rsc/colorbar/GFEColorbarResource.java index 59e1199b39..a525e35aad 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/rsc/colorbar/GFEColorbarResource.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/rsc/colorbar/GFEColorbarResource.java @@ -29,7 +29,7 @@ import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.swt.graphics.RGB; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; import com.raytheon.uf.common.dataplugin.gfe.reference.ReferenceData; import com.raytheon.uf.common.status.IUFStatusHandler; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/sampler/HistSample.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/sampler/HistSample.java index ee4e5af118..83b8f9361f 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/sampler/HistSample.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/sampler/HistSample.java @@ -31,7 +31,7 @@ import java.util.Map.Entry; import javax.vecmath.Vector2f; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteKey; import com.raytheon.uf.common.dataplugin.gfe.grid.Grid2DBit; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/sampler/HistValue.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/sampler/HistValue.java index 799140487d..e7bb789a13 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/sampler/HistValue.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/sampler/HistValue.java @@ -20,7 +20,7 @@ package com.raytheon.viz.gfe.sampler; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteKey; import com.raytheon.uf.common.dataplugin.gfe.weather.WeatherKey; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/smarttool/GridCycler.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/smarttool/GridCycler.java index fc4d18d49d..59c6524d2a 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/smarttool/GridCycler.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/smarttool/GridCycler.java @@ -24,8 +24,8 @@ import java.util.List; import com.raytheon.uf.common.dataplugin.gfe.GridDataHistory; import com.raytheon.uf.common.dataplugin.gfe.GridDataHistory.OriginType; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteKey; import com.raytheon.uf.common.dataplugin.gfe.grid.Grid2DBit; @@ -128,7 +128,7 @@ public class GridCycler { if (grids.length == 0) { ; - } else if ("First".equals(mode) || grids.length == 1) { + } else if ("First".equals(mode) || (grids.length == 1)) { grids[0].populate(); resultGrid = grids[0]; resultGrids = new IGridData[] { resultGrid }; @@ -226,8 +226,7 @@ public class GridCycler { // finally just process each range individually. IGridData[][] results = new IGridData[timeRanges.length][]; for (int i = 0; i < timeRanges.length; i += 1) { - results[i] = getCorrespondingResult(argParm, timeRanges[i], - mode); + results[i] = getCorrespondingResult(argParm, timeRanges[i], mode); } return results; } diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/AbstractTemporalEditorBar.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/AbstractTemporalEditorBar.java index 66221fbdf1..7a0f40f1ef 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/AbstractTemporalEditorBar.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/AbstractTemporalEditorBar.java @@ -45,7 +45,7 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Label; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.server.lock.LockTable; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; @@ -115,7 +115,7 @@ public abstract class AbstractTemporalEditorBar implements protected static final int DEFAULT_BAR_HEIGHT = 130; // +8 accounts for border on the draggable label - public static final int CONTROL_MIN_HEIGHT = DRAGGABLE_LABEL_HEIGHT * 2 + 8; + public static final int CONTROL_MIN_HEIGHT = (DRAGGABLE_LABEL_HEIGHT * 2) + 8; public static final int V_MARGIN = 2; @@ -335,7 +335,7 @@ public abstract class AbstractTemporalEditorBar implements height = Math.max(height, curParmHeight); } - if (container != null && !container.isDisposed()) { + if ((container != null) && !container.isDisposed()) { height = ((GridData) container.getLayoutData()).heightHint; container.dispose(); } @@ -356,7 +356,7 @@ public abstract class AbstractTemporalEditorBar implements * */ protected void setupTopLabel() { - if (topLabel != null && !topLabel.isDisposed()) { + if ((topLabel != null) && !topLabel.isDisposed()) { topLabel.dispose(); } @@ -375,7 +375,7 @@ public abstract class AbstractTemporalEditorBar implements */ protected void setupTitleBarCanvas() { int height = TITLEBAR_HEIGHT; - if (titleBarCanvas != null && !titleBarCanvas.isDisposed()) { + if ((titleBarCanvas != null) && !titleBarCanvas.isDisposed()) { titleBarCanvas.removeMouseListener(titleBarMouseHandler); height = ((GridData) titleBarCanvas.getLayoutData()).heightHint; titleBarCanvas.dispose(); @@ -410,7 +410,7 @@ public abstract class AbstractTemporalEditorBar implements * */ protected void setupBottomLabel() { - if (bottomLabel != null && !bottomLabel.isDisposed()) { + if ((bottomLabel != null) && !bottomLabel.isDisposed()) { bottomLabel.dispose(); } @@ -455,7 +455,7 @@ public abstract class AbstractTemporalEditorBar implements Point pt = gc.stringExtent(title); offset += TITLEBAR_PARM_SPACING; Rectangle textBorder = new Rectangle(offset, bounds.y - + TITLEBAR_MARGIN, pt.x + TITLEBAR_MARGIN * 2, + + TITLEBAR_MARGIN, pt.x + (TITLEBAR_MARGIN * 2), fontHeight + TITLEBAR_MARGIN); // draw text @@ -478,7 +478,7 @@ public abstract class AbstractTemporalEditorBar implements // draw white border click box offset += textBorder.width + 1; Rectangle selectBoxBorder = new Rectangle(offset, textBorder.y - + (textBorder.height - IMAGE_TOGGLE_BOX_HEIGHT) / 2, + + ((textBorder.height - IMAGE_TOGGLE_BOX_HEIGHT) / 2), IMAGE_TOGGLE_BOX_WIDTH, IMAGE_TOGGLE_BOX_HEIGHT); if (parmDispAtt.isDisplayedAsGraphic()) { @@ -589,7 +589,7 @@ public abstract class AbstractTemporalEditorBar implements // TimeRange. int xPixels = teUtil.durationToPixels(tr.getDuration()); Point txtSize = gc.textExtent(txt); - if (xPixels >= txtSize.x && yPixelsMax >= txtSize.y) { + if ((xPixels >= txtSize.x) && (yPixelsMax >= txtSize.y)) { // paint the label int xLoc = teUtil.dateToPixel(tr.getCenterTime()); int yLoc = yPos + yOffset; @@ -627,7 +627,7 @@ public abstract class AbstractTemporalEditorBar implements container.dispose(); bottomLabel.dispose(); resizeCursor.dispose(); - if (labelFont != null && !labelFont.isDisposed()) { + if ((labelFont != null) && !labelFont.isDisposed()) { labelFont.dispose(); labelFont = null; } @@ -668,7 +668,7 @@ public abstract class AbstractTemporalEditorBar implements @Override public int compareTo(AbstractTemporalEditorBar o) { int compare = 0; - if (this.parmList.size() > 0 && o.parmList.size() > 0) { + if ((this.parmList.size() > 0) && (o.parmList.size() > 0)) { List list1 = new ArrayList(this.parmList); List list2 = new ArrayList(o.parmList); Collections.sort(list1); @@ -752,7 +752,7 @@ public abstract class AbstractTemporalEditorBar implements if (clickedOnDisplayedRect && clickedOnGraphicRect) { Rectangle rect = new Rectangle(parmDispRect.x, parmDispRect.y, - parmGraphicRect.x - parmDispRect.x + (parmGraphicRect.x - parmDispRect.x) + parmGraphicRect.width, titleBarHeight); if (rect.contains(pt)) { return parm; @@ -778,9 +778,9 @@ public abstract class AbstractTemporalEditorBar implements IGridData grid = parm.overlappingGrid(date); if (parmDispAtt.isDisplayed() && parm.isOkToEdit(range) - && grid != null) { + && (grid != null)) { float ave = getAverage(parm, date); - if (closestParm == null + if ((closestParm == null) || (Math.abs(ave - val) < Math.abs(closestVal - val))) { closestParm = parm; closestVal = ave; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/TemporalEditor.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/TemporalEditor.java index 0c670d497a..67d8ad11cb 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/TemporalEditor.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/TemporalEditor.java @@ -38,7 +38,7 @@ import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; import com.raytheon.uf.viz.core.VizApp; import com.raytheon.viz.gfe.GFEPreference; @@ -222,7 +222,7 @@ public class TemporalEditor extends Composite implements IMessageClient { * @param parm */ protected void addParm(Parm parm) { - if (parm != null && !parmToTEBar.containsKey(parm)) { + if ((parm != null) && !parmToTEBar.containsKey(parm)) { TimeSeries ts = new TimeSeries(parm); // if bar with same unit already exists, append to it @@ -257,7 +257,7 @@ public class TemporalEditor extends Composite implements IMessageClient { * @param parm */ protected void addBar(Parm parm, AbstractTemporalEditorBar bar) { - if (parm != null && !parmToTEBar.containsKey(parm)) { + if ((parm != null) && !parmToTEBar.containsKey(parm)) { // if bar with same unit already exists, append to it String unit = parm.getGridInfo().getUnitString(); @@ -347,7 +347,7 @@ public class TemporalEditor extends Composite implements IMessageClient { // add the next with the correct unit?? List barList = unitToMovedGridBarList .get(unit); - if (barList != null && barList.size() > 0) { + if ((barList != null) && (barList.size() > 0)) { // grab the first item of the moved list unitToGridBar.put(unit, barList.remove(0)); @@ -591,6 +591,7 @@ public class TemporalEditor extends Composite implements IMessageClient { * @param makeOnlyVisible * true if only this parm is visible */ + @Override public void gridVisibilityChanged(Parm parm, boolean visible, boolean makeOnlyVisible) { if (makeOnlyVisible) { diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/TemporalEditorNumericBar.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/TemporalEditorNumericBar.java index e5a5da59a1..aae7915837 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/TemporalEditorNumericBar.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/TemporalEditorNumericBar.java @@ -44,7 +44,7 @@ import org.eclipse.swt.widgets.Canvas; import org.eclipse.swt.widgets.Display; import com.raytheon.uf.common.colormap.IColorMap; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus.Priority; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/dialogs/DisplayAttributesDialog.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/dialogs/DisplayAttributesDialog.java index 3256257545..acf286922e 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/dialogs/DisplayAttributesDialog.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/dialogs/DisplayAttributesDialog.java @@ -33,7 +33,7 @@ import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.MessageBox; import org.eclipse.swt.widgets.Shell; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.viz.gfe.core.parm.Parm; import com.raytheon.viz.gfe.temporaleditor.AbstractTemporalEditorBar; import com.raytheon.viz.gfe.temporaleditor.TEParmDisplayAttributes; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/mousehandler/EditorNumericMouseHandler.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/mousehandler/EditorNumericMouseHandler.java index 3daf6ea25f..e42ab0efa6 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/mousehandler/EditorNumericMouseHandler.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/mousehandler/EditorNumericMouseHandler.java @@ -28,7 +28,7 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.MessageBox; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.grid.Grid2DBit; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/mousehandler/TitleBarMouseHandler.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/mousehandler/TitleBarMouseHandler.java index df07c3a40a..ae18158576 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/mousehandler/TitleBarMouseHandler.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/mousehandler/TitleBarMouseHandler.java @@ -30,7 +30,7 @@ import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.PlatformUI; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.viz.gfe.GFEServerException; import com.raytheon.viz.gfe.core.parm.Parm; import com.raytheon.viz.gfe.gridmanager.MouseHandler; @@ -145,7 +145,7 @@ public class TitleBarMouseHandler extends MouseHandler { final List barList = teBar .getTemporalEditor().getCombinableBars(parm, teBar); - if (teBar.getParms().size() > 1 || barList.size() > 0) { + if ((teBar.getParms().size() > 1) || (barList.size() > 0)) { menuMgr.add(new Action("Move " + TemporalEditorUtil.getTitleBarText(parm) + "...") { @Override diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/visual/ScaleVisual.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/visual/ScaleVisual.java index 4b286482e4..26fbf6edf1 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/visual/ScaleVisual.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/visual/ScaleVisual.java @@ -31,7 +31,7 @@ import org.eclipse.swt.graphics.Rectangle; import org.eclipse.swt.widgets.Canvas; import org.eclipse.swt.widgets.Display; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/GridTypeUserType.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/GridTypeUserType.java index 837178e7ae..a21a29802a 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/GridTypeUserType.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/GridTypeUserType.java @@ -20,7 +20,7 @@ package com.raytheon.edex.plugin.gfe; import com.raytheon.edex.db.mapping.EnumUserType; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; /** Mapping class for persistence of GridType enum */ public class GridTypeUserType extends EnumUserType { diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/ifpAG/ASCIIGrid.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/ifpAG/ASCIIGrid.java index d53bfc46c3..91e48c9cfd 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/ifpAG/ASCIIGrid.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/ifpAG/ASCIIGrid.java @@ -42,9 +42,9 @@ import com.raytheon.uf.common.dataplugin.gfe.RemapGrid; import com.raytheon.uf.common.dataplugin.gfe.config.ProjectionData; import com.raytheon.uf.common.dataplugin.gfe.db.objects.DatabaseID; import com.raytheon.uf.common.dataplugin.gfe.db.objects.DatabaseID.DataType; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridLocation; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; import com.raytheon.uf.common.dataplugin.gfe.db.objects.TimeConstraints; import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteKey; diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/D2DSatParm.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/D2DSatParm.java index 66261c1587..8259b6d644 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/D2DSatParm.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/D2DSatParm.java @@ -35,9 +35,9 @@ import com.raytheon.uf.common.dataplugin.PluginException; import com.raytheon.uf.common.dataplugin.gfe.GridDataHistory; import com.raytheon.uf.common.dataplugin.gfe.RemapGrid; import com.raytheon.uf.common.dataplugin.gfe.db.objects.DatabaseID; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridLocation; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; import com.raytheon.uf.common.dataplugin.gfe.db.objects.TimeConstraints; import com.raytheon.uf.common.dataplugin.gfe.exception.GfeException; diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/D2DGridDatabase.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/D2DGridDatabase.java index 0c66d78ad9..2e787ef4a9 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/D2DGridDatabase.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/D2DGridDatabase.java @@ -50,9 +50,9 @@ import com.raytheon.uf.common.dataplugin.gfe.GridDataHistory; import com.raytheon.uf.common.dataplugin.gfe.RemapGrid; import com.raytheon.uf.common.dataplugin.gfe.db.objects.DatabaseID; import com.raytheon.uf.common.dataplugin.gfe.db.objects.DatabaseID.DataType; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridLocation; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; import com.raytheon.uf.common.dataplugin.gfe.db.objects.TimeConstraints; import com.raytheon.uf.common.dataplugin.gfe.exception.GfeException; diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/NetCDFGridDatabase.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/NetCDFGridDatabase.java index a3b07cc0cd..f88c093ce6 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/NetCDFGridDatabase.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/NetCDFGridDatabase.java @@ -36,9 +36,9 @@ import com.raytheon.uf.common.dataplugin.gfe.GridDataHistory.OriginType; import com.raytheon.uf.common.dataplugin.gfe.RemapGrid; import com.raytheon.uf.common.dataplugin.gfe.db.objects.DatabaseID; import com.raytheon.uf.common.dataplugin.gfe.db.objects.DatabaseID.DataType; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridLocation; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; import com.raytheon.uf.common.dataplugin.gfe.db.objects.TimeConstraints; import com.raytheon.uf.common.dataplugin.gfe.exception.GfeException; diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/GetPointDataHandler.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/GetPointDataHandler.java index 149fda355f..f0b6568ab3 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/GetPointDataHandler.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/GetPointDataHandler.java @@ -35,7 +35,7 @@ import javax.measure.unit.Unit; import com.raytheon.edex.plugin.gfe.server.IFPServer; import com.raytheon.edex.plugin.gfe.server.database.GridDatabase; import com.raytheon.uf.common.dataplugin.gfe.db.objects.DatabaseID; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridLocation; import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; import com.raytheon.uf.common.dataplugin.gfe.point.GFEPointDataContainer; diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/GFERecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/GFERecord.java index e160d3dcfc..2e2b2c3493 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/GFERecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/GFERecord.java @@ -84,6 +84,7 @@ import com.raytheon.uf.common.time.TimeRange; * Dec 03, 2013 2597 randerso Cleared gridHistory id when adding new history * records in consolidateHistory so dao will recognize * it as a new record + * Jan 13, 2015 3955 randerso Moved GridType enum to GridParmInfo where it belongs * * * @@ -106,11 +107,6 @@ public class GFERecord extends PluginDataObject implements IPersistable { private static final long serialVersionUID = 1L; - /** Grid type enumeration */ - public enum GridType { - NONE, SCALAR, VECTOR, WEATHER, DISCRETE - }; - public static final String PLUGIN_NAME = "gfe"; /** diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/GridParmInfo.java b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/GridParmInfo.java index a5042158ce..6c512751cf 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/GridParmInfo.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/GridParmInfo.java @@ -43,7 +43,6 @@ import javax.persistence.Transient; import org.hibernate.annotations.OnDelete; import org.hibernate.annotations.OnDeleteAction; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteKey; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; @@ -68,6 +67,7 @@ import com.raytheon.uf.common.status.UFStatus.Priority; * 08/06/13 #1571 randerso Added hibernate annotations, javadoc cleanup * 10/22/2013 #2361 njensen Remove ISerializableObject * 05/06/2014 #3118 randerso Changed clone() to also clone gridLoc + * 01/13/2015 #3955 randerso Moved GridType enum to GridParmInfo where it belongs * * * @@ -78,6 +78,10 @@ import com.raytheon.uf.common.status.UFStatus.Priority; @Embeddable @DynamicSerialize public class GridParmInfo implements Cloneable { + /** Grid type enumeration */ + public enum GridType { + NONE, SCALAR, VECTOR, WEATHER, DISCRETE + } private static final transient IUFStatusHandler statusHandler = UFStatus .getHandler(GridParmInfo.class); diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/slice/AbstractGridSlice.java b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/slice/AbstractGridSlice.java index 987cd8128d..7756ae3809 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/slice/AbstractGridSlice.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/slice/AbstractGridSlice.java @@ -27,8 +27,8 @@ import jep.INumpyable; import com.raytheon.uf.common.dataplugin.gfe.GridDataHistory; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.serialization.ISerializableObject; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; import com.raytheon.uf.common.time.TimeRange; @@ -310,10 +310,12 @@ public abstract class AbstractGridSlice implements IGridSlice, // do nothing by default } + @Override public boolean getUseCache() { return this.useCache; } + @Override public void setUseCache(boolean useCache) { if (this.useCache != useCache) { this.useCache = useCache; diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/slice/VectorGridSlice.java b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/slice/VectorGridSlice.java index 0e47319ca4..586266e0e3 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/slice/VectorGridSlice.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/slice/VectorGridSlice.java @@ -31,8 +31,8 @@ import com.raytheon.uf.common.cache.CacheFactory; import com.raytheon.uf.common.cache.ICache; import com.raytheon.uf.common.dataplugin.gfe.GridDataHistory; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType; import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType; import com.raytheon.uf.common.dataplugin.gfe.grid.Grid2DBit; import com.raytheon.uf.common.dataplugin.gfe.grid.Grid2DFloat; import com.raytheon.uf.common.dataplugin.gfe.grid.IGrid2D;