private boolean shouldPaintAeroEditorBorder(Component c) {
        JScrollPane scrollPane = (JScrollPane) c;
        Component view = SwingUtilities.getUnwrappedView(scrollPane.getViewport());
        return view instanceof JTextComponent || view instanceof JComponent
                && Boolean.TRUE.equals(
                        ((JComponent) view).getClientProperty(PropertyKeys.AERO_EDITOR));
    }