Merge "ASM #114" into asm_14.2.2
Former-commit-id:dd71746c6f
[formerly3edd73f78c
] [formerly575ed3610d
] [formerlydd71746c6f
[formerly3edd73f78c
] [formerly575ed3610d
] [formerlyc6253811e8
[formerly575ed3610d
[formerly d719e88d510424020955f06d8b597d2df3573836]]]] Former-commit-id:c6253811e8
Former-commit-id:d191fb83af
[formerlyf54454f8f1
] [formerly f3f8b80f5f698a4e575a4f3e5ff5b88856aa9c27 [formerly430b9a1ace
]] Former-commit-id: 98f642b65c54a5116368dc81ddbcde695e6ba5e2 [formerlyeb96dc613f
] Former-commit-id:05ad2e4da5
This commit is contained in:
commit
f5a8116a91
1 changed files with 17 additions and 5 deletions
|
@ -98,6 +98,8 @@ import com.vividsolutions.jts.geom.LineString;
|
|||
* 15Mar2013 15693 mgamazaychikov Made sure that magnification capability works.
|
||||
* 06-11-2013 DR 16234 D. Friedman Fix pivot index when frames count is reduced.
|
||||
* 06-24-2013 DR 16317 D. Friedman Handle "motionless" track.
|
||||
* 01-28-2014 DR16465 mgamazaychikov Fixed the problem with anchor point when frame
|
||||
* count changes; made line width configurable.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -408,13 +410,13 @@ public class StormTrackDisplay implements IRenderable {
|
|||
// if mouseDownGeom set or not
|
||||
RGB lineColor = state.mouseDownGeom != null ? LIGHT_GRAY : state.color;
|
||||
// Paint the non dragging geom
|
||||
paintLine(target, line.getCoordinates(), lineColor, state.isEditable(),
|
||||
paintLine(target, line.getCoordinates(), lineColor, state.lineWidth, state.isEditable(),
|
||||
circleSize, LineStyle.SOLID);
|
||||
|
||||
if (state.mouseDownGeom != null) {
|
||||
// Paint the dragging geom
|
||||
paintLine(target, state.mouseDownGeom.getCoordinates(),
|
||||
state.color, state.isEditable(), circleSize,
|
||||
state.color, state.lineWidth, state.isEditable(), circleSize,
|
||||
LineStyle.DOTTED);
|
||||
lineColor = LIGHT_GRAY;
|
||||
}
|
||||
|
@ -425,7 +427,7 @@ public class StormTrackDisplay implements IRenderable {
|
|||
line,
|
||||
gf.createPoint(state.futurePoints[state.futurePoints.length - 1].coord));
|
||||
if (endLine != null) {
|
||||
paintLine(target, endLine.getCoordinates(), lineColor, false,
|
||||
paintLine(target, endLine.getCoordinates(), lineColor, state.lineWidth, false,
|
||||
0, LineStyle.DASHED_LARGE);
|
||||
}
|
||||
}
|
||||
|
@ -440,12 +442,13 @@ public class StormTrackDisplay implements IRenderable {
|
|||
* coordinates in the line
|
||||
* @param color
|
||||
* color of the line
|
||||
* @param lineWidth
|
||||
* @param editable
|
||||
* if the line is editable
|
||||
* @throws VizException
|
||||
*/
|
||||
private void paintLine(IGraphicsTarget target, Coordinate[] coords,
|
||||
RGB color, boolean editable, double circleSize, LineStyle style)
|
||||
RGB color, float lineWidth, boolean editable, double circleSize, LineStyle style)
|
||||
throws VizException {
|
||||
DrawableCircle circle = new DrawableCircle();
|
||||
circle.basics.color = color;
|
||||
|
@ -474,7 +477,7 @@ public class StormTrackDisplay implements IRenderable {
|
|||
lastCoord.x, lastCoord.y });
|
||||
|
||||
target.drawLine(p1[0], p1[1], 0.0, p2[0], p2[1], 0.0,
|
||||
color, 1.0f, style);
|
||||
color, lineWidth, style);
|
||||
}
|
||||
}
|
||||
lastCoord = currCoord;
|
||||
|
@ -716,6 +719,15 @@ public class StormTrackDisplay implements IRenderable {
|
|||
|| currentState.newDuration != -1 || update) {
|
||||
if (currentState.timePoints != null
|
||||
&& currentState.timePoints.length != frameCount) {
|
||||
// need to set theAnchorPoint and theAnchorIndex here
|
||||
// because timePoints get erased before we get to updateAnchorPoint
|
||||
DataTime frameTime = paintProps.getDataTime();
|
||||
for (int j=0;j<currentState.timePoints.length;j++){
|
||||
if (frameTime.equals(currentState.timePoints[j].time)) {
|
||||
theAnchorPoint = currentState.timePoints[j].coord;
|
||||
theAnchorIndex = j;
|
||||
}
|
||||
}
|
||||
currentState.timePoints = null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue