14.1.1-12 baseline
Former-commit-id:f53eb87892
[formerly371d1ca63c
] [formerlyb24d9c80b0
] [formerlyf53eb87892
[formerly371d1ca63c
] [formerlyb24d9c80b0
] [formerlya3ec45a99f
[formerlyb24d9c80b0
[formerly 3b3b8ffbdadc65f41b67f2d649ec18e19521c989]]]] Former-commit-id:a3ec45a99f
Former-commit-id:1e4b2bac7b
[formerly4e6f319422
] [formerly 78fc95a6e82a286a422cf62a1c8adc867f7438c4 [formerly14421048af
]] Former-commit-id: e177b16a88af27dc0abf4496fe58fbe454cfa8c9 [formerly234ca267ed
] Former-commit-id:60f062ea59
This commit is contained in:
parent
941d5f65df
commit
31c94115c7
24 changed files with 293 additions and 194 deletions
|
@ -25,10 +25,11 @@
|
||||||
#------*-python-*-------------------------------------------------------------
|
#------*-python-*-------------------------------------------------------------
|
||||||
# Config file for the GFE (Graphical Forecast Editor).
|
# Config file for the GFE (Graphical Forecast Editor).
|
||||||
#
|
#
|
||||||
# $Id$
|
# SOFTWARE HISTORY
|
||||||
#-----------------------------------------------------------------------------
|
#
|
||||||
# Heading
|
# Date Ticket# Engineer Description
|
||||||
#-----------------------------------------------------------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
|
# 11/20/2013 2488 randerso Changed to use DejaVu fonts
|
||||||
|
|
||||||
GFESUITE_HOME = "/awips2/GFESuite"
|
GFESUITE_HOME = "/awips2/GFESuite"
|
||||||
GFESUITE_PRDDIR = "/tmp/products"
|
GFESUITE_PRDDIR = "/tmp/products"
|
||||||
|
@ -262,11 +263,11 @@ MapBackgrounds_default = ['States','CWA']
|
||||||
# style is a font style (one of "regular", "bold", "italic", or "bold italic")
|
# style is a font style (one of "regular", "bold", "italic", or "bold italic")
|
||||||
# height is an integer representing the font height.
|
# height is an integer representing the font height.
|
||||||
# Example: Times New Roman-bold-36.
|
# Example: Times New Roman-bold-36.
|
||||||
TextFont0 = "Bitstream Vera Sans Mono-regular-9"
|
TextFont0 = "DejaVu Sans Mono-regular-9"
|
||||||
TextFont1 = "Bitstream Vera Sans Mono-regular-9"
|
TextFont1 = "DejaVu Sans Mono-regular-9"
|
||||||
TextFont2 = "Bitstream Vera Sans Mono-bold-12"
|
TextFont2 = "DejaVu Sans Mono-bold-12"
|
||||||
TextFont3 = "Bitstream Vera Sans Mono-bold-14"
|
TextFont3 = "DejaVu Sans Mono-bold-14"
|
||||||
TextFont4 = "Bitstream Vera Sans Mono-bold-20"
|
TextFont4 = "DejaVu Sans Mono-bold-20"
|
||||||
|
|
||||||
# The color which will be used as the background for all of the display
|
# The color which will be used as the background for all of the display
|
||||||
# panes.
|
# panes.
|
||||||
|
|
|
@ -25,6 +25,9 @@ import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
import org.eclipse.core.runtime.IStatus;
|
import org.eclipse.core.runtime.IStatus;
|
||||||
import org.eclipse.core.runtime.Status;
|
import org.eclipse.core.runtime.Status;
|
||||||
import org.eclipse.core.runtime.jobs.Job;
|
import org.eclipse.core.runtime.jobs.Job;
|
||||||
|
import org.eclipse.swt.widgets.Display;
|
||||||
|
|
||||||
|
import com.raytheon.uf.viz.core.VizApp;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Repeats playing the System beep. Same code as
|
* Repeats playing the System beep. Same code as
|
||||||
|
@ -36,9 +39,9 @@ import org.eclipse.core.runtime.jobs.Job;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Mar 03, 2011 #8059 rferrel Initial creation
|
* Mar 03, 2011 #8059 rferrel Initial creation
|
||||||
|
* Nov 26, 2013 DR16772 gzhang use Display.beep()
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
|
||||||
* @author rferrel
|
* @author rferrel
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
|
@ -71,7 +74,7 @@ public class AlarmBeepJob extends Job {
|
||||||
protected IStatus run(IProgressMonitor monitor) {
|
protected IStatus run(IProgressMonitor monitor) {
|
||||||
IStatus status = Status.OK_STATUS;
|
IStatus status = Status.OK_STATUS;
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
Toolkit.getDefaultToolkit().beep();
|
VizApp.runAsync(new Runnable(){@Override public void run(){Display.getDefault().beep();}}); // DR 16772 //Toolkit.getDefaultToolkit().beep();
|
||||||
reSchedule();
|
reSchedule();
|
||||||
count--;
|
count--;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -251,6 +251,7 @@ public abstract class FFMPTable extends Composite {
|
||||||
event.gc.setLineWidth(1);
|
event.gc.setLineWidth(1);
|
||||||
int currentCol = event.index;
|
int currentCol = event.index;
|
||||||
|
|
||||||
|
TableItem ti = (TableItem) event.item;
|
||||||
Rectangle rect = ((TableItem) event.item).getBounds(currentCol);
|
Rectangle rect = ((TableItem) event.item).getBounds(currentCol);
|
||||||
event.gc.drawRectangle(rect.x - 1, rect.y - 1, rect.width,
|
event.gc.drawRectangle(rect.x - 1, rect.y - 1, rect.width,
|
||||||
rect.height);
|
rect.height);
|
||||||
|
@ -265,6 +266,13 @@ public abstract class FFMPTable extends Composite {
|
||||||
// Draw a top line
|
// Draw a top line
|
||||||
event.gc.drawLine(rect.x, rect.y, rect.x + rect.width, rect.y);
|
event.gc.drawLine(rect.x, rect.y, rect.x + rect.width, rect.y);
|
||||||
|
|
||||||
|
// Draw a bottom line if this is the last row of the table
|
||||||
|
int index = table.indexOf(ti);
|
||||||
|
if (index == table.getItemCount() - 1) {
|
||||||
|
event.gc.drawLine(rect.x, rect.y + rect.height - 2, rect.x
|
||||||
|
+ rect.width, rect.y + rect.height - 2);
|
||||||
|
}
|
||||||
|
|
||||||
if ((tableIndex >= 0) && (tableIndex < table.getItemCount())) {
|
if ((tableIndex >= 0) && (tableIndex < table.getItemCount())) {
|
||||||
event.gc.setForeground(parent.getDisplay().getSystemColor(
|
event.gc.setForeground(parent.getDisplay().getSystemColor(
|
||||||
SWT.COLOR_BLUE));
|
SWT.COLOR_BLUE));
|
||||||
|
|
|
@ -41,6 +41,22 @@ import org.eclipse.swt.layout.GridLayout;
|
||||||
import org.eclipse.swt.widgets.Canvas;
|
import org.eclipse.swt.widgets.Canvas;
|
||||||
import org.eclipse.swt.widgets.Composite;
|
import org.eclipse.swt.widgets.Composite;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Time Duration Scale Composite
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
*
|
||||||
|
* SOFTWARE HISTORY
|
||||||
|
*
|
||||||
|
* Date Ticket# Engineer Description
|
||||||
|
* ------------ ---------- ----------- --------------------------
|
||||||
|
* Nov 20, 2013 #2488 randerso Changed to use DejaVu font
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @author randerso
|
||||||
|
* @version 1.0
|
||||||
|
*/
|
||||||
public class TimeDurScaleComp extends Composite {
|
public class TimeDurScaleComp extends Composite {
|
||||||
/**
|
/**
|
||||||
* Parent composite.
|
* Parent composite.
|
||||||
|
@ -252,13 +268,10 @@ public class TimeDurScaleComp extends Composite {
|
||||||
*/
|
*/
|
||||||
private void init() {
|
private void init() {
|
||||||
// Create the font
|
// Create the font
|
||||||
// canvasFont = new Font(parentComp.getDisplay(), "Courier", 10,
|
|
||||||
// SWT.NORMAL);
|
|
||||||
// canvasFont = new Font(parentComp.getDisplay(), "Monospace", 10,
|
|
||||||
// SWT.NORMAL);
|
|
||||||
|
|
||||||
FontData fd = parentComp.getDisplay().getSystemFont().getFontData()[0];
|
FontData fd = parentComp.getDisplay().getSystemFont().getFontData()[0];
|
||||||
fd.setName("Bitstream Vera Sans Mono");
|
// TODO not have hard coded font name
|
||||||
|
fd.setName("DejaVu Sans Mono");
|
||||||
canvasFont = new Font(parentComp.getDisplay(), fd);
|
canvasFont = new Font(parentComp.getDisplay(), fd);
|
||||||
|
|
||||||
// Create the time bar colors
|
// Create the time bar colors
|
||||||
|
@ -307,6 +320,7 @@ public class TimeDurScaleComp extends Composite {
|
||||||
this.pack();
|
this.pack();
|
||||||
|
|
||||||
this.addDisposeListener(new DisposeListener() {
|
this.addDisposeListener(new DisposeListener() {
|
||||||
|
@Override
|
||||||
public void widgetDisposed(DisposeEvent arg0) {
|
public void widgetDisposed(DisposeEvent arg0) {
|
||||||
greyColor.dispose();
|
greyColor.dispose();
|
||||||
yellowColor.dispose();
|
yellowColor.dispose();
|
||||||
|
@ -328,6 +342,7 @@ public class TimeDurScaleComp extends Composite {
|
||||||
timeSliderCanvas.setLayoutData(new GridData(CANVAS_WIDTH + 10,
|
timeSliderCanvas.setLayoutData(new GridData(CANVAS_WIDTH + 10,
|
||||||
CANVAS_HEIGHT));
|
CANVAS_HEIGHT));
|
||||||
timeSliderCanvas.addPaintListener(new PaintListener() {
|
timeSliderCanvas.addPaintListener(new PaintListener() {
|
||||||
|
@Override
|
||||||
public void paintControl(PaintEvent e) {
|
public void paintControl(PaintEvent e) {
|
||||||
drawTimeSliderCanvas(e.gc);
|
drawTimeSliderCanvas(e.gc);
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,8 +82,8 @@ import com.raytheon.uf.viz.monitor.scan.tables.SCANAlarmAlertManager.AlertedAlar
|
||||||
* issue on the images being blank and throwing errors.
|
* issue on the images being blank and throwing errors.
|
||||||
* Also cleaned up some code.
|
* Also cleaned up some code.
|
||||||
*
|
*
|
||||||
|
* Nov 26, 2013 DR16782 gzhang use Display.beep()
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
|
||||||
* @author lvenable
|
* @author lvenable
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
|
@ -934,7 +934,7 @@ public abstract class SCANTable extends Composite {
|
||||||
beepTimer.purge();
|
beepTimer.purge();
|
||||||
}
|
}
|
||||||
if (mgr.isRing()) {
|
if (mgr.isRing()) {
|
||||||
Toolkit.getDefaultToolkit().beep();
|
Display.getDefault().beep();//Toolkit.getDefaultToolkit().beep();
|
||||||
} else {
|
} else {
|
||||||
beepTimer.cancel();
|
beepTimer.cancel();
|
||||||
beepTimer.purge();
|
beepTimer.purge();
|
||||||
|
|
|
@ -271,6 +271,14 @@ public abstract class TableComp extends Composite {
|
||||||
// Draw a top line
|
// Draw a top line
|
||||||
event.gc.drawLine(rect.x, rect.y, rect.x + rect.width, rect.y);
|
event.gc.drawLine(rect.x, rect.y, rect.x + rect.width, rect.y);
|
||||||
|
|
||||||
|
// Draw a bottom line if this is the last row of the table
|
||||||
|
TableItem ti = (TableItem) event.item;
|
||||||
|
int idx = table.indexOf(ti);
|
||||||
|
if (idx == table.getItemCount() - 1) {
|
||||||
|
event.gc.drawLine(rect.x, rect.y + rect.height - 2, rect.x
|
||||||
|
+ rect.width, rect.y + rect.height - 2);
|
||||||
|
}
|
||||||
|
|
||||||
if (tableIndex >= 0) {
|
if (tableIndex >= 0) {
|
||||||
event.gc.setForeground(parent.getDisplay().getSystemColor(
|
event.gc.setForeground(parent.getDisplay().getSystemColor(
|
||||||
SWT.COLOR_BLUE));
|
SWT.COLOR_BLUE));
|
||||||
|
|
|
@ -37,7 +37,9 @@ import org.eclipse.swt.graphics.GC;
|
||||||
import org.eclipse.swt.graphics.Image;
|
import org.eclipse.swt.graphics.Image;
|
||||||
import org.eclipse.swt.graphics.ImageData;
|
import org.eclipse.swt.graphics.ImageData;
|
||||||
import org.eclipse.swt.graphics.ImageLoader;
|
import org.eclipse.swt.graphics.ImageLoader;
|
||||||
|
import org.eclipse.swt.graphics.Point;
|
||||||
import org.eclipse.swt.graphics.RGB;
|
import org.eclipse.swt.graphics.RGB;
|
||||||
|
import org.eclipse.swt.graphics.Rectangle;
|
||||||
import org.eclipse.swt.layout.GridData;
|
import org.eclipse.swt.layout.GridData;
|
||||||
import org.eclipse.swt.layout.GridLayout;
|
import org.eclipse.swt.layout.GridLayout;
|
||||||
import org.eclipse.swt.printing.PrintDialog;
|
import org.eclipse.swt.printing.PrintDialog;
|
||||||
|
@ -85,6 +87,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||||
* 04OCT2012 1229 rferrel Changes for non-blocking WindRoseConfigDlg.
|
* 04OCT2012 1229 rferrel Changes for non-blocking WindRoseConfigDlg.
|
||||||
* 08OCT2012 1229 rferrel Made non-blocking.
|
* 08OCT2012 1229 rferrel Made non-blocking.
|
||||||
* 10/15/2012 1229 rferrel Changes for non-blocking HelpUsageDlg.
|
* 10/15/2012 1229 rferrel Changes for non-blocking HelpUsageDlg.
|
||||||
|
* 03Dec2013 16754 zhao Modified printImage()
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -734,20 +737,36 @@ public class WindRosePlotDlg extends CaveSWTDialog {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void printImage() {
|
private void printImage() {
|
||||||
|
Image image = windRoseCanvasComp.getWindRoseImage();
|
||||||
|
ImageData imageData = image.getImageData();
|
||||||
PrintDialog dialog = new PrintDialog(shell, SWT.NULL);
|
PrintDialog dialog = new PrintDialog(shell, SWT.NULL);
|
||||||
PrinterData printerData = dialog.open();
|
PrinterData printerData = dialog.open();
|
||||||
|
|
||||||
if (printerData != null) {
|
if (printerData != null) {
|
||||||
// Create the printer object
|
|
||||||
Printer printer = new Printer(printerData);
|
Printer printer = new Printer(printerData);
|
||||||
|
Point screenDPI = shell.getDisplay().getDPI();
|
||||||
|
Point printerDPI = printer.getDPI();
|
||||||
|
Rectangle bounds = printer.getBounds();
|
||||||
|
int destX = (screenDPI.x*bounds.width - printerDPI.x*imageData.width)/screenDPI.x/2;
|
||||||
|
if (destX < 0) {
|
||||||
|
destX = 0;
|
||||||
|
}
|
||||||
|
int destY = (screenDPI.x*bounds.height - printerDPI.x*imageData.height)/screenDPI.x*80/100/2;
|
||||||
|
if (destY < 0) {
|
||||||
|
destY = 0;
|
||||||
|
}
|
||||||
printer.startJob("jj");
|
printer.startJob("jj");
|
||||||
GC gc = new GC(printer);
|
GC gc = new GC(printer);
|
||||||
|
Image printerImage = new Image(printer, imageData);
|
||||||
|
|
||||||
if (printer.startPage()) {
|
if (printer.startPage()) {
|
||||||
windRoseCanvasComp.drawCanvas(gc);
|
gc.drawImage(printerImage, 0, 0, imageData.width, imageData.height, destX, destY,
|
||||||
|
printerDPI.x*imageData.width/screenDPI.x,
|
||||||
|
printerDPI.x*imageData.height/screenDPI.x);
|
||||||
printer.endPage();
|
printer.endPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printerImage.dispose();
|
||||||
gc.dispose();
|
gc.dispose();
|
||||||
printer.endJob();
|
printer.endJob();
|
||||||
printer.dispose();
|
printer.dispose();
|
||||||
|
|
Binary file not shown.
|
@ -65,8 +65,9 @@ import com.raytheon.viz.ui.dialogs.CaveJFACEDialog;
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Oct 26, 2011 randerso Initial creation
|
* Oct 26, 2011 randerso Initial creation
|
||||||
* Oct 30, 2012 1298 rferrel Code clean for non-blocking dialog.
|
* Oct 30, 2012 1298 rferrel Code clean for non-blocking dialog.
|
||||||
* 02/13/2013 #1597 randerso Made number of concurrent save threads a configurable value.
|
* Feb 13, 2013 1597 randerso Made number of concurrent save threads a configurable value.
|
||||||
* Added logging to support GFE Performance metrics
|
* Added logging to support GFE Performance metrics
|
||||||
|
* Nov 20, 2013 2488 randerso Changed to use DejaVu font
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -127,7 +128,8 @@ public abstract class AbstractSaveParameterDialog extends CaveJFACEDialog
|
||||||
master.addDisposeListener(this);
|
master.addDisposeListener(this);
|
||||||
|
|
||||||
FontData fd = master.getDisplay().getSystemFont().getFontData()[0];
|
FontData fd = master.getDisplay().getSystemFont().getFontData()[0];
|
||||||
fd.setName("Bitstream Vera Sans Mono");
|
// TODO not have hard coded font name
|
||||||
|
fd.setName("DejaVu Sans Mono");
|
||||||
font = new Font(master.getDisplay(), fd);
|
font = new Font(master.getDisplay(), fd);
|
||||||
|
|
||||||
initializeComponents();
|
initializeComponents();
|
||||||
|
|
|
@ -59,6 +59,7 @@ import com.raytheon.viz.ui.dialogs.CaveJFACEDialog;
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Jan 21, 2011 randerso Initial creation
|
* Jan 21, 2011 randerso Initial creation
|
||||||
* Oct 25, 2012 1287 rferrel Code clean up for non-blocking dialog.
|
* Oct 25, 2012 1287 rferrel Code clean up for non-blocking dialog.
|
||||||
|
* Nov 20, 2013 2488 randerso Changed to use DejaVu font
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -107,7 +108,8 @@ public class WERevertDialog extends CaveJFACEDialog implements DisposeListener {
|
||||||
master.addDisposeListener(this);
|
master.addDisposeListener(this);
|
||||||
|
|
||||||
FontData fd = master.getDisplay().getSystemFont().getFontData()[0];
|
FontData fd = master.getDisplay().getSystemFont().getFontData()[0];
|
||||||
fd.setName("Bitstream Vera Sans Mono");
|
// TODO not have hard coded font name
|
||||||
|
fd.setName("DejaVu Sans Mono");
|
||||||
font = new Font(master.getDisplay(), fd);
|
font = new Font(master.getDisplay(), fd);
|
||||||
|
|
||||||
String t;
|
String t;
|
||||||
|
|
|
@ -65,6 +65,7 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||||
import com.raytheon.uf.viz.core.RGBColors;
|
import com.raytheon.uf.viz.core.RGBColors;
|
||||||
import com.raytheon.viz.gfe.Activator;
|
import com.raytheon.viz.gfe.Activator;
|
||||||
import com.raytheon.viz.gfe.dialogs.formatterlauncher.ProductEditorComp.PTypeCategory;
|
import com.raytheon.viz.gfe.dialogs.formatterlauncher.ProductEditorComp.PTypeCategory;
|
||||||
|
import com.raytheon.viz.gfe.rsc.GFEFonts;
|
||||||
import com.raytheon.viz.gfe.textformatter.TextFmtParserUtil;
|
import com.raytheon.viz.gfe.textformatter.TextFmtParserUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -207,10 +208,12 @@ public class StyledTextComp extends Composite {
|
||||||
private void init() {
|
private void init() {
|
||||||
String fontSetting = Activator.getDefault().getPreferenceStore()
|
String fontSetting = Activator.getDefault().getPreferenceStore()
|
||||||
.getString("ProductOutputDialog_font");
|
.getString("ProductOutputDialog_font");
|
||||||
|
FontData fontData;
|
||||||
if (fontSetting.isEmpty()) {
|
if (fontSetting.isEmpty()) {
|
||||||
fontSetting = "Bitstream Vera Sans Mono-bold-12";
|
fontData = GFEFonts.getFontData(2);
|
||||||
|
} else {
|
||||||
|
fontData = StringConverter.asFontData(fontSetting);
|
||||||
}
|
}
|
||||||
FontData fontData = StringConverter.asFontData(fontSetting);
|
|
||||||
textFont = new Font(parent.getDisplay(), fontData);
|
textFont = new Font(parent.getDisplay(), fontData);
|
||||||
|
|
||||||
createMouseListner();
|
createMouseListner();
|
||||||
|
@ -227,6 +230,7 @@ public class StyledTextComp extends Composite {
|
||||||
createTextControl();
|
createTextControl();
|
||||||
|
|
||||||
this.addDisposeListener(new DisposeListener() {
|
this.addDisposeListener(new DisposeListener() {
|
||||||
|
@Override
|
||||||
public void widgetDisposed(DisposeEvent arg0) {
|
public void widgetDisposed(DisposeEvent arg0) {
|
||||||
textFont.dispose();
|
textFont.dispose();
|
||||||
bgColor.dispose();
|
bgColor.dispose();
|
||||||
|
@ -398,8 +402,7 @@ public class StyledTextComp extends Composite {
|
||||||
// should be unlocked. Cities list is unlocked for editing
|
// should be unlocked. Cities list is unlocked for editing
|
||||||
// when framing codes are present.
|
// when framing codes are present.
|
||||||
if (newProduct) {
|
if (newProduct) {
|
||||||
if (cityTip != null &&
|
if (cityTip != null && cityTip.getText().indexOf("|*") > 0) {
|
||||||
cityTip.getText().indexOf("|*") > 0) {
|
|
||||||
unlockCitySegs.add(ugc);
|
unlockCitySegs.add(ugc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -411,8 +414,7 @@ public class StyledTextComp extends Composite {
|
||||||
|
|
||||||
lockLines(productTextArray, startLine, cityStart);
|
lockLines(productTextArray, startLine, cityStart);
|
||||||
lockLines(productTextArray, cityEnd, endLine);
|
lockLines(productTextArray, cityEnd, endLine);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
lockLines(productTextArray, startLine, endLine);
|
lockLines(productTextArray, startLine, endLine);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -731,8 +733,7 @@ public class StyledTextComp extends Composite {
|
||||||
// .getStyleRangeAtOffset(event.start + event.length + 1);
|
// .getStyleRangeAtOffset(event.start + event.length + 1);
|
||||||
|
|
||||||
// if it's in a framing code, turn it red
|
// if it's in a framing code, turn it red
|
||||||
if (startRange != null
|
if (startRange != null && endRange != null
|
||||||
&& endRange != null
|
|
||||||
&& event.start > startRange.start
|
&& event.start > startRange.start
|
||||||
&& event.start + event.length < endRange.start
|
&& event.start + event.length < endRange.start
|
||||||
&& startRange.similarTo(endRange)
|
&& startRange.similarTo(endRange)
|
||||||
|
@ -856,6 +857,7 @@ public class StyledTextComp extends Composite {
|
||||||
private void createMouseListner() {
|
private void createMouseListner() {
|
||||||
mouseListener = new Listener() {
|
mouseListener = new Listener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
public void handleEvent(Event e) {
|
public void handleEvent(Event e) {
|
||||||
if (e.type == SWT.MouseDown) {
|
if (e.type == SWT.MouseDown) {
|
||||||
handleMouseDown(e);
|
handleMouseDown(e);
|
||||||
|
@ -1036,16 +1038,18 @@ public class StyledTextComp extends Composite {
|
||||||
|
|
||||||
protected boolean isUpperCase(final String word) {
|
protected boolean isUpperCase(final String word) {
|
||||||
for (int index = word.length() - 1; index >= 0; index--) {
|
for (int index = word.length() - 1; index >= 0; index--) {
|
||||||
if (Character.isLowerCase(word.charAt(index)))
|
if (Character.isLowerCase(word.charAt(index))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void upper() {
|
protected void upper() {
|
||||||
String text = textEditorST.getText();
|
String text = textEditorST.getText();
|
||||||
if (isUpperCase(text))
|
if (isUpperCase(text)) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
int topIdx = textEditorST.getTopIndex();
|
int topIdx = textEditorST.getTopIndex();
|
||||||
setProductText(textEditorST.getText().toUpperCase());
|
setProductText(textEditorST.getText().toUpperCase());
|
||||||
textEditorST.setTopIndex(topIdx);
|
textEditorST.setTopIndex(topIdx);
|
||||||
|
|
|
@ -46,6 +46,7 @@ import com.raytheon.viz.gfe.GFEPreference;
|
||||||
* Apr 27, 2011 #9250 bkowal getStyle and getName are now used to
|
* Apr 27, 2011 #9250 bkowal getStyle and getName are now used to
|
||||||
* get the style and name associated with
|
* get the style and name associated with
|
||||||
* a FontData object.
|
* a FontData object.
|
||||||
|
* Nov 20, 2013 #2488 randerso Changed to use DejaVu fonts
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -57,9 +58,9 @@ public class GFEFonts {
|
||||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||||
.getHandler(GFEFonts.class);
|
.getHandler(GFEFonts.class);
|
||||||
|
|
||||||
private static final String DEFAULT_FONT_NAME = "Bitstream Vera Sans";
|
private static final String DEFAULT_FONT_NAME = "DejaVu Sans Mono";
|
||||||
|
|
||||||
private static final int[] DEFAULT_FONT_SIZE = { 8, 10, 12, 14, 20 };
|
private static final int[] DEFAULT_FONT_SIZE = { 9, 9, 12, 14, 20 };
|
||||||
|
|
||||||
private static final int DEFAULT_FONT_STYLE = SWT.BOLD;
|
private static final int DEFAULT_FONT_STYLE = SWT.BOLD;
|
||||||
|
|
||||||
|
|
|
@ -147,4 +147,12 @@
|
||||||
</menu>
|
</menu>
|
||||||
</menuContribution>
|
</menuContribution>
|
||||||
</extension>
|
</extension>
|
||||||
|
<extension
|
||||||
|
point="org.eclipse.ui.themes">
|
||||||
|
<fontDefinition
|
||||||
|
id="com.raytheon.viz.radar.rsc.graphic.RadarGraphicsPage"
|
||||||
|
label="Radar Graphics Font"
|
||||||
|
value="Monospaced-regular-12">
|
||||||
|
</fontDefinition>
|
||||||
|
</extension>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
|
@ -19,13 +19,12 @@
|
||||||
**/
|
**/
|
||||||
package com.raytheon.viz.radar.rsc.graphic;
|
package com.raytheon.viz.radar.rsc.graphic;
|
||||||
|
|
||||||
import java.io.File;
|
import java.awt.image.BufferedImage;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.awt.image.BufferedImage;
|
|
||||||
|
|
||||||
import javax.measure.converter.UnitConverter;
|
import javax.measure.converter.UnitConverter;
|
||||||
import javax.measure.unit.NonSI;
|
import javax.measure.unit.NonSI;
|
||||||
|
@ -42,8 +41,8 @@ import com.raytheon.uf.common.dataplugin.radar.level3.CellTrendDataPacket;
|
||||||
import com.raytheon.uf.common.dataplugin.radar.level3.CellTrendVolumeScanPacket;
|
import com.raytheon.uf.common.dataplugin.radar.level3.CellTrendVolumeScanPacket;
|
||||||
import com.raytheon.uf.common.dataplugin.radar.level3.CorrelatedShearPacket;
|
import com.raytheon.uf.common.dataplugin.radar.level3.CorrelatedShearPacket;
|
||||||
import com.raytheon.uf.common.dataplugin.radar.level3.DMDPacket.DMDAttributeIDs;
|
import com.raytheon.uf.common.dataplugin.radar.level3.DMDPacket.DMDAttributeIDs;
|
||||||
import com.raytheon.uf.common.dataplugin.radar.level3.GFMPacket;
|
|
||||||
import com.raytheon.uf.common.dataplugin.radar.level3.ETVSPacket;
|
import com.raytheon.uf.common.dataplugin.radar.level3.ETVSPacket;
|
||||||
|
import com.raytheon.uf.common.dataplugin.radar.level3.GFMPacket;
|
||||||
import com.raytheon.uf.common.dataplugin.radar.level3.HailPositivePacket;
|
import com.raytheon.uf.common.dataplugin.radar.level3.HailPositivePacket;
|
||||||
import com.raytheon.uf.common.dataplugin.radar.level3.HailProbablePacket;
|
import com.raytheon.uf.common.dataplugin.radar.level3.HailProbablePacket;
|
||||||
import com.raytheon.uf.common.dataplugin.radar.level3.HdaHailPacket;
|
import com.raytheon.uf.common.dataplugin.radar.level3.HdaHailPacket;
|
||||||
|
@ -78,20 +77,19 @@ import com.raytheon.uf.common.dataplugin.radar.level3.generic.GenericDataCompone
|
||||||
import com.raytheon.uf.common.geospatial.ReferencedCoordinate;
|
import com.raytheon.uf.common.geospatial.ReferencedCoordinate;
|
||||||
import com.raytheon.uf.common.geospatial.ReferencedGeometry;
|
import com.raytheon.uf.common.geospatial.ReferencedGeometry;
|
||||||
import com.raytheon.uf.common.geospatial.ReferencedObject.Type;
|
import com.raytheon.uf.common.geospatial.ReferencedObject.Type;
|
||||||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
|
||||||
import com.raytheon.uf.viz.core.DrawableLine;
|
import com.raytheon.uf.viz.core.DrawableLine;
|
||||||
import com.raytheon.uf.viz.core.DrawableString;
|
import com.raytheon.uf.viz.core.DrawableString;
|
||||||
import com.raytheon.uf.viz.core.IGraphicsTarget;
|
import com.raytheon.uf.viz.core.IGraphicsTarget;
|
||||||
import com.raytheon.uf.viz.core.IGraphicsTarget.VerticalAlignment;
|
|
||||||
import com.raytheon.uf.viz.core.IGraphicsTarget.LineStyle;
|
import com.raytheon.uf.viz.core.IGraphicsTarget.LineStyle;
|
||||||
|
import com.raytheon.uf.viz.core.IGraphicsTarget.VerticalAlignment;
|
||||||
import com.raytheon.uf.viz.core.data.prep.IODataPreparer;
|
import com.raytheon.uf.viz.core.data.prep.IODataPreparer;
|
||||||
import com.raytheon.uf.viz.core.drawables.IDescriptor;
|
import com.raytheon.uf.viz.core.drawables.IDescriptor;
|
||||||
import com.raytheon.uf.viz.core.drawables.IFont;
|
import com.raytheon.uf.viz.core.drawables.IFont;
|
||||||
|
import com.raytheon.uf.viz.core.drawables.IImage;
|
||||||
import com.raytheon.uf.viz.core.drawables.IRenderable;
|
import com.raytheon.uf.viz.core.drawables.IRenderable;
|
||||||
import com.raytheon.uf.viz.core.drawables.IWireframeShape;
|
import com.raytheon.uf.viz.core.drawables.IWireframeShape;
|
||||||
import com.raytheon.uf.viz.core.drawables.PaintProperties;
|
import com.raytheon.uf.viz.core.drawables.PaintProperties;
|
||||||
import com.raytheon.uf.viz.core.drawables.ext.ICanvasRenderingExtension;
|
import com.raytheon.uf.viz.core.drawables.ext.ICanvasRenderingExtension;
|
||||||
import com.raytheon.uf.viz.core.drawables.IImage;
|
|
||||||
import com.raytheon.uf.viz.core.exception.VizException;
|
import com.raytheon.uf.viz.core.exception.VizException;
|
||||||
import com.raytheon.viz.core.rsc.jts.JTSCompiler;
|
import com.raytheon.viz.core.rsc.jts.JTSCompiler;
|
||||||
import com.raytheon.viz.pointdata.PointWindDisplay;
|
import com.raytheon.viz.pointdata.PointWindDisplay;
|
||||||
|
@ -121,6 +119,7 @@ import com.vividsolutions.jts.geom.LineString;
|
||||||
* Jan 8, 2009 chammack Initial creation
|
* Jan 8, 2009 chammack Initial creation
|
||||||
* 03/05/2013 DCS51 zwang Handle GFM product
|
* 03/05/2013 DCS51 zwang Handle GFM product
|
||||||
* 06/24/2013 DR16162 zwang Remove "wind behind"
|
* 06/24/2013 DR16162 zwang Remove "wind behind"
|
||||||
|
* 11/20/2013 2488 randerso Removed use of VeraMono font file
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -193,7 +192,8 @@ public class RadarGraphicsPage implements IRenderable {
|
||||||
|
|
||||||
// for GFM product, add gfmFcstWireframeShape
|
// for GFM product, add gfmFcstWireframeShape
|
||||||
public RadarGraphicsPage(IDescriptor descriptor, GeneralGridGeometry gg,
|
public RadarGraphicsPage(IDescriptor descriptor, GeneralGridGeometry gg,
|
||||||
IWireframeShape shape, IWireframeShape gfmShape, IGraphicsTarget target, RGB color) {
|
IWireframeShape shape, IWireframeShape gfmShape,
|
||||||
|
IGraphicsTarget target, RGB color) {
|
||||||
this(descriptor, gg, shape, target, color);
|
this(descriptor, gg, shape, target, color);
|
||||||
this.gfmFcstWireframeShape = gfmShape;
|
this.gfmFcstWireframeShape = gfmShape;
|
||||||
}
|
}
|
||||||
|
@ -895,7 +895,8 @@ public class RadarGraphicsPage implements IRenderable {
|
||||||
throws VizException {
|
throws VizException {
|
||||||
List<PlotObject> images = new ArrayList<PlotObject>();
|
List<PlotObject> images = new ArrayList<PlotObject>();
|
||||||
|
|
||||||
UnitConverter metersPerSecondToKnots = SI.METERS_PER_SECOND.getConverterTo(NonSI.KNOT);
|
UnitConverter metersPerSecondToKnots = SI.METERS_PER_SECOND
|
||||||
|
.getConverterTo(NonSI.KNOT);
|
||||||
|
|
||||||
boolean isFcst = false;
|
boolean isFcst = false;
|
||||||
double x, y;
|
double x, y;
|
||||||
|
@ -920,19 +921,23 @@ public class RadarGraphicsPage implements IRenderable {
|
||||||
}
|
}
|
||||||
// 11 parameters
|
// 11 parameters
|
||||||
else {
|
else {
|
||||||
propU = currFeature.getValue(GFMPacket.GFMAttributeIDs.PROPU.getName());
|
propU = currFeature.getValue(GFMPacket.GFMAttributeIDs.PROPU
|
||||||
|
.getName());
|
||||||
if ((propU != null) && (propU.length() > 0)) {
|
if ((propU != null) && (propU.length() > 0)) {
|
||||||
pU = metersPerSecondToKnots.convert(new Double(propU));
|
pU = metersPerSecondToKnots.convert(new Double(propU));
|
||||||
}
|
}
|
||||||
propV = currFeature.getValue(GFMPacket.GFMAttributeIDs.PROPV.getName());
|
propV = currFeature.getValue(GFMPacket.GFMAttributeIDs.PROPV
|
||||||
|
.getName());
|
||||||
if ((propV != null) && (propV.length() > 0)) {
|
if ((propV != null) && (propV.length() > 0)) {
|
||||||
pV = metersPerSecondToKnots.convert(new Double(propV));
|
pV = metersPerSecondToKnots.convert(new Double(propV));
|
||||||
}
|
}
|
||||||
windX = currFeature.getValue(GFMPacket.GFMAttributeIDs.WINDBEHINDX.getName());
|
windX = currFeature.getValue(GFMPacket.GFMAttributeIDs.WINDBEHINDX
|
||||||
|
.getName());
|
||||||
if ((windX != null) && (windX.length() > 0)) {
|
if ((windX != null) && (windX.length() > 0)) {
|
||||||
wX = Float.parseFloat(windX);
|
wX = Float.parseFloat(windX);
|
||||||
}
|
}
|
||||||
windY = currFeature.getValue(GFMPacket.GFMAttributeIDs.WINDBEHINDY.getName());
|
windY = currFeature.getValue(GFMPacket.GFMAttributeIDs.WINDBEHINDY
|
||||||
|
.getName());
|
||||||
if ((windY != null) && (windY.length() > 0)) {
|
if ((windY != null) && (windY.length() > 0)) {
|
||||||
wY = Float.parseFloat(windY);
|
wY = Float.parseFloat(windY);
|
||||||
}
|
}
|
||||||
|
@ -946,7 +951,8 @@ public class RadarGraphicsPage implements IRenderable {
|
||||||
|
|
||||||
// Prop wind arrow
|
// Prop wind arrow
|
||||||
PlotObject poWind = new PlotObject();
|
PlotObject poWind = new PlotObject();
|
||||||
PointWindDisplay barb = new PointWindDisplay(imgSize * 0.4, 0.5, 2, 0);
|
PointWindDisplay barb = new PointWindDisplay(imgSize * 0.4, 0.5, 2,
|
||||||
|
0);
|
||||||
barb.setImageParameters(imgSize, imgSize, 255, 255, 255, 1);
|
barb.setImageParameters(imgSize, imgSize, 255, 255, 255, 1);
|
||||||
barb.setColor(this.color);
|
barb.setColor(this.color);
|
||||||
|
|
||||||
|
@ -958,8 +964,10 @@ public class RadarGraphicsPage implements IRenderable {
|
||||||
}
|
}
|
||||||
|
|
||||||
barb.setWind(pU, pV, false);
|
barb.setWind(pU, pV, false);
|
||||||
BufferedImage imgBuf = barb.getWindImage(false, DisplayType.ARROW, 0.2);
|
BufferedImage imgBuf = barb.getWindImage(false, DisplayType.ARROW,
|
||||||
IImage img = this.target.initializeRaster(new IODataPreparer(imgBuf, UUID.randomUUID().toString(), 0), null);
|
0.2);
|
||||||
|
IImage img = this.target.initializeRaster(new IODataPreparer(
|
||||||
|
imgBuf, UUID.randomUUID().toString(), 0), null);
|
||||||
poWind.image = img;
|
poWind.image = img;
|
||||||
|
|
||||||
ReferencedCoordinate rc = referencedGfmCoord(wX, wY);
|
ReferencedCoordinate rc = referencedGfmCoord(wX, wY);
|
||||||
|
@ -986,10 +994,11 @@ public class RadarGraphicsPage implements IRenderable {
|
||||||
|
|
||||||
// Connect the dots
|
// Connect the dots
|
||||||
if (isFcst) {
|
if (isFcst) {
|
||||||
gfmFcstWireframeShape.addLineSegment(new Coordinate[] {pos1, pos2 });
|
gfmFcstWireframeShape.addLineSegment(new Coordinate[] {
|
||||||
}
|
pos1, pos2 });
|
||||||
else {
|
} else {
|
||||||
wireframeShape.addLineSegment(new Coordinate[] {pos1, pos2 });
|
wireframeShape
|
||||||
|
.addLineSegment(new Coordinate[] { pos1, pos2 });
|
||||||
}
|
}
|
||||||
pos1 = pos2;
|
pos1 = pos2;
|
||||||
}
|
}
|
||||||
|
@ -1190,9 +1199,7 @@ public class RadarGraphicsPage implements IRenderable {
|
||||||
public void paint(IGraphicsTarget target, PaintProperties paintProps)
|
public void paint(IGraphicsTarget target, PaintProperties paintProps)
|
||||||
throws VizException {
|
throws VizException {
|
||||||
if (font == null) {
|
if (font == null) {
|
||||||
File fontFile = PathManagerFactory.getPathManager().getStaticFile(
|
this.font = target.initializeFont(getClass().getName());
|
||||||
"fonts" + File.separator + "VeraMono.ttf");
|
|
||||||
this.font = target.initializeFont(fontFile, 12.0f, null);
|
|
||||||
this.font.setMagnification((float) magnification, false);
|
this.font.setMagnification((float) magnification, false);
|
||||||
this.font.setSmoothing(true);
|
this.font.setSmoothing(true);
|
||||||
}
|
}
|
||||||
|
@ -1201,9 +1208,9 @@ public class RadarGraphicsPage implements IRenderable {
|
||||||
// GFM forecast positions should be dashed thick lines
|
// GFM forecast positions should be dashed thick lines
|
||||||
if (this.gfmFcstWireframeShape != null) {
|
if (this.gfmFcstWireframeShape != null) {
|
||||||
target.drawWireframeShape(this.wireframeShape, this.color, 3.0f);
|
target.drawWireframeShape(this.wireframeShape, this.color, 3.0f);
|
||||||
target.drawWireframeShape(this.gfmFcstWireframeShape, this.color, 3.0f, LineStyle.DASHED);
|
target.drawWireframeShape(this.gfmFcstWireframeShape, this.color,
|
||||||
}
|
3.0f, LineStyle.DASHED);
|
||||||
else if (this.wireframeShape != null) {
|
} else if (this.wireframeShape != null) {
|
||||||
target.drawWireframeShape(this.wireframeShape, this.color, 1.0f);
|
target.drawWireframeShape(this.wireframeShape, this.color, 1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1483,20 +1490,21 @@ public class RadarGraphicsPage implements IRenderable {
|
||||||
* Need to convert x/y to lon/lat for GFM product
|
* Need to convert x/y to lon/lat for GFM product
|
||||||
*/
|
*/
|
||||||
public ReferencedCoordinate referencedGfmCoord(double i, double j) {
|
public ReferencedCoordinate referencedGfmCoord(double i, double j) {
|
||||||
return new ReferencedCoordinate(rectifyCoordinate(new Coordinate(i * 4, j * 4)),
|
return new ReferencedCoordinate(rectifyCoordinate(new Coordinate(i * 4,
|
||||||
this.gridGeometry, Type.GRID_CENTER);
|
j * 4)), this.gridGeometry, Type.GRID_CENTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the nearest point from GFM front to wind behind point to plot
|
* Gets the nearest point from GFM front to wind behind point to plot front
|
||||||
* front movement arrow
|
* movement arrow
|
||||||
*
|
*
|
||||||
* @param AreaComponent
|
* @param AreaComponent
|
||||||
* @param Coordinate
|
* @param Coordinate
|
||||||
* @return Coordinate
|
* @return Coordinate
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Coordinate getPlotPoint(AreaComponent currFeature, Coordinate windBehind) {
|
private Coordinate getPlotPoint(AreaComponent currFeature,
|
||||||
|
Coordinate windBehind) {
|
||||||
Coordinate point = new Coordinate();
|
Coordinate point = new Coordinate();
|
||||||
double minDist = Double.MAX_VALUE;
|
double minDist = Double.MAX_VALUE;
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||||
* Feb 03, 2012 14317 mhuang Make alarm display window wider
|
* Feb 03, 2012 14317 mhuang Make alarm display window wider
|
||||||
* Sep 6, 2012 13365 rferrel Accumulate and Display fix.
|
* Sep 6, 2012 13365 rferrel Accumulate and Display fix.
|
||||||
* Sep 25, 2012 1196 lvenable Dialog refactor for AlarmDisplayWindow.Added DO_NOT_BLOCK.
|
* Sep 25, 2012 1196 lvenable Dialog refactor for AlarmDisplayWindow.Added DO_NOT_BLOCK.
|
||||||
|
* Nov 20, 2013 2488 randerso Changed to use DejaVu font
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -127,7 +128,8 @@ public class AlarmDisplayWindow extends CaveSWTDialog {
|
||||||
shell.setMinimumSize(300, 100);
|
shell.setMinimumSize(300, 100);
|
||||||
|
|
||||||
FontData fd = shell.getDisplay().getSystemFont().getFontData()[0];
|
FontData fd = shell.getDisplay().getSystemFont().getFontData()[0];
|
||||||
fd.setName("Bitstream Vera Sans Mono");
|
// TODO not have hard coded font name
|
||||||
|
fd.setName("DejaVu Sans Mono");
|
||||||
font = new Font(shell.getDisplay(), fd);
|
font = new Font(shell.getDisplay(), fd);
|
||||||
|
|
||||||
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
|
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
|
||||||
|
|
|
@ -19,11 +19,10 @@
|
||||||
**/
|
**/
|
||||||
package com.raytheon.viz.texteditor.alarmalert.util;
|
package com.raytheon.viz.texteditor.alarmalert.util;
|
||||||
|
|
||||||
import java.awt.Toolkit;
|
|
||||||
|
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
import org.eclipse.core.runtime.IStatus;
|
import org.eclipse.core.runtime.IStatus;
|
||||||
import org.eclipse.core.runtime.Status;
|
import org.eclipse.core.runtime.Status;
|
||||||
|
import org.eclipse.swt.widgets.Display;
|
||||||
import org.eclipse.ui.progress.UIJob;
|
import org.eclipse.ui.progress.UIJob;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -36,6 +35,8 @@ import org.eclipse.ui.progress.UIJob;
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Oct 19, 2009 mnash Initial creation
|
* Oct 19, 2009 mnash Initial creation
|
||||||
* Jul 25, 2012 15122 rferrel Add sound repeat interval.
|
* Jul 25, 2012 15122 rferrel Add sound repeat interval.
|
||||||
|
* Nov 26, 2013 16781 mgamazaychikov Changed AWT Toolkit.getDefaultToolkit().beep to
|
||||||
|
* SWT Display.beep()
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -78,7 +79,7 @@ public class AlarmBeepJob extends UIJob {
|
||||||
public IStatus runInUIThread(IProgressMonitor monitor) {
|
public IStatus runInUIThread(IProgressMonitor monitor) {
|
||||||
IStatus status = Status.OK_STATUS;
|
IStatus status = Status.OK_STATUS;
|
||||||
if (count < BEEP_COUNT) {
|
if (count < BEEP_COUNT) {
|
||||||
Toolkit.getDefaultToolkit().beep();
|
Display.getCurrent().beep();
|
||||||
if (!disposed) {
|
if (!disposed) {
|
||||||
this.schedule(BEEP_INTERVAL);
|
this.schedule(BEEP_INTERVAL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ public class DupElimSrv {
|
||||||
newPdos.add(pdo);
|
newPdos.add(pdo);
|
||||||
} else {
|
} else {
|
||||||
// shouldn't be more than 1
|
// shouldn't be more than 1
|
||||||
PluginDataObject dbPdo = dbPdos.get(1);
|
PluginDataObject dbPdo = dbPdos.get(0);
|
||||||
if ((dbPdo == null)
|
if ((dbPdo == null)
|
||||||
|| !pdo.getDataURI().equals(dbPdo.getDataURI())) {
|
|| !pdo.getDataURI().equals(dbPdo.getDataURI())) {
|
||||||
newPdos.add(pdo);
|
newPdos.add(pdo);
|
||||||
|
|
|
@ -14,12 +14,14 @@ namespace VizLauncher.com.raytheon.viz.launcher.process
|
||||||
protected static readonly String LOG_SUFFIX = ".log";
|
protected static readonly String LOG_SUFFIX = ".log";
|
||||||
protected Process process = null;
|
protected Process process = null;
|
||||||
private StreamWriter logFileWriter;
|
private StreamWriter logFileWriter;
|
||||||
|
protected VizEnvironment vizEnvironment;
|
||||||
|
|
||||||
private bool ready = false;
|
private bool ready = false;
|
||||||
private String exceptionText = null;
|
private String exceptionText = null;
|
||||||
|
|
||||||
public AbstractProcessLauncher(VizEnvironment vizEnvironment)
|
public AbstractProcessLauncher(VizEnvironment vizEnvironment)
|
||||||
{
|
{
|
||||||
|
this.vizEnvironment = vizEnvironment;
|
||||||
// Prepare the log file.
|
// Prepare the log file.
|
||||||
if (Directory.Exists(vizEnvironment.getLogDirectory()) == false)
|
if (Directory.Exists(vizEnvironment.getLogDirectory()) == false)
|
||||||
{
|
{
|
||||||
|
@ -56,8 +58,10 @@ namespace VizLauncher.com.raytheon.viz.launcher.process
|
||||||
{
|
{
|
||||||
ProcessStartInfo processStartInfo =
|
ProcessStartInfo processStartInfo =
|
||||||
new ProcessStartInfo(this.constructProcessName(vizEnvironment.getLocation()));
|
new ProcessStartInfo(this.constructProcessName(vizEnvironment.getLocation()));
|
||||||
|
// include the default system PATH in the application PATH
|
||||||
|
String systemPath = System.Environment.GetEnvironmentVariable("PATH");
|
||||||
processStartInfo.EnvironmentVariables[EnvironmentProperties.ENVIRONMENT_VARIABLE_PATH] =
|
processStartInfo.EnvironmentVariables[EnvironmentProperties.ENVIRONMENT_VARIABLE_PATH] =
|
||||||
vizEnvironment.getPath();
|
vizEnvironment.getPath() + this.getApplicationSpecificPath() + systemPath;
|
||||||
processStartInfo.EnvironmentVariables[EnvironmentProperties.ENVIRONMENT_VARIABLE_PYTHON_PATH] =
|
processStartInfo.EnvironmentVariables[EnvironmentProperties.ENVIRONMENT_VARIABLE_PYTHON_PATH] =
|
||||||
vizEnvironment.getPythonPath();
|
vizEnvironment.getPythonPath();
|
||||||
processStartInfo.UseShellExecute = false;
|
processStartInfo.UseShellExecute = false;
|
||||||
|
@ -119,6 +123,11 @@ namespace VizLauncher.com.raytheon.viz.launcher.process
|
||||||
return this.exceptionText;
|
return this.exceptionText;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected virtual String getApplicationSpecificPath()
|
||||||
|
{
|
||||||
|
return String.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
protected abstract String constructProcessName(String location);
|
protected abstract String constructProcessName(String location);
|
||||||
|
|
||||||
protected abstract String constructLogName(String logDate);
|
protected abstract String constructLogName(String logDate);
|
||||||
|
|
|
@ -12,14 +12,21 @@ namespace VizLauncher.com.raytheon.viz.launcher.process.impl
|
||||||
{
|
{
|
||||||
private static readonly String LOG_PREFIX = "cave_";
|
private static readonly String LOG_PREFIX = "cave_";
|
||||||
private static readonly String COMMAND_LINE_ARGUMENTS = "-component thinclient";
|
private static readonly String COMMAND_LINE_ARGUMENTS = "-component thinclient";
|
||||||
|
private static readonly String CAVE_DIRECTORY = Path.DirectorySeparatorChar + "CAVE";
|
||||||
private static readonly String CAVE_EXECUTABLE =
|
private static readonly String CAVE_EXECUTABLE =
|
||||||
Path.DirectorySeparatorChar + "CAVE" + Path.DirectorySeparatorChar + "cave.exe";
|
CAVE_DIRECTORY + Path.DirectorySeparatorChar + "cave.exe";
|
||||||
|
|
||||||
public CaveProcessLauncher(VizEnvironment vizEnvironment)
|
public CaveProcessLauncher(VizEnvironment vizEnvironment)
|
||||||
: base(vizEnvironment)
|
: base(vizEnvironment)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override String getApplicationSpecificPath()
|
||||||
|
{
|
||||||
|
return Path.PathSeparator + this.vizEnvironment.getLocation() +
|
||||||
|
CAVE_DIRECTORY + Path.DirectorySeparatorChar + "lib" + Path.PathSeparator;
|
||||||
|
}
|
||||||
|
|
||||||
protected override String constructProcessName(String location)
|
protected override String constructProcessName(String location)
|
||||||
{
|
{
|
||||||
return location + CAVE_EXECUTABLE;
|
return location + CAVE_EXECUTABLE;
|
||||||
|
|
Binary file not shown.
|
@ -29,6 +29,7 @@
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* 11/17/09 3580 brockwoo Initial Creation
|
* 11/17/09 3580 brockwoo Initial Creation
|
||||||
|
* 11/19/13 2495 bclement changed dim arrays/lists to use npy_intp
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -50,7 +51,7 @@ static int dimensions(PyObject * array) {
|
||||||
if (aDim == 3) {
|
if (aDim == 3) {
|
||||||
returnValue |= 4; // 2d arrays
|
returnValue |= 4; // 2d arrays
|
||||||
} else if (aDim == 2) {
|
} else if (aDim == 2) {
|
||||||
npy_int * aDimList = PyArray_DIMS(array);
|
npy_intp * aDimList = PyArray_DIMS(array);
|
||||||
if (aDimList[0] == 1) {
|
if (aDimList[0] == 1) {
|
||||||
returnValue |= 1; //linear array
|
returnValue |= 1; //linear array
|
||||||
}
|
}
|
||||||
|
@ -79,9 +80,9 @@ static PyObject * defineNumpySlice(PyObject *self, PyObject* args)
|
||||||
int * param3dDim;
|
int * param3dDim;
|
||||||
int levelCount;
|
int levelCount;
|
||||||
int vnz, pnz, vny , pny , vnx , pnx;
|
int vnz, pnz, vny , pny , vnx , pnx;
|
||||||
int dimSize[2];
|
npy_intp dimSize[2];
|
||||||
npy_int * vdimList;
|
npy_intp * vdimList;
|
||||||
npy_int * pdimList;
|
npy_intp * pdimList;
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "OOfi", &vc, ¶m, &targetLevel, &sense)) {
|
if (!PyArg_ParseTuple(args, "OOfi", &vc, ¶m, &targetLevel, &sense)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -211,9 +212,9 @@ static PyObject * createNumpySlice(PyObject *self, PyObject* args)
|
||||||
int * vc3dDim ;
|
int * vc3dDim ;
|
||||||
int levelCount;
|
int levelCount;
|
||||||
float * vc2d ;
|
float * vc2d ;
|
||||||
int dimSize[2];
|
npy_intp dimSize[2];
|
||||||
npy_int * vdimList;
|
npy_intp * vdimList;
|
||||||
npy_int * sdimList;
|
npy_intp * sdimList;
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "OOOi|i", &vc, &s3d, &targetLevel, &sense, &hyb)) {
|
if (!PyArg_ParseTuple(args, "OOOi|i", &vc, &s3d, &targetLevel, &sense, &hyb)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
Name: awips2-python
|
Name: awips2-python
|
||||||
Summary: AWIPS II Python Distribution
|
Summary: AWIPS II Python Distribution
|
||||||
Version: 2.7.1
|
Version: 2.7.1
|
||||||
Release: 9.el6
|
Release: 10.el6
|
||||||
Group: AWIPSII
|
Group: AWIPSII
|
||||||
BuildRoot: %{_build_root}
|
BuildRoot: %{_build_root}
|
||||||
BuildArch: %{_build_arch}
|
BuildArch: %{_build_arch}
|
||||||
|
|
Binary file not shown.
|
@ -400,10 +400,10 @@ if [ "${1}" = "-viz" ]; then
|
||||||
buildRPM "awips2"
|
buildRPM "awips2"
|
||||||
buildRPM "awips2-common-base"
|
buildRPM "awips2-common-base"
|
||||||
#buildRPM "awips2-python-dynamicserialize"
|
#buildRPM "awips2-python-dynamicserialize"
|
||||||
buildRPM "awips2-gfesuite-client"
|
#buildRPM "awips2-gfesuite-client"
|
||||||
buildRPM "awips2-gfesuite-server"
|
#buildRPM "awips2-gfesuite-server"
|
||||||
buildRPM "awips2-python-numpy"
|
#buildRPM "awips2-python-numpy"
|
||||||
#buildRPM "awips2-python"
|
buildRPM "awips2-python"
|
||||||
#buildRPM "awips2-adapt-native"
|
#buildRPM "awips2-adapt-native"
|
||||||
#unpackHttpdPypies
|
#unpackHttpdPypies
|
||||||
#if [ $? -ne 0 ]; then
|
#if [ $? -ne 0 ]; then
|
||||||
|
|
Loading…
Add table
Reference in a new issue