if ((box.hasNode() && box.getNode().getNodeName() != "body") && !(box instanceof BlockBox)) {
if ((box.hasContent() && box.getContent() instanceof TextContent)) {
    public void mouseDragged(MouseEvent e) {        if (e.getComponent() instanceof BasicPanel) {            panel = (BasicPanel) e.getComponent();            Box box = panel.findBox(e.getX(), e.getY());            if (box == null) {                return;            }            // if box is text node then start selection            if ((box.hasNode() &&                    box.getNode().getNodeName() != "body") &&                    !(box instanceof BlockBox)) {                int x = panel.findBoxX(e.getX(), e.getY());                panel.getContext().setSelectionEnd(box, x);                panel.repaint();            }        }    }