if (doc != null)
/* do we need this? if (doc != null && body_box != null) { if(body_box.width != d.width)
    public void setSize(Dimension d) {        XRLog.layout(Level.FINEST, "set size called");        super.setSize(d);        if (doc != null)            RenderQueue.getInstance().dispatchLayoutEvent(new ReflowEvent(ReflowEvent.CANVAS_RESIZED, d));    }