void (final GuiEditor editor, @NotNull final RadComponent component, final Graphics g) { if (!(component instanceof RadContainer) && !(component instanceof RadNestedForm) && !component.isDragBorder()) { return; } boolean highlightBoundaries = (getDesignTimeInsets(component) > 2); if (component instanceof RadContainer container && !component.isDragBorder()) { if (!highlightBoundaries && (container.getBorderTitle() != null || container.getBorderType() != BorderType.NONE)) { return; } } final Point point = SwingUtilities.convertPoint( component.getDelegee(), 0, 0, editor.getRootContainer().getDelegee() ); g.translate(point.x, point.y); try { if (component.isDragBorder()) { Graphics2D g2d = (Graphics2D)g; g2d.setColor(LightColors.YELLOW); g2d.setStroke(new BasicStroke(2.0f)); g2d.translate(1, 1); } else if (highlightBoundaries) { g.setColor(HIGHLIGHTED_BOUNDARY_COLOR); } else if (component.isSelected()) { g.setColor(SELECTED_BOUNDARY_COLOR); } else { g.setColor(NON_SELECTED_BOUNDARY_COLOR); } g.drawRect(0, 0, component.getWidth() - 1, component.getHeight() - 1); if (component.isDragBorder()) { g.translate(-1, -1); } } finally { g.translate(-point.x, -point.y); } }