Merge "Omaha #3412 Replace drawCircle calls" into omaha_14.4.1
Former-commit-id:f8ef711068
[formerly4633cc855f
] [formerlyc47892bf95
] [formerlyf8ef711068
[formerly4633cc855f
] [formerlyc47892bf95
] [formerly25c79387ca
[formerlyc47892bf95
[formerly 61846ea9ec93ae255bdc4be7332a63252012aa9f]]]] Former-commit-id:25c79387ca
Former-commit-id:23cb97ae73
[formerly0274bcd3c1
] [formerly cd7e3f89f151fb29aec1b298b2be85d8443af8c5 [formerly56d62848c6
]] Former-commit-id: e027b702b70456c021232ef759f69046f13f1dcb [formerly40ea1b75a3
] Former-commit-id:e63c0a840e
This commit is contained in:
commit
3cac76ef11
4 changed files with 36 additions and 14 deletions
|
@ -28,6 +28,8 @@ import org.eclipse.jface.action.IMenuManager;
|
|||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.geotools.referencing.GeodeticCalculator;
|
||||
|
||||
import com.raytheon.uf.viz.core.DrawableBasics;
|
||||
import com.raytheon.uf.viz.core.DrawableCircle;
|
||||
import com.raytheon.uf.viz.core.IDisplayPaneContainer;
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget;
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget.HorizontalAlignment;
|
||||
|
@ -77,7 +79,7 @@ import com.vividsolutions.jts.geom.LineSegment;
|
|||
* 06-09-10 #5620 bkowal The tool will load in an editable state by
|
||||
* default now.
|
||||
* 15Mar2013 15693 mgamazaychikov Added magnification capability.
|
||||
*
|
||||
* 07-21-14 #3412 mapeters Updated deprecated drawCircle call.
|
||||
* </pre>
|
||||
*
|
||||
* @author ebabin
|
||||
|
@ -161,12 +163,17 @@ public class DistanceBearingToolLayer extends
|
|||
Coordinate[] ends = { line.p0, line.p1 };
|
||||
wireframeShape.addLineSegment(ends);
|
||||
if (isEditable()) {
|
||||
for (Coordinate vertex : ends) {
|
||||
DrawableCircle circle0 = new DrawableCircle();
|
||||
DrawableCircle circle1 = new DrawableCircle();
|
||||
DrawableCircle[] circles = new DrawableCircle[] { circle0, circle1 };
|
||||
for (int i = 0; i <= 1; i++) {
|
||||
double[] center = descriptor.worldToPixel(new double[] {
|
||||
vertex.x, vertex.y });
|
||||
target.drawCircle(center[0], center[1], 0.0, radius, color, 1);
|
||||
|
||||
ends[i].x, ends[i].y });
|
||||
circles[i].radius = radius;
|
||||
circles[i].basics.color = color;
|
||||
circles[i].setCoordinates(center[0], center[1]);
|
||||
}
|
||||
target.drawCircle(circles);
|
||||
}
|
||||
String label = computeRangeAndAzimuth(line);
|
||||
// set font for magnification capability
|
||||
|
|
|
@ -26,6 +26,7 @@ import java.util.Arrays;
|
|||
import org.eclipse.jface.action.IMenuManager;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
|
||||
import com.raytheon.uf.viz.core.DrawableCircle;
|
||||
import com.raytheon.uf.viz.core.IDisplayPaneContainer;
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget;
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget.HorizontalAlignment;
|
||||
|
@ -53,8 +54,8 @@ import com.vividsolutions.jts.geom.Envelope;
|
|||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
*
|
||||
*
|
||||
* bsteffen Intial creation.
|
||||
* 07-21-14 #3412 mapeters Updated deprecated drawCircle call.
|
||||
* </pre>
|
||||
*
|
||||
* @author bsteffen
|
||||
|
@ -165,7 +166,11 @@ public class LapsToolLayer extends AbstractMovableToolLayer<Coordinate>
|
|||
double radius = (MAGIC_CIRCLE_RADIUS * paintProps.getZoomLevel());
|
||||
double[] center = descriptor
|
||||
.worldToPixel(new double[] { home.x, home.y });
|
||||
target.drawCircle(center[0], center[1], 0, radius, color, 1);
|
||||
DrawableCircle circle = new DrawableCircle();
|
||||
circle.setCoordinates(center[0], center[1]);
|
||||
circle.radius = radius;
|
||||
circle.basics.color = color;
|
||||
target.drawCircle(circle);
|
||||
double labelLoc[] = target.getPointOnCircle(center[0], center[1], 0.0,
|
||||
radius, 0);
|
||||
target.drawString(null, "center point", labelLoc[0], labelLoc[1], 0.0,
|
||||
|
|
|
@ -35,6 +35,7 @@ import org.geotools.referencing.GeodeticCalculator;
|
|||
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.uf.viz.core.DrawableCircle;
|
||||
import com.raytheon.uf.viz.core.IDisplayPaneContainer;
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget;
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget.HorizontalAlignment;
|
||||
|
@ -67,7 +68,7 @@ import com.vividsolutions.jts.geom.GeometryFactory;
|
|||
import com.vividsolutions.jts.geom.Point;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Layer for displaying a radar's range rings.
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
|
@ -75,7 +76,7 @@ import com.vividsolutions.jts.geom.Point;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* 10-21-09 #717 bsteffen Refactor to common MovableTool model
|
||||
* 15Mar2013 15693 mgamazaychikov Added magnification capability.
|
||||
*
|
||||
* 07-21-14 #3412 mapeters Updated deprecated drawCircle call.
|
||||
* </pre>
|
||||
*
|
||||
* @author ebabin
|
||||
|
@ -225,8 +226,12 @@ public class RangeRingsLayer extends AbstractMovableToolLayer<RangeRing>
|
|||
double radius = (MAGIC_CIRCLE_RADIUS * paintProps.getZoomLevel());
|
||||
double[] centerPixel = descriptor.worldToPixel(new double[] {
|
||||
center.x, center.y });
|
||||
target.drawCircle(centerPixel[0], centerPixel[1], 0.0, radius,
|
||||
color, 1);
|
||||
DrawableCircle circle = new DrawableCircle();
|
||||
circle.setCoordinates(centerPixel[0], centerPixel[1]);
|
||||
circle.radius = radius;
|
||||
circle.basics.color = color;
|
||||
target.drawCircle(circle);
|
||||
|
||||
if (label.contains("C")) {
|
||||
double labelLoc[] = target.getPointOnCircle(centerPixel[0],
|
||||
centerPixel[1], 0.0, radius, 0);
|
||||
|
|
|
@ -26,6 +26,7 @@ import java.util.List;
|
|||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.eclipse.swt.graphics.Rectangle;
|
||||
|
||||
import com.raytheon.uf.viz.core.DrawableCircle;
|
||||
import com.raytheon.uf.viz.core.IExtent;
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget;
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget.HorizontalAlignment;
|
||||
|
@ -56,7 +57,7 @@ import com.raytheon.viz.radar.ui.xy.RadarGraphResource.GraphPosition;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 8, 2009 askripsk Initial creation
|
||||
*
|
||||
* 07-21-14 #3412 mapeters Updated deprecated drawCircle call.
|
||||
* </pre>
|
||||
*
|
||||
* @author askripsk
|
||||
|
@ -158,7 +159,11 @@ public class CellTrendGraph extends XYGraph {
|
|||
private void drawPoint(IGraphicsTarget target, double x, double y,
|
||||
PointType currPointType) throws VizException {
|
||||
if (currPointType.equals(PointType.CIRCLE)) {
|
||||
target.drawCircle(x, y, 0, 3, colorCap.getColor(), 1);
|
||||
DrawableCircle circle = new DrawableCircle();
|
||||
circle.setCoordinates(x, y);
|
||||
circle.radius = 3.0;
|
||||
circle.basics.color = colorCap.getColor();
|
||||
target.drawCircle(circle);
|
||||
} else if (currPointType.equals(PointType.X)) {
|
||||
target.drawLine(x - 3, y - 3, 0.0, x + 3, y + 3, 0.0, colorCap
|
||||
.getColor(), 1.0f);
|
||||
|
|
Loading…
Add table
Reference in a new issue