Merge branch 'master_14.2.3' into master_14.2.4
Former-commit-id:ce4a1c042f
[formerly5e04756c0c
] [formerlyce4a1c042f
[formerly5e04756c0c
] [formerly0f8e11aad4
[formerly 78923886791099b8e4564dd780d8ed64db16a5c1]]] Former-commit-id:0f8e11aad4
Former-commit-id:6907e0d17b
[formerly6c13091ec2
] Former-commit-id:189db02dfe
This commit is contained in:
commit
79070ce122
2 changed files with 61 additions and 36 deletions
|
@ -85,6 +85,8 @@ import com.raytheon.viz.gfe.rsc.GFEFonts;
|
||||||
* 02/19/2008 dfitch Initial creation.
|
* 02/19/2008 dfitch Initial creation.
|
||||||
* Apr 7, 2009 #2212 randerso Reimplemented
|
* Apr 7, 2009 #2212 randerso Reimplemented
|
||||||
* Jun 23, 2011 #9897 ryu Update static variables on new GFE config
|
* Jun 23, 2011 #9897 ryu Update static variables on new GFE config
|
||||||
|
* Oct 29, 2014 #3776 randerso Cached fill patterns used in history mode
|
||||||
|
* Renamed static variables to match AWIPS standards
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -108,18 +110,22 @@ public class GridBar implements IMessageClient, IParmInventoryChangedListener,
|
||||||
|
|
||||||
private static final Date BASE_DATE = new Date(0);
|
private static final Date BASE_DATE = new Date(0);
|
||||||
|
|
||||||
private static Color DEFAULT_COLOR = new Color(null,
|
private static final Color DEFAULT_COLOR = new Color(null,
|
||||||
RGBColors.getRGBColor("gray75"));
|
RGBColors.getRGBColor("gray75"));
|
||||||
|
|
||||||
protected static Pattern LockedByMe;
|
protected static Pattern lockedByMe;
|
||||||
|
|
||||||
public static Pattern LockedByOther;
|
public static Pattern lockedByOther;
|
||||||
|
|
||||||
protected static Color TimeBlockVisible_color;
|
protected static Map<RGB, Pattern> modifiedByMe = new HashMap<RGB, Pattern>();
|
||||||
|
|
||||||
protected static Color TimeBlockActive_color;
|
protected static Map<RGB, Pattern> modifiedByOther = new HashMap<RGB, Pattern>();
|
||||||
|
|
||||||
protected static Color TimeBlockInvisible_color;
|
protected static Color timeBlockVisible_color;
|
||||||
|
|
||||||
|
protected static Color timeBlockActive_color;
|
||||||
|
|
||||||
|
protected static Color timeBlockInvisible_color;
|
||||||
|
|
||||||
protected static boolean showEditorTimeLines;
|
protected static boolean showEditorTimeLines;
|
||||||
|
|
||||||
|
@ -140,10 +146,10 @@ public class GridBar implements IMessageClient, IParmInventoryChangedListener,
|
||||||
if ((pattern = prefs.getString("LockedByMe_pattern")).isEmpty()) {
|
if ((pattern = prefs.getString("LockedByMe_pattern")).isEmpty()) {
|
||||||
pattern = "WHOLE";
|
pattern = "WHOLE";
|
||||||
}
|
}
|
||||||
if (LockedByMe != null) {
|
if (lockedByMe != null) {
|
||||||
LockedByMe.dispose();
|
lockedByMe.dispose();
|
||||||
}
|
}
|
||||||
LockedByMe = FillPatterns.getSWTPattern(
|
lockedByMe = FillPatterns.getSWTPattern(
|
||||||
RGBColors.getRGBColor(color), pattern);
|
RGBColors.getRGBColor(color), pattern);
|
||||||
|
|
||||||
if ((color = prefs.getString("LockedByOther_color")).isEmpty()) {
|
if ((color = prefs.getString("LockedByOther_color")).isEmpty()) {
|
||||||
|
@ -153,40 +159,50 @@ public class GridBar implements IMessageClient, IParmInventoryChangedListener,
|
||||||
.isEmpty()) {
|
.isEmpty()) {
|
||||||
pattern = "WHOLE";
|
pattern = "WHOLE";
|
||||||
}
|
}
|
||||||
if (LockedByOther != null) {
|
if (lockedByOther != null) {
|
||||||
LockedByOther.dispose();
|
lockedByOther.dispose();
|
||||||
}
|
}
|
||||||
LockedByOther = FillPatterns.getSWTPattern(
|
lockedByOther = FillPatterns.getSWTPattern(
|
||||||
RGBColors.getRGBColor(color), pattern);
|
RGBColors.getRGBColor(color), pattern);
|
||||||
|
|
||||||
|
for (RGB key : modifiedByMe.keySet()) {
|
||||||
|
Pattern pat = modifiedByMe.remove(key);
|
||||||
|
pat.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (RGB key : modifiedByOther.keySet()) {
|
||||||
|
Pattern pat = modifiedByOther.remove(key);
|
||||||
|
pat.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
if ((color = prefs.getString("TimeBlockVisible_color"))
|
if ((color = prefs.getString("TimeBlockVisible_color"))
|
||||||
.isEmpty()) {
|
.isEmpty()) {
|
||||||
color = "White";
|
color = "White";
|
||||||
}
|
}
|
||||||
if (TimeBlockVisible_color != null) {
|
if (timeBlockVisible_color != null) {
|
||||||
TimeBlockVisible_color.dispose();
|
timeBlockVisible_color.dispose();
|
||||||
}
|
}
|
||||||
TimeBlockVisible_color = new Color(Display.getDefault(),
|
timeBlockVisible_color = new Color(Display.getDefault(),
|
||||||
RGBColors.getRGBColor(color));
|
RGBColors.getRGBColor(color));
|
||||||
|
|
||||||
if ((color = prefs.getString("TimeBlockActive_color"))
|
if ((color = prefs.getString("TimeBlockActive_color"))
|
||||||
.isEmpty()) {
|
.isEmpty()) {
|
||||||
color = "Yellow";
|
color = "Yellow";
|
||||||
}
|
}
|
||||||
if (TimeBlockActive_color != null) {
|
if (timeBlockActive_color != null) {
|
||||||
TimeBlockActive_color.dispose();
|
timeBlockActive_color.dispose();
|
||||||
}
|
}
|
||||||
TimeBlockActive_color = new Color(Display.getDefault(),
|
timeBlockActive_color = new Color(Display.getDefault(),
|
||||||
RGBColors.getRGBColor(color));
|
RGBColors.getRGBColor(color));
|
||||||
|
|
||||||
if ((color = prefs.getString("TimeBlockInvisible_color"))
|
if ((color = prefs.getString("TimeBlockInvisible_color"))
|
||||||
.isEmpty()) {
|
.isEmpty()) {
|
||||||
color = "Gray50";
|
color = "Gray50";
|
||||||
}
|
}
|
||||||
if (TimeBlockInvisible_color != null) {
|
if (timeBlockInvisible_color != null) {
|
||||||
TimeBlockInvisible_color.dispose();
|
timeBlockInvisible_color.dispose();
|
||||||
}
|
}
|
||||||
TimeBlockInvisible_color = new Color(Display.getDefault(),
|
timeBlockInvisible_color = new Color(Display.getDefault(),
|
||||||
RGBColors.getRGBColor(color));
|
RGBColors.getRGBColor(color));
|
||||||
|
|
||||||
showEditorTimeLines = true;
|
showEditorTimeLines = true;
|
||||||
|
@ -496,7 +512,7 @@ public class GridBar implements IMessageClient, IParmInventoryChangedListener,
|
||||||
|
|
||||||
LockTable lockTable = parm.getLockTable();
|
LockTable lockTable = parm.getLockTable();
|
||||||
|
|
||||||
gc.setBackgroundPattern(LockedByMe);
|
gc.setBackgroundPattern(lockedByMe);
|
||||||
for (TimeRange timeRange : lockTable.lockedByMe()) {
|
for (TimeRange timeRange : lockTable.lockedByMe()) {
|
||||||
if (timeRange.overlaps(this.gridManager.getVisibleTimeRange())) {
|
if (timeRange.overlaps(this.gridManager.getVisibleTimeRange())) {
|
||||||
Rectangle rect = computeLockRect(timeRange);
|
Rectangle rect = computeLockRect(timeRange);
|
||||||
|
@ -505,7 +521,7 @@ public class GridBar implements IMessageClient, IParmInventoryChangedListener,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gc.setBackgroundPattern(LockedByOther);
|
gc.setBackgroundPattern(lockedByOther);
|
||||||
for (TimeRange timeRange : lockTable.lockedByOther()) {
|
for (TimeRange timeRange : lockTable.lockedByOther()) {
|
||||||
if (timeRange.overlaps(this.gridManager.getVisibleTimeRange())) {
|
if (timeRange.overlaps(this.gridManager.getVisibleTimeRange())) {
|
||||||
Rectangle rect = computeLockRect(timeRange);
|
Rectangle rect = computeLockRect(timeRange);
|
||||||
|
@ -519,7 +535,7 @@ public class GridBar implements IMessageClient, IParmInventoryChangedListener,
|
||||||
TimeRange dataTR[]) {
|
TimeRange dataTR[]) {
|
||||||
GC gc = event.gc;
|
GC gc = event.gc;
|
||||||
TimeRange visibleRange = gridManager.getVisibleTimeRange();
|
TimeRange visibleRange = gridManager.getVisibleTimeRange();
|
||||||
gc.setForeground(TimeBlockInvisible_color);
|
gc.setForeground(timeBlockInvisible_color);
|
||||||
|
|
||||||
gc.setLineStyle(DATA_BLOCK_LINE_STYLE);
|
gc.setLineStyle(DATA_BLOCK_LINE_STYLE);
|
||||||
gc.setLineWidth(0);
|
gc.setLineWidth(0);
|
||||||
|
@ -684,18 +700,18 @@ public class GridBar implements IMessageClient, IParmInventoryChangedListener,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!active && !visible) {
|
if (!active && !visible) {
|
||||||
gc.setBackground(TimeBlockInvisible_color);
|
gc.setBackground(timeBlockInvisible_color);
|
||||||
gc.fillRectangle(rect);
|
gc.fillRectangle(rect);
|
||||||
} else if (!active && visible) {
|
} else if (!active && visible) {
|
||||||
gc.setBackground(TimeBlockVisible_color);
|
gc.setBackground(timeBlockVisible_color);
|
||||||
gc.fillRectangle(rect);
|
gc.fillRectangle(rect);
|
||||||
} else if (active && visible) {
|
} else if (active && visible) {
|
||||||
gc.setBackground(TimeBlockActive_color);
|
gc.setBackground(timeBlockActive_color);
|
||||||
gc.fillRectangle(rect);
|
gc.fillRectangle(rect);
|
||||||
} else {
|
} else {
|
||||||
gc.setBackground(TimeBlockInvisible_color);
|
gc.setBackground(timeBlockInvisible_color);
|
||||||
gc.fillRectangle(rect);
|
gc.fillRectangle(rect);
|
||||||
gc.setForeground(TimeBlockActive_color);
|
gc.setForeground(timeBlockActive_color);
|
||||||
gc.drawRectangle(rect);
|
gc.drawRectangle(rect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -760,13 +776,21 @@ public class GridBar implements IMessageClient, IParmInventoryChangedListener,
|
||||||
patt = Activator.getDefault().getPreferenceStore()
|
patt = Activator.getDefault().getPreferenceStore()
|
||||||
.getString("HistoryUserModPattern_Me");
|
.getString("HistoryUserModPattern_Me");
|
||||||
if (!patt.isEmpty()) {
|
if (!patt.isEmpty()) {
|
||||||
fp = FillPatterns.getSWTPattern(color.getRGB(), patt);
|
fp = modifiedByMe.get(color.getRGB());
|
||||||
|
if (fp == null) {
|
||||||
|
fp = FillPatterns.getSWTPattern(color.getRGB(), patt);
|
||||||
|
modifiedByMe.put(color.getRGB(), fp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
patt = Activator.getDefault().getPreferenceStore()
|
patt = Activator.getDefault().getPreferenceStore()
|
||||||
.getString("HistoryUserModPattern_Other");
|
.getString("HistoryUserModPattern_Other");
|
||||||
if (!patt.isEmpty()) {
|
if (!patt.isEmpty()) {
|
||||||
fp = FillPatterns.getSWTPattern(color.getRGB(), patt);
|
fp = modifiedByOther.get(color.getRGB());
|
||||||
|
if (fp == null) {
|
||||||
|
fp = FillPatterns.getSWTPattern(color.getRGB(), patt);
|
||||||
|
modifiedByOther.put(color.getRGB(), fp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,9 +52,7 @@ 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.time.TimeRange;
|
import com.raytheon.uf.common.time.TimeRange;
|
||||||
import com.raytheon.uf.viz.core.VizApp;
|
import com.raytheon.uf.viz.core.VizApp;
|
||||||
import com.raytheon.viz.gfe.Activator;
|
|
||||||
import com.raytheon.viz.gfe.GFEPreference;
|
import com.raytheon.viz.gfe.GFEPreference;
|
||||||
import com.raytheon.viz.gfe.constants.StatusConstants;
|
|
||||||
import com.raytheon.viz.gfe.core.griddata.IGridData;
|
import com.raytheon.viz.gfe.core.griddata.IGridData;
|
||||||
import com.raytheon.viz.gfe.core.msgs.IParmInventoryChangedListener;
|
import com.raytheon.viz.gfe.core.msgs.IParmInventoryChangedListener;
|
||||||
import com.raytheon.viz.gfe.core.parm.Parm;
|
import com.raytheon.viz.gfe.core.parm.Parm;
|
||||||
|
@ -78,6 +76,7 @@ import com.raytheon.viz.gfe.temporaleditor.mousehandler.TitleBarMouseHandler;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Apr 30, 2009 2159 rjpeter Initial creation.
|
* Apr 30, 2009 2159 rjpeter Initial creation.
|
||||||
|
* Oct 29, 2014 #3776 randerso Renamed static variables to match AWIPS standards
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author rjpeter
|
* @author rjpeter
|
||||||
|
@ -85,7 +84,9 @@ import com.raytheon.viz.gfe.temporaleditor.mousehandler.TitleBarMouseHandler;
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractTemporalEditorBar implements
|
public abstract class AbstractTemporalEditorBar implements
|
||||||
Comparable<AbstractTemporalEditorBar> {
|
Comparable<AbstractTemporalEditorBar> {
|
||||||
private static final transient IUFStatusHandler statusHandler = UFStatus.getHandler(AbstractTemporalEditorBar.class);
|
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||||
|
.getHandler(AbstractTemporalEditorBar.class);
|
||||||
|
|
||||||
protected static final Color DEFAULT_COLOR = Display.getDefault()
|
protected static final Color DEFAULT_COLOR = Display.getDefault()
|
||||||
.getSystemColor(SWT.COLOR_GRAY);
|
.getSystemColor(SWT.COLOR_GRAY);
|
||||||
|
|
||||||
|
@ -552,7 +553,7 @@ public abstract class AbstractTemporalEditorBar implements
|
||||||
for (Parm parm : parmList) {
|
for (Parm parm : parmList) {
|
||||||
LockTable lockTable = parm.getLockTable();
|
LockTable lockTable = parm.getLockTable();
|
||||||
|
|
||||||
gc.setBackgroundPattern(GridBar.LockedByOther);
|
gc.setBackgroundPattern(GridBar.lockedByOther);
|
||||||
for (TimeRange timeRange : lockTable.lockedByOther()) {
|
for (TimeRange timeRange : lockTable.lockedByOther()) {
|
||||||
if (timeRange.overlaps(range)) {
|
if (timeRange.overlaps(range)) {
|
||||||
Rectangle rect = teUtil.timeRangeToPixels(timeRange);
|
Rectangle rect = teUtil.timeRangeToPixels(timeRange);
|
||||||
|
@ -643,7 +644,7 @@ public abstract class AbstractTemporalEditorBar implements
|
||||||
scaleCanvas.redraw();
|
scaleCanvas.redraw();
|
||||||
editorCanvas.redraw();
|
editorCanvas.redraw();
|
||||||
bottomLabel.redraw();
|
bottomLabel.redraw();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue