Merge pull request #462 from srcarter3/unidata_18.2.1
Changes to the WWA layers
This commit is contained in:
commit
7f8f0b4f41
4 changed files with 292 additions and 99 deletions
|
@ -96,6 +96,7 @@ import com.vividsolutions.jts.geom.prep.PreparedGeometryFactory;
|
|||
* Aug 22, 2016 5842 dgilling Remove dependency on viz.texteditor plugin.
|
||||
* Dec 19, 2018 ---- mjames@ucar Added phensig color table lookup.
|
||||
* Mar 15, 2022 srcarter@ucar Add support for display settings for outline, fill, text and time displays
|
||||
* Jun 24, 2022 srcarter@ucar Add 'statement/other' display settings, set enabled for only relevant WWA types
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -161,6 +162,14 @@ public abstract class AbstractWWAResource extends
|
|||
public static final boolean ADV_TEXT_DEFAULT = true;
|
||||
/** Whether to display advisory time by default */
|
||||
public static final boolean ADV_TIME_DEFAULT = true;
|
||||
/** Whether to display statements/other outlines by default */
|
||||
public static final boolean OTHER_OUTLINE_DEFAULT = true;
|
||||
/** Whether to display statements/other fill by default */
|
||||
public static final boolean OTHER_FILL_DEFAULT = true;
|
||||
/** Whether to display statements/other text by default */
|
||||
public static final boolean OTHER_TEXT_DEFAULT = true;
|
||||
/** Whether to display statements/other time by default */
|
||||
public static final boolean OTHER_TIME_DEFAULT = true;
|
||||
//gui display variables
|
||||
private boolean warnOutline = WARN_OUTLINE_DEFAULT;
|
||||
private boolean warnFill = WARN_FILL_DEFAULT;
|
||||
|
@ -174,6 +183,19 @@ public abstract class AbstractWWAResource extends
|
|||
private boolean advFill = ADV_FILL_DEFAULT;
|
||||
private boolean advText = ADV_TEXT_DEFAULT;
|
||||
private boolean advTime = ADV_TIME_DEFAULT;
|
||||
private boolean otherOutline = OTHER_OUTLINE_DEFAULT;
|
||||
private boolean otherFill = OTHER_FILL_DEFAULT;
|
||||
private boolean otherText = OTHER_TEXT_DEFAULT;
|
||||
private boolean otherTime = OTHER_TIME_DEFAULT;
|
||||
private boolean enableWarnDisplay = false;
|
||||
private boolean enableWatchDisplay = false;
|
||||
private boolean enableAdvisoryDisplay = false;
|
||||
private boolean enableOtherDisplay = false;
|
||||
|
||||
// The significance values for WWAs
|
||||
private static final String WARN_SIG = "W";
|
||||
private static final String WATCH_SIG = "A";
|
||||
private static final String ADVISORY_SIG = "Y";
|
||||
|
||||
/** The dialog used to change display properties */
|
||||
private DrawingPropertiesDialog drawingDialog;
|
||||
|
@ -414,31 +436,42 @@ public abstract class AbstractWWAResource extends
|
|||
boolean drawText = true;
|
||||
boolean drawTime = true;
|
||||
|
||||
String sig = record.getSig();
|
||||
boolean sigRecognized = false;
|
||||
if(record != null && record.getSig() != null){
|
||||
String sig = record.getSig();
|
||||
|
||||
//warning
|
||||
if(sig.equalsIgnoreCase("W")){
|
||||
if(sig.equalsIgnoreCase(WARN_SIG)){
|
||||
drawShape = warnFill;
|
||||
drawOutline = warnOutline;
|
||||
drawText = warnText;
|
||||
drawTime = warnTime;
|
||||
sigRecognized = true;
|
||||
}
|
||||
//watch
|
||||
else if(sig.equalsIgnoreCase("A")){
|
||||
else if(sig.equalsIgnoreCase(WATCH_SIG)){
|
||||
drawShape = watchFill;
|
||||
drawOutline = watchOutline;
|
||||
drawText = watchText;
|
||||
drawTime = watchTime;
|
||||
sigRecognized = true;
|
||||
}
|
||||
//advisory
|
||||
else if(sig.equals("Y")){
|
||||
else if(sig.equals(ADVISORY_SIG)){
|
||||
drawShape = advFill;
|
||||
drawOutline = advOutline;
|
||||
drawText = advText;
|
||||
drawTime = advTime;
|
||||
sigRecognized = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(sig == null || !sigRecognized){
|
||||
drawShape = otherFill;
|
||||
drawOutline = otherOutline;
|
||||
drawText = otherText;
|
||||
drawTime = otherTime;
|
||||
}
|
||||
|
||||
// check shapes
|
||||
if (entry.project) {
|
||||
|
@ -631,7 +664,33 @@ public abstract class AbstractWWAResource extends
|
|||
if (!resourceData.getMetadataMap().containsKey("officeid")
|
||||
|| resourceData.getMetadataMap().get("officeid")
|
||||
.getConstraintValue().contains(officeid)) {
|
||||
this.recordsToLoad.add((AbstractWarningRecord) pdo);
|
||||
|
||||
AbstractWarningRecord rec = (AbstractWarningRecord) pdo;
|
||||
this.recordsToLoad.add(rec);
|
||||
|
||||
//set the drawing display for the corresponding significance types
|
||||
// if all settings are on, no need to keep doing it
|
||||
if(rec !=null && (!enableWatchDisplay || !enableWarnDisplay || !enableAdvisoryDisplay || !enableOtherDisplay)){
|
||||
String sig = rec.getSig();
|
||||
boolean sigRecognized = false;
|
||||
if(sig!=null){
|
||||
if(sig.equals(WARN_SIG)){
|
||||
enableWarnDisplay = true;
|
||||
sigRecognized = true;
|
||||
}
|
||||
else if(sig.equals(WATCH_SIG)){
|
||||
enableWatchDisplay = true;
|
||||
sigRecognized = true;
|
||||
}
|
||||
else if(sig.equals(ADVISORY_SIG)){
|
||||
enableAdvisoryDisplay = true;
|
||||
sigRecognized = true;
|
||||
}
|
||||
}
|
||||
if(sig == null || !sigRecognized){
|
||||
enableOtherDisplay = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -926,6 +985,41 @@ public abstract class AbstractWWAResource extends
|
|||
public void setAdvisoryTimeDisplay(boolean advTime) {
|
||||
this.advTime = advTime;
|
||||
}
|
||||
/**
|
||||
* Set whether or not to display the outline for statements
|
||||
* and other records
|
||||
* @param advOutline If true, will draw the outline
|
||||
*/
|
||||
public void setOtherOutlineDisplay(boolean otherOutline) {
|
||||
this.otherOutline = otherOutline;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether or not to display the fill (shaded shape) for
|
||||
* statements and other records
|
||||
* @param otherFill If true, will draw the fill
|
||||
*/
|
||||
public void setOtherFillDisplay(boolean otherFill) {
|
||||
this.otherFill = otherFill;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether or not to display the text for statements
|
||||
* and other records
|
||||
* @param otherText If true, will draw the title
|
||||
*/
|
||||
public void setOtherTextDisplay(boolean otherText) {
|
||||
this.otherText = otherText;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether or not to display the time for statements
|
||||
* and other records
|
||||
* @param otherTime If true, will draw the time
|
||||
*/
|
||||
public void setOtherTimeDisplay(boolean otherTime) {
|
||||
this.otherTime = otherTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the warning outline is displayed
|
||||
|
@ -1011,6 +1105,66 @@ public abstract class AbstractWWAResource extends
|
|||
return advTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the statement/other outline is displayed
|
||||
*/
|
||||
public boolean showOtherOutline(){
|
||||
return otherOutline;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the statement/other fill is displayed
|
||||
*/
|
||||
public boolean showOtherFill(){
|
||||
return otherFill;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the statement/other text is displayed
|
||||
*/
|
||||
public boolean showOtherText(){
|
||||
return otherText;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the statement/other time is displayed
|
||||
*/
|
||||
public boolean showOtherTime(){
|
||||
return otherTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the warning display settings are to
|
||||
* be enabled
|
||||
*/
|
||||
public boolean enableWarnDisplay() {
|
||||
return enableWarnDisplay;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the watch display settings are to
|
||||
* be enabled
|
||||
*/
|
||||
public boolean enableWatchDisplay() {
|
||||
return enableWatchDisplay;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the advisory display settings are
|
||||
* to be enabled
|
||||
*/
|
||||
public boolean enableAdvisoryDisplay() {
|
||||
return enableAdvisoryDisplay;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the warning statement/other settings
|
||||
* are to be enabled
|
||||
*/
|
||||
public boolean enableOtherDisplay(){
|
||||
return enableOtherDisplay;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the associated DrawingPropertiesDialog
|
||||
* @param dialog
|
||||
|
|
|
@ -36,15 +36,15 @@ import com.raytheon.uf.viz.core.IGraphicsTarget;
|
|||
import com.raytheon.uf.viz.core.catalog.DirectDbQuery;
|
||||
import com.raytheon.uf.viz.core.catalog.DirectDbQuery.QueryLanguage;
|
||||
import com.raytheon.uf.viz.core.drawables.FillPatterns;
|
||||
import com.raytheon.uf.viz.core.drawables.IShadedShape;
|
||||
import com.raytheon.uf.viz.core.drawables.IWireframeShape;
|
||||
import com.raytheon.uf.viz.core.drawables.JTSCompiler;
|
||||
import com.raytheon.uf.viz.core.drawables.JTSCompiler.JTSGeometryData;
|
||||
import com.raytheon.uf.viz.core.drawables.JTSCompiler.PointStyle;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.rsc.LoadProperties;
|
||||
import com.vividsolutions.jts.geom.Geometry;
|
||||
import com.vividsolutions.jts.geom.GeometryCollection;
|
||||
import com.vividsolutions.jts.geom.GeometryFactory;
|
||||
import com.vividsolutions.jts.io.ParseException;
|
||||
import com.vividsolutions.jts.io.WKBReader;
|
||||
import com.vividsolutions.jts.io.WKTReader;
|
||||
|
||||
|
@ -63,6 +63,7 @@ import com.vividsolutions.jts.io.WKTReader;
|
|||
* Aug 01, 2014 3471 mapeters Updated deprecated createShadedShape() calls.
|
||||
* Aug 22, 2016 5842 dgilling Remove dependency on viz.texteditor plugin.
|
||||
* Sep 14, 2016 3241 bsteffen Update deprecated JTSCompiler method calls
|
||||
* Jun 24, 2022 srcarter@ucar Always create outline (wireshapes) and fill (shadedshapes)
|
||||
* </pre>
|
||||
*
|
||||
* @author rjpeter
|
||||
|
@ -187,82 +188,47 @@ public class CWASPSResource extends WatchesResource {
|
|||
entry.record = record;
|
||||
entryMap.put(record.getDataURI(), entry);
|
||||
}
|
||||
|
||||
// default to a wireframe shape
|
||||
boolean isShaded = false;
|
||||
|
||||
if (entry.shadedShape != null) {
|
||||
// if the shape was in the shadedShape map then create a shaded
|
||||
// shape
|
||||
isShaded = true;
|
||||
} else if ((entry.wireframeShape == null)
|
||||
&& (record.getGeometry() == null)) {
|
||||
// if it is not in the wireframeShape map and the geometry is null
|
||||
// then create a shaded shape
|
||||
isShaded = true;
|
||||
}
|
||||
|
||||
if (isShaded) {
|
||||
if (!record.getUgcZones().isEmpty()) {
|
||||
// if the geometry is null get a geometry based on the county
|
||||
// list
|
||||
if (record.getGeometry() == null) {
|
||||
record.setGeometry(getGeometry(record));
|
||||
}
|
||||
if (record.getGeometry() != null) {
|
||||
|
||||
// dispose old shape
|
||||
if (entry.shadedShape != null) {
|
||||
entry.shadedShape.dispose();
|
||||
}
|
||||
|
||||
entry.shadedShape = target.createShadedShape(false,
|
||||
descriptor.getGridGeometry());
|
||||
try {
|
||||
geo = wktr.read(record.getGeometry().toString());
|
||||
|
||||
JTSCompiler jtsCompiler = new JTSCompiler(
|
||||
entry.shadedShape, null, this.descriptor);
|
||||
JTSGeometryData jtsData = jtsCompiler
|
||||
.createGeometryData();
|
||||
jtsData.setPointStyle(PointStyle.CROSS);
|
||||
jtsData.setGeometryColor(color);
|
||||
try {
|
||||
jtsCompiler.handle(geo, jtsData);
|
||||
} catch (VizException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
e.getLocalizedMessage(), e);
|
||||
entryMap.remove(entry.record.getDataURI());
|
||||
return;
|
||||
}
|
||||
entry.shadedShape.setFillPattern(FillPatterns
|
||||
.getGLPattern("VERTICAL_DOTTED"));
|
||||
entry.shadedShape.compile();
|
||||
} catch (ParseException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
e.getLocalizedMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
if (!record.getUgcZones().isEmpty()) {
|
||||
// if the geometry is null get a geometry based on the county
|
||||
// list
|
||||
if (record.getGeometry() == null) {
|
||||
record.setGeometry(getGeometry(record));
|
||||
}
|
||||
} else {
|
||||
if (record.getGeometry() != null) {
|
||||
try {
|
||||
//give every entry a fill and outline
|
||||
//add fill (shadedshape)
|
||||
IShadedShape ss = target.createShadedShape(false, descriptor.getGridGeometry());
|
||||
geo = wktr.read(record.getGeometry().toString());
|
||||
JTSCompiler jtsCompiler = new JTSCompiler(ss, null, this.descriptor);
|
||||
JTSGeometryData geoData = jtsCompiler.createGeometryData();
|
||||
geoData.setGeometryColor(color);
|
||||
geoData.setPointStyle(PointStyle.CROSS);
|
||||
jtsCompiler.handle(geo, geoData);
|
||||
ss.setFillPattern(FillPatterns.getGLPattern("VERTICAL_DOTTED"));
|
||||
ss.compile();
|
||||
|
||||
try {
|
||||
// dispose old shape
|
||||
if (entry.wireframeShape != null) {
|
||||
entry.wireframeShape.dispose();
|
||||
entry.shadedShape = ss;
|
||||
|
||||
//add outline (wireshape)
|
||||
IWireframeShape wfs = entry.wireframeShape;
|
||||
|
||||
if (wfs != null) {
|
||||
wfs.dispose();
|
||||
}
|
||||
|
||||
wfs = target.createWireframeShape(false, descriptor);
|
||||
|
||||
jtsCompiler = new JTSCompiler(null, wfs, descriptor);
|
||||
jtsCompiler.handle(geo);
|
||||
wfs.compile();
|
||||
entry.wireframeShape = wfs;
|
||||
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.ERROR,
|
||||
"Error creating wireframe", e);
|
||||
}
|
||||
|
||||
entry.wireframeShape = target.createWireframeShape(false,
|
||||
descriptor);
|
||||
geo = wktr.read(record.getGeometry().toString());
|
||||
|
||||
JTSCompiler jtsCompiler = new JTSCompiler(null,
|
||||
entry.wireframeShape, descriptor);
|
||||
jtsCompiler.handle(geo);
|
||||
entry.wireframeShape.compile();
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.ERROR,
|
||||
"Error creating wireframe", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ import com.raytheon.viz.warnings.rsc.AbstractWWAResource;
|
|||
* ------------ ---------- ---------------- --------------------------
|
||||
* Mar 15, 2022 srcarter@ucar Initial creation
|
||||
* Mar 21, 2022 srcarter@ucar Set the current values every time initializeComponents is called (also called from .Open)
|
||||
* Jun 24, 2022 srcarter@ucar Move Watches to top, add section for Other/Statement, add 'enabled' functionality
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -47,6 +48,10 @@ public class DrawingPropertiesDialog extends CaveSWTDialog {
|
|||
private Button advFillChk;
|
||||
private Button advTextChk;
|
||||
private Button advTimeChk;
|
||||
private Button otherOutlineChk;
|
||||
private Button otherFillChk;
|
||||
private Button otherTextChk;
|
||||
private Button otherTimeChk;
|
||||
|
||||
/**
|
||||
* The WWA Resource associated with this properties dialog
|
||||
|
@ -67,6 +72,8 @@ public class DrawingPropertiesDialog extends CaveSWTDialog {
|
|||
}
|
||||
|
||||
@Override
|
||||
// Create and initialize all gui components for controlling the drawing
|
||||
// displays for the WWAs.
|
||||
protected void initializeComponents(Shell shell) {
|
||||
// --- Sub title ---
|
||||
Composite subComp = new Composite(shell, SWT.NONE);
|
||||
|
@ -74,22 +81,7 @@ public class DrawingPropertiesDialog extends CaveSWTDialog {
|
|||
subComp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
|
||||
Label layerName = new Label(subComp, SWT.NONE);
|
||||
layerName.setText(myResource.getResourceData().getName());
|
||||
|
||||
// --- Warnings ---
|
||||
Group warnComp = new Group(shell, SWT.NONE);
|
||||
warnComp.setText("Warnings");
|
||||
warnComp.setLayoutData(new GridData(SWT.CENTER, SWT.FILL, true, true));
|
||||
warnComp.setLayout(new GridLayout(2, true));
|
||||
|
||||
//outline and fill
|
||||
warnOutlineChk = createButton(warnComp, "Show Outline");
|
||||
warnFillChk = createButton(warnComp, "Thatched Fill");
|
||||
//text and time
|
||||
warnTextChk = createButton(warnComp, "Show Text");
|
||||
warnTimeChk = createButton(warnComp, "Show Time");
|
||||
|
||||
// --- end Warnings ---
|
||||
|
||||
|
||||
// --- Watches ---
|
||||
Group watchComp = new Group(shell, SWT.NONE);
|
||||
watchComp.setText("Watches");
|
||||
|
@ -106,6 +98,21 @@ public class DrawingPropertiesDialog extends CaveSWTDialog {
|
|||
|
||||
// --- end Watches ---
|
||||
|
||||
// --- Warnings ---
|
||||
Group warnComp = new Group(shell, SWT.NONE);
|
||||
warnComp.setText("Warnings");
|
||||
warnComp.setLayoutData(new GridData(SWT.CENTER, SWT.FILL, true, true));
|
||||
warnComp.setLayout(new GridLayout(2, true));
|
||||
|
||||
//outline and fill
|
||||
warnOutlineChk = createButton(warnComp, "Show Outline");
|
||||
warnFillChk = createButton(warnComp, "Thatched Fill");
|
||||
//text and time
|
||||
warnTextChk = createButton(warnComp, "Show Text");
|
||||
warnTimeChk = createButton(warnComp, "Show Time");
|
||||
|
||||
// --- end Warnings ---
|
||||
|
||||
// --- Advisories ---
|
||||
Group advComp = new Group(shell, SWT.NONE);
|
||||
advComp.setText("Advisories");
|
||||
|
@ -120,7 +127,23 @@ public class DrawingPropertiesDialog extends CaveSWTDialog {
|
|||
advTextChk = createButton(advComp, "Show Text");
|
||||
advTimeChk = createButton(advComp, "Show Time");
|
||||
|
||||
// --- end Advisories ---
|
||||
// --- end Advisories ---
|
||||
|
||||
// --- Other ---
|
||||
Group otherComp = new Group(shell, SWT.NONE);
|
||||
otherComp.setText("Statements/Other");
|
||||
otherComp.setLayoutData(new GridData(SWT.CENTER, SWT.FILL, true, true));
|
||||
otherComp.setLayout(new GridLayout(2, true));
|
||||
|
||||
//outline and fill
|
||||
otherOutlineChk = createButton(otherComp, "Show Outline");
|
||||
otherFillChk = createButton(otherComp, "Thatched Fill");
|
||||
|
||||
//text and time
|
||||
otherTextChk = createButton(otherComp, "Show Text");
|
||||
otherTimeChk = createButton(otherComp, "Show Time");
|
||||
|
||||
// --- end Other ---
|
||||
|
||||
// --- Bottom Buttons ---
|
||||
Composite btnComp = new Composite(shell, SWT.NONE);
|
||||
|
@ -156,6 +179,40 @@ public class DrawingPropertiesDialog extends CaveSWTDialog {
|
|||
|
||||
//set all the values
|
||||
setToCurrentValues();
|
||||
|
||||
//set visibility from resource
|
||||
setWarningControlsEnabled(myResource.enableWarnDisplay());
|
||||
setWatchControlsEnabled(myResource.enableWatchDisplay());
|
||||
setAdvisoryControlsEnabled(myResource.enableAdvisoryDisplay());
|
||||
setOtherControlsEnabled(myResource.enableOtherDisplay());
|
||||
}
|
||||
|
||||
private void setWarningControlsEnabled(boolean isEnabled){
|
||||
warnOutlineChk.setEnabled(isEnabled);
|
||||
warnFillChk.setEnabled(isEnabled);
|
||||
warnTextChk.setEnabled(isEnabled);
|
||||
warnTimeChk.setEnabled(isEnabled);
|
||||
}
|
||||
|
||||
private void setWatchControlsEnabled(boolean isEnabled){
|
||||
watchOutlineChk.setEnabled(isEnabled);
|
||||
watchFillChk.setEnabled(isEnabled);
|
||||
watchTextChk.setEnabled(isEnabled);
|
||||
watchTimeChk.setEnabled(isEnabled);
|
||||
}
|
||||
|
||||
private void setAdvisoryControlsEnabled(boolean isEnabled){
|
||||
advOutlineChk.setEnabled(isEnabled);
|
||||
advFillChk.setEnabled(isEnabled);
|
||||
advTextChk.setEnabled(isEnabled);
|
||||
advTimeChk.setEnabled(isEnabled);
|
||||
}
|
||||
|
||||
private void setOtherControlsEnabled(boolean isEnabled){
|
||||
otherOutlineChk.setEnabled(isEnabled);
|
||||
otherFillChk.setEnabled(isEnabled);
|
||||
otherTextChk.setEnabled(isEnabled);
|
||||
otherTimeChk.setEnabled(isEnabled);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -205,6 +262,12 @@ public class DrawingPropertiesDialog extends CaveSWTDialog {
|
|||
myResource.setAdvisoryFillDisplay(advFillChk.getSelection());
|
||||
myResource.setAdvisoryTextDisplay(advTextChk.getSelection());
|
||||
myResource.setAdvisoryTimeDisplay(advTimeChk.getSelection());
|
||||
|
||||
myResource.setOtherOutlineDisplay(otherOutlineChk.getSelection());
|
||||
myResource.setOtherFillDisplay(otherFillChk.getSelection());
|
||||
myResource.setOtherTextDisplay(otherTextChk.getSelection());
|
||||
myResource.setOtherTimeDisplay(otherTimeChk.getSelection());
|
||||
|
||||
myResource.issueRefresh();
|
||||
}
|
||||
|
||||
|
@ -227,7 +290,11 @@ public class DrawingPropertiesDialog extends CaveSWTDialog {
|
|||
advFillChk.setSelection(AbstractWWAResource.ADV_FILL_DEFAULT);
|
||||
advTextChk.setSelection(AbstractWWAResource.ADV_TEXT_DEFAULT);
|
||||
advTimeChk.setSelection(AbstractWWAResource.ADV_TIME_DEFAULT);
|
||||
}
|
||||
|
||||
otherOutlineChk.setSelection(AbstractWWAResource.OTHER_OUTLINE_DEFAULT);
|
||||
otherFillChk.setSelection(AbstractWWAResource.OTHER_FILL_DEFAULT);
|
||||
otherTextChk.setSelection(AbstractWWAResource.OTHER_TEXT_DEFAULT);
|
||||
otherTimeChk.setSelection(AbstractWWAResource.OTHER_TIME_DEFAULT); }
|
||||
|
||||
/**
|
||||
* Set all the GUI checkboxes to the current boolean values from
|
||||
|
@ -248,5 +315,10 @@ public class DrawingPropertiesDialog extends CaveSWTDialog {
|
|||
advFillChk.setSelection(myResource.showAdvisoryFill());
|
||||
advTextChk.setSelection(myResource.showAdvisoryText());
|
||||
advTimeChk.setSelection(myResource.showAdvisoryTime());
|
||||
|
||||
otherOutlineChk.setSelection(myResource.showOtherOutline());
|
||||
otherFillChk.setSelection(myResource.showOtherFill());
|
||||
otherTextChk.setSelection(myResource.showOtherText());
|
||||
otherTimeChk.setSelection(myResource.showOtherTime());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ import com.raytheon.viz.warnings.rsc.WatchesResource;
|
|||
* ------------ ---------- ---------------- --------------------------
|
||||
* Mar 15, 2022 srcarter@ucar Initial creation
|
||||
* Mar 17, 2022 srcarter@ucar Small change to isHidden to only display for proper resources
|
||||
* Jun 24, 2022 srcarter@ucar Enable for CWASPSResources as well
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -65,7 +66,7 @@ public class WWADrawingPropertiesAction extends AbstractRightClickAction {
|
|||
public boolean isHidden(){
|
||||
AbstractVizResource rsc = getSelectedRsc();
|
||||
|
||||
if((rsc instanceof WatchesResource || rsc instanceof WarningsResource) && !(rsc instanceof CWASPSResource)){
|
||||
if(rsc instanceof WatchesResource || rsc instanceof WarningsResource){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue