mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-12 06:57:13 -06:00
Theme Editor: added editor theme
This commit is contained in:
@@ -23,6 +23,7 @@ import java.nio.charset.StandardCharsets;
|
||||
import javax.swing.JPanel;
|
||||
import org.fife.ui.rsyntaxtextarea.AbstractTokenMakerFactory;
|
||||
import org.fife.ui.rsyntaxtextarea.FileLocation;
|
||||
import org.fife.ui.rsyntaxtextarea.Theme;
|
||||
import org.fife.ui.rsyntaxtextarea.TokenMakerFactory;
|
||||
import org.fife.ui.rtextarea.RTextScrollPane;
|
||||
import com.formdev.flatlaf.util.UIScale;
|
||||
@@ -51,6 +52,14 @@ class FlatThemeEditorPane
|
||||
textArea = new FlatSyntaxTextArea();
|
||||
textArea.setSyntaxEditingStyle( FLATLAF_STYLE );
|
||||
|
||||
// theme
|
||||
try {
|
||||
Theme theme = Theme.load( getClass().getResourceAsStream( "light.xml" ) );
|
||||
theme.apply( textArea );
|
||||
} catch( IOException ex ) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
// create scroll pane
|
||||
scrollPane = new RTextScrollPane( textArea );
|
||||
scrollPane.setLineNumbersEnabled( true );
|
||||
|
||||
Reference in New Issue
Block a user