diff --git a/src/main/java/pl/andus/skeditor/Main.java b/src/main/java/pl/andus/skeditor/Main.java index 1b8b961..969c10d 100644 --- a/src/main/java/pl/andus/skeditor/Main.java +++ b/src/main/java/pl/andus/skeditor/Main.java @@ -70,12 +70,14 @@ public Main() throws IOException { JMenuItem nSkyTheme = new JMenuItem("Night Sky"); JMenuItem metalicTheme = new JMenuItem("Metalic"); JMenuItem laserLTheme = new JMenuItem("Laser Lemon"); + JMenuItem nineEightTheme = new JMenuItem("98"); themesMenu.add(lightTheme); themesMenu.add(darkTheme); themesMenu.add(nSkyTheme); themesMenu.add(metalicTheme); themesMenu.add(laserLTheme); + themesMenu.add(nineEightTheme); JMenuItem about = new JMenuItem("About"); @@ -223,6 +225,8 @@ public Main() throws IOException { laserLTheme.addActionListener(e -> LimeToYellow()); + nineEightTheme.addActionListener(e -> NineEight()); + about.addActionListener(e -> new About()); } diff --git a/src/main/java/pl/andus/skeditor/Themes.java b/src/main/java/pl/andus/skeditor/Themes.java index 118c525..201d189 100644 --- a/src/main/java/pl/andus/skeditor/Themes.java +++ b/src/main/java/pl/andus/skeditor/Themes.java @@ -3,6 +3,8 @@ import org.fife.ui.rsyntaxtextarea.Token; import javax.imageio.ImageIO; +import javax.swing.*; +import javax.swing.plaf.metal.MetalLookAndFeel; import java.awt.*; import java.awt.image.BufferedImage; import java.io.IOException; @@ -10,9 +12,11 @@ import static pl.andus.skeditor.Main.*; public class Themes { + static BufferedImage nightSkyImg = null; static BufferedImage metalImg = null; static BufferedImage laserLemonImg = null; + static BufferedImage neImg = null; public static void Light() { // menu @@ -56,7 +60,7 @@ public static void NightSky() { } // menu - menuBar.setBackground(Color.white); + menuBar.setBackground(new Color(0, 77, 168)); // textarea textArea.setBackgroundImage(nightSkyImg); textArea.setCurrentLineHighlightColor(new Color(0, 118, 255, 161)); @@ -113,4 +117,26 @@ public static void LimeToYellow() { scheme.getStyle(Token.OPERATOR).foreground = new Color(231, 80, 255); scheme.getStyle(Token.LITERAL_NUMBER_DECIMAL_INT).foreground = Color.lightGray; } + + public static void NineEight() { + try { + neImg = ImageIO.read(Themes.class.getClassLoader().getResourceAsStream("themes/98.png")); + } catch (IOException e) { + e.printStackTrace(); + } + + // menu + menuBar.setBackground(new Color(0, 125, 121)); + // textarea + textArea.setBackgroundImage(neImg); + textArea.setCurrentLineHighlightColor(new Color(0, 125, 160, 165)); + textArea.setForeground(Color.black); + // text + scheme.getStyle(Token.RESERVED_WORD).foreground = Color.blue; + scheme.getStyle(Token.RESERVED_WORD_2).foreground = new Color(255, 0, 0); + scheme.getStyle(Token.COMMENT_KEYWORD).foreground = Color.magenta; + scheme.getStyle(Token.DATA_TYPE).foreground = new Color(31, 140, 255); + scheme.getStyle(Token.OPERATOR).foreground = new Color(231, 80, 255); + scheme.getStyle(Token.LITERAL_NUMBER_DECIMAL_INT).foreground = Color.lightGray; + } } diff --git a/src/main/resources/themes/98.png b/src/main/resources/themes/98.png new file mode 100644 index 0000000..30de63f Binary files /dev/null and b/src/main/resources/themes/98.png differ diff --git a/src/main/resources/themes/lime-yellow.png b/src/main/resources/themes/lime-yellow.png index 777563a..bbe7145 100644 Binary files a/src/main/resources/themes/lime-yellow.png and b/src/main/resources/themes/lime-yellow.png differ diff --git a/src/main/resources/themes/metal.png b/src/main/resources/themes/metal.png index 51a3719..af70403 100644 Binary files a/src/main/resources/themes/metal.png and b/src/main/resources/themes/metal.png differ diff --git a/src/main/resources/themes/night.png b/src/main/resources/themes/night.png index ec91185..b1c8fb2 100644 Binary files a/src/main/resources/themes/night.png and b/src/main/resources/themes/night.png differ diff --git a/src/main/resources/themes/unused/mc-sunset.png b/src/main/resources/themes/unused/mc-sunset.png new file mode 100644 index 0000000..76bf13b Binary files /dev/null and b/src/main/resources/themes/unused/mc-sunset.png differ diff --git a/target/classes/pl/andus/skeditor/Main.class b/target/classes/pl/andus/skeditor/Main.class index 397efde..f7c4140 100644 Binary files a/target/classes/pl/andus/skeditor/Main.class and b/target/classes/pl/andus/skeditor/Main.class differ diff --git a/target/classes/pl/andus/skeditor/ShowDialog.class b/target/classes/pl/andus/skeditor/ShowDialog.class index 0b8df8f..6d5726d 100644 Binary files a/target/classes/pl/andus/skeditor/ShowDialog.class and b/target/classes/pl/andus/skeditor/ShowDialog.class differ diff --git a/target/classes/pl/andus/skeditor/Themes.class b/target/classes/pl/andus/skeditor/Themes.class index f3a06b2..8cc9ebe 100644 Binary files a/target/classes/pl/andus/skeditor/Themes.class and b/target/classes/pl/andus/skeditor/Themes.class differ diff --git a/target/classes/themes/98.png b/target/classes/themes/98.png new file mode 100644 index 0000000..30de63f Binary files /dev/null and b/target/classes/themes/98.png differ diff --git a/target/classes/themes/lime-yellow.png b/target/classes/themes/lime-yellow.png index 777563a..bbe7145 100644 Binary files a/target/classes/themes/lime-yellow.png and b/target/classes/themes/lime-yellow.png differ diff --git a/target/classes/themes/metal.png b/target/classes/themes/metal.png index 51a3719..af70403 100644 Binary files a/target/classes/themes/metal.png and b/target/classes/themes/metal.png differ diff --git a/target/classes/themes/night.png b/target/classes/themes/night.png index ec91185..b1c8fb2 100644 Binary files a/target/classes/themes/night.png and b/target/classes/themes/night.png differ diff --git a/target/classes/themes/unused/mc-sunset.png b/target/classes/themes/unused/mc-sunset.png new file mode 100644 index 0000000..76bf13b Binary files /dev/null and b/target/classes/themes/unused/mc-sunset.png differ