From f19dfc5915b137431a1c3b9d47103cf73827561d Mon Sep 17 00:00:00 2001 From: Nate Jensen Date: Thu, 3 Sep 2015 11:37:08 -0500 Subject: [PATCH] Omaha #4779 remove OBE data scale Change-Id: I49a1fd81bb92cb5e3ff49241243121fbcb396f50 Former-commit-id: 0fb0edd13e512854841c78ec3a76fd70c6836b45 --- .../raytheon/uf/viz/d2d/core/DataScale.java | 93 ---------- .../d2d/core/map/D2DMapRenderableDisplay.java | 31 +--- .../viz/d2d/core/map/DataScaleListener.java | 162 ------------------ .../viz/d2d/core/map/IDataScaleResource.java | 49 ------ cave/com.raytheon.uf.viz.d2d.ui/plugin.xml | 29 +--- .../viz/d2d/ui/actions/DataScaleAction.java | 74 -------- .../viz/grid/rsc/GridResourceData.java | 9 +- .../viz/radar/rsc/AbstractRadarResource.java | 104 ++++------- 8 files changed, 47 insertions(+), 504 deletions(-) delete mode 100644 cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/DataScale.java delete mode 100644 cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/map/DataScaleListener.java delete mode 100644 cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/map/IDataScaleResource.java delete mode 100644 cave/com.raytheon.uf.viz.d2d.ui/src/com/raytheon/uf/viz/d2d/ui/actions/DataScaleAction.java diff --git a/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/DataScale.java b/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/DataScale.java deleted file mode 100644 index ef8a40a1ee..0000000000 --- a/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/DataScale.java +++ /dev/null @@ -1,93 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -package com.raytheon.uf.viz.d2d.core; - -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.ui.IWorkbenchWindow; - -import com.raytheon.viz.ui.VizWorkbenchManager; - -/** - * Class for holding whether data scale is selected for each window - * - *
- * 
- * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Jul 19, 2010            mschenke     Initial creation
- * 
- * 
- * - * @author mschenke - * @version 1.0 - */ - -public class DataScale { - - private static Map scaleMap = new HashMap(); - - /** - * Set the data scale for the given workbench window - * - * @param window - * @param scale - */ - public static void setDataScale(IWorkbenchWindow window, Boolean scale) { - scaleMap.put(window, scale); - } - - /** - * Set the data scale for the active workbench window, used if you don't - * know what window you are on - * - * @param scale - */ - public static void setDataScale(Boolean scale) { - setDataScale(VizWorkbenchManager.getInstance().getCurrentWindow(), - scale); - } - - /** - * Check if the data scale option is selected for the given window - * - * @param window - * @return - */ - public static boolean isDataScale(IWorkbenchWindow window) { - Boolean scaled = scaleMap.get(window); - if (scaled == null) { - scaled = false; - scaleMap.put(window, scaled); - } - return scaled; - } - - /** - * Check if the data scaled option is selected for the active window - * - * @return - */ - public static boolean isDataScale() { - return isDataScale(VizWorkbenchManager.getInstance().getCurrentWindow()); - } -} diff --git a/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/map/D2DMapRenderableDisplay.java b/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/map/D2DMapRenderableDisplay.java index 318c5ba824..2c3ac0f916 100644 --- a/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/map/D2DMapRenderableDisplay.java +++ b/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/map/D2DMapRenderableDisplay.java @@ -63,10 +63,11 @@ import com.raytheon.viz.core.imagery.ImageCombiner; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Feb 9, 2009 njensen Initial creation + * Feb 09, 2009 njensen Initial creation * Mar 21, 2013 1638 mschenke Made map scales not tied to d2d * Mar 22, 2013 1638 mschenke Moved map scale code to MapScaleRenderableDisplay * Apr 06, 2015 ASM #17215 D. Friedman Implement clear to avoid removing time match basis + * Sep 03, 2015 4779 njensen Removed DataScale references * * * @@ -89,8 +90,6 @@ public class D2DMapRenderableDisplay extends MapScaleRenderableDisplay protected double density = ((Double) VizGlobalsManager.getCurrentInstance() .getPropery(VizConstants.DENSITY_ID)).doubleValue(); - protected DataScaleListener scaleListener = null; - protected ImageCombiner combinerListener = null; protected boolean scaleOnNextPaint = false; @@ -272,10 +271,12 @@ public class D2DMapRenderableDisplay extends MapScaleRenderableDisplay this.scaleOnNextPaint = scale; } + @Override public long getBlinkInterval() { return super.getBlinkInterval(); } + @Override public void setBlinkInterval(long blinkInterval) { super.setBlinkInterval(blinkInterval); } @@ -297,22 +298,6 @@ public class D2DMapRenderableDisplay extends MapScaleRenderableDisplay // Add the image combiner resourceList.addPostAddListener(getImageCombinerListener()); - - // Add scale listeners - resourceList.addPostAddListener(getScaleListener()); - resourceList.addPostRemoveListener(getScaleListener()); - } - - /** - * Get the data scale listener, instantiates if null - * - * @return - */ - private DataScaleListener getScaleListener() { - if (scaleListener == null) { - scaleListener = new DataScaleListener(this); - } - return scaleListener; } /** @@ -327,9 +312,11 @@ public class D2DMapRenderableDisplay extends MapScaleRenderableDisplay return combinerListener; } - /** Like MapScaleRenderableDisplayer.clear, but avoids removing the time match - * basis until other resources are removed. This reduces time matching churn - * and reduces the chances of lockups. + /** + * Like MapScaleRenderableDisplayer.clear, but avoids removing the time + * match basis until other resources are removed. This reduces time matching + * churn and reduces the chances of lockups. + * * @see com.raytheon.uf.viz.core.maps.scales.MapScaleRenderableDisplay#clear() */ @Override diff --git a/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/map/DataScaleListener.java b/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/map/DataScaleListener.java deleted file mode 100644 index c216577cb2..0000000000 --- a/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/map/DataScaleListener.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -package com.raytheon.uf.viz.d2d.core.map; - -import org.geotools.coverage.grid.GridGeometry2D; -import org.opengis.referencing.crs.CoordinateReferenceSystem; - -import com.raytheon.uf.common.geospatial.MapUtil; -import com.raytheon.uf.viz.core.drawables.ResourcePair; -import com.raytheon.uf.viz.core.exception.VizException; -import com.raytheon.uf.viz.core.map.MapDescriptor; -import com.raytheon.uf.viz.core.rsc.IResourceGroup; -import com.raytheon.uf.viz.core.rsc.ResourceList; -import com.raytheon.uf.viz.core.rsc.ResourceList.AddListener; -import com.raytheon.uf.viz.core.rsc.ResourceList.RemoveListener; -import com.raytheon.uf.viz.core.rsc.capabilities.BlendableCapability; -import com.raytheon.uf.viz.d2d.core.DataScale; -import com.raytheon.viz.core.rsc.BestResResource; -import com.vividsolutions.jts.geom.Coordinate; - -/** - * Resource add/remove listener for doing data scale changing with the data - * scale set in the options menu - * - *
- * 
- * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Jul 20, 2010            mschenke     Initial creation
- * 
- * 
- * - * @author mschenke - * @version 1.0 - */ - -public class DataScaleListener implements AddListener, RemoveListener { - - private ResourcePair scaleResource; - - private D2DMapRenderableDisplay renderableDisplay; - - public DataScaleListener(D2DMapRenderableDisplay display) { - this.renderableDisplay = display; - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.viz.core.rsc.ResourceList.AddListener#notifyAdd(com.raytheon - * .uf.viz.core.drawables.ResourcePair) - */ - @Override - public void notifyAdd(ResourcePair rp) throws VizException { - if (isDataScale() && scaleResource == null) { - checkDataScaleResource(null, rp); - } - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.viz.core.rsc.ResourceList.RemoveListener#notifyRemove - * (com.raytheon.uf.viz.core.drawables.ResourcePair) - */ - @Override - public void notifyRemove(ResourcePair rp) throws VizException { - if (scaleResource != null && rp == scaleResource) { - scaleResource = null; - if (isDataScale()) { - checkDataScaleResourceList(null, renderableDisplay - .getDescriptor().getResourceList()); - } - } - } - - /** - * Checks the DataScale class for data scaled selected on the active window. - * Must be run on UI Thread - * - * @return - */ - private boolean isDataScale() { - return DataScale.isDataScale(); - } - - /** - * Checks for IDataScaleInterface on the resource - * - * @param parent - * @param rp - * @return - * @throws VizException - */ - private boolean checkDataScaleResource(ResourcePair parent, ResourcePair rp) - throws VizException { - if (rp.getResource() != null) { - parent = parent == null ? rp : parent; - if (rp.getResource() instanceof IDataScaleResource) { - scaleResource = parent; - - IDataScaleResource dsr = (IDataScaleResource) rp.getResource(); - Coordinate centerPoint = dsr.getCenterLocation(); - if (centerPoint != null) { - CoordinateReferenceSystem crs = MapUtil - .constructStereographic(MapUtil.AWIPS_EARTH_RADIUS, - MapUtil.AWIPS_EARTH_RADIUS, centerPoint.y, - centerPoint.x); - GridGeometry2D gridGeom = MapDescriptor.createGridGeometry( - crs, centerPoint, 500000, 500000); - renderableDisplay.getDescriptor().setGridGeometry(gridGeom); - renderableDisplay.setScaleOnNextPaint(true); - return true; - } - } else if (rp.getResource() - .hasCapability(BlendableCapability.class)) { - return checkDataScaleResourceList(parent, rp.getResource() - .getCapability(BlendableCapability.class) - .getResourceList()); - } else if (rp.getResource() instanceof IResourceGroup) { - return checkDataScaleResourceList(parent, ((IResourceGroup) rp - .getResource()).getResourceList()); - } else if (rp.getResource() instanceof BestResResource) { - return checkDataScaleResourceList(parent, ((BestResResource) rp - .getResource()).getResourceList()); - } - } - return false; - } - - private boolean checkDataScaleResourceList(ResourcePair parent, - ResourceList list) throws VizException { - boolean rval = false; - for (ResourcePair pair : list) { - if (checkDataScaleResource(parent, pair)) { - rval = true; - break; - } - } - return rval; - } -} diff --git a/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/map/IDataScaleResource.java b/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/map/IDataScaleResource.java deleted file mode 100644 index 5f013b6d79..0000000000 --- a/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/map/IDataScaleResource.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -package com.raytheon.uf.viz.d2d.core.map; - -import com.vividsolutions.jts.geom.Coordinate; - -/** - * Interface for providing data scale information - * - *
- * 
- * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Jul 20, 2010            mschenke     Initial creation
- * 
- * 
- * - * @author mschenke - * @version 1.0 - */ - -public interface IDataScaleResource { - - /** - * Get the center point for the resource, used for rescaling the map - * - * @return - */ - public Coordinate getCenterLocation(); - -} diff --git a/cave/com.raytheon.uf.viz.d2d.ui/plugin.xml b/cave/com.raytheon.uf.viz.d2d.ui/plugin.xml index 77df5fd614..91b3c6cb3d 100644 --- a/cave/com.raytheon.uf.viz.d2d.ui/plugin.xml +++ b/cave/com.raytheon.uf.viz.d2d.ui/plugin.xml @@ -225,11 +225,6 @@ label="Time Options" style="toggle"> - - - - - + @@ -1679,13 +1670,7 @@ - - - + - - - - - * - * SOFTWARE HISTORY - * Date Ticket# Engineer Description - * ------------ ---------- ----------- -------------------------- - * Jul 19, 2010 mschenke Initial creation - * - * - * - * @author mschenke - * @version 1.0 - */ - -public class DataScaleAction extends AbstractTool { - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands. - * ExecutionEvent) - */ - @Override - public Object execute(ExecutionEvent event) throws ExecutionException { - super.execute(event); - boolean selected = !DataScale.isDataScale(); - DataScale.setDataScale(selected); - setEnabled(selected); - return null; - } - - public void setEnabled(boolean isEnabled) { - this.isEnabled = isEnabled; - ICommandService service = (ICommandService) VizWorkbenchManager - .getInstance().getCurrentWindow() - .getService(ICommandService.class); - - if (service != null) { - service.refreshElements(commandId, null); - } - } -} diff --git a/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/rsc/GridResourceData.java b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/rsc/GridResourceData.java index 2151815928..92f4acddbc 100644 --- a/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/rsc/GridResourceData.java +++ b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/rsc/GridResourceData.java @@ -30,7 +30,6 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; -import com.raytheon.uf.common.inventory.exception.DataCubeException; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.grid.GridConstants; import com.raytheon.uf.common.dataplugin.grid.GridRecord; @@ -38,6 +37,7 @@ import com.raytheon.uf.common.dataplugin.level.Level; import com.raytheon.uf.common.dataquery.requests.RequestConstraint; import com.raytheon.uf.common.datastorage.Request; import com.raytheon.uf.common.datastorage.records.IDataRecord; +import com.raytheon.uf.common.inventory.exception.DataCubeException; import com.raytheon.uf.common.time.DataTime; import com.raytheon.uf.viz.core.drawables.IDescriptor; import com.raytheon.uf.viz.core.drawables.ResourcePair; @@ -50,7 +50,6 @@ import com.raytheon.uf.viz.core.rsc.IResourceGroup; import com.raytheon.uf.viz.core.rsc.LoadProperties; import com.raytheon.uf.viz.core.rsc.ResourceList; import com.raytheon.uf.viz.core.rsc.capabilities.DisplayTypeCapability; -import com.raytheon.uf.viz.d2d.core.map.IDataScaleResource; import com.raytheon.uf.viz.datacube.DataCubeContainer; import com.raytheon.viz.core.rsc.ICombinedResourceData; import com.raytheon.viz.grid.inv.GribDataCubeAlertMessageParser; @@ -58,6 +57,7 @@ import com.raytheon.viz.grid.inv.GridInventory; import com.raytheon.viz.grid.rsc.general.D2DGridResource; import com.raytheon.viz.grid.rsc.general.DifferenceGridResourceData; import com.raytheon.viz.grid.util.TiltRequest; +import com.raytheon.viz.radar.rsc.AbstractRadarResource; import com.vividsolutions.jts.geom.Coordinate; /** @@ -71,6 +71,7 @@ import com.vividsolutions.jts.geom.Coordinate; * Feb 12, 2009 njensen Initial creation * Jun 17, 2013 2107 bsteffen Enable sampling by default for several * display types. + * Sep 03, 2015 4779 njensen Removed DataScale references * * * @@ -386,8 +387,8 @@ public class GridResourceData extends AbstractRequestableResourceData implements for (ResourcePair rp : resourceList) { AbstractResourceData resourceData = rp.getResourceData(); AbstractVizResource resource = rp.getResource(); - if (resource instanceof IDataScaleResource) { - return ((IDataScaleResource) resource).getCenterLocation(); + if (resource instanceof AbstractRadarResource) { + return ((AbstractRadarResource) resource).getRadarLocation(); } if (resourceData instanceof IResourceGroup) { Coordinate tiltLoc = findTiltLocation(((IResourceGroup) resourceData) diff --git a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/AbstractRadarResource.java b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/AbstractRadarResource.java index 62ce48447b..e619bd7b2c 100644 --- a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/AbstractRadarResource.java +++ b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/AbstractRadarResource.java @@ -55,7 +55,6 @@ import com.raytheon.uf.viz.core.rsc.capabilities.BlendableCapability; import com.raytheon.uf.viz.core.rsc.capabilities.BlendedCapability; import com.raytheon.uf.viz.core.rsc.capabilities.ColorMapCapability; import com.raytheon.uf.viz.core.rsc.capabilities.ColorableCapability; -import com.raytheon.uf.viz.d2d.core.map.IDataScaleResource; import com.raytheon.uf.viz.d2d.core.sampling.ID2DSamplingResource; import com.raytheon.uf.viz.d2d.core.time.D2DTimeMatcher; import com.raytheon.uf.viz.d2d.core.time.ID2DTimeMatchingExtension; @@ -84,6 +83,7 @@ import com.vividsolutions.jts.geom.Coordinate; * May 5, 2014 17201 D. Friedman Enable same-radar time matching. * Jun 11, 2014 2061 bsteffen Move rangeable methods to radial resource * May 13, 2015 4461 bsteffen Add sails frame coordinator. + * Sep 03, 2015 4779 njensen Removed IDataScale * * * @@ -93,15 +93,21 @@ import com.vividsolutions.jts.geom.Coordinate; public class AbstractRadarResource extends AbstractVizResource implements - IResourceDataChanged, IDataScaleResource, - IRadarTextGeneratingResource, ICacheObjectCallback, - ID2DTimeMatchingExtension { + IResourceDataChanged, IRadarTextGeneratingResource, + ICacheObjectCallback, ID2DTimeMatchingExtension { + + /* + * TODO This is dumb that a class with a name starting with Abstract is not + * actually abstract. Either rename this class or actually apply the + * abstract modifier. + */ + private static final transient IUFStatusHandler statusHandler = UFStatus .getHandler(AbstractRadarResource.class); public enum InspectLabels { Mnemonic, Value, Angle, Shear, MSL, AGL, Azimuth, Range, ICAO - }; + } private static final List defaultInspectLabels = Arrays .asList(InspectLabels.Value, InspectLabels.Shear, @@ -136,7 +142,7 @@ public class AbstractRadarResource extends protected Map upperTextMap = new HashMap(); - protected Coordinate centerLocation = null; + protected Coordinate radarLocation = null; protected static final RadarInfoDict infoDict; @@ -172,24 +178,12 @@ public class AbstractRadarResource extends icao = ""; } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.viz.core.rsc.AbstractVizResource#initInternal(com.raytheon - * .uf.viz.core.IGraphicsTarget) - */ @Override protected void initInternal(IGraphicsTarget target) throws VizException { SailsFrameCoordinator.addToDescriptor(descriptor); RadarTextResourceData.addRadarTextResource(descriptor); } - /* - * (non-Javadoc) - * - * @see com.raytheon.uf.viz.core.rsc.AbstractVizResource#disposeInternal() - */ @Override protected void disposeInternal() { radarRecords.clear(); @@ -212,8 +206,8 @@ public class AbstractRadarResource extends radarRecord.setAddSpatial(!resourceData.latest); icao = radarRecord.getIcao(); if (radarRecord.getLatitude() != null - && radarRecord.getLongitude() != null) { - centerLocation = new Coordinate(radarRecord.getLongitude(), + && radarRecord.getLongitude() != null && radarLocation == null) { + radarLocation = new Coordinate(radarRecord.getLongitude(), radarRecord.getLatitude()); } DataTime d = radarRecord.getDataTime(); @@ -267,27 +261,15 @@ public class AbstractRadarResource extends return new DefaultVizRadarRecord(radarRecord); } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.viz.core.rsc.AbstractVizResource#paintInternal(com.raytheon - * .uf.viz.core.IGraphicsTarget, - * com.raytheon.uf.viz.core.drawables.PaintProperties) - */ @Override protected void paintInternal(IGraphicsTarget target, PaintProperties paintProps) throws VizException { + /* + * TODO if this class actually goes abstract, this method should be + * deleted and force subclasses to implement it + */ } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.viz.core.rsc.IResourceDataChanged#resourceChanged(com - * .raytheon.uf.viz.core.rsc.IResourceDataChanged.ChangeType, - * java.lang.Object) - */ @Override public void resourceChanged(ChangeType type, Object object) { if (type == ChangeType.DATA_UPDATE) { @@ -299,13 +281,6 @@ public class AbstractRadarResource extends issueRefresh(); } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.viz.core.rsc.capabilities.IInspectableResource#inspect(com - * .vividsolutions.jts.geom.Coordinate) - */ @Override public String inspect(ReferencedCoordinate latLon) throws VizException { Map dataMap; @@ -422,27 +397,20 @@ public class AbstractRadarResource extends displayedData.append("@" + dataMap.get("Azimuth")); } - if (!"DMD".equalsIgnoreCase(dataMap.get("Mnemonic"))) - { + if (!"DMD".equalsIgnoreCase(dataMap.get("Mnemonic"))) { if (labels.contains(InspectLabels.ICAO)) { displayedData.append(' ').append(dataMap.get("ICAO")); } } - if (displayedData.toString().contains("null") || displayedData.toString().isEmpty()) { + if (displayedData.toString().contains("null") + || displayedData.toString().isEmpty()) { displayedData.replace(0, displayedData.length(), "NO DATA"); } return displayedData.toString(); } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.viz.core.rsc.AbstractVizResource#interrogate(com.raytheon - * .uf.viz.core.geospatial.ReferencedCoordinate) - */ @Override public Map interrogate(ReferencedCoordinate coord) throws VizException { @@ -523,15 +491,8 @@ public class AbstractRadarResource extends return radarRecords; } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.viz.d2d.core.map.IDataScaleResource#getCenterLocation() - */ - @Override - public Coordinate getCenterLocation() { - return centerLocation; + public Coordinate getRadarLocation() { + return radarLocation; } @Override @@ -543,13 +504,6 @@ public class AbstractRadarResource extends upperTextMap.remove(dataTime); } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.viz.core.cache.GeneralCacheObject.ICacheObjectCallback - * #objectArrived(java.lang.Object) - */ @Override public void objectArrived(RadarRecord object) { issueRefresh(); @@ -558,16 +512,20 @@ public class AbstractRadarResource extends @Override public void modifyTimeMatching(D2DTimeMatcher d2dTimeMatcher, AbstractVizResource rsc, TimeMatcher timeMatcher) { - /* Intended to be equivalent to A1 radar-specific part of + /* + * Intended to be equivalent to A1 radar-specific part of * TimeMatchingFunctions.C:setRadarOnRadar. */ AbstractVizResource tmb = d2dTimeMatcher.getTimeMatchBasis(); if (tmb instanceof AbstractRadarResource) { AbstractRadarResource tmbRadarRsc = (AbstractRadarResource) tmb; AbstractResourceData tmbResData = tmbRadarRsc.getResourceData(); - RequestConstraint icaoRC = getResourceData().getMetadataMap().get("icao"); - if (icaoRC != null && tmbResData instanceof RadarResourceData && - icaoRC.equals(((RadarResourceData) tmbResData).getMetadataMap().get("icao"))) { + RequestConstraint icaoRC = getResourceData().getMetadataMap().get( + "icao"); + if (icaoRC != null + && tmbResData instanceof RadarResourceData + && icaoRC.equals(((RadarResourceData) tmbResData) + .getMetadataMap().get("icao"))) { timeMatcher.setRadarOnRadar(true); } }