Issue #2804 Fixed clipping pane issues where clipped map borders would be visible due to other resources not resetting up the clipping pane when done.
Change-Id: If27cd7c8e11cdc6287303e6d5fc1f4990e300ada Former-commit-id:1854bbb477
[formerly6edfb8965f
[formerlydbcbd1b560
] [formerly1854bbb477
[formerly 51664693bd87df52acdb74d5286b61eeb06b792d]]] Former-commit-id:6edfb8965f
[formerlydbcbd1b560
] Former-commit-id:6edfb8965f
Former-commit-id:4bcdc9f85b
This commit is contained in:
parent
f9a90d4ae9
commit
70fec6a068
14 changed files with 362 additions and 308 deletions
|
@ -66,6 +66,9 @@ import com.raytheon.uf.viz.core.rsc.sampling.SamplingResource;
|
||||||
* Jul 20, 2010 6187 bkowal The alpha level will always be reset for every
|
* Jul 20, 2010 6187 bkowal The alpha level will always be reset for every
|
||||||
* resource when the paint method is called now.
|
* resource when the paint method is called now.
|
||||||
* 06/24/2013 2140 randerso Changed to use standardized paint error handling
|
* 06/24/2013 2140 randerso Changed to use standardized paint error handling
|
||||||
|
* Mar 3, 2014 2804 mschenke Setup display to clip before each resource is
|
||||||
|
* to ensure resources do not affect each other
|
||||||
|
*
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -145,7 +148,6 @@ public class MapRenderableDisplay extends AbstractRenderableDisplay implements
|
||||||
this.mapCenter = descriptor.pixelToWorld(paintProps.getView()
|
this.mapCenter = descriptor.pixelToWorld(paintProps.getView()
|
||||||
.getExtent().getCenter());
|
.getExtent().getCenter());
|
||||||
|
|
||||||
target.setupClippingPlane(getMapExtent());
|
|
||||||
paintProps.setClippingPane(getMapExtent());
|
paintProps.setClippingPane(getMapExtent());
|
||||||
|
|
||||||
int displayWidth = (int) (((MapDescriptor) descriptor).getMapWidth() * zoomLevel);
|
int displayWidth = (int) (((MapDescriptor) descriptor).getMapWidth() * zoomLevel);
|
||||||
|
@ -173,6 +175,7 @@ public class MapRenderableDisplay extends AbstractRenderableDisplay implements
|
||||||
}
|
}
|
||||||
|
|
||||||
paintProps = calcPaintDataTime(paintProps, rsc);
|
paintProps = calcPaintDataTime(paintProps, rsc);
|
||||||
|
target.setupClippingPlane(paintProps.getClippingPane());
|
||||||
paintResource(pair, target, paintProps);
|
paintResource(pair, target, paintProps);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,6 +66,7 @@ import com.vividsolutions.jts.geom.Coordinate;
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Dec 22, 2010 mschenke Initial creation
|
* Dec 22, 2010 mschenke Initial creation
|
||||||
* Jan 31, 2012 14306 kshresth Cursor readout as you sample the dispays
|
* Jan 31, 2012 14306 kshresth Cursor readout as you sample the dispays
|
||||||
|
* Mar 3, 2014 2804 mschenke Set back up clipping pane
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -352,6 +353,8 @@ public class SamplingResource extends
|
||||||
+ e.getLocalizedMessage(), e);
|
+ e.getLocalizedMessage(), e);
|
||||||
}
|
}
|
||||||
errorInHovering = true;
|
errorInHovering = true;
|
||||||
|
} finally {
|
||||||
|
target.setupClippingPlane(paintProps.getClippingPane());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@ import javax.xml.bind.annotation.XmlElement;
|
||||||
import com.raytheon.uf.common.time.DataTime;
|
import com.raytheon.uf.common.time.DataTime;
|
||||||
import com.raytheon.uf.viz.core.drawables.IDescriptor;
|
import com.raytheon.uf.viz.core.drawables.IDescriptor;
|
||||||
import com.raytheon.uf.viz.core.exception.VizException;
|
import com.raytheon.uf.viz.core.exception.VizException;
|
||||||
|
import com.raytheon.uf.viz.core.rsc.IResourceDataChanged.ChangeType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A base implementation of resource data and metadata. This class is used by
|
* A base implementation of resource data and metadata. This class is used by
|
||||||
|
@ -112,7 +113,10 @@ public abstract class AbstractResourceData {
|
||||||
*
|
*
|
||||||
* This class is typically implemented and provides any transformations
|
* This class is typically implemented and provides any transformations
|
||||||
* necessary to go between the raw data form and the input of the renderable
|
* necessary to go between the raw data form and the input of the renderable
|
||||||
* AbstractVizResource.
|
* AbstractVizResource. Default calls
|
||||||
|
* {@link #fireChangeListeners(com.raytheon.uf.viz.core.rsc.IResourceDataChanged.ChangeType, Object)}
|
||||||
|
* with {@link ChangeType#DATA_UPDATE} and the updateData with no
|
||||||
|
* transformations
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @param updateData
|
* @param updateData
|
||||||
|
|
|
@ -174,6 +174,7 @@ import com.vividsolutions.jts.geom.Point;
|
||||||
* Jul 17, 2013 2197 njensen Improved speed of getName()
|
* Jul 17, 2013 2197 njensen Improved speed of getName()
|
||||||
* Oct 18, 2013 DR 16151 gzhang Used getAverageValue() for QPF Graph.
|
* Oct 18, 2013 DR 16151 gzhang Used getAverageValue() for QPF Graph.
|
||||||
* Feb 19, 2014 2819 randerso Removed unnecessary .clone() call
|
* Feb 19, 2014 2819 randerso Removed unnecessary .clone() call
|
||||||
|
* Mar 3, 2014 2804 mschenke Set back up clipping pane
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -1211,198 +1212,208 @@ public class FFMPResource extends
|
||||||
}
|
}
|
||||||
|
|
||||||
aTarget.clearClippingPlane();
|
aTarget.clearClippingPlane();
|
||||||
|
try {
|
||||||
|
|
||||||
paintTime = paintProps.getDataTime();
|
paintTime = paintProps.getDataTime();
|
||||||
paintProps.setAlpha(getCapability(ImagingCapability.class).getAlpha());
|
paintProps.setAlpha(getCapability(ImagingCapability.class)
|
||||||
|
.getAlpha());
|
||||||
|
|
||||||
FFMPDrawable drawable = null;
|
FFMPDrawable drawable = null;
|
||||||
|
|
||||||
if (paintTime != null) {
|
if (paintTime != null) {
|
||||||
if (!drawables.containsKey(paintTime)) {
|
if (!drawables.containsKey(paintTime)) {
|
||||||
|
|
||||||
drawable = new FFMPDrawable(getDomains());
|
drawable = new FFMPDrawable(getDomains());
|
||||||
drawables.put(paintTime, drawable);
|
drawables.put(paintTime, drawable);
|
||||||
} else {
|
} else {
|
||||||
// we found it!
|
// we found it!
|
||||||
drawable = drawables.get(paintTime);
|
drawable = drawables.get(paintTime);
|
||||||
// System.out.println("Found the drawable");
|
// System.out.println("Found the drawable");
|
||||||
|
|
||||||
if (!paintTime.equals(drawable.getTime())) {
|
if (!paintTime.equals(drawable.getTime())) {
|
||||||
drawable.setDirty(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
// auto refresh state
|
|
||||||
if (isQuery) {
|
|
||||||
drawable.setDirty(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (getResourceData().tableLoad
|
|
||||||
&& !paintTime.getRefTime().equals(getMostRecentTime())) {
|
|
||||||
setMostRecentTime(paintTime.getRefTime());
|
|
||||||
setTableTime();
|
|
||||||
// if (isLinkToFrame && loader != null && loader.loadType !=
|
|
||||||
// LOADER_TYPE.GENERAL) {
|
|
||||||
if (isLinkToFrame) {
|
|
||||||
updateDialog();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
getResourceData().getMonitor().forceKillFFMPSplash();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((drawable != null) && drawable.isDirty()) {
|
|
||||||
// only need to do the query if extent changed, pfafs may be
|
|
||||||
// fine
|
|
||||||
if (!isFirst || (queryJob.getState() == Job.NONE)) {
|
|
||||||
queryJob.request(aTarget, drawable, paintTime);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((drawable != null) && isFfmpDataToggle()) {
|
|
||||||
IColormapShadedShapeExtension ext = aTarget
|
|
||||||
.getExtension(IColormapShadedShapeExtension.class);
|
|
||||||
ImagingCapability imageCap = getCapability(ImagingCapability.class);
|
|
||||||
float brightness = imageCap.getBrightness();
|
|
||||||
float alpha = imageCap.getAlpha();
|
|
||||||
for (DomainXML domain : getDomains()) {
|
|
||||||
String cwa = domain.getCwa();
|
|
||||||
IColormapShadedShape shape = shadedShapes.getDrawableShape(cwa,
|
|
||||||
drawable.getShadedHuc());
|
|
||||||
Map<Object, RGB> colorMap = drawable.getColorMap(cwa);
|
|
||||||
if ((shape != null) && (colorMap != null)) {
|
|
||||||
ext.drawColormapShadedShape(shape, colorMap, alpha,
|
|
||||||
brightness);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean isAllHuc = getHuc().equals(FFMPRecord.ALL);
|
|
||||||
if (getResourceData().tableLoad) {
|
|
||||||
|
|
||||||
int mapWidth = getDescriptor().getMapWidth() / 1000;
|
|
||||||
double zoom = getDescriptor().getRenderableDisplay().getZoom();
|
|
||||||
|
|
||||||
// determine whether or not to draw the small guys
|
|
||||||
if ((mapWidth * zoom) > 250.0) {
|
|
||||||
if (isSmallBasins) {
|
|
||||||
isSmallBasins = false;
|
|
||||||
refresh();
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if ((mapWidth * zoom) < 250.0) {
|
|
||||||
if (!isSmallBasins) {
|
|
||||||
isSmallBasins = true;
|
|
||||||
if (smallBasinOverlayShape == null) {
|
|
||||||
drawable.setDirty(true);
|
drawable.setDirty(true);
|
||||||
} else {
|
}
|
||||||
|
|
||||||
|
// auto refresh state
|
||||||
|
if (isQuery) {
|
||||||
|
drawable.setDirty(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (getResourceData().tableLoad
|
||||||
|
&& !paintTime.getRefTime().equals(getMostRecentTime())) {
|
||||||
|
setMostRecentTime(paintTime.getRefTime());
|
||||||
|
setTableTime();
|
||||||
|
// if (isLinkToFrame && loader != null && loader.loadType !=
|
||||||
|
// LOADER_TYPE.GENERAL) {
|
||||||
|
if (isLinkToFrame) {
|
||||||
|
updateDialog();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
getResourceData().getMonitor().forceKillFFMPSplash();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((drawable != null) && drawable.isDirty()) {
|
||||||
|
// only need to do the query if extent changed, pfafs may be
|
||||||
|
// fine
|
||||||
|
if (!isFirst || (queryJob.getState() == Job.NONE)) {
|
||||||
|
queryJob.request(aTarget, drawable, paintTime);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((drawable != null) && isFfmpDataToggle()) {
|
||||||
|
IColormapShadedShapeExtension ext = aTarget
|
||||||
|
.getExtension(IColormapShadedShapeExtension.class);
|
||||||
|
ImagingCapability imageCap = getCapability(ImagingCapability.class);
|
||||||
|
float brightness = imageCap.getBrightness();
|
||||||
|
float alpha = imageCap.getAlpha();
|
||||||
|
for (DomainXML domain : getDomains()) {
|
||||||
|
String cwa = domain.getCwa();
|
||||||
|
IColormapShadedShape shape = shadedShapes.getDrawableShape(
|
||||||
|
cwa, drawable.getShadedHuc());
|
||||||
|
Map<Object, RGB> colorMap = drawable.getColorMap(cwa);
|
||||||
|
if ((shape != null) && (colorMap != null)) {
|
||||||
|
ext.drawColormapShadedShape(shape, colorMap, alpha,
|
||||||
|
brightness);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean isAllHuc = getHuc().equals(FFMPRecord.ALL);
|
||||||
|
if (getResourceData().tableLoad) {
|
||||||
|
|
||||||
|
int mapWidth = getDescriptor().getMapWidth() / 1000;
|
||||||
|
double zoom = getDescriptor().getRenderableDisplay().getZoom();
|
||||||
|
|
||||||
|
// determine whether or not to draw the small guys
|
||||||
|
if ((mapWidth * zoom) > 250.0) {
|
||||||
|
if (isSmallBasins) {
|
||||||
|
isSmallBasins = false;
|
||||||
refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isSmallBasins && this.isBasinToggle()) {
|
} else if ((mapWidth * zoom) < 250.0) {
|
||||||
OutlineCapability lineCap = getCapability(OutlineCapability.class);
|
if (!isSmallBasins) {
|
||||||
if ((smallBasinOverlayShape != null)
|
isSmallBasins = true;
|
||||||
&& smallBasinOverlayShape.isDrawable()) {
|
if (smallBasinOverlayShape == null) {
|
||||||
|
drawable.setDirty(true);
|
||||||
if (basinBoundaryColor == null) {
|
} else {
|
||||||
basinBoundaryColor = getCapability(
|
refresh();
|
||||||
ColorableCapability.class).getColor();
|
|
||||||
}
|
|
||||||
|
|
||||||
aTarget.drawWireframeShape(smallBasinOverlayShape,
|
|
||||||
basinBoundaryColor, lineCap.getOutlineWidth(),
|
|
||||||
lineCap.getLineStyle());
|
|
||||||
} else if ((smallBasinOverlayShape == null)
|
|
||||||
&& lineCap.isOutlineOn()) {
|
|
||||||
issueRefresh();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// the product string
|
|
||||||
if (isFfmpDataToggle() && (fieldDescString != null)) {
|
|
||||||
paintProductString(aTarget, paintProps);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// re-centered ?
|
|
||||||
if (centeredAggregationKey != null) {
|
|
||||||
vgbDrawables.clear();
|
|
||||||
// create pixelCoverages for the VGB's
|
|
||||||
if (isAllHuc) {
|
|
||||||
for (DomainXML domain : getDomains()) {
|
|
||||||
for (Long pfaf : monitor.getTemplates(getSiteKey())
|
|
||||||
.getMap(getSiteKey(), domain.getCwa(), getHuc())
|
|
||||||
.keySet()) {
|
|
||||||
List<FFMPVirtualGageBasinMetaData> fvgmdList = monitor
|
|
||||||
.getTemplates(getSiteKey())
|
|
||||||
.getVirtualGageBasinMetaData(getSiteKey(),
|
|
||||||
domain.getCwa(), pfaf);
|
|
||||||
if (fvgmdList != null) {
|
|
||||||
for (FFMPVirtualGageBasinMetaData fvgmd : fvgmdList) {
|
|
||||||
vgbDrawables.put(
|
|
||||||
fvgmd.getLid(),
|
|
||||||
getPixelCoverage(fvgmd.getCoordinate(),
|
|
||||||
paintProps));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
if (lowestCenter == FFMPRecord.ZOOM.AGGREGATE) {
|
if (isSmallBasins && this.isBasinToggle()) {
|
||||||
for (Long pfaf : monitor.getTemplates(getSiteKey())
|
OutlineCapability lineCap = getCapability(OutlineCapability.class);
|
||||||
.getAllAggregatePfafs(centeredAggregationKey,
|
if ((smallBasinOverlayShape != null)
|
||||||
getHuc())) {
|
&& smallBasinOverlayShape.isDrawable()) {
|
||||||
List<FFMPVirtualGageBasinMetaData> fvgmdList = monitor
|
|
||||||
|
if (basinBoundaryColor == null) {
|
||||||
|
basinBoundaryColor = getCapability(
|
||||||
|
ColorableCapability.class).getColor();
|
||||||
|
}
|
||||||
|
|
||||||
|
aTarget.drawWireframeShape(smallBasinOverlayShape,
|
||||||
|
basinBoundaryColor, lineCap.getOutlineWidth(),
|
||||||
|
lineCap.getLineStyle());
|
||||||
|
} else if ((smallBasinOverlayShape == null)
|
||||||
|
&& lineCap.isOutlineOn()) {
|
||||||
|
issueRefresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// the product string
|
||||||
|
if (isFfmpDataToggle() && (fieldDescString != null)) {
|
||||||
|
paintProductString(aTarget, paintProps);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// re-centered ?
|
||||||
|
if (centeredAggregationKey != null) {
|
||||||
|
vgbDrawables.clear();
|
||||||
|
// create pixelCoverages for the VGB's
|
||||||
|
if (isAllHuc) {
|
||||||
|
for (DomainXML domain : getDomains()) {
|
||||||
|
for (Long pfaf : monitor
|
||||||
.getTemplates(getSiteKey())
|
.getTemplates(getSiteKey())
|
||||||
.getVirtualGageBasinMetaData(getSiteKey(),
|
.getMap(getSiteKey(), domain.getCwa(), getHuc())
|
||||||
null, pfaf);
|
.keySet()) {
|
||||||
if (fvgmdList != null) {
|
List<FFMPVirtualGageBasinMetaData> fvgmdList = monitor
|
||||||
for (FFMPVirtualGageBasinMetaData fvgmd : fvgmdList) {
|
.getTemplates(getSiteKey())
|
||||||
vgbDrawables.put(
|
.getVirtualGageBasinMetaData(getSiteKey(),
|
||||||
fvgmd.getLid(),
|
domain.getCwa(), pfaf);
|
||||||
getPixelCoverage(fvgmd.getCoordinate(),
|
if (fvgmdList != null) {
|
||||||
paintProps));
|
for (FFMPVirtualGageBasinMetaData fvgmd : fvgmdList) {
|
||||||
|
vgbDrawables.put(
|
||||||
|
fvgmd.getLid(),
|
||||||
|
getPixelCoverage(
|
||||||
|
fvgmd.getCoordinate(),
|
||||||
|
paintProps));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (DomainXML domain : getDomains()) {
|
if (lowestCenter == FFMPRecord.ZOOM.AGGREGATE) {
|
||||||
for (Entry<String, FFMPVirtualGageBasinMetaData> entry : monitor
|
for (Long pfaf : monitor.getTemplates(getSiteKey())
|
||||||
.getTemplates(getSiteKey())
|
.getAllAggregatePfafs(centeredAggregationKey,
|
||||||
.getVirtualGageBasins(getSiteKey(),
|
getHuc())) {
|
||||||
domain.getCwa()).entrySet()) {
|
List<FFMPVirtualGageBasinMetaData> fvgmdList = monitor
|
||||||
if (entry.getValue() != null) {
|
.getTemplates(getSiteKey())
|
||||||
vgbDrawables.put(
|
.getVirtualGageBasinMetaData(getSiteKey(),
|
||||||
entry.getKey(),
|
null, pfaf);
|
||||||
getPixelCoverage(entry.getValue()
|
if (fvgmdList != null) {
|
||||||
.getCoordinate(), paintProps));
|
for (FFMPVirtualGageBasinMetaData fvgmd : fvgmdList) {
|
||||||
|
vgbDrawables.put(
|
||||||
|
fvgmd.getLid(),
|
||||||
|
getPixelCoverage(
|
||||||
|
fvgmd.getCoordinate(),
|
||||||
|
paintProps));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (DomainXML domain : getDomains()) {
|
||||||
|
for (Entry<String, FFMPVirtualGageBasinMetaData> entry : monitor
|
||||||
|
.getTemplates(getSiteKey())
|
||||||
|
.getVirtualGageBasins(getSiteKey(),
|
||||||
|
domain.getCwa()).entrySet()) {
|
||||||
|
if (entry.getValue() != null) {
|
||||||
|
vgbDrawables.put(
|
||||||
|
entry.getKey(),
|
||||||
|
getPixelCoverage(entry.getValue()
|
||||||
|
.getCoordinate(),
|
||||||
|
paintProps));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
paintCenter(aTarget, paintProps);
|
||||||
|
paintVGBs(aTarget, paintProps);
|
||||||
}
|
}
|
||||||
|
|
||||||
paintCenter(aTarget, paintProps);
|
// draw or clear the colorMap
|
||||||
paintVGBs(aTarget, paintProps);
|
if (!isFfmpDataToggle()) { // clear if ffmpDataToggle is false
|
||||||
}
|
getCapability(ColorMapCapability.class).setColorMapParameters(
|
||||||
|
null);
|
||||||
|
} else if (getColorUtil().getColorMapParameters() != null) {
|
||||||
|
// restore if null
|
||||||
|
getCapability(ColorMapCapability.class).setColorMapParameters(
|
||||||
|
getColorUtil().getColorMapParameters());
|
||||||
|
}
|
||||||
|
|
||||||
// draw or clear the colorMap
|
// draw stream trace?
|
||||||
if (!isFfmpDataToggle()) { // clear if ffmpDataToggle is false
|
if (isShowStream() && isStreamFollow()) {
|
||||||
getCapability(ColorMapCapability.class).setColorMapParameters(null);
|
paintUpAndDownStream(aTarget, paintProps);
|
||||||
} else if (getColorUtil().getColorMapParameters() != null) {
|
}
|
||||||
// restore if null
|
|
||||||
getCapability(ColorMapCapability.class).setColorMapParameters(
|
|
||||||
getColorUtil().getColorMapParameters());
|
|
||||||
}
|
|
||||||
|
|
||||||
// draw stream trace?
|
// always reset
|
||||||
if (isShowStream() && isStreamFollow()) {
|
isQuery = false;
|
||||||
paintUpAndDownStream(aTarget, paintProps);
|
} finally {
|
||||||
|
aTarget.setupClippingPlane(paintProps.getClippingPane());
|
||||||
}
|
}
|
||||||
|
|
||||||
// always reset
|
|
||||||
isQuery = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -84,7 +84,7 @@ import com.vividsolutions.jts.geom.Coordinate;
|
||||||
* D2DTimeMatcher.
|
* D2DTimeMatcher.
|
||||||
* Apr 02, 2013 1731 mpduff Fix problem with DMD updates.
|
* Apr 02, 2013 1731 mpduff Fix problem with DMD updates.
|
||||||
* Apr 22, 2013 1926 njensen Faster rendering
|
* Apr 22, 2013 1926 njensen Faster rendering
|
||||||
*
|
* Mar 3, 2014 2804 mschenke Set back up clipping pane
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author dhladky
|
* @author dhladky
|
||||||
|
@ -246,7 +246,6 @@ public class ScanResource extends
|
||||||
PaintProperties paintProps) throws VizException {
|
PaintProperties paintProps) throws VizException {
|
||||||
getScan().setFrames(paintProps.getFramesInfo().getFrameCount());
|
getScan().setFrames(paintProps.getFramesInfo().getFrameCount());
|
||||||
|
|
||||||
target.setupClippingPlane(paintProps.getClippingPane());
|
|
||||||
this.paintTime = paintProps.getDataTime();
|
this.paintTime = paintProps.getDataTime();
|
||||||
|
|
||||||
if (paintTime != null) {
|
if (paintTime != null) {
|
||||||
|
@ -393,6 +392,7 @@ public class ScanResource extends
|
||||||
} else if (getTable().equals(ScanTables.DMD)) {
|
} else if (getTable().equals(ScanTables.DMD)) {
|
||||||
paintElevationAngle(target, paintProps);
|
paintElevationAngle(target, paintProps);
|
||||||
}
|
}
|
||||||
|
target.setupClippingPlane(paintProps.getClippingPane());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,9 +39,9 @@ import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||||
import com.raytheon.uf.common.status.UFStatus;
|
import com.raytheon.uf.common.status.UFStatus;
|
||||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||||
import com.raytheon.uf.common.style.ParamLevelMatchCriteria;
|
import com.raytheon.uf.common.style.ParamLevelMatchCriteria;
|
||||||
|
import com.raytheon.uf.common.style.StyleException;
|
||||||
import com.raytheon.uf.common.style.StyleManager;
|
import com.raytheon.uf.common.style.StyleManager;
|
||||||
import com.raytheon.uf.common.style.StyleRule;
|
import com.raytheon.uf.common.style.StyleRule;
|
||||||
import com.raytheon.uf.common.style.StyleException;
|
|
||||||
import com.raytheon.uf.common.style.image.ImagePreferences;
|
import com.raytheon.uf.common.style.image.ImagePreferences;
|
||||||
import com.raytheon.uf.common.time.DataTime;
|
import com.raytheon.uf.common.time.DataTime;
|
||||||
import com.raytheon.uf.viz.core.IGraphicsTarget;
|
import com.raytheon.uf.viz.core.IGraphicsTarget;
|
||||||
|
@ -68,8 +68,8 @@ import com.vividsolutions.jts.geom.Coordinate;
|
||||||
*
|
*
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* 11Nov2009 2037 dhladky Initial Creation.
|
* 11Nov2009 2037 dhladky Initial Creation.
|
||||||
*
|
* Mar 3, 2014 2804 mschenke Set back up clipping pane
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author dhladky
|
* @author dhladky
|
||||||
|
@ -196,76 +196,81 @@ public class VILResource extends
|
||||||
PaintProperties paintProps) throws VizException {
|
PaintProperties paintProps) throws VizException {
|
||||||
|
|
||||||
target.clearClippingPlane();
|
target.clearClippingPlane();
|
||||||
this.displayedDataTime = paintProps.getDataTime();
|
try {
|
||||||
|
this.displayedDataTime = paintProps.getDataTime();
|
||||||
|
|
||||||
if (this.font == null) {
|
if (this.font == null) {
|
||||||
this.font = target.initializeFont("Dialog", 11, null);
|
this.font = target.initializeFont("Dialog", 11, null);
|
||||||
}
|
|
||||||
|
|
||||||
// Pull the record out
|
|
||||||
this.record = resourceData.dataObjectMap.get(this.displayedDataTime);
|
|
||||||
|
|
||||||
if (record == null) {
|
|
||||||
// Don't have data for this frame
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
GriddedImageDisplay2 gridDisplay = null;
|
|
||||||
|
|
||||||
if (record.getDataArray() == null) {
|
|
||||||
record = resourceData.populateRecord(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
gridDisplay = griddedDisplayMap.get(displayedDataTime);
|
|
||||||
if (gridDisplay == null) {
|
|
||||||
gridDisplay = new GriddedImageDisplay2(FloatBuffer.wrap(record
|
|
||||||
.getDataArray()), record.getGridGeometry(), this);
|
|
||||||
this.previousDataTime = displayedDataTime;
|
|
||||||
griddedDisplayMap.put(displayedDataTime, gridDisplay);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (record.getDataArray() == null) {
|
|
||||||
// this should never happen, but just to be sure
|
|
||||||
System.err.println("record.getDataArray() returned null");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ColorMapParameters colorMapParameters = getCapability(
|
|
||||||
ColorMapCapability.class).getColorMapParameters();
|
|
||||||
|
|
||||||
if (record != null && init) {
|
|
||||||
// Get default colormap
|
|
||||||
StyleRule sr;
|
|
||||||
try {
|
|
||||||
sr = StyleManager.getInstance().getStyleRule(
|
|
||||||
StyleManager.StyleType.IMAGERY, getMatchCriteria());
|
|
||||||
} catch (StyleException e) {
|
|
||||||
throw new VizException(e.getLocalizedMessage(), e);
|
|
||||||
}
|
}
|
||||||
this.colormapfile = ((ImagePreferences) sr.getPreferences())
|
|
||||||
.getDefaultColormap();
|
|
||||||
|
|
||||||
IColorMap cxml = ColorMapLoader.loadColorMap(colormapfile);
|
// Pull the record out
|
||||||
ColorMap colorMap = new ColorMap(colormapfile, (ColorMap) cxml);
|
this.record = resourceData.dataObjectMap
|
||||||
colorMapParameters.setColorMap(colorMap);
|
.get(this.displayedDataTime);
|
||||||
|
|
||||||
colorMapParameters.setDataMapping(((ImagePreferences) sr
|
if (record == null) {
|
||||||
.getPreferences()).getDataMapping());
|
// Don't have data for this frame
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
vilmax = colorMapParameters
|
GriddedImageDisplay2 gridDisplay = null;
|
||||||
.getDataMapping()
|
|
||||||
.getEntries()
|
|
||||||
.get(colorMapParameters.getDataMapping().getEntries()
|
|
||||||
.size() - 1).getDisplayValue().floatValue();
|
|
||||||
vilmin = colorMapParameters.getDataMapping().getEntries().get(0)
|
|
||||||
.getDisplayValue().floatValue();
|
|
||||||
colorMapParameters.setColorMapMax(vilmax);
|
|
||||||
colorMapParameters.setColorMapMin(vilmin);
|
|
||||||
|
|
||||||
init = false;
|
if (record.getDataArray() == null) {
|
||||||
|
record = resourceData.populateRecord(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
gridDisplay = griddedDisplayMap.get(displayedDataTime);
|
||||||
|
if (gridDisplay == null) {
|
||||||
|
gridDisplay = new GriddedImageDisplay2(FloatBuffer.wrap(record
|
||||||
|
.getDataArray()), record.getGridGeometry(), this);
|
||||||
|
this.previousDataTime = displayedDataTime;
|
||||||
|
griddedDisplayMap.put(displayedDataTime, gridDisplay);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (record.getDataArray() == null) {
|
||||||
|
// this should never happen, but just to be sure
|
||||||
|
System.err.println("record.getDataArray() returned null");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ColorMapParameters colorMapParameters = getCapability(
|
||||||
|
ColorMapCapability.class).getColorMapParameters();
|
||||||
|
|
||||||
|
if (record != null && init) {
|
||||||
|
// Get default colormap
|
||||||
|
StyleRule sr;
|
||||||
|
try {
|
||||||
|
sr = StyleManager.getInstance().getStyleRule(
|
||||||
|
StyleManager.StyleType.IMAGERY, getMatchCriteria());
|
||||||
|
} catch (StyleException e) {
|
||||||
|
throw new VizException(e.getLocalizedMessage(), e);
|
||||||
|
}
|
||||||
|
this.colormapfile = ((ImagePreferences) sr.getPreferences())
|
||||||
|
.getDefaultColormap();
|
||||||
|
|
||||||
|
IColorMap cxml = ColorMapLoader.loadColorMap(colormapfile);
|
||||||
|
ColorMap colorMap = new ColorMap(colormapfile, (ColorMap) cxml);
|
||||||
|
colorMapParameters.setColorMap(colorMap);
|
||||||
|
|
||||||
|
colorMapParameters.setDataMapping(((ImagePreferences) sr
|
||||||
|
.getPreferences()).getDataMapping());
|
||||||
|
|
||||||
|
vilmax = colorMapParameters
|
||||||
|
.getDataMapping()
|
||||||
|
.getEntries()
|
||||||
|
.get(colorMapParameters.getDataMapping().getEntries()
|
||||||
|
.size() - 1).getDisplayValue().floatValue();
|
||||||
|
vilmin = colorMapParameters.getDataMapping().getEntries()
|
||||||
|
.get(0).getDisplayValue().floatValue();
|
||||||
|
colorMapParameters.setColorMapMax(vilmax);
|
||||||
|
colorMapParameters.setColorMapMin(vilmin);
|
||||||
|
|
||||||
|
init = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
gridDisplay.paint(target, paintProps);
|
||||||
|
} finally {
|
||||||
|
target.setupClippingPlane(paintProps.getClippingPane());
|
||||||
}
|
}
|
||||||
|
|
||||||
gridDisplay.paint(target, paintProps);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -72,6 +72,7 @@ import com.vividsolutions.jts.geom.LineString;
|
||||||
* Aug 29, 2013 2281 bsteffen Fix click distance calculations.
|
* Aug 29, 2013 2281 bsteffen Fix click distance calculations.
|
||||||
* Sep 03, 2013 2310 bsteffen Move MouseHandler from ShearAction to
|
* Sep 03, 2013 2310 bsteffen Move MouseHandler from ShearAction to
|
||||||
* ShearLayer.
|
* ShearLayer.
|
||||||
|
* Mar 3, 2014 2804 mschenke Set back up clipping pane
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -167,7 +168,11 @@ public class ShearLayer extends
|
||||||
drawLineString(target, ls, color, IGraphicsTarget.LineStyle.SOLID);
|
drawLineString(target, ls, color, IGraphicsTarget.LineStyle.SOLID);
|
||||||
String label = drawLabeling(target, ls, color, paintProps);
|
String label = drawLabeling(target, ls, color, paintProps);
|
||||||
target.clearClippingPlane();
|
target.clearClippingPlane();
|
||||||
drawUpperLeftCornerLabel(target, paintProps, label);
|
try {
|
||||||
|
drawUpperLeftCornerLabel(target, paintProps, label);
|
||||||
|
} finally {
|
||||||
|
target.setupClippingPlane(paintProps.getClippingPane());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void drawLines(Coordinate[] coors) {
|
public void drawLines(Coordinate[] coors) {
|
||||||
|
@ -227,7 +232,7 @@ public class ShearLayer extends
|
||||||
return coorOnCircle;
|
return coorOnCircle;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void drawBaselineLabel(IGraphicsTarget target,
|
protected void drawBaselineLabel(IGraphicsTarget target,
|
||||||
Coordinate latLong, String label) throws VizException {
|
Coordinate latLong, String label) throws VizException {
|
||||||
|
|
||||||
|
@ -244,7 +249,7 @@ public class ShearLayer extends
|
||||||
ds.horizontalAlignment = HorizontalAlignment.LEFT;
|
ds.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||||
// set the magnification
|
// set the magnification
|
||||||
ds.magnification = this.getCapability(MagnificationCapability.class)
|
ds.magnification = this.getCapability(MagnificationCapability.class)
|
||||||
.getMagnification().floatValue();
|
.getMagnification().floatValue();
|
||||||
target.drawStrings(ds);
|
target.drawStrings(ds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -309,8 +314,7 @@ public class ShearLayer extends
|
||||||
* y location in screen pixels
|
* y location in screen pixels
|
||||||
* @return T Coordinate of the endpoint, null if not found.
|
* @return T Coordinate of the endpoint, null if not found.
|
||||||
*/
|
*/
|
||||||
public Coordinate isInsideEndpoint(int x,
|
public Coordinate isInsideEndpoint(int x, int y) {
|
||||||
int y) {
|
|
||||||
IDisplayPaneContainer container = getResourceContainer();
|
IDisplayPaneContainer container = getResourceContainer();
|
||||||
if (container == null) {
|
if (container == null) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -378,7 +382,7 @@ public class ShearLayer extends
|
||||||
ds.horizontalAlignment = HorizontalAlignment.LEFT;
|
ds.horizontalAlignment = HorizontalAlignment.LEFT;
|
||||||
// set the magnification
|
// set the magnification
|
||||||
ds.magnification = this.getCapability(MagnificationCapability.class)
|
ds.magnification = this.getCapability(MagnificationCapability.class)
|
||||||
.getMagnification().floatValue();
|
.getMagnification().floatValue();
|
||||||
target.drawStrings(ds);
|
target.drawStrings(ds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -425,9 +429,10 @@ public class ShearLayer extends
|
||||||
String separatorSymbol;
|
String separatorSymbol;
|
||||||
|
|
||||||
public VelocityRange(Map<String, Object> map) {
|
public VelocityRange(Map<String, Object> map) {
|
||||||
if (map != null && map.containsKey("Mnemonic")
|
if (map != null
|
||||||
&& (map.containsKey(BASE_VELOCITY_VALUE_KEY) ||
|
&& map.containsKey("Mnemonic")
|
||||||
map.containsKey(VALUE_KEY))) {
|
&& (map.containsKey(BASE_VELOCITY_VALUE_KEY) || map
|
||||||
|
.containsKey(VALUE_KEY))) {
|
||||||
String mnemonic = map.get("Mnemonic").toString();
|
String mnemonic = map.get("Mnemonic").toString();
|
||||||
|
|
||||||
if (mnemonic.equalsIgnoreCase("V")
|
if (mnemonic.equalsIgnoreCase("V")
|
||||||
|
|
|
@ -130,6 +130,7 @@ import com.sun.opengl.util.j2d.TextRenderer;
|
||||||
* May 28, 2013 1638 mschenke Made sure {@link TextStyle#BLANKED} text is drawing correct size
|
* May 28, 2013 1638 mschenke Made sure {@link TextStyle#BLANKED} text is drawing correct size
|
||||||
* box around text
|
* box around text
|
||||||
* Nov 4, 2013 2492 mschenke Switched colormap drawing to use 1D texture object for alpha mask
|
* Nov 4, 2013 2492 mschenke Switched colormap drawing to use 1D texture object for alpha mask
|
||||||
|
* Mar 3, 2014 2804 mschenke Added clipping pane field to only setup if changed
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -250,6 +251,8 @@ public class GLTarget extends AbstractGraphicsTarget implements IGLTarget {
|
||||||
|
|
||||||
protected Rectangle monitorBounds;
|
protected Rectangle monitorBounds;
|
||||||
|
|
||||||
|
protected IExtent clippingPane;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct a GL target using a canvas (inherited from IGraphicsTarget)
|
* Construct a GL target using a canvas (inherited from IGraphicsTarget)
|
||||||
*
|
*
|
||||||
|
@ -406,6 +409,7 @@ public class GLTarget extends AbstractGraphicsTarget implements IGLTarget {
|
||||||
gl.glDisable(GL.GL_CLIP_PLANE1);
|
gl.glDisable(GL.GL_CLIP_PLANE1);
|
||||||
gl.glDisable(GL.GL_CLIP_PLANE2);
|
gl.glDisable(GL.GL_CLIP_PLANE2);
|
||||||
gl.glDisable(GL.GL_CLIP_PLANE3);
|
gl.glDisable(GL.GL_CLIP_PLANE3);
|
||||||
|
this.clippingPane = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1394,9 +1398,19 @@ public class GLTarget extends AbstractGraphicsTarget implements IGLTarget {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setupClippingPlane(IExtent extent) {
|
public void setupClippingPlane(IExtent extent) {
|
||||||
if (extent == null) {
|
if (this.clippingPane == extent
|
||||||
|
|| (this.clippingPane != null && extent != null && this.clippingPane
|
||||||
|
.equals(extent))) {
|
||||||
|
// Clipping pane already set to this
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.clippingPane = extent;
|
||||||
|
if (clippingPane == null) {
|
||||||
|
clearClippingPlane();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Clone to preserve clipping pane extent
|
||||||
|
this.clippingPane = clippingPane.clone();
|
||||||
|
|
||||||
gl.glMatrixMode(GL.GL_MODELVIEW);
|
gl.glMatrixMode(GL.GL_MODELVIEW);
|
||||||
gl.glPushMatrix();
|
gl.glPushMatrix();
|
||||||
|
|
|
@ -35,8 +35,6 @@ import com.raytheon.uf.common.dataplugin.gfe.reference.ReferenceData;
|
||||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||||
import com.raytheon.uf.common.status.UFStatus;
|
import com.raytheon.uf.common.status.UFStatus;
|
||||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||||
import com.raytheon.uf.viz.core.AbstractGraphicsFactoryAdapter;
|
|
||||||
import com.raytheon.uf.viz.core.GraphicsFactory;
|
|
||||||
import com.raytheon.uf.viz.core.IDisplayPane;
|
import com.raytheon.uf.viz.core.IDisplayPane;
|
||||||
import com.raytheon.uf.viz.core.IDisplayPaneContainer;
|
import com.raytheon.uf.viz.core.IDisplayPaneContainer;
|
||||||
import com.raytheon.uf.viz.core.IExtent;
|
import com.raytheon.uf.viz.core.IExtent;
|
||||||
|
@ -103,6 +101,7 @@ import com.raytheon.viz.ui.input.InputAdapter;
|
||||||
* 01/23/2013 #1524 randerso Fix error when clicking on discrete color bar when
|
* 01/23/2013 #1524 randerso Fix error when clicking on discrete color bar when
|
||||||
* no grid exists
|
* no grid exists
|
||||||
* 08/27/2013 #2287 randerso Fixed fitToDataColorTable for Single Grids
|
* 08/27/2013 #2287 randerso Fixed fitToDataColorTable for Single Grids
|
||||||
|
* Mar 3, 2014 #2804 mschenke Set back up clipping pane
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -241,8 +240,6 @@ public class GFEColorbarResource extends
|
||||||
|
|
||||||
protected static RGB seColorBarBgWxPickupColor = new RGB(255, 0, 255);
|
protected static RGB seColorBarBgWxPickupColor = new RGB(255, 0, 255);
|
||||||
|
|
||||||
AbstractGraphicsFactoryAdapter graphicsAdapter = null;
|
|
||||||
|
|
||||||
protected Set<ParmID> fittedParms;
|
protected Set<ParmID> fittedParms;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
@ -430,12 +427,7 @@ public class GFEColorbarResource extends
|
||||||
colorbarDisplay.paint(target, paintProps);
|
colorbarDisplay.paint(target, paintProps);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (graphicsAdapter == null) {
|
target.setupClippingPlane(paintProps.getClippingPane());
|
||||||
graphicsAdapter = GraphicsFactory.getGraphicsAdapter();
|
|
||||||
}
|
|
||||||
|
|
||||||
target.setupClippingPlane(graphicsAdapter.constructExtent(descriptor
|
|
||||||
.getGridGeometry().getGridRange()));
|
|
||||||
|
|
||||||
// this.lastIndex = curIndex;
|
// this.lastIndex = curIndex;
|
||||||
|
|
||||||
|
|
|
@ -61,10 +61,11 @@ import com.raytheon.viz.ui.cmenu.IContextMenuContributor;
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Feb 20, 2009 mpduff Initial creation
|
* Feb 20, 2009 mpduff Initial creation
|
||||||
* Feb 14, 2013 1616 bsteffen Add option for interpolation of colormap
|
* Feb 14, 2013 1616 bsteffen Add option for interpolation of colormap
|
||||||
* parameters, disable colormap interpolation
|
* parameters, disable colormap interpolation
|
||||||
* by default.
|
* by default.
|
||||||
|
* Mar 3, 2014 2804 mschenke Set back up clipping pane
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -156,11 +157,15 @@ public class HydroColorBarResource extends
|
||||||
|
|
||||||
target.clearClippingPlane();
|
target.clearClippingPlane();
|
||||||
|
|
||||||
double yMax = screenExtent.getMaxY();
|
try {
|
||||||
|
double yMax = screenExtent.getMaxY();
|
||||||
|
|
||||||
/* Draw the color bar */
|
/* Draw the color bar */
|
||||||
yMax = drawColorBar(target, screenExtent.getMinX(),
|
yMax = drawColorBar(target, screenExtent.getMinX(),
|
||||||
screenExtent.getMaxX(), yMax);
|
screenExtent.getMaxX(), yMax);
|
||||||
|
} finally {
|
||||||
|
target.setupClippingPlane(paintProps.getClippingPane());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -86,6 +86,7 @@ import com.vividsolutions.jts.index.strtree.STRtree;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Jul 8, 2009 2589 snaples Initial creation
|
* Jul 8, 2009 2589 snaples Initial creation
|
||||||
|
* Mar 3, 2014 2804 mschenke Set back up clipping pane
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -528,6 +529,7 @@ public class PointFreezePlotResource extends
|
||||||
}
|
}
|
||||||
target.clearClippingPlane();
|
target.clearClippingPlane();
|
||||||
drawQCLegend();
|
drawQCLegend();
|
||||||
|
target.setupClippingPlane(paintProps.getClippingPane());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,6 +88,7 @@ import com.vividsolutions.jts.index.strtree.STRtree;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Nov 24, 2008 1748 snaples Initial creation
|
* Nov 24, 2008 1748 snaples Initial creation
|
||||||
|
* Mar 3, 2014 2804 mschenke Set back up clipping pane
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -761,6 +762,7 @@ public class PointPrecipPlotResource extends
|
||||||
}
|
}
|
||||||
target.clearClippingPlane();
|
target.clearClippingPlane();
|
||||||
drawQCLegend();
|
drawQCLegend();
|
||||||
|
target.setupClippingPlane(paintProps.getClippingPane());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,6 +87,7 @@ import com.vividsolutions.jts.index.strtree.STRtree;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Jun 24, 2009 2524 snaples Initial creation
|
* Jun 24, 2009 2524 snaples Initial creation
|
||||||
|
* Mar 3, 2014 2804 mschenke Set back up clipping pane
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -602,6 +603,7 @@ public class PointTempPlotResource extends
|
||||||
}
|
}
|
||||||
target.clearClippingPlane();
|
target.clearClippingPlane();
|
||||||
drawQCLegend();
|
drawQCLegend();
|
||||||
|
target.setupClippingPlane(paintProps.getClippingPane());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,11 +43,11 @@ import com.raytheon.uf.viz.core.rsc.capabilities.ColorableCapability;
|
||||||
import com.raytheon.uf.viz.core.rsc.capabilities.IMiddleClickCapableResource;
|
import com.raytheon.uf.viz.core.rsc.capabilities.IMiddleClickCapableResource;
|
||||||
import com.raytheon.uf.viz.core.rsc.capabilities.MagnificationCapability;
|
import com.raytheon.uf.viz.core.rsc.capabilities.MagnificationCapability;
|
||||||
import com.raytheon.viz.radar.IRadarConfigListener;
|
import com.raytheon.viz.radar.IRadarConfigListener;
|
||||||
|
import com.raytheon.viz.radar.VizRadarRecord;
|
||||||
import com.raytheon.viz.radar.interrogators.IRadarInterrogator;
|
import com.raytheon.viz.radar.interrogators.IRadarInterrogator;
|
||||||
import com.raytheon.viz.radar.rsc.AbstractRadarResource;
|
import com.raytheon.viz.radar.rsc.AbstractRadarResource;
|
||||||
import com.raytheon.viz.radar.rsc.RadarResourceData;
|
import com.raytheon.viz.radar.rsc.RadarResourceData;
|
||||||
import com.raytheon.viz.radar.ui.RadarDisplayManager;
|
import com.raytheon.viz.radar.ui.RadarDisplayManager;
|
||||||
import com.raytheon.viz.radar.VizRadarRecord;
|
|
||||||
import com.vividsolutions.jts.geom.Coordinate;
|
import com.vividsolutions.jts.geom.Coordinate;
|
||||||
import com.vividsolutions.jts.geom.Envelope;
|
import com.vividsolutions.jts.geom.Envelope;
|
||||||
|
|
||||||
|
@ -62,7 +62,8 @@ import com.vividsolutions.jts.geom.Envelope;
|
||||||
* May 13, 2010 mnash Initial creation
|
* May 13, 2010 mnash Initial creation
|
||||||
* Jul 20, 2010 #6187 bkowal The cache will be cleared out every time
|
* Jul 20, 2010 #6187 bkowal The cache will be cleared out every time
|
||||||
* a refresh is required.
|
* a refresh is required.
|
||||||
* 03/05/2013 DCS51 zwang Handle GFM product
|
* 03/05/2013 DCS51 zwang Handle GFM product
|
||||||
|
* Mar 3, 2014 2804 mschenke Set back up clipping pane
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -164,14 +165,14 @@ public class RadarGraphicsResource extends AbstractRadarResource<MapDescriptor>
|
||||||
@Override
|
@Override
|
||||||
public String[] getUpperText(DataTime time) {
|
public String[] getUpperText(DataTime time) {
|
||||||
|
|
||||||
VizRadarRecord record = getRadarRecord(time);
|
VizRadarRecord record = getRadarRecord(time);
|
||||||
|
|
||||||
// Use upper text to display gfmCount for GFM (140)
|
// Use upper text to display gfmCount for GFM (140)
|
||||||
if (record != null && record.getProductCode() == 140) {
|
if (record != null && record.getProductCode() == 140) {
|
||||||
return super.getUpperText(time);
|
return super.getUpperText(time);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Upper text would interfere with the table
|
// Upper text would interfere with the table
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,48 +224,53 @@ public class RadarGraphicsResource extends AbstractRadarResource<MapDescriptor>
|
||||||
// DMD specify
|
// DMD specify
|
||||||
if (radarRecord.getProductCode() == 149) {
|
if (radarRecord.getProductCode() == 149) {
|
||||||
target.clearClippingPlane();
|
target.clearClippingPlane();
|
||||||
int xPos = 95;
|
try {
|
||||||
int yPos = 10;
|
int xPos = 95;
|
||||||
xPos = paintProps.getCanvasBounds().x
|
int yPos = 10;
|
||||||
+ paintProps.getCanvasBounds().width - xPos;
|
xPos = paintProps.getCanvasBounds().x
|
||||||
|
+ paintProps.getCanvasBounds().width - xPos;
|
||||||
|
|
||||||
// Get the Lat/Lon of the screen Extent
|
// Get the Lat/Lon of the screen Extent
|
||||||
Envelope screenLatLon = descriptor.pixelToWorld(paintProps
|
Envelope screenLatLon = descriptor.pixelToWorld(paintProps
|
||||||
.getView().getExtent());
|
.getView().getExtent());
|
||||||
|
|
||||||
int offScreenCount = 0;
|
int offScreenCount = 0;
|
||||||
int filteredCount = 0;
|
int filteredCount = 0;
|
||||||
Coordinate currFeature;
|
Coordinate currFeature;
|
||||||
for (RadarDataKey currPt : radarRecord.getSymbologyData().keySet()) {
|
for (RadarDataKey currPt : radarRecord.getSymbologyData()
|
||||||
currFeature = new Coordinate(currPt.getLon(), currPt.getLat());
|
.keySet()) {
|
||||||
|
currFeature = new Coordinate(currPt.getLon(),
|
||||||
|
currPt.getLat());
|
||||||
|
|
||||||
if (!screenLatLon.contains(currFeature)) {
|
if (!screenLatLon.contains(currFeature)) {
|
||||||
// Count how many are not on the screen
|
// Count how many are not on the screen
|
||||||
offScreenCount++;
|
offScreenCount++;
|
||||||
} else if (!radarRecord.getSymbologyData().get(currPt)
|
} else if (!radarRecord.getSymbologyData().get(currPt)
|
||||||
.isVisible()) {
|
.isVisible()) {
|
||||||
// Count how many are not visible, that would be on the
|
// Count how many are not visible, that would be on the
|
||||||
// screen
|
// screen
|
||||||
filteredCount++;
|
filteredCount++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DrawableString offscreen = new DrawableString(offScreenCount
|
||||||
|
+ " FEATURES OFF SCREEN", this.getCapability(
|
||||||
|
ColorableCapability.class).getColor());
|
||||||
|
offscreen.setCoordinates(xPos, yPos);
|
||||||
|
offscreen.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||||
|
offscreen.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||||
|
|
||||||
|
DrawableString notShown = new DrawableString(filteredCount
|
||||||
|
+ " FEATURES NOT SHOWN", this.getCapability(
|
||||||
|
ColorableCapability.class).getColor());
|
||||||
|
notShown.setCoordinates(xPos, yPos + 20);
|
||||||
|
notShown.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||||
|
notShown.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||||
|
target.getExtension(ICanvasRenderingExtension.class)
|
||||||
|
.drawStrings(paintProps, offscreen, notShown);
|
||||||
|
} finally {
|
||||||
|
target.setupClippingPlane(paintProps.getClippingPane());
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawableString offscreen = new DrawableString(offScreenCount
|
|
||||||
+ " FEATURES OFF SCREEN", this.getCapability(
|
|
||||||
ColorableCapability.class).getColor());
|
|
||||||
offscreen.setCoordinates(xPos, yPos);
|
|
||||||
offscreen.horizontalAlignment = HorizontalAlignment.CENTER;
|
|
||||||
offscreen.verticallAlignment = VerticalAlignment.MIDDLE;
|
|
||||||
|
|
||||||
DrawableString notShown = new DrawableString(filteredCount
|
|
||||||
+ " FEATURES NOT SHOWN", this.getCapability(
|
|
||||||
ColorableCapability.class).getColor());
|
|
||||||
notShown.setCoordinates(xPos, yPos + 20);
|
|
||||||
notShown.horizontalAlignment = HorizontalAlignment.CENTER;
|
|
||||||
notShown.verticallAlignment = VerticalAlignment.MIDDLE;
|
|
||||||
target.getExtension(ICanvasRenderingExtension.class).drawStrings(
|
|
||||||
paintProps, offscreen, notShown);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue