boolean (DnDEvent event) { event.setDropPossible(false); EventContext eventContext = getEventContext(event.getPoint()); if (eventContext == null) return true; if (eventContext.descriptor.canDrop(event, INTO)) { event.setDropPossible(true); RelativeRectangle rectangle = new RelativeRectangle(myTree, eventContext.cellBounds); event.setHighlighting(rectangle, DnDEvent.DropTargetHighlightingType.RECTANGLE); return false; } Position position = eventContext.getPosition(); if (eventContext.descriptor.canDrop(event, position)) { event.setDropPossible(true); Rectangle bounds = eventContext.cellBounds; bounds.y -= -1; bounds.height = 2; if (position != ABOVE) { bounds.y += bounds.height; } RelativeRectangle rectangle = new RelativeRectangle(myTree, bounds); event.setHighlighting(rectangle, DnDEvent.DropTargetHighlightingType.FILLED_RECTANGLE); return false; } event.hideHighlighter(); return false; }