I just tried to make a text editor feature which blurs the text of an RSytaxTextArea wrapped in an RTextScrollPane, but have failed to do so on the first try. The latter seems to insist that components passed to it's setViewportView() method be subclasses of RTextArea. Why is that?

A JXLayer (and it's spawn JLayer, part of JDK7) are meant to wrap components in order to decorate them (paint over them, capture events, etc.). It's mighty useful. I wanted to decorate RSTA but that means I now have to pass the decorator to the scroll pane instead of RSTA itself. Which cannot be done as it seems, unfortunately.

RTextScrollPane needs an RSyntaxTextArea in it because it needs information from the text area to render the Gutter correctly (line numbers and code folding, etc.).

What is the best way to allow for support of JXLayer/JLayer? RSTA only requires Java 5, so we cannot reference the Java 7 JLayer class directly. If I added an interface for your layer implementations to also implement (yuck, I know), that gave access to the contained RSTA instance, would that work? Something like this: