Issue #1803 fix redbook sharing in collaboration

Change-Id: I7e5d887d8dd46fec02966d9ea4723252d7cda31e

Former-commit-id: 4a826332e9 [formerly fdf384ea4cedebbf06c5e4861a5a7cdcc72533b4]
Former-commit-id: 1efb9a2a4d
This commit is contained in:
Nate Jensen 2014-04-10 10:50:33 -05:00
parent fe95275a34
commit 4cccdac37e

View file

@ -94,6 +94,7 @@ import com.vividsolutions.jts.geom.Coordinate;
* Jul 19, 2013 16401 D. Friedman Fix unknown block processing.
* Mar 13, 2014 2907 njensen split edex.redbook plugin into common
* and edex redbook plugins
* Apr 10, 2014 1803 njensen Fix dispose() for collaboration
*
* </pre>
*
@ -141,7 +142,7 @@ public class RedbookFrame implements IRenderable {
return (this.compiler != null);
}
public void deInit() {
protected void deInit() {
if (this.wireframeShape != null) {
this.wireframeShape.dispose();
}
@ -329,9 +330,9 @@ public class RedbookFrame implements IRenderable {
@Override
public void paint(IGraphicsTarget target, PaintProperties paintProps)
throws VizException {
target.drawWireframeShape(this.wireframeShape, this.redbookResource
.getCapability(ColorableCapability.class).getColor(),
RGB color = this.redbookResource.getCapability(
ColorableCapability.class).getColor();
target.drawWireframeShape(this.wireframeShape, color,
this.redbookResource.getCapability(OutlineCapability.class)
.getOutlineWidth(),
this.redbookResource.getCapability(OutlineCapability.class)
@ -339,8 +340,9 @@ public class RedbookFrame implements IRenderable {
synchronized (this) {
IExtent pe = paintProps.getView().getExtent();
IFont font = this.redbookResource.getRenderingFont();
Rectangle2D cellSize = target.getStringBounds(font, "M");
DrawableString m = new DrawableString("M", color);
m.font = this.redbookResource.getRenderingFont();
Rectangle2D cellSize = target.getStringsBounds(m);
boolean clipped = true;
double xRatio = paintProps.getView().getExtent().getWidth()
/ paintProps.getCanvasBounds().width;
@ -556,7 +558,7 @@ public class RedbookFrame implements IRenderable {
: VerticalAlignment.BOTTOM;
Rectangle2D bounds = target.getStringsBounds(dstring);
if (blanked) {
dstring.textStyle = TextStyle.BLANKED;
dstring.addTextStyle(TextStyle.BLANKED);
}
if (isLegend) {
target.getExtension(ICanvasRenderingExtension.class)
@ -608,9 +610,7 @@ public class RedbookFrame implements IRenderable {
}
public void dispose() {
if (this.wireframeShape != null) {
this.wireframeShape.dispose();
}
deInit();
}
public DataTime getDataTime() {