|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.fife.ui.rsyntaxtextarea.Theme
public class Theme
A theme is a set of fonts and colors to use to style RSyntaxTextArea.
Themes are defined in XML files that are validated against
themes.dtd
. This provides applications and other consumers
with an easy way to style RSyntaxTextArea without having to use the API.
Sample themes are included in the source tree under the /themes
folder, but are not a part of the built RSyntaxTextArea jar. Hosting
applications are free to ship and use these themes as-is, modify them, or
create their own.
Note that to save a Theme
via save(OutputStream)
,
you must currently create a Theme
from a text area wrapped in
an RTextScrollPane
, so that the color information for the
gutter can be retrieved.
Constructor Summary | |
---|---|
Theme(RSyntaxTextArea textArea)
Creates a theme from an RSyntaxTextArea. |
Method Summary | |
---|---|
void |
apply(RSyntaxTextArea textArea)
Applies this theme to a text area. |
static Theme |
load(InputStream in)
Loads a theme. |
void |
save(OutputStream out)
Saves this theme to an output stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Theme(RSyntaxTextArea textArea)
RTextScrollPane
to get all gutter color information.
textArea
- The text area.Method Detail |
---|
public void apply(RSyntaxTextArea textArea)
textArea
- The text area to apply this theme to.public static Theme load(InputStream in) throws IOException
in
- The input stream to read from. This will be closed when this
method returns.
IOException
- If an IO error occurs.save(OutputStream)
public void save(OutputStream out) throws IOException
out
- The output stream to write to.
IOException
- If an IO error occurs.load(InputStream)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |