From dd85085986924b27f2f2ad0665e877885189860b Mon Sep 17 00:00:00 2001 From: Mark Peters Date: Thu, 7 Aug 2014 10:00:34 -0500 Subject: [PATCH] Omaha #3492 Replace Raytheon plugin calls to deprecated IGraphicsTarget.createWireframeShape() Change-Id: I68c4757365ad1bcb6254f78fe26b98b333cf7b5a Former-commit-id: fbebe6213718025ecf2288c0d57627df53e4bc5e --- .../rsc/rendering/ShapeRenderingHandler.java | 14 ++----- .../graphics/DispatchGraphicsTarget.java | 42 +++---------------- .../rsc/AbstractSatelliteResource.java | 7 ++-- 3 files changed, 12 insertions(+), 51 deletions(-) diff --git a/cave/com.raytheon.uf.viz.collaboration.display/src/com/raytheon/uf/viz/collaboration/display/rsc/rendering/ShapeRenderingHandler.java b/cave/com.raytheon.uf.viz.collaboration.display/src/com/raytheon/uf/viz/collaboration/display/rsc/rendering/ShapeRenderingHandler.java index c79c96c269..3cf3e37121 100644 --- a/cave/com.raytheon.uf.viz.collaboration.display/src/com/raytheon/uf/viz/collaboration/display/rsc/rendering/ShapeRenderingHandler.java +++ b/cave/com.raytheon.uf.viz.collaboration.display/src/com/raytheon/uf/viz/collaboration/display/rsc/rendering/ShapeRenderingHandler.java @@ -67,6 +67,7 @@ import com.vividsolutions.jts.geom.LineString; * ------------ ---------- ----------- -------------------------- * Apr 16, 2012 mschenke Initial creation * Mar 05, 2014 2826 njensen Fixed null pointer in renderShadedShapes + * Aug 07, 2014 3492 mapeters Updated deprecated createWireframeShape() calls. * * * @@ -82,17 +83,8 @@ public class ShapeRenderingHandler extends CollaborationRenderingHandler { int shapeId = event.getObjectId(); IWireframeShape shape = null; if (event.getSimplificationLevel() != null) { - if (event.isSpatialChopFlag() != null) { - shape = target.createWireframeShape(event.isMutable(), - event.getGridGeometry(), - event.getSimplificationLevel(), - event.isSpatialChopFlag(), event.getIExtent()); - } else { - shape = target - .createWireframeShape(event.isMutable(), - event.getGridGeometry(), - event.getSimplificationLevel()); - } + shape = target.createWireframeShape(event.isMutable(), + event.getGridGeometry(), event.getSimplificationLevel()); } else { shape = target.createWireframeShape(event.isMutable(), event.getGridGeometry()); diff --git a/cave/com.raytheon.uf.viz.remote.graphics/src/com/raytheon/uf/viz/remote/graphics/DispatchGraphicsTarget.java b/cave/com.raytheon.uf.viz.remote.graphics/src/com/raytheon/uf/viz/remote/graphics/DispatchGraphicsTarget.java index bd8910ed85..c73e2ca8f3 100644 --- a/cave/com.raytheon.uf.viz.remote.graphics/src/com/raytheon/uf/viz/remote/graphics/DispatchGraphicsTarget.java +++ b/cave/com.raytheon.uf.viz.remote.graphics/src/com/raytheon/uf/viz/remote/graphics/DispatchGraphicsTarget.java @@ -37,7 +37,6 @@ import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Listener; import org.geotools.coverage.grid.GeneralGridGeometry; -import com.raytheon.uf.common.colormap.IColorMap; import com.raytheon.uf.common.colormap.image.ColorMapData; import com.raytheon.uf.common.colormap.prefs.ColorMapParameters; import com.raytheon.uf.common.status.IUFStatusHandler; @@ -59,7 +58,6 @@ import com.raytheon.uf.viz.core.data.IDataPreparer; import com.raytheon.uf.viz.core.data.IImageDataPreparer; import com.raytheon.uf.viz.core.data.IRenderedImageCallback; import com.raytheon.uf.viz.core.data.resp.NumericImageData; -import com.raytheon.uf.viz.core.drawables.ColorMapLoader; import com.raytheon.uf.viz.core.drawables.IDescriptor; import com.raytheon.uf.viz.core.drawables.IFont; import com.raytheon.uf.viz.core.drawables.IFont.FontType; @@ -116,6 +114,9 @@ import com.raytheon.uf.viz.remote.graphics.objects.DispatchingWireframeShape; * May 16, 2014 3163 bsteffen Remove references to deprecated * {@link IGraphicsTarget} methods. * Jul 28, 2014 3429 mapeters Updated deprecated drawLine() calls. + * Aug 07, 2014 3492 mapeters Updated deprecated createWireframeShape() calls + * and removed unused setUseBuiltinColorbar(), + * drawFilledCircle(), and buildColorMap() methods. * * * @@ -802,8 +803,7 @@ public class DispatchGraphicsTarget extends DispatchingObject boolean spatialChopFlag, IExtent extent) { // Create original IWireframeShape targetShape = wrappedObject.createWireframeShape( - mutable, descriptor, simplificationLevel, spatialChopFlag, - extent); + mutable, descriptor, simplificationLevel); // Create wrapped DispatchingWireframeShape dispatching = new DispatchingWireframeShape( targetShape, getDispatcher(), descriptor.getGridGeometry()); @@ -853,7 +853,7 @@ public class DispatchGraphicsTarget extends DispatchingObject boolean spatialChopFlag, IExtent extent) { // Create original IWireframeShape targetShape = wrappedObject.createWireframeShape( - mutable, geom, simplificationLevel, spatialChopFlag, extent); + mutable, geom, simplificationLevel); // Create wrapped DispatchingWireframeShape dispatching = new DispatchingWireframeShape( targetShape, getDispatcher(), geom); @@ -1027,16 +1027,6 @@ public class DispatchGraphicsTarget extends DispatchingObject wrappedObject.setBackgroundColor(backgroundColor); } - /** - * @deprecated: This method has no effect. IGraphicsTargets are not - * responsible to drawing a colorbar. Use method drawColorRamp - * to draw a color ramp - */ - @Deprecated - public void setUseBuiltinColorbar(boolean isColorbarDisplayed) { - - } - /** * @param colorMap * @throws VizException @@ -1235,28 +1225,6 @@ public class DispatchGraphicsTarget extends DispatchingObject drawCircle(circle); } - /** - * @deprecated Use {@link #drawCircle(DrawableCircle...)} - */ - @Deprecated - public void drawFilledCircle(double x, double y, double z, double radius, - RGB color) throws VizException { - DrawableCircle circle = new DrawableCircle(); - circle.setCoordinates(x, y, z); - circle.basics.color = color; - circle.radius = new Double(radius); - circle.filled = true; - drawCircle(circle); - } - - /** - * @deprecated Use {@link ColorMapLoader#loadColorMap(String)} - */ - @Deprecated - public IColorMap buildColorMap(String name) throws VizException { - return ColorMapLoader.loadColorMap(name); - } - /** * @deprecated Use {@link #drawLine(DrawableLine...)} */ diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.satellite/src/gov/noaa/nws/ncep/viz/rsc/satellite/rsc/AbstractSatelliteResource.java b/ncep/gov.noaa.nws.ncep.viz.rsc.satellite/src/gov/noaa/nws/ncep/viz/rsc/satellite/rsc/AbstractSatelliteResource.java index 51525a70ce..0fdc73db6e 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.satellite/src/gov/noaa/nws/ncep/viz/rsc/satellite/rsc/AbstractSatelliteResource.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.satellite/src/gov/noaa/nws/ncep/viz/rsc/satellite/rsc/AbstractSatelliteResource.java @@ -46,6 +46,7 @@ import com.raytheon.uf.common.dataplugin.satellite.units.counts.DerivedWVPixel; import com.raytheon.uf.common.dataplugin.satellite.units.generic.GenericPixel; import com.raytheon.uf.common.dataplugin.satellite.units.goes.PolarPrecipWaterPixel; import com.raytheon.uf.common.dataplugin.satellite.units.water.BlendedTPWPixel; +import com.raytheon.uf.common.derivparam.library.DerivedParameterRequest; import com.raytheon.uf.common.geospatial.ISpatialEnabled; import com.raytheon.uf.common.geospatial.ISpatialObject; import com.raytheon.uf.common.geospatial.MapUtil; @@ -74,7 +75,6 @@ import com.raytheon.uf.viz.core.rsc.LoadProperties; import com.raytheon.uf.viz.core.rsc.ResourceProperties; import com.raytheon.uf.viz.core.rsc.capabilities.ColorMapCapability; import com.raytheon.uf.viz.core.rsc.capabilities.ImagingCapability; -import com.raytheon.uf.common.derivparam.library.DerivedParameterRequest; import com.raytheon.viz.core.gl.IGLTarget; import com.raytheon.viz.core.rsc.hdf5.AbstractTileSet; import com.raytheon.viz.core.rsc.hdf5.FileBasedTileSet; @@ -117,6 +117,9 @@ import com.vividsolutions.jts.geom.Coordinate; * 05/20/2013 862 ghull implement IAreaProviderCapable * Nov 14, 2013 2393 bclement changed how numLevels is calculated for mcidas * 03/12/2014 920 pswamy Implemented changes to fix GINI VIS image display problems. + * 08/07/2014 3492 mapeters Removed IGraphicsTarget.setUseBuiltinColorbar() call from initResource() + * as it had no effect and has been removed from IGraphicsTarget. + * * * * @author chammack @@ -566,8 +569,6 @@ public abstract class AbstractSatelliteResource extends this.viewType = target.getViewType(); this.grphTarget = target; - grphTarget.setUseBuiltinColorbar(false); - // create the colorBar Resource and add it to the resourceList for // this descriptor. cbarRscPair = ResourcePair