Issue #2903 prevent shared display crash from missing point style enum value
Change-Id: I9d3faccba56c2832c5dcc185c6c20bcce396b173 Former-commit-id:5a4f4319b8
[formerlyccac7c3d47
] [formerlyb8a0a60df6
] [formerlyb8a0a60df6
[formerly9946f78241
]] [formerly5a4f4319b8
[formerlyccac7c3d47
] [formerlyb8a0a60df6
] [formerlyb8a0a60df6
[formerly9946f78241
]] [formerly5d03048fff
[formerlyb8a0a60df6
[formerly9946f78241
] [formerly5d03048fff
[formerly 5d298b39786d37aa365ccfe2c337214d1e46f1a9]]]]] Former-commit-id:5d03048fff
Former-commit-id:e29cc654c7
[formerly424e910953
] [formerlydbe778cbe0
] [formerly 0382c1ffb8e900a6ac7630dbecdc308015b20081 [formerly e21697c67a7f70581429d5de01d62bdd8589e8e9] [formerlydbe778cbe0
[formerly59d92634b0
]]] Former-commit-id: a09002483a7bf56dcde45daa8700170c19d96a78 [formerly 7a2a949eba2c4f80c7fff71719a70d5f4ae9e7ec] [formerlyed95461c36
[formerly48e634b14a
]] Former-commit-id:ed95461c36
Former-commit-id:d75be4a64c
This commit is contained in:
parent
d64286b3b0
commit
d48875043d
4 changed files with 54 additions and 1 deletions
|
@ -67,6 +67,7 @@ import com.raytheon.uf.viz.core.exception.VizException;
|
|||
* Jun 25, 2012 bsteffen Initial creation
|
||||
* Jul 18, 2013 2189 mschenke Added ability to specify font type
|
||||
* Apr 04, 2014 2920 bsteffen Allow strings to use mulitple styles.
|
||||
* Jun 17, 2014 2903 bclement added PIPE to PointStyle
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -373,6 +374,9 @@ public abstract class AbstractGraphicsTarget implements IGraphicsTarget {
|
|||
case X:
|
||||
text = "x";
|
||||
break;
|
||||
case PIPE:
|
||||
text = "|";
|
||||
break;
|
||||
case NONE:
|
||||
default:
|
||||
return;
|
||||
|
|
|
@ -62,6 +62,7 @@ import com.raytheon.uf.viz.core.exception.VizException;
|
|||
* Feature Following Zoom Tool at this time.
|
||||
* Jul 18, 2013 2189 mschenke Added ability to specify font type
|
||||
* Apr 04, 2014 2920 bsteffen Allow strings to use mulitple styles.
|
||||
* Jun 17, 2014 2903 bclement added PIPE to PointStyle
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -187,7 +188,7 @@ public interface IGraphicsTarget extends IImagingExtension {
|
|||
}
|
||||
|
||||
public static enum PointStyle {
|
||||
NONE, POINT, CROSS, X, STAR, CIRCLE, DISC, BOX, SQUARE, DASH
|
||||
NONE, POINT, CROSS, X, STAR, CIRCLE, DISC, BOX, SQUARE, DASH, PIPE
|
||||
}
|
||||
|
||||
/** Defines the raster mode */
|
||||
|
|
|
@ -145,6 +145,7 @@ import com.sun.opengl.util.j2d.TextRenderer;
|
|||
* Apr 04, 2014 2920 bsteffen Allow strings to use mulitple styles.
|
||||
* Apr 08, 2014 2950 bsteffen Reduce oversized colormaps.
|
||||
* May 08, 2014 2920 bsteffen Fix default color of BOXED text.
|
||||
* Jun 17, 2014 2903 bclement added PIPE to PointStyle
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -2262,6 +2263,7 @@ public class GLTarget extends AbstractGraphicsTarget implements IGLTarget {
|
|||
int pointsPerLocation = 1;
|
||||
int geomType = GL.GL_LINES;
|
||||
switch (pointStyle) {
|
||||
case PIPE:
|
||||
case POINT:
|
||||
case DASH: {
|
||||
pointsPerLocation = 2;
|
||||
|
@ -2359,6 +2361,9 @@ public class GLTarget extends AbstractGraphicsTarget implements IGLTarget {
|
|||
y + yTick, x + xTick, y - yTick, x - xTick,
|
||||
y - yTick });
|
||||
break;
|
||||
case PIPE:
|
||||
buf.put(new float[] { x, y - yTick, x, y + yTick });
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/**
|
||||
* 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.viz.ui.cmenu;
|
||||
|
||||
import org.eclipse.jface.action.Action;
|
||||
|
@ -16,6 +35,22 @@ import com.raytheon.uf.viz.core.IGraphicsTarget.PointStyle;
|
|||
import com.raytheon.uf.viz.core.rsc.AbstractVizResource;
|
||||
import com.raytheon.uf.viz.core.rsc.capabilities.PointCapability;
|
||||
|
||||
/**
|
||||
* Action to change point rendering style on the map
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* ??? ??? Initial Creation
|
||||
* Jun 17, 2014 2903 bclement added PIPE to PointStyle
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @version 1.0
|
||||
*/
|
||||
public class ChangePointStyleAction extends AbstractRightClickAction implements
|
||||
IMenuCreator {
|
||||
|
||||
|
@ -173,6 +208,14 @@ public class ChangePointStyleAction extends AbstractRightClickAction implements
|
|||
gc.fillOval(x - xTick, y - yTick, xTick * 2 + 1, yTick * 2 + 1);
|
||||
break;
|
||||
|
||||
case PIPE:
|
||||
gc.drawLine(x, y - yTick, x, y + yTick);
|
||||
break;
|
||||
|
||||
case DASH:
|
||||
gc.drawLine(x - xTick, y, x + xTick, y);
|
||||
break;
|
||||
|
||||
case NONE:
|
||||
default:
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue