diff --git a/Spirit_License_1.0.license b/Spirit_License_1.0.license index 73a44c6..131cd5d 100644 --- a/Spirit_License_1.0.license +++ b/Spirit_License_1.0.license @@ -1,6 +1,6 @@ This software is licensed under Spirit License 1.0 -By downloading this plugin you confirm that you are one of us, a part of [idP!] Crew and you swear fulfill these basic principles: +By downloading this plugin you swear to try to fulfill these basic principles: 1. Right understanding: To have right understanding is to comprehend that life is impermanent and that one's illusion of a separate and individual self contributes to one's dissatisfaction in life. diff --git a/build.xml b/build.xml index fb74315..335c74e 100644 --- a/build.xml +++ b/build.xml @@ -2,7 +2,7 @@ - - Builds, tests, and runs the project org.idp.laf. + + Builds, tests, and runs the project org.twopm.laf. diff --git a/manifest.mf b/manifest.mf index a9adfd1..8eaa0c9 100644 --- a/manifest.mf +++ b/manifest.mf @@ -1,7 +1,7 @@ Manifest-Version: 1.0 AutoUpdate-Show-In-Client: true -OpenIDE-Module: org.idp.laf/1 +OpenIDE-Module: org.twopm.laf/1 OpenIDE-Module-Implementation-Version: 0 -OpenIDE-Module-Localizing-Bundle: org/idp/laf/Bundle.properties -OpenIDE-Module-Install: org/idp/laf/Installer.class +OpenIDE-Module-Localizing-Bundle: org/twopm/laf/Bundle.properties +OpenIDE-Module-Install: org/twopm/laf/Installer.class OpenIDE-Module-Requires: org.openide.windows.WindowManager diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml index 767aa16..315ec82 100644 --- a/nbproject/build-impl.xml +++ b/nbproject/build-impl.xml @@ -3,7 +3,7 @@ *** GENERATED FROM project.xml - DO NOT EDIT *** *** EDIT ../build.xml INSTEAD *** --> - + diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties index b10ea6f..94e89e2 100644 --- a/nbproject/genfiles.properties +++ b/nbproject/genfiles.properties @@ -1,8 +1,8 @@ -build.xml.data.CRC32=45912724 +build.xml.data.CRC32=62cf18a4 build.xml.script.CRC32=1097797e -build.xml.stylesheet.CRC32=a56c6a5b@2.67.1 +build.xml.stylesheet.CRC32=15ca8a54@2.74.1 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=45912724 +nbproject/build-impl.xml.data.CRC32=62cf18a4 nbproject/build-impl.xml.script.CRC32=e0c60086 -nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.67.1 +nbproject/build-impl.xml.stylesheet.CRC32=49aa68b0@2.74.1 diff --git a/nbproject/project.properties b/nbproject/project.properties index df3e4b7..3705531 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -3,8 +3,8 @@ javac.source=1.6 javac.compilerargs=-Xlint -Xlint:-serial javadoc.arch=${basedir}/arch.xml license.file=Spirit_License_1.0.license -nbm.homepage=http://idp-crew.com/index.php/projects/laf/ -nbm.module.author=Sinner +nbm.homepage= +nbm.module.author=pagan nbm.needs.restart=true spec.version.base=1.6 keystore=nbproject/private/keystore diff --git a/nbproject/project.xml b/nbproject/project.xml index aa69236..8b5f805 100644 --- a/nbproject/project.xml +++ b/nbproject/project.xml @@ -3,7 +3,7 @@ org.netbeans.modules.apisupport.project - org.idp.laf + org.twopm.laf @@ -89,7 +89,7 @@ - org.idp.laf + org.twopm.laf diff --git a/src/org/twopm/laf/AttributeSetConfigured.java b/src/org/twopm/laf/AttributeSetConfigured.java new file mode 100644 index 0000000..768a406 --- /dev/null +++ b/src/org/twopm/laf/AttributeSetConfigured.java @@ -0,0 +1,134 @@ +package org.twopm.laf; + +import java.awt.Color; +import java.util.List; + +/** + * @author Edward M. Kagan + */ +public class AttributeSetConfigured { + + String name; + Color bgColor; + Color fgColor; + Color underColor; + + Boolean v_isUseHighlightColor; + Boolean v_isInheritForegroundColor; + Boolean v_isUseWaveUnderlineColor; + + Color a_getHighlight; + Color a_getForegroundColor; + Color a_getWaveUnderlineColor; + + + Boolean bold; + Boolean italic; + + public AttributeSetConfigured (String name, + Color bgColor, + Color fgColor, + Color underColor, + + Boolean v_isUseHighlightColor, + Boolean v_isInheritForegroundColor, + Boolean v_isUseWaveUnderlineColor, + + Color a_getHighlight, + Color a_getForegroundColor, + Color a_getWaveUnderlineColor, + + Boolean bold, + Boolean italic + ) + { + this.name = name; + this.bgColor = bgColor; + this.fgColor = fgColor; + this.underColor = underColor; + this.v_isInheritForegroundColor = v_isInheritForegroundColor; + this.v_isUseHighlightColor = v_isUseHighlightColor; + this.v_isUseWaveUnderlineColor = v_isUseWaveUnderlineColor; + this.bold = bold; + this.italic = italic; + this.a_getForegroundColor = a_getForegroundColor; + this.a_getHighlight = a_getHighlight; + this.a_getWaveUnderlineColor = a_getWaveUnderlineColor; + } + + public String produceConfLine () + { + String res = "new AttributeSetConfigured (" ; + res +="\"" + this.name + "\", "; + res += wrapColor(bgColor) + ", "; + res += wrapColor(fgColor) + ", "; + res += wrapColor(underColor) + ", "; + res += wrapBoolean (v_isUseHighlightColor) + ", "; + res += wrapBoolean (v_isInheritForegroundColor) + ", "; + res += wrapBoolean (v_isUseWaveUnderlineColor) + ", "; + res += wrapColor(a_getForegroundColor) + ", "; + res += wrapColor(a_getHighlight) + ", "; + res += wrapColor(a_getWaveUnderlineColor) + ", "; + res += wrapBoolean (bold) + ", "; + res += wrapBoolean (italic); + res += ")"; + return res; + } + + private String wrapColor(Color c) + { + if (c != null) + { + String res = "new Color (" + c.getRed() + ", " + + c.getGreen() + ", " + + c.getBlue() + ", " + + c.getAlpha() + ")"; + return res; + } + else + { + return "null"; + } + } + + private String wrapBoolean(Boolean b) + { + if (b != null) + { + if (b) + { + return "true"; + } + else + { + return "false"; + } + } + else + { + return "null"; + } + } + + public static void compileSet (String setName, List conf) + { + String res = "private static final AttributeSetConfigured [] " + setName + " = {\n"; + + for (int i = 0; i < conf.size(); i ++) + { + if (i != conf.size() - 1) + { + res += " " + conf.get(i).produceConfLine() + ", \n"; + } + else + { + res += " " + conf.get(i).produceConfLine() + "\n"; + } + } + + res += "};"; + System.out.println(res); + } + + +} diff --git a/src/org/twopm/laf/Bundle.properties b/src/org/twopm/laf/Bundle.properties new file mode 100644 index 0000000..a0083ea --- /dev/null +++ b/src/org/twopm/laf/Bundle.properties @@ -0,0 +1,5 @@ +OpenIDE-Module-Display-Category=Team +OpenIDE-Module-Long-Description=\ + This plugin was designed only to compose well readable and enoght dark theme for Netbeans, But day by day it was enlarging - and now it is what it is. +OpenIDE-Module-Name=2pmTech L&F +OpenIDE-Module-Short-Description=Editor for Netbeans Metal Look and Feel diff --git a/src/org/twopm/laf/Color.java b/src/org/twopm/laf/Color.java new file mode 100644 index 0000000..400ad2f --- /dev/null +++ b/src/org/twopm/laf/Color.java @@ -0,0 +1,205 @@ +package org.twopm.laf; + +import java.io.Serializable; +import javax.swing.plaf.ColorUIResource; +import static org.twopm.laf.Color.ColorClass.AT; +import static org.twopm.laf.Color.ColorClass.SF; + +/** + * @author Edward M. Kagan + */ +@SuppressWarnings("rawtypes") +public class Color implements Serializable{ + + public void printJava() { + + String res = "color_map.add("; + res += this.getString(); + res += ");"; + System.out.println(res); + } + + public String getString() { + + String res = "new org.twopm.laf.Color(\""; + res += this.pname + "\", "; + + if (this.cls ==SF) + { + res += "org.twopm.laf.Color.ColorClass.SF, "; + } + else + { + res += "org.twopm.laf.Color.ColorClass.AT, "; + } + + res += R + ", "; + res += G + ", "; + res += B + ", "; + res += A + ", "; + res += "\"" +this.description + "\""; + + res += ")"; + return res; + } + + + + public enum ColorClass { + SF (javax.swing.plaf.ColorUIResource.class), + AT (java.awt.Color.class); + + private final Class cls; + + ColorClass(Class cls) { + this.cls = cls; + } + + public Class getClazz() + { + return this.cls; + } + } + + int R; + int G; + int B; + int A; + String pname; + ColorClass cls; + String description; + + + public Color(javax.swing.plaf.ColorUIResource color) { + this.A = color.getAlpha(); + this.B = color.getBlue(); + this.G = color.getGreen(); + this.R = color.getRed(); + this.pname = "_"; + this.cls = SF; + this.description = ""; + } + + public Color(String pname, ColorClass cls, int red, int green, int blue, int alpha, String desc) { + this.A = alpha; + this.B = blue; + this.G = green; + this.R = red; + this.pname = pname; + this.cls = cls; + this.description = desc; + } + + @Override + public String toString() { + return this.pname; + } + + public String toStringC() { + return "C[" + this.pname + ":" + this.cls + ":" + R + "," + G + "," + B + "," + A + ":" + description + "]"; + } + + public Color (String str) + { + if (str.startsWith("C")) + { + String real = str.substring(2, str.length() - 1); + String [] vals = real.split(":"); + + this.pname = vals[0]; + if (vals[1].equals("SF")) + { + this.cls = SF; + } + else if (vals[1].equals("AT")) + { + this.cls = AT; + } + + this.description = vals[3]; + + vals = vals[2].split(","); + + + this.R = Integer.parseInt(vals[0]); + this.G = Integer.parseInt(vals[1]); + this.B = Integer.parseInt(vals[2]); + this.A = Integer.parseInt(vals[3]); + + } + else + { + System.err.println("FUCK OFF - poor format"); + } + + + } + + public Object getObject () + { + java.awt.Color cc = new java.awt.Color(R, G, B, A); + switch (this.cls) + { + + case SF : { + javax.swing.plaf.ColorUIResource res = new ColorUIResource(cc); + return res; + } + case AT : { + return cc; + } + } + return null; + } + + public Object getName() { + return this.pname; + } + + public String getDescription() { + return description; + } + + public void setA(int A) { + this.A = A; + } + + public void setB(int B) { + this.B = B; + } + + public void setG(int G) { + this.G = G; + } + + public void setR(int R) { + this.R = R; + } + + public void setDescription(String description) { + this.description = description; + } + + public Color() { + } + + public String getPname() { + return pname; + } + + public void setObject ( java.awt.Color obj) + { + this.A = obj.getAlpha(); + this.B = obj.getBlue(); + this.G = obj.getGreen(); + this.R = obj.getRed(); + } + + public String getHEX () + { + java.awt.Color cc = new java.awt.Color(R, G, B, A); + return String.format("#%06X", (0xFFFFFF & cc.getRGB())); + } + +} + diff --git a/src/org/twopm/laf/ColorTheme.java b/src/org/twopm/laf/ColorTheme.java new file mode 100644 index 0000000..918099c --- /dev/null +++ b/src/org/twopm/laf/ColorTheme.java @@ -0,0 +1,430 @@ +package org.twopm.laf; + +import java.awt.Color; +import java.util.HashMap; + +/** + * @author Edward M. Kagan + */ +public class ColorTheme { + +//// EDITOR THEME + +// +private static final AttributeSetConfigured [] annotations = { + new AttributeSetConfigured ("debugger-mixed_BP", new Color (252, 157, 159, 255), null, null, true, true, false, new Color (252, 157, 159, 255), new Color (252, 157, 159, 255), null, null, null), + new AttributeSetConfigured ("Dbx_Bpt_cmpx_hit_dis", new Color (189, 230, 170, 255), null, null, true, true, false, new Color (189, 230, 170, 255), new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("OtherThreads_DBP", new Color (220, 220, 216, 255), null, null, true, true, false, new Color (220, 220, 216, 255), new Color (220, 220, 216, 255), null, null, null), + new AttributeSetConfigured ("stopwatchProfilingPoint", new Color (180, 228, 252, 255), null, null, true, true, false, new Color (180, 228, 252, 255), new Color (180, 228, 252, 255), null, null, null), + new AttributeSetConfigured ("OtherThread_PC", new Color (189, 230, 170, 255), null, null, true, true, false, new Color (189, 230, 170, 255), new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("debugger-PC_CBP_stroke", new Color (189, 230, 170, 255), null, null, true, true, false, new Color (189, 230, 170, 255), new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("CurrentPC2_DBP", new Color (220, 220, 216, 255), null, null, true, true, false, new Color (220, 220, 216, 255), new Color (220, 220, 216, 255), null, null, null), + new AttributeSetConfigured ("FieldBreakpoint", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("ClassBreakpoint_stroke", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("DisabledMethodBreakpoint", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("org-netbeans-spi-editor-hints-parser_annotation_warn", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("org-netbeans-modules-mercurial-Annotation", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("resetResultsProfilingPoint", new Color (180, 228, 252, 255), null, null, true, true, false, new Color (180, 228, 252, 255), new Color (180, 228, 252, 255), null, null, null), + new AttributeSetConfigured ("org-netbeans-spi-editor-hints-parser_annotation_hint", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("Dbx_Bpt_cmpx_hit_broken", new Color (189, 230, 170, 255), null, null, true, true, false, new Color (189, 230, 170, 255), new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("Dbx_PC", new Color (189, 230, 170, 255), null, null, true, true, false, new Color (189, 230, 170, 255), new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("org-netbeans-modules-editor-annotations-has_implementations", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("CondBreakpoint_stroke", new Color (220, 220, 216, 255), null, null, true, true, false, new Color (220, 220, 216, 255), new Color (220, 220, 216, 255), null, null, null), + new AttributeSetConfigured ("CondBreakpoint", new Color (255, 200, 0, 255), null, null, true, true, false, new Color (255, 200, 0, 255), new Color (255, 200, 0, 255), null, null, null), + new AttributeSetConfigured ("MethodBreakpoint", new Color (255, 200, 0, 255), null, null, true, true, false, new Color (255, 200, 0, 255), new Color (255, 200, 0, 255), null, null, null), + new AttributeSetConfigured ("OtherThreads_BP_broken", new Color (189, 230, 170, 255), null, null, true, true, false, new Color (189, 230, 170, 255), new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("MethodBreakpoint_stroke", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("OtherThreads_BP", new Color (255, 0, 255, 255), null, null, true, true, false, new Color (255, 0, 255, 255), new Color (255, 0, 255, 255), null, null, null), + new AttributeSetConfigured ("debugger-PC_multi_DBPCBP", new Color (189, 230, 170, 255), null, null, true, true, false, new Color (189, 230, 170, 255), new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("Dbx_Bpt_hit_dis", new Color (189, 230, 170, 255), null, null, true, true, false, new Color (189, 230, 170, 255), new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("Dbx_Bpt_cmpx_broken_dis", new Color (220, 220, 216, 255), null, null, true, true, false, new Color (220, 220, 216, 255), new Color (220, 220, 216, 255), null, null, null), + new AttributeSetConfigured ("CurrentExpressionLine_BP", new Color (233, 255, 230, 255), null, null, true, true, false, null, new Color (233, 255, 230, 255), null, null, null), + new AttributeSetConfigured ("takeSnapshotProfilingPointD", new Color (220, 220, 216, 255), null, null, true, true, false, new Color (220, 220, 216, 255), new Color (220, 220, 216, 255), null, null, null), + new AttributeSetConfigured ("org-netbeans-modules-cnd-navigation-is_overridden_combined_pseudo", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("DisabledClassBreakpoint", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("org-netbeans-modules-cnd-navigation-extended_specializes", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("Dbx_Bpt_cmpx_broken", new Color (220, 220, 216, 255), null, null, true, true, false, null, new Color (220, 220, 216, 255), null, null, null), + new AttributeSetConfigured ("debugger-PC_multi_BPCBP", new Color (189, 230, 170, 255), null, null, true, true, false, new Color (189, 230, 170, 255), new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("org-netbeans-spi-editor-hints-parser_annotation_hint_fixable", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("Dbx_Bpt_cmpx_dis", new Color (220, 220, 216, 255), null, null, true, true, false, null, new Color (220, 220, 216, 255), null, null, null), + new AttributeSetConfigured ("DisabledBreakpoint_stroke", new Color (220, 220, 216, 255), null, null, true, true, false, null, new Color (220, 220, 216, 255), null, null, null), + new AttributeSetConfigured ("debugger-PC_CBP_broken", new Color (189, 230, 170, 255), null, null, true, true, false, new Color (189, 230, 170, 255), new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("debugger-PC_multi_BPCBP_broken", new Color (189, 230, 170, 255), null, null, true, true, false, new Color (189, 230, 170, 255), new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("CurrentPC2LinePart", new Color (189, 230, 170, 255), null, null, true, true, false, null, new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("debugger-PC_mixedBP_broken", new Color (189, 230, 170, 255), null, null, true, true, false, new Color (189, 230, 170, 255), new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("editor-bookmark", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("stopwatchProfilingPointD", new Color (220, 220, 216, 255), null, null, true, true, false, new Color (220, 220, 216, 255), new Color (220, 220, 216, 255), null, null, null), + new AttributeSetConfigured ("CurrentPC2", new Color (189, 230, 170, 255), null, null, true, true, false, null, new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("debugger-PC_DBP", new Color (189, 230, 170, 255), null, null, true, true, false, null, new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("DisabledCondBreakpoint", new Color (220, 220, 216, 255), null, null, true, true, false, null, new Color (220, 220, 216, 255), null, null, null), + new AttributeSetConfigured ("OtherThread", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("debugger-PC_DCBP", new Color (189, 230, 170, 255), null, null, true, true, false, null, new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("FieldBreakpoint_stroke", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("debugger-multi_DBPCBP", new Color (220, 220, 216, 255), null, null, true, true, false, new Color (220, 220, 216, 255), new Color (220, 220, 216, 255), null, null, null), + new AttributeSetConfigured ("Breakpoint", new Color (220, 220, 216, 255), null, null, true, true, false, null, new Color (220, 220, 216, 255), null, null, null), + new AttributeSetConfigured ("Dbx_Bpt_cmpx", new Color (220, 220, 216, 255), null, null, true, true, false, null, new Color (220, 220, 216, 255), null, null, null), + new AttributeSetConfigured ("org-netbeans-modules-editor-annotations-implements-is-overridden-combined", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("org-netbeans-modules-xml-error", new Color (255, 0, 255, 255), null, null, true, true, false, new Color (255, 0, 255, 255), new Color (255, 0, 255, 255), null, null, null), + new AttributeSetConfigured ("Dbx_Bpt_cmpx_hit_broken_dis", new Color (189, 230, 170, 255), null, null, true, true, false, null, new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("CallSite", new Color (231, 225, 239, 255), null, null, true, true, false, null, new Color (231, 225, 239, 255), null, null, null), + new AttributeSetConfigured ("debugger-PC_BP_broken", new Color (189, 230, 170, 255), null, null, true, true, false, null, new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("debugger-PC_DBP_stroke", new Color (189, 230, 170, 255), null, null, true, true, false, null, new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("Dbx_Bpt_broken", new Color (220, 220, 216, 255), null, null, true, true, false, null, new Color (220, 220, 216, 255), null, null, null), + new AttributeSetConfigured ("OtherThread_BP_broken", new Color (189, 230, 170, 255), null, null, true, true, false, null, new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("OtherThreads_PC_BP", new Color (189, 230, 170, 255), null, null, true, true, false, null, new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("Breakpoint_broken", new Color (220, 220, 216, 255), null, null, true, true, false, null, new Color (220, 220, 216, 255), null, null, null), + new AttributeSetConfigured ("Dbx_Bpt_compound_hit", new Color (189, 230, 170, 255), null, null, true, true, false, null, new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("Dbx_Bpt_hit_broken_dis", new Color (189, 230, 170, 255), null, null, true, true, false, null, new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("Dbx_Bpt_cmpx_hit", new Color (189, 230, 170, 255), null, null, true, true, false, null, new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("org-netbeans-modules-cnd-navigation-is_overridden_combined", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("Dbx_Bpt_dis", new Color (220, 220, 216, 255), null, null, true, true, false, null, new Color (220, 220, 216, 255), null, null, null), + new AttributeSetConfigured ("Dbx_Bpt_hit", new Color (189, 230, 170, 255), null, null, true, true, false, null, new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("DisabledFieldBreakpoint", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("OtherThread_DBP", new Color (220, 220, 216, 255), null, null, true, true, false, null, new Color (220, 220, 216, 255), null, null, null), + new AttributeSetConfigured ("DisabledFieldBreakpoint_stroke", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("org-netbeans-modules-cnd-navigation-overrides", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("Dbx_Bpt", new Color (220, 220, 216, 255), null, null, true, true, false, null, new Color (220, 220, 216, 255), null, null, null), + new AttributeSetConfigured ("loadgenProfilingPoint", new Color (180, 228, 252, 255), null, null, true, true, false, null, new Color (180, 228, 252, 255), null, null, null), + new AttributeSetConfigured ("CurrentExpressionLine_CBP", new Color (233, 255, 230, 255), null, null, true, true, false, null, new Color (233, 255, 230, 255), null, null, null), + new AttributeSetConfigured ("debugger-PC_CBP", new Color (189, 230, 170, 255), null, null, true, true, false, null, new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("DisabledBreakpoint", new Color (220, 220, 216, 255), null, null, true, true, false, null, new Color (220, 220, 216, 255), null, null, null), + new AttributeSetConfigured ("loadgenProfilingPointD", new Color (220, 220, 216, 255), null, null, true, true, false, null, new Color (220, 220, 216, 255), null, null, null), + new AttributeSetConfigured ("org-netbeans-spi-editor-hints-parser_annotation_todo_fixable", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("OtherThreads", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("org-netbeans-spi-editor-hints-parser_annotation_warn_fixable", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("org-netbeans-spi-editor-hints-parser_annotation_err_fixable", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("org-netbeans-modules-versioning-annotate-Annotation", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("org-netbeans-spi-editor-hints-parser_annotation_verifier", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("debugger-mixed_BP_broken", new Color (0, 0, 255, 255), null, null, true, true, false, null, new Color (0, 0, 255, 255), null, null, null), + new AttributeSetConfigured ("org-netbeans-modules-subversion-Annotation", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("org-netbeans-modules-cnd-navigation-specializes", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("org-netbeans-modules-editor-annotations-implements", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("DisabledMethodBreakpoint_stroke", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("CurrentPC", new Color (189, 230, 170, 255), null, null, true, true, false, null, new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("Dbx_Bpt_compound", new Color (252, 157, 159, 255), null, null, true, true, false, null, new Color (252, 157, 159, 255), null, null, null), + new AttributeSetConfigured ("org-netbeans-modules-editor-annotations-override-is-overridden-combined", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("OtherThread_BP", new Color (255, 0, 255, 255), null, null, true, true, false, null, new Color (255, 0, 255, 255), null, null, null), + new AttributeSetConfigured ("org-netbeans-modules-editor-annotations-is_overridden", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("org-netbeans-modules-cnd-navigation-is_overridden_pseudo", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("debugger-multi_BPCBP", new Color (0, 0, 255, 255), null, null, true, true, false, null, new Color (0, 0, 255, 255), null, null, null), + new AttributeSetConfigured ("debugger-PC_DCBP_stroke", new Color (189, 230, 170, 255), null, null, true, true, false, null, new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("resetResultsProfilingPointD", new Color (220, 220, 216, 255), null, null, true, true, false, null, new Color (220, 220, 216, 255), null, null, null), + new AttributeSetConfigured ("CurrentExpressionLine_DCBP", new Color (233, 255, 230, 255), null, null, true, true, false, null, new Color (233, 255, 230, 255), null, null, null), + new AttributeSetConfigured ("org-netbeans-modules-git-Annotation", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("org-netbeans-modules-cnd-navigation-extended_is_specialized", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("CurrentExpressionLine_DBP", new Color (233, 255, 230, 255), null, null, true, true, false, null, new Color (233, 255, 230, 255), null, null, null), + new AttributeSetConfigured ("org-netbeans-modules-cnd-cpp-parser_annotation_err", null, null, null, false, true, false, null, null, new Color (255, 0, 0, 255), null, null), + new AttributeSetConfigured ("org-netbeans-modules-editor-annotations-overrides", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("takeSnapshotProfilingPoint", new Color (180, 228, 252, 255), null, null, true, true, false, null, new Color (180, 228, 252, 255), null, null, null), + new AttributeSetConfigured ("org-netbeans-spi-editor-hints-parser_annotation_todo", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("org-netbeans-modules-cnd-navigation-overrides_pseudo", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("debugger-PC_mixedBP", new Color (189, 230, 170, 255), null, null, true, true, false, null, new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("org-netbeans-spi-editor-hints-parser_annotation_verifier_fixable", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("Dbx_Bpt_hit_broken", new Color (189, 230, 170, 255), null, null, true, true, false, null, new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("org-netbeans-spi-editor-hints-parser_annotation_err", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("CondBreakpoint_broken", new Color (220, 220, 216, 255), null, null, true, true, false, null, new Color (220, 220, 216, 255), null, null, null), + new AttributeSetConfigured ("org-netbeans-modules-editor-annotations-implements-has-implementations-combined", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("CurrentExpression", new Color (209, 255, 188, 255), null, null, true, true, false, null, new Color (209, 255, 188, 255), null, null, null), + new AttributeSetConfigured ("CurrentPC2_BP", new Color (255, 0, 255, 255), null, null, true, true, false, null, new Color (255, 0, 255, 255), null, null, null), + new AttributeSetConfigured ("debugger-PC_BP_stroke", new Color (189, 230, 170, 255), null, null, true, true, false, null, new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("org-netbeans-modules-cnd-navigation-is_specialized", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("debugger-multi_BPCBP_broken", new Color (220, 220, 216, 255), null, null, true, true, false, null, new Color (220, 220, 216, 255), null, null, null), + new AttributeSetConfigured ("DisabledCondBreakpoint_stroke", new Color (220, 220, 216, 255), null, null, true, true, false, null, new Color (220, 220, 216, 255), null, null, null), + new AttributeSetConfigured ("debugger-PC_BP", new Color (189, 230, 170, 255), null, null, true, true, false, null, new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("Breakpoint_stroke", new Color (220, 220, 216, 255), null, null, true, true, false, null, new Color (220, 220, 216, 255), null, null, null), + new AttributeSetConfigured ("org-netbeans-modules-cnd-highligh-semantic-markoccurrences", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("ClassBreakpoint", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("OtherThread_PC_BP", new Color (189, 230, 170, 255), null, null, true, true, false, null, new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("DisabledClassBreakpoint_stroke", null, null, null, false, true, false, null, null, null, null, null), + new AttributeSetConfigured ("CurrentExpressionLine", new Color (233, 255, 230, 255), null, null, true, true, false, null, new Color (233, 255, 230, 255), null, null, null), + new AttributeSetConfigured ("Dbx_Bpt_broken_dis", new Color (220, 220, 216, 255), null, null, true, true, false, null, new Color (220, 220, 216, 255), null, null, null), + new AttributeSetConfigured ("CurrentPCLinePart", new Color (189, 230, 170, 255), null, null, true, true, false, null, new Color (189, 230, 170, 255), null, null, null), + new AttributeSetConfigured ("org-netbeans-modules-cnd-navigation-is_overridden", null, null, null, false, true, false, null, null, null, null, null) +}; +// + +// +private static final AttributeSetConfigured [] highlightings = { + new AttributeSetConfigured ("nbeditor-bracesMatching-match", new Color (110, 110, 110, 255), null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("text-limit-line-color", null, new Color (110, 110, 110, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("code-folding", null, new Color (148, 148, 148, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("synchronized-text-blocks-ext", null, new Color (204, 0, 153, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("nbeditor-bracesMatching-mismatch", new Color (186, 2, 58, 255), null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("highlight-caret-row", new Color (32, 32, 32, 255), null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("caret-color-overwrite-mode", new Color (228, 228, 228, 255), new Color (208, 208, 208, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("status-bar", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("guarded", new Color (32, 32, 64, 255), new Color (255, 0, 255, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("trailing-whitespace", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("nbeditor-bracesMatching-mismatch-multichar", new Color (186, 2, 58, 255), null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("status-bar-bold", null, new Color (255, 0, 0, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("nbeditor-bracesMatching-sidebar", null, new Color (187, 187, 187, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("readonly-files", new Color (24, 20, 20, 255), null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("line-number", null, new Color (110, 110, 110, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("highlight-search", new Color (110, 110, 110, 255), new Color (255, 135, 35, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("code-folding-bar", null, new Color (110, 110, 110, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("synchronized-text-blocks-ext-slave", null, new Color (153, 102, 0, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("indent-guide-lines", null, new Color (48, 48, 48, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("indent-whitespace", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("block-search", new Color (48, 48, 48, 255), null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("selection", new Color (64, 64, 64, 255), null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("inc-search", new Color (255, 153, 0, 255), new Color (16, 16, 16, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("nbeditor-bracesMatching-match-multichar", new Color (110, 110, 110, 255), null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("caret-color-insert-mode", new Color (228, 228, 228, 255), new Color (208, 208, 208, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("hyperlinks", null, new Color (0, 0, 255, 255), null, null, null, null, null, null, null, null, null) +}; +// + +// +private static final AttributeSetConfigured [] lang_Java = { + new AttributeSetConfigured ("mark-occurrences", new Color (73, 72, 66, 255), null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("mod-abstract", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("string", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("javadoc-identifier", null, new Color (128, 128, 128, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("mod-public", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("mod-class", null, new Color (187, 129, 219, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("mod-unused", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("mod-interface-declaration", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("mod-method-declaration", null, new Color (88, 88, 196, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("operator", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("keyword-directive", null, new Color (230, 31, 91, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("literal", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("number", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("character", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("mod-parameter", null, new Color (251, 152, 32, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("mod-deprecated", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("mod-annotation-type", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("javadoc-first-sentence", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("string-escape", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("string-escape-invalid", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("keyword", null, new Color (234, 82, 128, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("mod-local-variable", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("identifier", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("mod-field", null, new Color (255, 255, 255, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("javadoc-tag", null, new Color (255, 0, 102, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("mod-method", null, new Color (141, 141, 222, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("mod-annotation-type-declaration", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("mod-interface", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("mod-protected", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("character-escape-invalid", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("mod-constructor-declaration", null, new Color (62, 176, 176, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("html-tag", null, new Color (153, 153, 255, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("separator", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("mod-enum", null, new Color (187, 129, 219, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("mod-local-variable-declaration", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("mod-parameter-declaration", null, new Color (251, 151, 31, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("mod-private", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("mod-enum-declaration", null, new Color (148, 73, 189, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("mod-static", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("character-escape", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("mod-class-declaration", null, new Color (148, 73, 189, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("mod-package-private", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("comment", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("whitespace", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("mod-constructor", null, new Color (120, 212, 212, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("errors", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("mod-field-declaration", null, new Color (255, 255, 255, 255), null, null, null, null, null, null, null, null, null) +}; +// + +// +private static final AttributeSetConfigured [] lang_CPP = { + new AttributeSetConfigured ("string", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("pragma-omp-keyword-directive", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("preprocessor", null, new Color (0, 155, 0, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("cc-highlighting-function", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("operator", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("literal", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("keyword-directive", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("cc-highlighting-typedefs", null, new Color (46, 146, 199, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("number", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("character", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("preprocessor-user-include-literal", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("cc-highlighting-macros", null, new Color (46, 146, 199, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("string-escape", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("string-escape-invalid", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("keyword", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("doxygen-tag", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("identifier", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("cc-highlighting-unused-variables", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("cc-highlighting-class-fields", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("preprocessor-keyword", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("cc-highlighting-macros-user", null, new Color (46, 146, 199, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("separator", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("html-tag", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("cc-highlighting-mark-occurrences", new Color (0, 0, 255, 255), null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("cc-highlighting-inactive", null, new Color (150, 150, 150, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("cc-highlighting-macros-system", null, new Color (46, 146, 199, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("preprocessor-system-include-literal", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("cc-highlighting-function-usage", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("preprocessor-identifier", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("comment", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("whitespace", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("preprocessor-keyword-directive", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("pragma-omp", null, new Color (46, 146, 199, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("errors", null, null, null, null, null, null, null, null, null, null, null) +}; +// + +// +private static final AttributeSetConfigured [] lang_C = { + new AttributeSetConfigured ("string", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("pragma-omp-keyword-directive", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("preprocessor", null, new Color (85, 186, 2, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("cc-highlighting-function", null, new Color (88, 88, 196, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("operator", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("literal", null, new Color (234, 82, 128, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("keyword-directive", null, new Color (230, 31, 91, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("cc-highlighting-typedefs", null, new Color (46, 146, 199, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("number", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("character", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("preprocessor-user-include-literal", null, new Color (150, 233, 82, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("cc-highlighting-macros", null, new Color (46, 146, 199, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("string-escape", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("string-escape-invalid", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("keyword", null, new Color (234, 82, 128, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("doxygen-tag", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("identifier", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("cc-highlighting-unused-variables", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("cc-highlighting-class-fields", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("preprocessor-keyword", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("cc-highlighting-macros-user", null, new Color (46, 146, 199, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("separator", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("html-tag", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("cc-highlighting-mark-occurrences", new Color (65, 65, 65, 255), null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("cc-highlighting-inactive", null, new Color (150, 150, 150, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("cc-highlighting-macros-system", null, new Color (46, 146, 199, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("preprocessor-system-include-literal", null, new Color (186, 243, 138, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("cc-highlighting-function-usage", null, new Color (141, 141, 222, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("preprocessor-identifier", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("comment", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("whitespace", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("preprocessor-keyword-directive", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("pragma-omp", null, new Color (46, 146, 199, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("errors", null, null, null, null, null, null, null, null, null, null, null) +}; +// + +// + private static final AttributeSetConfigured [] lang_All_Languages = { + new AttributeSetConfigured ("markup-attribute", null, new Color (0, 124, 0, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("private", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("string", null, new Color (255, 255, 90, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("deprecated", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("error", new Color (255, 0, 0, 255), new Color (255, 255, 255, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("interface", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("entity-reference", null, new Color (255, 175, 175, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("operator", null, new Color (187, 187, 187, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("number", null, new Color (150, 233, 82, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("default", new Color (16, 16, 16, 255), new Color (228, 228, 228, 255), null, null, null, null, null, null, null, false, false), + new AttributeSetConfigured ("protected", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("public", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("method-parameter", null, new Color (160, 96, 1, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("warning", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("keyword", null, new Color (230, 31, 91, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("local-variable", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("class", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("identifier", null, new Color (255, 255, 255, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("static", null, null, null, null, null, null, null, null, null, false, true), + new AttributeSetConfigured ("method", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("markup-element", null, new Color (255, 200, 0, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("constructor", null, null, null, null, null, null, null, null, null, true, false), + new AttributeSetConfigured ("markup-attribute-value", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("abstract", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("separator", null, new Color (187, 187, 187, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("url", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("enum", null, null, null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("field", null, new Color (9, 134, 24, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("char", null, new Color (255, 255, 145, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("comment", null, new Color (117, 113, 94, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("unused", null, new Color (128, 128, 128, 255), null, null, null, null, null, null, null, null, null), + new AttributeSetConfigured ("whitespace", null, null, null, null, null, null, null, null, null, null, null) +}; +// + +// +public static final org.twopm.laf.Color[] GIT = { + new org.twopm.laf.Color("annotationFormat.added", org.twopm.laf.Color.ColorClass.AT, 150, 233, 82, 255, ""), + new org.twopm.laf.Color("annotationFormat.conflict", org.twopm.laf.Color.ColorClass.AT, 230, 31, 91, 255, ""), + new org.twopm.laf.Color("annotationFormat.excluded", org.twopm.laf.Color.ColorClass.AT, 134, 134, 134, 255, ""), + new org.twopm.laf.Color("annotationFormat.modified", org.twopm.laf.Color.ColorClass.AT, 62, 176, 176, 255, ""), + new org.twopm.laf.Color("annotationFormat.new", org.twopm.laf.Color.ColorClass.AT, 121, 229, 31, 255, ""), + new org.twopm.laf.Color("annotationFormat.removed", org.twopm.laf.Color.ColorClass.AT, 255, 135, 35, 255, ""), + new org.twopm.laf.Color("annotationFormat.textAnnotation", org.twopm.laf.Color.ColorClass.AT, 166, 165, 165, 255, ""), +}; +// + +// +public static final org.twopm.laf.Color[] SVN = { + new org.twopm.laf.Color("annotationFormat.addedLocally", org.twopm.laf.Color.ColorClass.AT, 0, 128, 0, 255, ""), + new org.twopm.laf.Color("annotationFormat.conflict", org.twopm.laf.Color.ColorClass.AT, 255, 0, 0, 255, ""), + new org.twopm.laf.Color("annotationFormat.copiedLocally", org.twopm.laf.Color.ColorClass.AT, 0, 128, 0, 255, ""), + new org.twopm.laf.Color("annotationFormat.excluded", org.twopm.laf.Color.ColorClass.AT, 153, 153, 153, 255, ""), + new org.twopm.laf.Color("annotationFormat.mergeable", org.twopm.laf.Color.ColorClass.AT, 0, 0, 255, 255, ""), + new org.twopm.laf.Color("annotationFormat.modifiedinRepository", org.twopm.laf.Color.ColorClass.AT, 0, 0, 0, 255, ""), + new org.twopm.laf.Color("annotationFormat.modifiedLocally", org.twopm.laf.Color.ColorClass.AT, 0, 0, 255, 255, ""), + new org.twopm.laf.Color("annotationFormat.newinRepository", org.twopm.laf.Color.ColorClass.AT, 0, 0, 0, 255, ""), + new org.twopm.laf.Color("annotationFormat.newLocally", org.twopm.laf.Color.ColorClass.AT, 0, 128, 0, 255, ""), + new org.twopm.laf.Color("annotationFormat.removedinRepository", org.twopm.laf.Color.ColorClass.AT, 0, 0, 0, 255, ""), + new org.twopm.laf.Color("annotationFormat.removedLocally", org.twopm.laf.Color.ColorClass.AT, 153, 153, 153, 255, ""), + new org.twopm.laf.Color("annotationFormat.textAnnotation", org.twopm.laf.Color.ColorClass.AT, 153, 153, 153, 255, ""), +}; +// + +// +public static final org.twopm.laf.Color[] HG = { + new org.twopm.laf.Color("annotationFormat.addedLocally", org.twopm.laf.Color.ColorClass.AT, 0, 128, 0, 255, ""), + new org.twopm.laf.Color("annotationFormat.conflict", org.twopm.laf.Color.ColorClass.AT, 255, 0, 0, 255, ""), + new org.twopm.laf.Color("annotationFormat.copiedLocally", org.twopm.laf.Color.ColorClass.AT, 0, 128, 0, 255, ""), + new org.twopm.laf.Color("annotationFormat.deletedLocally", org.twopm.laf.Color.ColorClass.AT, 153, 153, 153, 255, ""), + new org.twopm.laf.Color("annotationFormat.excluded", org.twopm.laf.Color.ColorClass.AT, 153, 153, 153, 255, ""), + new org.twopm.laf.Color("annotationFormat.modifiedLocally", org.twopm.laf.Color.ColorClass.AT, 0, 0, 255, 255, ""), + new org.twopm.laf.Color("annotationFormat.newLocally", org.twopm.laf.Color.ColorClass.AT, 0, 128, 0, 255, ""), + new org.twopm.laf.Color("annotationFormat.removedLocally", org.twopm.laf.Color.ColorClass.AT, 153, 153, 153, 255, ""), + new org.twopm.laf.Color("annotationFormat.textAnnotation", org.twopm.laf.Color.ColorClass.AT, 153, 153, 153, 255, ""), +}; +// + +//// +public static final org.twopm.laf.Color[] DIFF = { +// new org.twopm.laf.Color("addedColor", org.twopm.laf.Color.ColorClass.AT, 48, 94, 9, 255, ""), +// new org.twopm.laf.Color("changedColor", org.twopm.laf.Color.ColorClass.AT, 6, 63, 63, 255, ""), +// new org.twopm.laf.Color("deletedColor", org.twopm.laf.Color.ColorClass.AT, 94, 9, 35, 255, ""), +// new org.twopm.laf.Color("merge.appliedColor", org.twopm.laf.Color.ColorClass.AT, 30, 93, 93, 255, ""), +// new org.twopm.laf.Color("merge.notappliedColor", org.twopm.laf.Color.ColorClass.AT, 138, 45, 73, 255, ""), +// new org.twopm.laf.Color("merge.unresolvedColor", org.twopm.laf.Color.ColorClass.AT, 155, 98, 50, 255, ""), +// new org.twopm.laf.Color("sidebar.changedColor", org.twopm.laf.Color.ColorClass.AT, 155, 98, 50, 255, ""), +// new org.twopm.laf.Color("sidebar.deletedColor", org.twopm.laf.Color.ColorClass.AT, 87, 138, 45, 255, "") +}; +//// + + +public static final HashMap > color_map; + +static +{ + + color_map = new HashMap>(); + + color_map.put("annotations", wrap(annotations)); + color_map.put("highlightings", wrap(highlightings)); + color_map.put("Java", wrap(lang_Java)); + color_map.put("C++", wrap(lang_CPP)); + color_map.put("C", wrap(lang_C)); + color_map.put("All Languages", wrap(lang_All_Languages)); + +} + + + +private static HashMap wrap (AttributeSetConfigured [] data) +{ + HashMap data_map = new HashMap(); + for (AttributeSetConfigured asc : data) + { + data_map.put(asc.name, asc); + } + return data_map; +} + + +} diff --git a/src/org/twopm/laf/DarkIconFilter.java b/src/org/twopm/laf/DarkIconFilter.java new file mode 100644 index 0000000..cc0208e --- /dev/null +++ b/src/org/twopm/laf/DarkIconFilter.java @@ -0,0 +1,96 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright 2013 Oracle and/or its affiliates. All rights reserved. + * + * Oracle and Java are registered trademarks of Oracle and/or its affiliates. + * Other names may be trademarks of their respective owners. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common + * Development and Distribution License("CDDL") (collectively, the + * "License"). You may not use this file except in compliance with the + * License. You can obtain a copy of the License at + * http://www.netbeans.org/cddl-gplv2.html + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the + * specific language governing permissions and limitations under the + * License. When distributing the software, include this License Header + * Notice in each file and include the License file at + * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the GPL Version 2 section of the License file that + * accompanied this code. If applicable, add the following below the + * License Header, with the fields enclosed by brackets [] replaced by + * your own identifying information: + * "Portions Copyrighted [year] [name of copyright owner]" + * + * If you wish your version of this file to be governed by only the CDDL + * or only the GPL Version 2, indicate your decision by adding + * "[Contributor] elects to include this software in this distribution + * under the [CDDL or GPL Version 2] license." If you do not indicate a + * single choice of license, a recipient has the option to distribute + * your version of this file under either the CDDL, the GPL Version 2 or + * to extend the choice of license to its licensees as provided above. + * However, if you add GPL Version 2 code and therefore, elected the GPL + * Version 2 license, then the option applies only if the new code is + * made subject to such option by the copyright holder. + * + * Contributor(s): + * + * Portions Copyrighted 2013 Sun Microsystems, Inc. + */ +package org.twopm.laf; + +import java.awt.Color; +import java.awt.image.RGBImageFilter; + +/** + * For dark LaFs it inverts icon brightness (=inverts icon image to obtain dark icon, + * then inverts its hue to restore original colors). + * + * @author P. Somol + */ +public class DarkIconFilter extends RGBImageFilter { + + /** in dark LaFs brighten all icons; 0.0f = no change, 1.0f = maximum brightening */ + private static final float DARK_ICON_BRIGHTEN = 0.1f; + + @Override + public int filterRGB(int x, int y, int color) { + int a = color & 0xff000000; + int rgb[] = decode(color); + int inverted[] = invert(rgb); + int result[] = invertHueBrighten(inverted, DARK_ICON_BRIGHTEN); + return a | encode(result); + } + + private int[] invert(int[] rgb) { + int acc = (rgb[0] + rgb[1] + rgb[2]) / 3; + + //return new int[]{255-acc, 255-acc, 255-acc}; + + return new int[]{ + ((255-rgb[0]) + (255-acc)) / 2, + ((255-rgb[1]) + (255-acc)) / 2, + ((255-rgb[2]) + (255-acc)) / 2 + }; + } + + private int[] invertHueBrighten(int[] rgb, float brighten) { + float hsb[] = new float[3]; + Color.RGBtoHSB(rgb[0], rgb[1], rgb[2], hsb); + return decode(Color.HSBtoRGB(hsb[0] > 0.5f ? hsb[0]-0.5f : hsb[0]+0.5f, hsb[1], hsb[2]+(1.0f-hsb[2])*brighten)); + } + + private int[] decode(int rgb) { + return new int[]{(rgb & 0x00ff0000) >> 16, (rgb & 0x0000ff00) >> 8, rgb & 0x000000ff}; + } + private int encode(int[] rgb) { + return (toBoundaries(rgb[0]) << 16) | (toBoundaries(rgb[1]) << 8) | toBoundaries(rgb[2]); + } + + private int toBoundaries(int color) { + return Math.max(0,Math.min(255,color)); + } + +} diff --git a/src/org/twopm/laf/Defaults.java b/src/org/twopm/laf/Defaults.java new file mode 100644 index 0000000..1e252ff --- /dev/null +++ b/src/org/twopm/laf/Defaults.java @@ -0,0 +1,410 @@ +package org.twopm.laf; + +import java.util.ArrayList; +import static org.twopm.laf.Kernel.color_scheme_loaded; + +/** + * @author Edward M. Kagan + * @author Helen A. Kukhar + */ +public class Defaults { + + public static Color[] preload_defaults() { + ArrayList color_map = new ArrayList(); + color_map.add(new Color("Button.background", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("Button.darkShadow", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("Button.disabledText", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("Button.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("Button.highlight", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("Button.light", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("Button.select", Color.ColorClass.SF, 176, 176, 176, 255, "...")); + color_map.add(new Color("Button.shadow", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("CheckBox.background", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("CheckBox.disabledText", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("CheckBox.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("CheckBoxMenuItem.acceleratorForeground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("CheckBoxMenuItem.acceleratorSelectionForeground", Color.ColorClass.SF, 176, 176, 176, 255, "...")); + color_map.add(new Color("CheckBoxMenuItem.background", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("CheckBoxMenuItem.disabledForeground", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("CheckBoxMenuItem.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("CheckBoxMenuItem.selectionBackground", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("CheckBoxMenuItem.selectionForeground", Color.ColorClass.SF, 176, 176, 176, 255, "...")); + color_map.add(new Color("ColorChooser.background", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("ColorChooser.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("ColorChooser.swatchesDefaultRecentColor", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("ComboBox.background", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("ComboBox.buttonBackground", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("ComboBox.buttonDarkShadow", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("ComboBox.buttonHighlight", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("ComboBox.buttonShadow", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("ComboBox.disabledBackground", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("ComboBox.disabledForeground", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("ComboBox.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("ComboBox.selectionBackground", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("ComboBox.selectionForeground", Color.ColorClass.SF, 176, 176, 176, 255, "...")); + color_map.add(new Color("Desktop.background", Color.ColorClass.SF, 16, 16, 16, 255, "...")); + color_map.add(new Color("EditorPane.background", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("EditorPane.caretForeground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("EditorPane.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("EditorPane.inactiveForeground", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("EditorPane.selectionBackground", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("EditorPane.selectionForeground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("FormattedTextField.background", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("FormattedTextField.caretForeground", Color.ColorClass.SF, 240, 240, 240, 255, "...")); + color_map.add(new Color("FormattedTextField.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("FormattedTextField.inactiveBackground", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("FormattedTextField.inactiveForeground", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("FormattedTextField.selectionBackground", Color.ColorClass.SF, 224, 224, 224, 255, "...")); + color_map.add(new Color("FormattedTextField.selectionForeground", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("InternalFrame.activeTitleBackground", Color.ColorClass.SF, 0, 0, 255, 255, "...")); + color_map.add(new Color("InternalFrame.activeTitleForeground", Color.ColorClass.SF, 0, 255, 0, 255, "...")); + color_map.add(new Color("InternalFrame.borderColor", Color.ColorClass.SF, 204, 204, 204, 255, "...")); + color_map.add(new Color("InternalFrame.borderDarkShadow", Color.ColorClass.SF, 102, 102, 102, 255, "...")); + color_map.add(new Color("InternalFrame.borderHighlight", Color.ColorClass.SF, 255, 255, 255, 255, "...")); + color_map.add(new Color("InternalFrame.borderLight", Color.ColorClass.SF, 255, 255, 255, 255, "...")); + color_map.add(new Color("InternalFrame.borderShadow", Color.ColorClass.SF, 153, 153, 153, 255, "...")); + color_map.add(new Color("InternalFrame.inactiveTitleBackground", Color.ColorClass.SF, 204, 204, 204, 255, "...")); + color_map.add(new Color("InternalFrame.inactiveTitleForeground", Color.ColorClass.SF, 0, 0, 255, 255, "...")); + color_map.add(new Color("Label.background", Color.ColorClass.SF, 16, 16, 16, 255, "...")); + color_map.add(new Color("Label.disabledForeground", Color.ColorClass.SF, 176, 176, 176, 255, "...")); + color_map.add(new Color("Label.disabledShadow", Color.ColorClass.SF, 176, 176, 176, 255, "...")); + color_map.add(new Color("Label.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("List.background", Color.ColorClass.SF, 16, 16, 16, 255, "...")); + color_map.add(new Color("List.dropLineColor", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("List.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("List.selectionBackground", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("List.selectionForeground", Color.ColorClass.SF, 176, 176, 176, 255, "...")); + color_map.add(new Color("Menu.acceleratorForeground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("Menu.acceleratorSelectionForeground", Color.ColorClass.SF, 176, 176, 176, 255, "...")); + color_map.add(new Color("Menu.background", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("Menu.disabledForeground", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("Menu.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("Menu.selectionBackground", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("Menu.selectionForeground", Color.ColorClass.SF, 192, 192, 192, 255, "...")); + color_map.add(new Color("MenuBar.background", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("MenuBar.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("MenuBar.highlight", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("MenuBar.shadow", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("MenuItem.acceleratorForeground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("MenuItem.acceleratorSelectionForeground", Color.ColorClass.SF, 176, 176, 176, 255, "...")); + color_map.add(new Color("MenuItem.background", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("MenuItem.disabledForeground", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("MenuItem.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("MenuItem.selectionBackground", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("MenuItem.selectionForeground", Color.ColorClass.SF, 176, 176, 176, 255, "...")); + color_map.add(new Color("OptionPane.background", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("OptionPane.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("OptionPane.messageForeground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("Panel.background", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("Panel.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("PasswordField.background", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("PasswordField.caretForeground", Color.ColorClass.SF, 240, 240, 240, 255, "...")); + color_map.add(new Color("PasswordField.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("PasswordField.inactiveBackground", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("PasswordField.inactiveForeground", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("PasswordField.selectionBackground", Color.ColorClass.SF, 224, 224, 224, 255, "...")); + color_map.add(new Color("PasswordField.selectionForeground", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("PopupMenu.background", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("PopupMenu.foreground", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("ProgressBar.background", Color.ColorClass.SF, 16, 16, 16, 255, "...")); + color_map.add(new Color("ProgressBar.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("ProgressBar.selectionBackground", Color.ColorClass.SF, 176, 176, 176, 255, "...")); + color_map.add(new Color("ProgressBar.selectionForeground", Color.ColorClass.SF, 16, 16, 16, 255, "...")); + color_map.add(new Color("RadioButton.background", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("RadioButton.darkShadow", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("RadioButton.disabledText", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("RadioButton.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("RadioButton.highlight", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("RadioButton.light", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("RadioButton.select", Color.ColorClass.SF, 176, 176, 176, 255, "...")); + color_map.add(new Color("RadioButton.shadow", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("RadioButtonMenuItem.acceleratorForeground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("RadioButtonMenuItem.acceleratorSelectionForeground", Color.ColorClass.SF, 176, 176, 176, 255, "...")); + color_map.add(new Color("RadioButtonMenuItem.background", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("RadioButtonMenuItem.disabledForeground", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("RadioButtonMenuItem.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("RadioButtonMenuItem.selectionBackground", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("RadioButtonMenuItem.selectionForeground", Color.ColorClass.SF, 176, 176, 176, 255, "...")); + color_map.add(new Color("ScrollBar.background", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("ScrollBar.foreground", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("ScrollBar.thumb", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("ScrollBar.thumbDarkShadow", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("ScrollBar.thumbHighlight", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("ScrollBar.thumbShadow", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("ScrollBar.track", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("ScrollBar.trackHighlight", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("ScrollPane.background", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("ScrollPane.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("Separator.foreground", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("Separator.highlight", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("Separator.shadow", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("Slider.background", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("Slider.focus", Color.ColorClass.SF, 64, 64, 64, 0, "...")); + color_map.add(new Color("Slider.foreground", Color.ColorClass.SF, 80, 80, 80, 255, "...")); + color_map.add(new Color("Slider.highlight", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("Slider.shadow", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("Slider.tickColor", Color.ColorClass.AT, 0, 255, 0, 255, "...")); + color_map.add(new Color("Spinner.background", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("Spinner.foreground", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("SplitPane.background", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("SplitPane.darkShadow", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("SplitPane.highlight", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("SplitPane.shadow", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("SplitPaneDivider.draggingColor", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("TabbedPane.background", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("TabbedPane.darkShadow", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("TabbedPane.focus", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("TabbedPane.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("TabbedPane.highlight", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("TabbedPane.light", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("TabbedPane.shadow", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("Table.background", Color.ColorClass.SF, 16, 16, 16, 255, "...")); + color_map.add(new Color("Table.dropLineColor", Color.ColorClass.SF, 153, 153, 204, 255, "...")); + color_map.add(new Color("Table.dropLineShortColor", Color.ColorClass.SF, 102, 102, 153, 255, "...")); + color_map.add(new Color("Table.focusCellBackground", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("Table.focusCellForeground", Color.ColorClass.SF, 176, 176, 176, 255, "...")); + color_map.add(new Color("Table.gridColor", Color.ColorClass.SF, 80, 80, 80, 255, "...")); + color_map.add(new Color("Table.selectionBackground", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("Table.selectionForeground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("Table.sortIconColor", Color.ColorClass.SF, 153, 153, 153, 255, "...")); + color_map.add(new Color("TableHeader.background", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("TableHeader.focusCellBackground", Color.ColorClass.SF, 128, 128, 128, 255, "...")); + color_map.add(new Color("TableHeader.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("TextArea.background", Color.ColorClass.SF, 48, 48, 48, 255, "...")); + color_map.add(new Color("TextArea.caretForeground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("TextArea.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("TextArea.inactiveForeground", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("TextArea.selectionBackground", Color.ColorClass.SF, 224, 224, 224, 255, "...")); + color_map.add(new Color("TextArea.selectionForeground", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("TextField.background", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("TextField.caretForeground", Color.ColorClass.SF, 240, 240, 240, 255, "...")); + color_map.add(new Color("TextField.darkShadow", Color.ColorClass.SF, 102, 102, 102, 255, "...")); + color_map.add(new Color("TextField.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("TextField.highlight", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("TextField.inactiveBackground", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("TextField.inactiveForeground", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("TextField.light", Color.ColorClass.SF, 255, 255, 255, 255, "...")); + color_map.add(new Color("TextField.selectionBackground", Color.ColorClass.SF, 176, 176, 176, 255, "...")); + color_map.add(new Color("TextField.selectionForeground", Color.ColorClass.SF, 16, 16, 16, 255, "...")); + color_map.add(new Color("TextField.shadow", Color.ColorClass.SF, 153, 153, 153, 255, "...")); + color_map.add(new Color("TextPane.background", Color.ColorClass.SF, 48, 48, 48, 255, "...")); + color_map.add(new Color("TextPane.caretForeground", Color.ColorClass.SF, 255, 0, 0, 255, "...")); + color_map.add(new Color("TextPane.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("TextPane.inactiveForeground", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("TextPane.selectionBackground", Color.ColorClass.SF, 224, 224, 224, 255, "...")); + color_map.add(new Color("TextPane.selectionForeground", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("TitledBorder.titleColor", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("ToggleButton.background", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("ToggleButton.darkShadow", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("ToggleButton.disabledText", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("ToggleButton.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("ToggleButton.highlight", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("ToggleButton.light", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("ToggleButton.shadow", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("ToolBar.background", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("ToolBar.darkShadow", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("ToolBar.dockingBackground", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("ToolBar.dockingForeground", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("ToolBar.floatingBackground", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("ToolBar.floatingForeground", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("ToolBar.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("ToolBar.highlight", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("ToolBar.light", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("ToolBar.shadow", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("ToolTip.background", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("ToolTip.foreground", Color.ColorClass.SF, 8, 8, 8, 255, "...")); + color_map.add(new Color("Tree.background", Color.ColorClass.SF, 16, 16, 16, 255, "...")); + color_map.add(new Color("Tree.dropLineColor", Color.ColorClass.SF, 224, 224, 224, 255, "...")); + color_map.add(new Color("Tree.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("Tree.hash", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("Tree.line", Color.ColorClass.SF, 176, 176, 176, 255, "...")); + color_map.add(new Color("Tree.selectionBackground", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("Tree.selectionBorderColor", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("Tree.selectionForeground", Color.ColorClass.SF, 176, 176, 176, 255, "...")); + color_map.add(new Color("Tree.textBackground", Color.ColorClass.SF, 16, 16, 16, 255, "...")); + color_map.add(new Color("Tree.textForeground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("Viewport.background", Color.ColorClass.SF, 16, 16, 16, 255, "...")); + color_map.add(new Color("Viewport.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + + + color_map.add(new Color("activeCaption", Color.ColorClass.SF, 16, 16, 16, 255, "...")); + color_map.add(new Color("activeCaptionBorder", Color.ColorClass.SF, 16, 16, 16, 255, "...")); + color_map.add(new Color("activeCaptionText", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("control", Color.ColorClass.SF, 48, 48, 48, 255, "...")); + color_map.add(new Color("controlDkShadow", Color.ColorClass.SF, 48, 48, 48, 255, "...")); + color_map.add(new Color("controlHighlight", Color.ColorClass.SF, 48, 48, 48, 0, "...")); + color_map.add(new Color("controlLtHighlight", Color.ColorClass.SF, 48, 48, 48, 0, "...")); + color_map.add(new Color("controlShadow", Color.ColorClass.SF, 24, 24, 24, 255, "...")); + color_map.add(new Color("controlText", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("desktop", Color.ColorClass.SF, 153, 153, 204, 255, "...")); + color_map.add(new Color("inactiveCaption", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("inactiveCaptionBorder", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("inactiveCaptionText", Color.ColorClass.SF, 176, 176, 176, 255, "...")); + color_map.add(new Color("info", Color.ColorClass.SF, 204, 204, 204, 255, "...")); + color_map.add(new Color("infoText", Color.ColorClass.SF, 255, 0, 0, 255, "...")); + color_map.add(new Color("menu", Color.ColorClass.SF, 204, 204, 204, 255, "...")); + color_map.add(new Color("menuText", Color.ColorClass.SF, 0, 255, 0, 255, "...")); + color_map.add(new Color("scrollbar", Color.ColorClass.SF, 204, 204, 204, 255, "...")); + color_map.add(new Color("textHighlight", Color.ColorClass.SF, 204, 204, 204, 255, "...")); + color_map.add(new Color("textHighlightText", Color.ColorClass.SF, 0, 0, 255, 255, "...")); + color_map.add(new Color("textInactiveText", Color.ColorClass.AT, 128, 128, 128, 255, "...")); + color_map.add(new Color("textText", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("window", Color.ColorClass.SF, 16, 16, 16, 255, "...")); + color_map.add(new Color("windowBorder", Color.ColorClass.SF, 16, 16, 16, 255, "...")); + color_map.add(new Color("windowText", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("PropSheet.setBackground", Color.ColorClass.AT, 80, 80, 80, 255, "...")); + color_map.add(new Color("PropSheet.selectedSetBackground", Color.ColorClass.AT, 96, 96, 96, 255, "...")); + color_map.add(new Color("PropSheet.setForeground", Color.ColorClass.AT, 208, 208, 208, 255, "...")); + color_map.add(new Color("PropSheet.selectedSetForeground", Color.ColorClass.AT, 176, 176, 176, 255, "...")); + color_map.add(new Color("PropSheet.disabledForeground", Color.ColorClass.AT, 96, 96, 96, 255, "...")); + color_map.add(new Color("PropSheet.selectionBackground", Color.ColorClass.AT, 64, 64, 64, 255, "...")); + color_map.add(new Color("PropSheet.selectionForeground", Color.ColorClass.AT, 208, 208, 208, 255, "...")); + color_map.add(new Color("CheckBoxMenuItem.disabledBackground", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("EditorPane.inactiveBackground", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("Focus.color", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("InternalFrame.background", Color.ColorClass.SF, 49, 37, 177, 255, "...")); + color_map.add(new Color("InternalFrame.optionDialogBackground", Color.ColorClass.SF, 206, 228, 135, 255, "...")); + color_map.add(new Color("InternalFrame.paletteBackground", Color.ColorClass.SF, 30, 185, 18, 255, "...")); + color_map.add(new Color("Menu.disabledBackground", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("MenuBar.disabledBackground", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("MenuBar.disabledForeground", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("MenuBar.selectionBackground", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("MenuBar.selectionForeground", Color.ColorClass.SF, 176, 176, 176, 255, "...")); + color_map.add(new Color("MenuItem.disabledBackground", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("PopupMenu.selectionBackground", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("PopupMenu.selectionForeground", Color.ColorClass.SF, 176, 176, 176, 255, "...")); + color_map.add(new Color("RadioButtonMenuItem.disabledBackground", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("TextArea.inactiveBackground", Color.ColorClass.SF, 48, 48, 48, 255, "...")); + color_map.add(new Color("TextComponent.selectionBackgroundInactive", Color.ColorClass.SF, 97, 215, 123, 255, "...")); + color_map.add(new Color("TextPane.inactiveBackground", Color.ColorClass.SF, 48, 48, 48, 255, "...")); + color_map.add(new Color("nb_workplace_fill", Color.ColorClass.SF, 50, 221, 208, 255, "...")); + color_map.add(new Color("Nb.Desktop.background", Color.ColorClass.SF, 125, 90, 158, 255, "...")); + color_map.add(new Color("nb.output.selectionBackground", Color.ColorClass.SF, 188, 54, 68, 255, "...")); + color_map.add(new Color("nb.hyperlink.foreground", Color.ColorClass.SF, 220, 244, 200, 255, "...")); + color_map.add(new Color("nb.output.background", Color.ColorClass.SF, 16, 16, 16, 255, "...")); + color_map.add(new Color("nb.output.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("Tree.altbackground", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("PropSheet.customButtonForeground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("netbeans.ps.buttonColor", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("netbeans.ps.background", Color.ColorClass.SF, 16, 16, 16, 255, "...")); + color_map.add(new Color("nb.errorForeground", Color.ColorClass.SF, 210, 245, 244, 255, "...")); + color_map.add(new Color("nb.warningForeground", Color.ColorClass.SF, 36, 223, 138, 255, "...")); + color_map.add(new Color("TabRenderer.selectedActivatedBackground", Color.ColorClass.SF, 16, 16, 16, 255, "...")); + color_map.add(new Color("TabRenderer.selectedActivatedForeground", Color.ColorClass.SF, 160, 160, 160, 255, "...")); + color_map.add(new Color("TabRenderer.selectedForeground", Color.ColorClass.SF, 224, 224, 224, 255, "...")); + color_map.add(new Color("TabRenderer.selectedBackground", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("Button.focus", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("CheckBox.focus", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("Checkbox.select", Color.ColorClass.SF, 176, 176, 176, 255, "...")); + color_map.add(new Color("DesktopIcon.background", Color.ColorClass.SF, 204, 204, 204, 255, "...")); + color_map.add(new Color("DesktopIcon.foreground", Color.ColorClass.SF, 255, 0, 0, 255, "...")); + color_map.add(new Color("OptionPane.errorDialog.border.background", Color.ColorClass.SF, 153, 51, 51, 255, "...")); + color_map.add(new Color("OptionPane.errorDialog.titlePane.background", Color.ColorClass.SF, 255, 153, 153, 255, "...")); + color_map.add(new Color("OptionPane.errorDialog.titlePane.foreground", Color.ColorClass.SF, 51, 0, 0, 255, "...")); + color_map.add(new Color("OptionPane.errorDialog.titlePane.shadow", Color.ColorClass.SF, 204, 102, 102, 255, "...")); + color_map.add(new Color("OptionPane.questionDialog.border.background", Color.ColorClass.SF, 51, 102, 51, 255, "...")); + color_map.add(new Color("OptionPane.questionDialog.titlePane.background", Color.ColorClass.SF, 153, 204, 153, 255, "...")); + color_map.add(new Color("OptionPane.questionDialog.titlePane.foreground", Color.ColorClass.SF, 0, 51, 0, 255, "...")); + color_map.add(new Color("OptionPane.questionDialog.titlePane.shadow", Color.ColorClass.SF, 102, 153, 102, 255, "...")); + color_map.add(new Color("OptionPane.warningDialog.border.background", Color.ColorClass.SF, 153, 102, 51, 255, "...")); + color_map.add(new Color("OptionPane.warningDialog.titlePane.background", Color.ColorClass.SF, 255, 204, 153, 255, "...")); + color_map.add(new Color("OptionPane.warningDialog.titlePane.foreground", Color.ColorClass.SF, 102, 51, 0, 255, "...")); + color_map.add(new Color("OptionPane.warningDialog.titlePane.shadow", Color.ColorClass.SF, 204, 153, 102, 255, "...")); + color_map.add(new Color("RadioButton.focus", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("ScrollBar.darkShadow", Color.ColorClass.SF, 16, 16, 16, 255, "...")); + color_map.add(new Color("ScrollBar.highlight", Color.ColorClass.SF, 48, 48, 48, 255, "...")); + color_map.add(new Color("ScrollBar.shadow", Color.ColorClass.SF, 48, 48, 48, 255, "...")); + color_map.add(new Color("Separator.background", Color.ColorClass.SF, 80, 80, 80, 255, "...")); + color_map.add(new Color("SplitPane.dividerFocusColor", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("TabbedPane.selected", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("TabbedPane.selectHighlight", Color.ColorClass.SF, 48, 48, 48, 192, "...")); + color_map.add(new Color("TabbedPane.tabAreaBackground", Color.ColorClass.SF, 32, 32, 32, 255, "...")); + color_map.add(new Color("Table.foreground", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("ToggleButton.focus", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("ToggleButton.select", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("ToolTip.backgroundInactive", Color.ColorClass.SF, 204, 204, 204, 255, "...")); + color_map.add(new Color("ToolTip.foregroundInactive", Color.ColorClass.SF, 102, 102, 102, 255, "...")); + color_map.add(new Color("primary1", Color.ColorClass.SF, 128, 128, 128, 255, "...")); + color_map.add(new Color("primary2", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("primary3", Color.ColorClass.SF, 128, 128, 128, 255, "...")); + color_map.add(new Color("secondary1", Color.ColorClass.SF, 208, 208, 208, 255, "...")); + color_map.add(new Color("secondary2", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("secondary3", Color.ColorClass.SF, 64, 64, 64, 255, "...")); + color_map.add(new Color("black", Color.ColorClass.SF, 255, 255, 255, 255, "...")); + color_map.add(new Color("white", Color.ColorClass.SF, 0, 0, 0, 255, "...")); + color_map.add(new Color("Nb.ScrollPane.Border.color", Color.ColorClass.AT, 32, 32, 32, 255, "...")); + color_map.add(new Color("nb.explorer.unfocusedSelBg", Color.ColorClass.AT, 64, 64, 64, 255, "...")); + color_map.add(new Color("nb.explorer.unfocusedSelFg", Color.ColorClass.SF, 128, 128, 128, 255, "...")); + color_map.add(new Color("nb.heapview.border1", Color.ColorClass.SF, 63, 47, 210, 255, "...")); + color_map.add(new Color("nb.heapview.border2", Color.ColorClass.SF, 60, 17, 143, 255, "...")); + color_map.add(new Color("nb.heapview.border3", Color.ColorClass.SF, 152, 17, 9, 255, "...")); + color_map.add(new Color("nb.heapview.foreground", Color.ColorClass.SF, 178, 146, 69, 255, "...")); + color_map.add(new Color("nb.heapview.background1", Color.ColorClass.SF, 232, 84, 239, 255, "...")); + color_map.add(new Color("nb.heapview.background2", Color.ColorClass.SF, 255, 0, 0, 255, "...")); + color_map.add(new Color("nb.heapview.grid1.start", Color.ColorClass.SF, 57, 128, 191, 255, "...")); + color_map.add(new Color("nb.heapview.grid1.end", Color.ColorClass.SF, 152, 226, 133, 255, "...")); + color_map.add(new Color("nb.heapview.grid2.start", Color.ColorClass.SF, 186, 229, 67, 255, "...")); + color_map.add(new Color("nb.heapview.grid2.end", Color.ColorClass.SF, 0, 0, 255, 255, "...")); + color_map.add(new Color("nb.heapview.grid3.start", Color.ColorClass.SF, 238, 108, 196, 255, "...")); + color_map.add(new Color("nb.heapview.grid3.end", Color.ColorClass.SF, 105, 72, 222, 255, "...")); + color_map.add(new Color("nb.heapview.grid4.start", Color.ColorClass.SF, 78, 70, 95, 255, "...")); + color_map.add(new Color("nb.heapview.grid4.end", Color.ColorClass.SF, 49, 152, 255, 255, "...")); + color_map.add(new Color("nb.bugtracking.comment.background", Color.ColorClass.SF, 244, 92, 44, 255, "...")); + color_map.add(new Color("nb.bugtracking.comment.foreground", Color.ColorClass.SF, 243, 45, 235, 255, "...")); + color_map.add(new Color("nb.bugtracking.label.highlight", Color.ColorClass.SF, 31, 30, 223, 255, "...")); + color_map.add(new Color("nb.bugtracking.table.background", Color.ColorClass.SF, 189, 57, 2, 255, "...")); + color_map.add(new Color("nb.bugtracking.table.background.alternate", Color.ColorClass.SF, 142, 69, 142, 255, "...")); + color_map.add(new Color("nb.bugtracking.new.color", Color.ColorClass.SF, 209, 15, 203, 255, "...")); + color_map.add(new Color("nb.bugtracking.modified.color", Color.ColorClass.SF, 107, 159, 235, 255, "...")); + color_map.add(new Color("nb.bugtracking.obsolete.color", Color.ColorClass.SF, 0, 0, 255, 255, "...")); + color_map.add(new Color("nb.bugtracking.conflict.color", Color.ColorClass.SF, 255, 255, 0, 255, "...")); + color_map.add(new Color("nb.html.link.foreground", Color.ColorClass.SF, 116, 94, 245, 255, "...")); + color_map.add(new Color("nb.html.link.foreground.hover", Color.ColorClass.SF, 112, 42, 3, 255, "...")); + color_map.add(new Color("nb.html.link.foreground.visited", Color.ColorClass.SF, 0, 0, 255, 255, "...")); + color_map.add(new Color("nb.html.link.foreground.focus", Color.ColorClass.SF, 54, 48, 97, 255, "...")); + color_map.add(new Color("nb.startpage.bottombar.background", Color.ColorClass.SF, 96, 96, 96, 255, "...")); + color_map.add(new Color("nb.editor.errorstripe.caret.color", Color.ColorClass.SF, 180, 194, 38, 255, "...")); + color_map.add(new Color("nb.diff.added.color", Color.ColorClass.SF, 131, 255, 149, 255, "...")); + color_map.add(new Color("nb.diff.changed.color", Color.ColorClass.SF, 12, 174, 54, 255, "...")); + color_map.add(new Color("nb.diff.deleted.color", Color.ColorClass.SF, 248, 240, 174, 255, "...")); + color_map.add(new Color("nb.diff.applied.color", Color.ColorClass.SF, 39, 227, 180, 255, "...")); + color_map.add(new Color("nb.diff.notapplied.color", Color.ColorClass.SF, 177, 77, 160, 255, "...")); + color_map.add(new Color("nb.diff.unresolved.color", Color.ColorClass.SF, 131, 118, 124, 255, "...")); + color_map.add(new Color("nb.diff.sidebar.changed.color", Color.ColorClass.SF, 38, 29, 2, 255, "...")); + color_map.add(new Color("nb.diff.sidebar.deleted.color", Color.ColorClass.SF, 171, 66, 200, 255, "...")); + color_map.add(new Color("nb.versioning.tooltip.background.color", Color.ColorClass.SF, 0, 0, 255, 255, "...")); + +// "nb.versioning.added.color" +// "nb.versioning.modified.color" +// "nb.versioning.deleted.color" +// "nb.versioning.conflicted.color" +// "nb.versioning.ignored.color" +// "nb.versioning.textannotation.color" + + + + color_map.add(new Color("nb.formdesigner.gap.fixed.color", Color.ColorClass.SF, 142, 200, 230, 255, "...")); + color_map.add(new Color("nb.formdesigner.gap.resizing.color", Color.ColorClass.SF, 26, 72, 208, 255, "...")); + color_map.add(new Color("nb.formdesigner.gap.min.color", Color.ColorClass.SF, 134, 54, 215, 255, "...")); + color_map.add(new Color("nb.debugger.debugging.currentThread", Color.ColorClass.SF, 150, 206, 254, 255, "...")); + color_map.add(new Color("nb.debugger.debugging.highlightColor", Color.ColorClass.SF, 51, 205, 120, 255, "...")); + color_map.add(new Color("nb.debugger.debugging.BPHits", Color.ColorClass.SF, 82, 76, 59, 255, "...")); + color_map.add(new Color("nb.debugger.debugging.bars.BPHits", Color.ColorClass.SF, 61, 192, 77, 255, "...")); + color_map.add(new Color("nb.debugger.debugging.bars.currentThread", Color.ColorClass.SF, 108, 19, 162, 255, "...")); + color_map.add(new Color("nb.dataview.tablecell.edited.selected.foreground", Color.ColorClass.SF, 176, 176, 176, 255, "...")); + color_map.add(new Color("nb.dataview.tablecell.edited.unselected.foreground", Color.ColorClass.SF, 128, 128, 128, 255, "...")); + color_map.add(new Color("nb.autoupdate.search.highlight", Color.ColorClass.SF, 255, 0, 0, 255, "...")); + color_map.add(new Color("selection.highlight", Color.ColorClass.SF, 122, 185, 125, 255, "...")); + color_map.add(new Color("textArea.background", Color.ColorClass.SF, 0, 0, 255, 255, "...")); + color_map.add(new Color("Nb.browser.picker.background.light", Color.ColorClass.AT, 249, 249, 249, 255, "...")); + color_map.add(new Color("Nb.browser.picker.foreground.light", Color.ColorClass.AT, 130, 130, 130, 255, "...")); + color_map.add(new Color("nb.search.sandbox.highlight", Color.ColorClass.SF, 32, 38, 171, 255, "...")); + color_map.add(new Color("nb.search.sandbox.regexp.wrong", Color.ColorClass.SF, 18, 103, 179, 255, "...")); + color_map.add(new Color("nb.laf.postinstall.callable.httplink", Color.ColorClass.SF, 105, 254, 158, 255, "...")); + + color_scheme_loaded = new Color[color_map.size()]; + color_map.toArray(color_scheme_loaded); + return color_scheme_loaded; + } + +} diff --git a/src/org/twopm/laf/Installer.java b/src/org/twopm/laf/Installer.java new file mode 100644 index 0000000..8f013fd --- /dev/null +++ b/src/org/twopm/laf/Installer.java @@ -0,0 +1,71 @@ +package org.twopm.laf; + +import java.util.prefs.Preferences; +import javax.swing.SwingUtilities; +import org.openide.modules.ModuleInstall; +import org.openide.util.NbPreferences; +import org.openide.windows.WindowManager; + +/** + * @author Edward M. Kagan + */ +public class Installer extends ModuleInstall +{ + + @Override + public void restored() { + + SwingUtilities.invokeLater(new Runnable() + { + @Override + public void run() + { + Kernel.load_kernel(); + + } + }); + + Preferences prefs = NbPreferences.root().node( "laf" ); //NOI18N + if( !prefs.getBoolean("twopm.titan.installed", false) ) //NOI18N + { + prefs.putBoolean("twopm.titan.installed", true ); //NOI18N + WindowManager.getDefault().invokeWhenUIReady( new Runnable() + { + @Override + public void run() { + TitanEditor.load_editor(true); + } + }); + } + else + { + WindowManager.getDefault().invokeWhenUIReady( new Runnable() + { + @Override + public void run() { + TitanEditor.load_editor(false); + } + }); + } + + + + + + } + + @Override + public void validate() throws IllegalStateException + { + if (TitanLookAndFeel.self_install()) + { + System.out.print("Setting up anti-aliasing hints to conf file..."); + if (!Kernel.setup_font_antialiaing_hints()) + { + System.err.println("FAIL"); + return; + } + System.out.println("OK"); + } + } +} diff --git a/src/org/twopm/laf/Kernel.java b/src/org/twopm/laf/Kernel.java new file mode 100644 index 0000000..9e61373 --- /dev/null +++ b/src/org/twopm/laf/Kernel.java @@ -0,0 +1,496 @@ +package org.twopm.laf; + +import java.awt.Font; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStreamWriter; +import java.io.PrintWriter; +import java.io.UnsupportedEncodingException; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.nio.file.FileSystems; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.List; +import java.util.Random; +import java.util.concurrent.Callable; +import javax.swing.JLabel; +import javax.swing.SwingUtilities; +import javax.swing.UIManager; +import javax.swing.border.CompoundBorder; +import javax.swing.border.EmptyBorder; +import javax.swing.border.LineBorder; +import javax.swing.plaf.ColorUIResource; +import javax.swing.text.html.HTMLEditorKit; +import javax.swing.text.html.StyleSheet; +import org.twopm.laf.tools.Scheme2Java; +import org.openide.util.Exceptions; +import org.openide.windows.WindowManager; + +/** + * @author Edward M. Kagan + */ +@SuppressWarnings("rawtypes") +public class Kernel { + + private static final boolean w_init = false; + public static Color[] color_scheme_loaded; + private static final String scheme_file_name = "netbeans.twopm_scheme"; + + public static void load_kernel () + { + if (UIManager.getLookAndFeel().getName().equals("[twopm!] Titan")) //NOI18N + { + String nb_etc = retrieve_netbeans_etc_dir(); + String cfh_dir = retrieve_app_folder(); + boolean a = (new File (cfh_dir).mkdirs()); + load_setup (cfh_dir); + TitanTheme.self_tuneup(color_scheme_loaded); + reset_html_link_color(); + apply_border_managment_hints(); + reloadUI(); + if (w_init) + { + Scheme2Java.printJava(color_scheme_loaded); + } + } + else + { + System.err.println("\"Titan\" Look and Feel is not selected" + + " - no modifications done. Follow your ugly way of live."); + } + } + + public static boolean setup_font_antialiaing_hints () + { + try + { + String nb_etc = retrieve_netbeans_etc_dir (); + System.setProperty("awt.useSystemAAFontSettings","lcd"); + System.setProperty("swing.aatext", "true"); + + Path path = FileSystems.getDefault().getPath(nb_etc, "netbeans.conf"); + if( Files.isWritable(path)) + { + + List linesL = Files.readAllLines(path, StandardCharsets.UTF_8); + String [] lines = new String[linesL.size()]; + + int i = 0; + for (String str : linesL) + { + lines[i] = str; + i++; + } + + for (i =0; i < lines.length; i ++) + { + if (lines[i].contains("netbeans_default_options=")) + { + if (!lines[i].contains("-J-Dawt.useSystemAAFontSettings")) + { + System.err.println("No rendering hints defined - fixing..."); + String [] parts = lines[i].split("\""); + String new_line = parts[0] + "\"" + parts[1] + " -J-Dswing.aatext=true -J-Dawt.useSystemAAFontSettings=lcd" + "\""; + lines[i] = new_line; + write_scheme(nb_etc + "netbeans.conf", lines); + System.out.println("Restart Netbeabs to see the effect."); + } + } + } + return true; + } + else + { + System.err.println("Unable to fix config - bye-bye :("); + return false; + } + } + catch (IOException ex) + { + Exceptions.printStackTrace(ex); + System.err.println("Unable to apply rendering hints :( Sorry..."); + return false; + } + } + + private static void apply_border_managment_hints () + { + javax.swing.border.EmptyBorder invisable_border = new EmptyBorder(0,0,0,0); + UIManager.put ("EditorPane.border", invisable_border); // Editor FUCKING LINE! + UIManager.put ("ComboBox.border", invisable_border); // Editor FUCKING LINE! + + javax.swing.border.EmptyBorder spinner_border = new EmptyBorder(1,1,1,1); + + UIManager.put("Spinner.border", spinner_border); + UIManager.put("Spinner.arrowButtonBorder", spinner_border); + + UIManager.put ("TabbedContainer.editor.outerBorder", + new LineBorder(new java.awt.Color(24, 24, 24, 255), 1)); // Editor border + + javax.swing.border.LineBorder light_dark_bodrer = + new LineBorder(new java.awt.Color(0, 0, 0, 31), 2); + UIManager.put ("TabbedContainer.view.outerBorder", light_dark_bodrer); // Navigator/Project/etc. round border!! + + // + + javax.swing.border.CompoundBorder buttons_border = + new CompoundBorder(light_dark_bodrer, new EmptyBorder(4,6,4,6)); + + String [] buttonized_components = { + "ToggleButton.border", + "Button.border", + "ToggleButton.border", + } ; + + javax.swing.border.LineBorder text_bodrer = + new LineBorder(new java.awt.Color(0, 0, 0, 31), 1); + + String [] text_components = { + "CheckBox.border", + "FormattedTextField.border", + "PasswordField.border", + "TextField.border", + "RadioButton.border", + "TextArea.border", + "TextPane.border", + "SplitPane.border" + } ; + + for (String o : text_components) + { + UIManager.put(o, text_bodrer); + } + + for (String o : buttonized_components) + { + UIManager.put(o, buttons_border); + } + // + + // + + javax.swing.border.EmptyBorder mainMenuBorder = new EmptyBorder(2,4,2,4); + javax.swing.border.EmptyBorder itemBorder = new EmptyBorder(4,4,4,4); + UIManager.put ("MenuBar.border", buttons_border); + UIManager.put ("Menu.border", mainMenuBorder); + UIManager.put ("MenuItem.border", itemBorder); + + + + + String [] side_components ={ + "CheckBoxMenuItem.border", + "ScrollPane.border", + "RadioButtonMenuItem.border", + "PopupMenu.border" + }; + + javax.swing.border.EmptyBorder empty_1p_border = new EmptyBorder(1,1,1,1); + + for (String o : side_components) + { + UIManager.put(o, empty_1p_border); + } + + // + + // + + javax.swing.border.EmptyBorder ministatusbarBorder = new EmptyBorder(2,4,2,4); + UIManager.put ("nb.explorer.ministatusbar.border", ministatusbarBorder); + + javax.swing.border.EmptyBorder status_border = new EmptyBorder(4,2,4,2); + + String [] status = + { + "Nb.Editor.Toolbar.border", + "Nb.Editor.Status.leftBorder", + "Nb.Editor.Status.rightBorder", + "Nb.Editor.Status.onlyOneBorder", + "Nb.Explorer.Status.border", + "Nb.Editor.Status.innerBorder", + "Table.scrollPaneBorder", + "TableHeader.cellBorder", + "OptionPane.border", + //"Tree.editorBorder", + "Table.focusCellHighlightBorder", + "ToolTip.border", + "List.focusCellHighlightBorder", + "nb.quicksearch.border" + }; + + for (String o : status) + { + UIManager.put(o, status_border); + } + // + } + + + // + + private static String retrieve_app_folder () + { + if (System.getProperty("os.name").startsWith("Windows")) { + return System.getenv("APPDATA") + File.separator + "twopm_scheme"; + } else { + return retrieve_netbeans_etc_dir (); + } + } + + private static String retrieve_netbeans_etc_dir () + { + String nb_home = System.getProperty("netbeans.home"); + String nb_conf = nb_home.substring(0, nb_home.length() - "platform".length()) + "etc" + File.separator; + return nb_conf; + } + // + + + // + + private static boolean load_setup (String nb_etc) + { + File scheme_file = new File(nb_etc + File.separator + scheme_file_name); + String path = scheme_file.getAbsolutePath(); + + if (!scheme_file.exists()) + { + if (w_init) + { + init_scheme(); + if (save_scheme(path)) + { + if (read_scheme (path)) + { + reloadUI(); + return true; + } + } + else + { + return false; + } + } + else + { + color_scheme_loaded = Defaults.preload_defaults(); + reloadUI(); + return true; + } + } + else + { + if (read_scheme (path)) + { + reloadUI(); + return true; + } + } + return false; + } + + private static Random rand = new Random(System.currentTimeMillis()); + + public static void save () + { + String nb_etc = retrieve_app_folder(); + File scheme_file = new File(nb_etc + File.separator + scheme_file_name); + String path = scheme_file.getAbsolutePath(); + save_scheme (path); + } + + public static void reload () + { + String nb_etc = retrieve_app_folder(); + File scheme_file = new File(nb_etc + File.separator + scheme_file_name); + String path = scheme_file.getAbsolutePath(); + read_scheme (path); + reloadUI(); + } + + public static void load (String path) + { + read_scheme (path); + reloadUI(); + } + + private static void init_scheme () + { + ArrayList color_map = new ArrayList(); + for (int i = 0; i < Keys.color_keys.length; i ++) + { + Object o = UIManager.get(Keys.color_keys[i]); + if (o != null) + { + if (o.getClass().equals(javax.swing.plaf.ColorUIResource.class)) + { + ColorUIResource oo = (ColorUIResource) o; + Color c = new Color(Keys.color_keys[i], Color.ColorClass.SF, oo.getRed(), oo.getGreen(), oo.getBlue(), oo.getAlpha(),"..."); + color_map.add(c); + } + else if (o.getClass().equals(java.awt.Color.class)) + { + java.awt.Color oo = (java.awt.Color) o; + Color c = new Color(Keys.color_keys[i], Color.ColorClass.AT, oo.getRed(), oo.getGreen(), oo.getBlue(), oo.getAlpha(),"..."); + color_map.add(c); + } + } + else + { + ColorUIResource oo = new ColorUIResource(rand.nextInt(256), rand.nextInt(256), rand.nextInt(256)); + Color c = new Color(Keys.color_keys[i], Color.ColorClass.SF, oo.getRed(), oo.getGreen(), oo.getBlue(), oo.getAlpha(),"..."); + color_map.add(c); + } + } + + color_scheme_loaded = new Color[color_map.size()]; + color_map.toArray(color_scheme_loaded); + } + + + private static boolean save_scheme(String scheme_file) { + + Path path = FileSystems.getDefault().getPath(scheme_file); + + try + { + PrintWriter writer = new PrintWriter(scheme_file , "UTF-8"); + for (int i = 0; i < color_scheme_loaded.length; i ++) + { + writer.println(color_scheme_loaded[i].toStringC()); + } + writer.close(); + return true; + } + catch (FileNotFoundException ex) + { + Exceptions.printStackTrace(ex); + return false; + } + catch (UnsupportedEncodingException ex) + { + Exceptions.printStackTrace(ex); + return false; + } + //} +// else +// { +// JOptionPane.showMessageDialog(null, "Unable to write '" + scheme_file + "'" ); +// return false; +// } + } + + private static boolean read_scheme(String scheme_file) { + + try + { + ArrayList color_map = new ArrayList(); + List C = Files.readAllLines(Paths.get(scheme_file), Charset.forName("UTF-8")); + + for (String s : C) + { + Color toLoad = new Color(s); + for (String key : Keys.color_keys) + { + if (toLoad.getName().equals(key)) + { + color_map.add(toLoad); + break; + } + } + } + + color_scheme_loaded = new Color[color_map.size()]; + color_map.toArray(color_scheme_loaded); + + return true; + } + catch (IOException ex) + { + Exceptions.printStackTrace(ex); + return false; + } + } + + public static void reloadUI() + { + for (int i = 0; i < color_scheme_loaded.length; i ++) + { + UIManager.put(color_scheme_loaded[i].getName(), color_scheme_loaded[i].getObject()); + } + repaintUI(); + } + + private static void repaintUI() + { + SwingUtilities.updateComponentTreeUI(WindowManager.getDefault().getMainWindow()); + WindowManager.getDefault().getMainWindow().pack(); + WindowManager.getDefault().getMainWindow().repaint(); + } + + private static void write_scheme(String path, String [] data) throws IOException + { + File fout = new File(path); + FileOutputStream fos = new FileOutputStream(fout); + + BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(fos)); + + for (int i = 0; i < data.length; i ++) + { + bw.write(data[i]); + bw.newLine(); + } + + bw.close(); + } + + // + + public static Color[] getColors() + { + if (color_scheme_loaded == null) + { + return new Color[0]; + } + else + { + return color_scheme_loaded; + } + } + + + private static void reset_html_link_color() + { + for (int i = 0; i < color_scheme_loaded.length; i ++) + { + if (color_scheme_loaded[i].getName().equals("nb.laf.postinstall.callable.httplink"))// NOI18N + { + final int index = i; + UIManager.put( "nb.laf.postinstall.callable", new Callable() { //NOI18N + + @Override + public Object call() throws Exception { + HTMLEditorKit kit = new HTMLEditorKit(); + StyleSheet newStyleSheet = new StyleSheet(); + Font f = new JLabel().getFont(); + newStyleSheet.addRule(new StringBuffer("body { font-size: ").append(f.getSize()) // NOI18N + .append("; font-family: ").append(f.getName()).append("; }").toString()); // NOI18N + newStyleSheet.addRule( "a { color: " +color_scheme_loaded[index].getHEX() + "; text-decoration: underline}"); //NOI18N + newStyleSheet.addStyleSheet(kit.getStyleSheet()); + kit.setStyleSheet(newStyleSheet); + return null; + } + }); + break; + } + } + } + +} diff --git a/src/org/twopm/laf/Keys.java b/src/org/twopm/laf/Keys.java new file mode 100644 index 0000000..5934ad2 --- /dev/null +++ b/src/org/twopm/laf/Keys.java @@ -0,0 +1,1255 @@ +package org.twopm.laf; + +/** + * @author Edward M. Kagan + */ +public class Keys { + + public static final String[] borders + = { + "Button.border", + "CheckBox.border", + "ComboBox.border", + "ComboBox.editorBorder", + "ProgressBar.border", + "RadioButton.border", + "Spinner.arrowButtonBorder", + "Spinner.border", + "ToggleButton.border", + "ToolTip.border", + "ToolTip.borderInactive", + "EditorPane.border", + "FormattedTextField.border", + "PasswordField.border", + "TextArea.border", + "TextField.border", + "TextPane.border", + "List.evenRowBackgroundPainter", + "List.focusCellHighlightBorder", + "List.oddRowBackgroundPainter", + "List.sourceListBackgroundPainter", + "List.sourceListFocusedSelectionBackgroundPainter", + "List.sourceListSelectionBackgroundPainter", + "Table.focusCellHighlightBorder", + "Table.focusSelectedCellHighlightBorder", + "Table.scrollPaneBorder", + "TableHeader.cellBorder", + "Tree.editorBorder", + "RootPane.ColorChooserDialogBorder", + "RootPane.errorDialogBorder", + "RootPane.fileChooserDialogBorder", + "RootPane.frameBorder", + "RootPane.informationDialogBorder", + "RootPane.plainDialogBorder", + "RootPane.questionDialogBorder", + "RootPane.warningDialogBorder", + "ScrollPane.border", + "SplitPane.border", + "SplitPaneDivider.border", + "ToolBar.border", + "ToolBar.nonrolloverBorder", + "ToolBar.rolloverBorder", + "CheckBoxMenuItem.border", + "Menu.border", + "MenuBar.backgroundPainter", + "MenuBar.border", + "MenuBar.selectedBackgroundPainter", + "MenuItem.border", + "MenuItem.selectedBackgroundPainter", + "PopupMenu.border", + "RadioButtonMenuItem.border", + "DesktopIcon.border", + "InternalFrame.border", + "InternalFrame.optionDialogBorder", + "InternalFrame.paletteBorder", + "FileChooser.listViewBorder", + "OptionPane.border", + "OptionPane.messageAreaBorder", + "InsetBorder.aquaVariant", + "TitledBorder.aquaVariant", + "TitledBorder.border", + "Nb.Editor.Status.leftBorder", + "Nb.Editor.Status.innerBorder", + "Nb.Editor.Status.rightBorder", + "Nb.Editor.Status.onlyOneBorder", + "Nb.Editor.Toolbar.border", + "Nb.Explorer.Status.border", + "Nb.Desktop.border", + "TabbedContainer.editor.contentBorder", + "TabbedContainer.editor.tabsBorder", + "TabbedContainer.editor.outerBorder", + "TabbedContainer.view.contentBorder", + "TabbedContainer.view.tabsBorder", + "TabbedContainer.view.outerBorder", + "TabbedContainer.sliding.contentBorder", + "TabbedContainer.sliding.tabsBorder", + "TabbedContainer.sliding.outerBorder", + "nb.explorer.ministatusbar.border", + "nb.quicksearch.border" + }; + + public static final String[] color_keys + = { + "Button.background", + "Button.darkShadow", + "Button.disabledText", + "Button.foreground", + "Button.highlight", + "Button.light", + "Button.select", + "Button.shadow", + "CheckBox.background", + "CheckBox.disabledText", + "CheckBox.foreground", + "CheckBoxMenuItem.acceleratorForeground", + "CheckBoxMenuItem.acceleratorSelectionForeground", + "CheckBoxMenuItem.background", + "CheckBoxMenuItem.disabledForeground", + "CheckBoxMenuItem.foreground", + "CheckBoxMenuItem.selectionBackground", + "CheckBoxMenuItem.selectionForeground", + "ColorChooser.background", + "ColorChooser.foreground", + "ColorChooser.swatchesDefaultRecentColor", + "ComboBox.background", + "ComboBox.buttonBackground", + "ComboBox.buttonDarkShadow", + "ComboBox.buttonHighlight", + "ComboBox.buttonShadow", + "ComboBox.disabledBackground", + "ComboBox.disabledForeground", + "ComboBox.foreground", + "ComboBox.selectionBackground", + "ComboBox.selectionForeground", + "Desktop.background", + "EditorPane.background", + "EditorPane.caretForeground", + "EditorPane.foreground", + "EditorPane.inactiveForeground", + "EditorPane.selectionBackground", + "EditorPane.selectionForeground", + "FormattedTextField.background", + "FormattedTextField.caretForeground", + "FormattedTextField.foreground", + "FormattedTextField.inactiveBackground", + "FormattedTextField.inactiveForeground", + "FormattedTextField.selectionBackground", + "FormattedTextField.selectionForeground", + "InternalFrame.activeTitleBackground", + "InternalFrame.activeTitleForeground", + "InternalFrame.borderColor", + "InternalFrame.borderDarkShadow", + "InternalFrame.borderHighlight", + "InternalFrame.borderLight", + "InternalFrame.borderShadow", + "InternalFrame.inactiveTitleBackground", + "InternalFrame.inactiveTitleForeground", + "Label.background", + "Label.disabledForeground", + "Label.disabledShadow", + "Label.foreground", + "List.background", + "List.dropLineColor", + "List.foreground", + "List.selectionBackground", + "List.selectionForeground", + "Menu.acceleratorForeground", + "Menu.acceleratorSelectionForeground", + "Menu.background", + "Menu.disabledForeground", + "Menu.foreground", + "Menu.selectionBackground", + "Menu.selectionForeground", + "MenuBar.background", + "MenuBar.foreground", + "MenuBar.highlight", + "MenuBar.shadow", + "MenuItem.acceleratorForeground", + "MenuItem.acceleratorSelectionForeground", + "MenuItem.background", + "MenuItem.disabledForeground", + "MenuItem.foreground", + "MenuItem.selectionBackground", + "MenuItem.selectionForeground", + "OptionPane.background", + "OptionPane.foreground", + "OptionPane.messageForeground", + "Panel.background", + "Panel.foreground", + "PasswordField.background", + "PasswordField.caretForeground", + "PasswordField.foreground", + "PasswordField.inactiveBackground", + "PasswordField.inactiveForeground", + "PasswordField.selectionBackground", + "PasswordField.selectionForeground", + "PopupMenu.background", + "PopupMenu.foreground", + "ProgressBar.background", + "ProgressBar.foreground", + "ProgressBar.selectionBackground", + "ProgressBar.selectionForeground", + "RadioButton.background", + "RadioButton.darkShadow", + "RadioButton.disabledText", + "RadioButton.foreground", + "RadioButton.highlight", + "RadioButton.light", + "RadioButton.select", + "RadioButton.shadow", + "RadioButtonMenuItem.acceleratorForeground", + "RadioButtonMenuItem.acceleratorSelectionForeground", + "RadioButtonMenuItem.background", + "RadioButtonMenuItem.disabledForeground", + "RadioButtonMenuItem.foreground", + "RadioButtonMenuItem.selectionBackground", + "RadioButtonMenuItem.selectionForeground", + "ScrollBar.background", + "ScrollBar.foreground", + "ScrollBar.thumb", + "ScrollBar.thumbDarkShadow", + "ScrollBar.thumbHighlight", + "ScrollBar.thumbShadow", + "ScrollBar.track", + "ScrollBar.trackHighlight", + "ScrollPane.background", + "ScrollPane.foreground", + "Separator.foreground", + "Separator.highlight", + "Separator.shadow", + "Slider.background", + "Slider.focus", + "Slider.foreground", + "Slider.highlight", + "Slider.shadow", + "Slider.tickColor", + "Spinner.background", + "Spinner.foreground", + "SplitPane.background", + "SplitPane.darkShadow", + "SplitPane.highlight", + "SplitPane.shadow", + "SplitPaneDivider.draggingColor", + "TabbedPane.background", + "TabbedPane.darkShadow", + "TabbedPane.focus", + "TabbedPane.foreground", + "TabbedPane.highlight", + "TabbedPane.light", + "TabbedPane.shadow", + "Table.background", + "Table.dropLineColor", + "Table.dropLineShortColor", + "Table.focusCellBackground", + "Table.focusCellForeground", + "Table.gridColor", + "Table.selectionBackground", + "Table.selectionForeground", + "Table.sortIconColor", + "TableHeader.background", + "TableHeader.focusCellBackground", + "TableHeader.foreground", + "TextArea.background", + "TextArea.caretForeground", + "TextArea.foreground", + "TextArea.inactiveForeground", + "TextArea.selectionBackground", + "TextArea.selectionForeground", + "TextField.background", + "TextField.caretForeground", + "TextField.darkShadow", + "TextField.foreground", + "TextField.highlight", + "TextField.inactiveBackground", + "TextField.inactiveForeground", + "TextField.light", + "TextField.selectionBackground", + "TextField.selectionForeground", + "TextField.shadow", + "TextPane.background", + "TextPane.caretForeground", + "TextPane.foreground", + "TextPane.inactiveForeground", + "TextPane.selectionBackground", + "TextPane.selectionForeground", + "TitledBorder.titleColor", + "ToggleButton.background", + "ToggleButton.darkShadow", + "ToggleButton.disabledText", + "ToggleButton.foreground", + "ToggleButton.highlight", + "ToggleButton.light", + "ToggleButton.shadow", + "ToolBar.background", + "ToolBar.darkShadow", + "ToolBar.dockingBackground", + "ToolBar.dockingForeground", + "ToolBar.floatingBackground", + "ToolBar.floatingForeground", + "ToolBar.foreground", + "ToolBar.highlight", + "ToolBar.light", + "ToolBar.shadow", + "ToolTip.background", + "ToolTip.foreground", + "Tree.background", + "Tree.dropLineColor", + "Tree.foreground", + "Tree.hash", + "Tree.line", + "Tree.selectionBackground", + "Tree.selectionBorderColor", + "Tree.selectionForeground", + "Tree.textBackground", + "Tree.textForeground", + "Viewport.background", + "Viewport.foreground", + "activeCaption", + "activeCaptionBorder", + "activeCaptionText", + "control", + "controlDkShadow", + "controlHighlight", + "controlLtHighlight", + "controlShadow", + "controlText", + "desktop", + "inactiveCaption", + "inactiveCaptionBorder", + "inactiveCaptionText", + "info", + "infoText", + "menu", + "menuText", + "scrollbar", + // "text", + "textHighlight", + "textHighlightText", + "textInactiveText", + "textText", + "window", + "windowBorder", + "windowText", + "PropSheet.setBackground", + "PropSheet.selectedSetBackground", + "PropSheet.setForeground", + "PropSheet.selectedSetForeground", + "PropSheet.disabledForeground", + "PropSheet.selectionBackground", + "PropSheet.selectionForeground", + "CheckBoxMenuItem.disabledBackground", + "EditorPane.inactiveBackground", + "Focus.color", + "InternalFrame.background", + "InternalFrame.optionDialogBackground", + "InternalFrame.paletteBackground", + "Menu.disabledBackground", + "MenuBar.disabledBackground", + "MenuBar.disabledForeground", + "MenuBar.selectionBackground", + "MenuBar.selectionForeground", + "MenuItem.disabledBackground", + "PopupMenu.selectionBackground", + "PopupMenu.selectionForeground", + "RadioButtonMenuItem.disabledBackground", + "TextArea.inactiveBackground", + "TextComponent.selectionBackgroundInactive", + "TextPane.inactiveBackground", + "nb_workplace_fill", + "Nb.Desktop.background", + "nb.output.selectionBackground", + "nb.hyperlink.foreground", + "nb.output.background", + "nb.output.foreground", + "Tree.altbackground", + "PropSheet.customButtonForeground", + "netbeans.ps.buttonColor", + "netbeans.ps.background", + "nb.errorForeground", + "nb.warningForeground", + "TabRenderer.selectedActivatedBackground", + "TabRenderer.selectedActivatedForeground", + "TabRenderer.selectedForeground", + "TabRenderer.selectedBackground", + "Button.focus", + "CheckBox.focus", + "Checkbox.select", + "DesktopIcon.background", + "DesktopIcon.foreground", + "OptionPane.errorDialog.border.background", + "OptionPane.errorDialog.titlePane.background", + "OptionPane.errorDialog.titlePane.foreground", + "OptionPane.errorDialog.titlePane.shadow", + "OptionPane.questionDialog.border.background", + "OptionPane.questionDialog.titlePane.background", + "OptionPane.questionDialog.titlePane.foreground", + "OptionPane.questionDialog.titlePane.shadow", + "OptionPane.warningDialog.border.background", + "OptionPane.warningDialog.titlePane.background", + "OptionPane.warningDialog.titlePane.foreground", + "OptionPane.warningDialog.titlePane.shadow", + "RadioButton.focus", + "ScrollBar.darkShadow", + "ScrollBar.highlight", + "ScrollBar.shadow", + "Separator.background", + "SplitPane.dividerFocusColor", + "TabbedPane.selected", + "TabbedPane.selectHighlight", + "TabbedPane.tabAreaBackground", + "Table.foreground", + "ToggleButton.focus", + "ToggleButton.select", + "ToolTip.backgroundInactive", + "ToolTip.foregroundInactive", + "primary1", + "primary2", + "primary3", + "secondary1", + "secondary2", + "secondary3", + "black", + "white", + "Nb.ScrollPane.Border.color", + "nb.explorer.unfocusedSelBg", + "nb.explorer.unfocusedSelFg", + "nb.heapview.border1", + "nb.heapview.border2", + "nb.heapview.border3", + "nb.heapview.foreground", + "nb.heapview.background1", + "nb.heapview.background2", + "nb.heapview.grid1.start", + "nb.heapview.grid1.end", + "nb.heapview.grid2.start", "nb.heapview.grid2.end", + "nb.heapview.grid3.start", + "nb.heapview.grid3.end", + "nb.heapview.grid4.start", + "nb.heapview.grid4.end", + //////////////////////////////////////////////// + "nb.bugtracking.comment.background", + "nb.bugtracking.comment.foreground", + "nb.bugtracking.label.highlight", + "nb.bugtracking.table.background", + "nb.bugtracking.table.background.alternate", + "nb.bugtracking.new.color", + "nb.bugtracking.modified.color", + "nb.bugtracking.obsolete.color", + "nb.bugtracking.conflict.color", + "nb.html.link.foreground", + "nb.html.link.foreground.hover", + "nb.html.link.foreground.visited", + "nb.html.link.foreground.focus", + "nb.startpage.bottombar.background", + // "nb.startpage.topbar.background", + // "nb.startpage.border.color", + // "nb.startpage.tab.border1.color", + // "nb.startpage.tab.border2.color", + // "nb.startpage.rss.details.color", + // "nb.startpage.rss.header.color", + // "nb.startpage.contentheader.color1", + // "nb.startpage.contentheader.color2", + "nb.editor.errorstripe.caret.color", + "nb.diff.added.color", + "nb.diff.changed.color", + "nb.diff.deleted.color", + "nb.diff.applied.color", + "nb.diff.notapplied.color", + "nb.diff.unresolved.color", + "nb.diff.sidebar.changed.color", + "nb.diff.sidebar.deleted.color", + "nb.versioning.tooltip.background.color", + "nb.formdesigner.gap.fixed.color", + "nb.formdesigner.gap.resizing.color", + "nb.formdesigner.gap.min.color", + // "nbProgressBar.Foreground", + // "nbProgressBar.popupDynaText.foreground", + "nb.debugger.debugging.currentThread", + "nb.debugger.debugging.highlightColor", + "nb.debugger.debugging.BPHits", + "nb.debugger.debugging.bars.BPHits", + "nb.debugger.debugging.bars.currentThread", +// "nb.versioning.added.color", +// "nb.versioning.modified.color", +// "nb.versioning.deleted.color", +// "nb.versioning.conflicted.color", +// "nb.versioning.ignored.color", +// "nb.versioning.remotemodification.color", + "nb.dataview.tablecell.edited.selected.foreground", + "nb.dataview.tablecell.edited.unselected.foreground", + "nb.autoupdate.search.highlight", + "selection.highlight", + "textArea.background", + "Nb.browser.picker.background.light", + "Nb.browser.picker.foreground.light", + "nb.search.sandbox.highlight", + "nb.search.sandbox.regexp.wrong", + "nb.laf.postinstall.callable.httplink" + }; + + public static String[] all_keys = { + "AbstractButton.clickText", + "AbstractDocument.additionText", + "AbstractDocument.deletionText", + "AbstractDocument.redoText", + "AbstractDocument.styleChangeText", + "AbstractDocument.undoText", + "AbstractUndoableEdit.redoText", + "AbstractUndoableEdit.undoText", + "AuditoryCues.allAuditoryCues", + "AuditoryCues.cueList", + "AuditoryCues.noAuditoryCues", + "Button.background", + "Button.border", + "Button.darkShadow", + "Button.defaultButtonFollowsFocus", + "Button.disabledText", + "Button.focusInputMap", + "Button.font", + "Button.foreground", + "Button.highlight", + "Button.light", + "Button.margin", + "Button.opaque", + "Button.select", + "Button.shadow", + "Button.textIconGap", + "Button.textShiftOffset", + "ButtonUI", + "CheckBox.background", + "CheckBox.border", + "CheckBox.disabledText", + "CheckBox.focusInputMap", + "CheckBox.font", + "CheckBox.foreground", + "CheckBox.icon", + "CheckBox.margin", + "CheckBox.select", + "CheckBox.textIconGap", + "CheckBox.textShiftOffset", + "CheckBoxMenuItem.acceleratorDelimiter", + "CheckBoxMenuItem.acceleratorFont", + "CheckBoxMenuItem.acceleratorForeground", + "CheckBoxMenuItem.acceleratorSelectionForeground", + "CheckBoxMenuItem.arrowIcon", + "CheckBoxMenuItem.background", + "CheckBoxMenuItem.border", + "CheckBoxMenuItem.borderPainted", + "CheckBoxMenuItem.checkIcon", + "CheckBoxMenuItem.dashIcon", + "CheckBoxMenuItem.disabledBackground", + "CheckBoxMenuItem.disabledForeground", + "CheckBoxMenuItem.font", + "CheckBoxMenuItem.foreground", + "CheckBoxMenuItem.margin", + "CheckBoxMenuItem.selectionBackground", + "CheckBoxMenuItem.selectionForeground", + "CheckBoxMenuItemUI", + "CheckBoxUI", + "ColorChooser.background", + "ColorChooser.cancelText", + "ColorChooser.font", + "ColorChooser.foreground", + "ColorChooser.hsbBlueText", + "ColorChooser.hsbBrightnessText", + "ColorChooser.hsbDisplayedMnemonicIndex", + "ColorChooser.hsbGreenText", + "ColorChooser.hsbHueText", + "ColorChooser.hsbMnemonic", + "ColorChooser.hsbNameText", + "ColorChooser.hsbRedText", + "ColorChooser.hsbSaturationText", + "ColorChooser.okText", + "ColorChooser.previewText", + "ColorChooser.resetMnemonic", + "ColorChooser.resetText", + "ColorChooser.rgbBlueMnemonic", + "ColorChooser.rgbBlueText", + "ColorChooser.rgbDisplayedMnemonicIndex", + "ColorChooser.rgbGreenMnemonic", + "ColorChooser.rgbGreenText", + "ColorChooser.rgbMnemonic", + "ColorChooser.rgbNameText", + "ColorChooser.rgbRedMnemonic", + "ColorChooser.rgbRedText", + "ColorChooser.sampleText", + "ColorChooser.swatchesDefaultRecentColor", + "ColorChooser.swatchesDisplayedMnemonicIndex", + "ColorChooser.swatchesMnemonic", + "ColorChooser.swatchesNameText", + "ColorChooser.swatchesRecentSwatchSize", + "ColorChooser.swatchesRecentText", + "ColorChooser.swatchesSwatchSize", + "ColorChooserUI", + "ComboBox.ancestorInputMap", + "ComboBox.background", + "ComboBox.buttonBackground", + "ComboBox.buttonDarkShadow", + "ComboBox.buttonHighlight", + "ComboBox.buttonShadow", + "ComboBox.disabledBackground", + "ComboBox.disabledForeground", + "ComboBox.font", + "ComboBox.foreground", + "ComboBox.isEnterSelectablePopup", + "ComboBox.selectionBackground", + "ComboBox.selectionForeground", + "ComboBox.timeFactor", + "ComboBox.togglePopupText", + "ComboBoxUI", + "Desktop.ancestorInputMap", + "Desktop.background", + "Desktop.minOnScreenInsets", + "DesktopIcon.border", + "DesktopIconUI", + "DesktopPaneUI", + "EditorPane.background", + "EditorPane.border", + "EditorPane.caretBlinkRate", + "EditorPane.caretForeground", + "EditorPane.focusInputMap", + "EditorPane.font", + "EditorPane.foreground", + "EditorPane.inactiveBackground", + "EditorPane.inactiveForeground", + "EditorPane.margin", + "EditorPane.selectionBackground", + "EditorPane.selectionForeground", + "EditorPaneUI", + "FileChooser.acceptAllFileFilterText", + "FileChooser.ancestorInputMap", + "FileChooser.byDateText", + "FileChooser.byNameText", + "FileChooser.cancelButtonMnemonic", + "FileChooser.cancelButtonText", + "FileChooser.chooseButtonText", + "FileChooser.createButtonText", + "FileChooser.desktopName", + "FileChooser.detailsViewIcon", + "FileChooser.directoryDescriptionText", + "FileChooser.directoryOpenButtonMnemonic", + "FileChooser.directoryOpenButtonText", + "FileChooser.fileDescriptionText", + "FileChooser.fileNameLabelMnemonic", + "FileChooser.fileNameLabelText", + "FileChooser.fileSizeGigaBytes", + "FileChooser.fileSizeKiloBytes", + "FileChooser.fileSizeMegaBytes", + "FileChooser.filesOfTypeLabelMnemonic", + "FileChooser.filesOfTypeLabelText", + "FileChooser.helpButtonMnemonic", + "FileChooser.helpButtonText", + "FileChooser.homeFolderIcon", + "FileChooser.listViewIcon", + "FileChooser.lookInLabelMnemonic", + "FileChooser.mac.newFolder", + "FileChooser.mac.newFolder.subsequent", + "FileChooser.newFolderAccessibleName", + "FileChooser.newFolderButtonText", + "FileChooser.newFolderErrorSeparator", + "FileChooser.newFolderErrorText", + "FileChooser.newFolderExistsErrorText", + "FileChooser.newFolderIcon", + "FileChooser.newFolderPromptText", + "FileChooser.newFolderTitleText", + "FileChooser.openButtonMnemonic", + "FileChooser.openButtonText", + "FileChooser.openDialogTitleText", + "FileChooser.openTitleText", + "FileChooser.readOnly", + "FileChooser.saveButtonMnemonic", + "FileChooser.saveButtonText", + "FileChooser.saveDialogFileNameLabelText", + "FileChooser.saveDialogTitleText", + "FileChooser.saveTitleText", + "FileChooser.untitledFileName", + "FileChooser.untitledFolderName", + "FileChooser.upFolderIcon", + "FileChooser.updateButtonMnemonic", + "FileChooser.updateButtonText", + "FileChooser.useSystemExtensionHiding", + "FileChooser.usesSingleFilePane", + "FileChooserUI", + "FileView.computerIcon", + "FileView.directoryIcon", + "FileView.fileIcon", + "FileView.floppyDriveIcon", + "FileView.hardDriveIcon", + "Focus.color", + "FormView.browseFileButtonText", + "FormView.resetButtonText", + "FormView.submitButtonText", + "FormattedTextField.background", + "FormattedTextField.border", + "FormattedTextField.caretBlinkRate", + "FormattedTextField.caretForeground", + "FormattedTextField.focusInputMap", + "FormattedTextField.font", + "FormattedTextField.foreground", + "FormattedTextField.inactiveBackground", + "FormattedTextField.inactiveForeground", + "FormattedTextField.margin", + "FormattedTextField.selectionBackground", + "FormattedTextField.selectionForeground", + "FormattedTextFieldUI", + "IconButton.font", + "InsetBorder.aquaVariant", + "InternalFrame.activeTitleBackground", + "InternalFrame.activeTitleForeground", + "InternalFrame.background", + "InternalFrame.borderColor", + "InternalFrame.borderDarkShadow", + "InternalFrame.borderHighlight", + "InternalFrame.borderLight", + "InternalFrame.borderShadow", + "InternalFrame.closeButtonToolTip", + "InternalFrame.closeIcon", + "InternalFrame.iconButtonToolTip", + "InternalFrame.iconifyIcon", + "InternalFrame.inactiveTitleBackground", + "InternalFrame.inactiveTitleForeground", + "InternalFrame.maxButtonToolTip", + "InternalFrame.maximizeIcon", + "InternalFrame.minimizeIcon", + "InternalFrame.opaque", + "InternalFrame.optionDialogBackground", + "InternalFrame.optionDialogTitleFont", + "InternalFrame.paletteBackground", + "InternalFrame.paletteTitleFont", + "InternalFrame.restoreButtonToolTip", + "InternalFrame.titleFont", + "InternalFrame.windowBindings", + "InternalFrameTitlePane.closeButtonAccessibleName", + "InternalFrameTitlePane.closeButtonOpacity", + "InternalFrameTitlePane.closeButtonText", + "InternalFrameTitlePane.iconifyButtonAccessibleName", + "InternalFrameTitlePane.iconifyButtonOpacity", + "InternalFrameTitlePane.maximizeButtonAccessibleName", + "InternalFrameTitlePane.maximizeButtonOpacity", + "InternalFrameTitlePane.maximizeButtonText", + "InternalFrameTitlePane.minimizeButtonText", + "InternalFrameTitlePane.moveButtonText", + "InternalFrameTitlePane.restoreButtonText", + "InternalFrameTitlePane.sizeButtonText", + "InternalFrameUI", + "IsindexView.prompt", + "Label.background", + "Label.disabledForeground", + "Label.disabledShadow", + "Label.font", + "Label.foreground", + "Label.opaque", + "LabelUI", + "List.background", + "List.cellRenderer", + "List.dropLineColor", + "List.evenRowBackgroundPainter", + "List.focusCellHighlightBorder", + "List.focusInputMap", + "List.focusInputMap.RightToLeft", + "List.font", + "List.foreground", + "List.oddRowBackgroundPainter", + "List.selectionBackground", + "List.selectionForeground", + "List.sourceListBackgroundPainter", + "List.sourceListFocusedSelectionBackgroundPainter", + "List.sourceListSelectionBackgroundPainter", + "List.timeFactor", + "ListUI", + "Menu.acceleratorFont", + "Menu.acceleratorForeground", + "Menu.acceleratorSelectionForeground", + "Menu.arrowIcon", + "Menu.background", + "Menu.border", + "Menu.borderPainted", + "Menu.checkIcon", + "Menu.consumesTabs", + "Menu.crossMenuMnemonic", + "Menu.disabledBackground", + "Menu.disabledForeground", + "Menu.font", + "Menu.foreground", + "Menu.margin", + "Menu.menuPopupOffsetX", + "Menu.menuPopupOffsetY", + "Menu.selectionBackground", + "Menu.selectionForeground", + "Menu.shortcutKeys", + "Menu.submenuPopupOffsetX", + "Menu.submenuPopupOffsetY", + "MenuBar.background", + "MenuBar.backgroundPainter", + "MenuBar.border", + "MenuBar.disabledBackground", + "MenuBar.disabledForeground", + "MenuBar.font", + "MenuBar.foreground", + "MenuBar.highlight", + "MenuBar.margin", + "MenuBar.selectedBackgroundPainter", + "MenuBar.selectionBackground", + "MenuBar.selectionForeground", + "MenuBar.shadow", + "MenuBar.windowBindings", + "MenuBarUI", + "MenuItem.acceleratorDelimiter", + "MenuItem.acceleratorFont", + "MenuItem.acceleratorForeground", + "MenuItem.acceleratorSelectionForeground", + "MenuItem.arrowIcon", + "MenuItem.background", + "MenuItem.border", + "MenuItem.borderPainted", + "MenuItem.checkIcon", + "MenuItem.disabledBackground", + "MenuItem.disabledForeground", + "MenuItem.font", + "MenuItem.foreground", + "MenuItem.margin", + "MenuItem.selectedBackgroundPainter", + "MenuItem.selectionBackground", + "MenuItem.selectionForeground", + "MenuItemUI", + "MenuUI", + "OptionPane.background", + "OptionPane.border", + "OptionPane.buttonAreaBorder", + "OptionPane.buttonClickThreshhold", + "OptionPane.buttonFont", + "OptionPane.cancelButtonMnemonic", + "OptionPane.cancelButtonText", + "OptionPane.errorIcon", + "OptionPane.font", + "OptionPane.foreground", + "OptionPane.informationIcon", + "OptionPane.inputDialogTitle", + "OptionPane.messageAreaBorder", + "OptionPane.messageDialogTitle", + "OptionPane.messageFont", + "OptionPane.messageForeground", + "OptionPane.minimumSize", + "OptionPane.noButtonMnemonic", + "OptionPane.noButtonText", + "OptionPane.okButtonMnemonic", + "OptionPane.okButtonText", + "OptionPane.questionIcon", + "OptionPane.titleText", + "OptionPane.warningIcon", + "OptionPane.windowBindings", + "OptionPane.yesButtonMnemonic", + "OptionPane.yesButtonText", + "OptionPaneUI", + "Panel.background", + "Panel.font", + "Panel.foreground", + "Panel.opaque", + "PanelUI", + "PasswordField.background", + "PasswordField.border", + "PasswordField.caretBlinkRate", + "PasswordField.caretForeground", + "PasswordField.echoChar", + "PasswordField.focusInputMap", + "PasswordField.font", + "PasswordField.foreground", + "PasswordField.inactiveBackground", + "PasswordField.inactiveForeground", + "PasswordField.margin", + "PasswordField.selectionBackground", + "PasswordField.selectionForeground", + "PasswordFieldUI", + "PopupMenu.background", + "PopupMenu.border", + "PopupMenu.consumeEventOnClose", + "PopupMenu.font", + "PopupMenu.foreground", + "PopupMenu.selectedWindowInputMapBindings", + "PopupMenu.selectedWindowInputMapBindings.RightToLeft", + "PopupMenu.selectionBackground", + "PopupMenu.selectionForeground", + "PopupMenuSeparatorUI", + "PopupMenuUI", + "PrintingDialog.abortButtonDisplayedMnemonicIndex", + "PrintingDialog.abortButtonMnemonic", + "PrintingDialog.abortButtonText", + "PrintingDialog.abortButtonToolTipText", + "PrintingDialog.contentAbortingText", + "PrintingDialog.contentInitialText", + "PrintingDialog.contentProgressText", + "PrintingDialog.titleAbortingText", + "PrintingDialog.titleProgressText", + "ProgressBar.background", + "ProgressBar.border", + "ProgressBar.cellLength", + "ProgressBar.cellSpacing", + "ProgressBar.cycleTime", + "ProgressBar.font", + "ProgressBar.foreground", + "ProgressBar.horizontalSize", + "ProgressBar.repaintInterval", + "ProgressBar.selectionBackground", + "ProgressBar.selectionForeground", + "ProgressBar.verticalSize", + "ProgressBarUI", + "ProgressMonitor.progressText", + "RadioButton.background", + "RadioButton.border", + "RadioButton.darkShadow", + "RadioButton.disabledText", + "RadioButton.focusInputMap", + "RadioButton.font", + "RadioButton.foreground", + "RadioButton.highlight", + "RadioButton.icon", + "RadioButton.light", + "RadioButton.margin", + "RadioButton.select", + "RadioButton.shadow", + "RadioButton.textIconGap", + "RadioButton.textShiftOffset", + "RadioButtonMenuItem.acceleratorDelimiter", + "RadioButtonMenuItem.acceleratorFont", + "RadioButtonMenuItem.acceleratorForeground", + "RadioButtonMenuItem.acceleratorSelectionForeground", + "RadioButtonMenuItem.arrowIcon", + "RadioButtonMenuItem.background", + "RadioButtonMenuItem.border", + "RadioButtonMenuItem.borderPainted", + "RadioButtonMenuItem.checkIcon", + "RadioButtonMenuItem.dashIcon", + "RadioButtonMenuItem.disabledBackground", + "RadioButtonMenuItem.disabledForeground", + "RadioButtonMenuItem.font", + "RadioButtonMenuItem.foreground", + "RadioButtonMenuItem.margin", + "RadioButtonMenuItem.selectionBackground", + "RadioButtonMenuItem.selectionForeground", + "RadioButtonMenuItemUI", + "RadioButtonUI", + "RootPane.ancestorInputMap", + "RootPane.defaultButtonWindowKeyBindings", + "RootPaneUI", + "ScrollBar.ancestorInputMap", + "ScrollBar.ancestorInputMap.RightToLeft", + "ScrollBar.background", + "ScrollBar.focusInputMap", + "ScrollBar.focusInputMap.RightToLeft", + "ScrollBar.foreground", + "ScrollBar.maximumThumbSize", + "ScrollBar.minimumThumbSize", + "ScrollBar.thumb", + "ScrollBar.thumbDarkShadow", + "ScrollBar.thumbHighlight", + "ScrollBar.thumbShadow", + "ScrollBar.track", + "ScrollBar.trackHighlight", + "ScrollBar.width", + "ScrollBarUI", + "ScrollPane.ancestorInputMap", + "ScrollPane.ancestorInputMap.RightToLeft", + "ScrollPane.background", + "ScrollPane.border", + "ScrollPane.font", + "ScrollPane.foreground", + "ScrollPaneUI", + "Separator.foreground", + "Separator.highlight", + "Separator.shadow", + "SeparatorUI", + "Slider.background", + "Slider.focus", + "Slider.focusInputMap", + "Slider.focusInputMap.RightToLeft", + "Slider.focusInsets", + "Slider.font", + "Slider.foreground", + "Slider.highlight", + "Slider.horizontalSize", + "Slider.minimumHorizontalSize", + "Slider.minimumVerticalSize", + "Slider.shadow", + "Slider.tickColor", + "Slider.verticalSize", + "SliderUI", + "Spinner.ancestorInputMap", + "Spinner.arrowButtonSize", + "Spinner.background", + "Spinner.editorAlignment", + "Spinner.editorBorderPainted", + "Spinner.font", + "Spinner.foreground", + "SpinnerUI", + "SplitPane.ancestorInputMap", + "SplitPane.background", + "SplitPane.border", + "SplitPane.darkShadow", + "SplitPane.dividerSize", + "SplitPane.highlight", + "SplitPane.leftButtonText", + "SplitPane.rightButtonText", + "SplitPane.shadow", + "SplitPaneDivider.draggingColor", + "SplitPaneDivider.horizontalGradientVariant", + "SplitPaneUI", + "TabbedPane.ancestorInputMap", + "TabbedPane.background", + "TabbedPane.contentBorderInsets", + "TabbedPane.contentOpaque", + "TabbedPane.darkShadow", + "TabbedPane.focus", + "TabbedPane.focusInputMap", + "TabbedPane.font", + "TabbedPane.foreground", + "TabbedPane.highlight", + "TabbedPane.leftTabInsets", + "TabbedPane.light", + "TabbedPane.opaque", + "TabbedPane.rightTabInsets", + "TabbedPane.selectedTabPadInsets", + "TabbedPane.shadow", + "TabbedPane.smallFont", + "TabbedPane.tabAreaInsets", + "TabbedPane.tabInsets", + "TabbedPane.tabRunOverlay", + "TabbedPane.tabsOpaque", + "TabbedPane.tabsOverlapBorder", + "TabbedPane.textIconGap", + "TabbedPane.useSmallLayout", + "TabbedPaneUI", + "Table.ancestorInputMap", + "Table.ancestorInputMap.RightToLeft", + "Table.ascendingSortIcon", + "Table.background", + "Table.descendingSortIcon", + "Table.dropLineColor", + "Table.dropLineShortColor", + "Table.focusCellBackground", + "Table.focusCellForeground", + "Table.focusCellHighlightBorder", + "Table.font", + "Table.foreground", + "Table.gridColor", + "Table.scrollPaneBorder", + "Table.selectionBackground", + "Table.selectionForeground", + "Table.sortIconColor", + "TableHeader.ancestorInputMap", + "TableHeader.background", + "TableHeader.cellBorder", + "TableHeader.focusCellBackground", + "TableHeader.font", + "TableHeader.foreground", + "TableHeaderUI", + "TableUI", + "TextArea.background", + "TextArea.border", + "TextArea.caretBlinkRate", + "TextArea.caretForeground", + "TextArea.focusInputMap", + "TextArea.font", + "TextArea.foreground", + "TextArea.inactiveBackground", + "TextArea.inactiveForeground", + "TextArea.margin", + "TextArea.selectionBackground", + "TextArea.selectionForeground", + "TextAreaUI", + "TextComponent.selectionBackgroundInactive", + "TextField.background", + "TextField.border", + "TextField.caretBlinkRate", + "TextField.caretForeground", + "TextField.darkShadow", + "TextField.focusInputMap", + "TextField.font", + "TextField.foreground", + "TextField.highlight", + "TextField.inactiveBackground", + "TextField.inactiveForeground", + "TextField.light", + "TextField.margin", + "TextField.selectionBackground", + "TextField.selectionForeground", + "TextField.shadow", + "TextFieldUI", + "TextPane.background", + "TextPane.border", + "TextPane.caretBlinkRate", + "TextPane.caretForeground", + "TextPane.focusInputMap", + "TextPane.font", + "TextPane.foreground", + "TextPane.inactiveBackground", + "TextPane.inactiveForeground", + "TextPane.margin", + "TextPane.selectionBackground", + "TextPane.selectionForeground", + "TextPaneUI", + "TitledBorder.aquaVariant", + "TitledBorder.border", + "TitledBorder.font", + "TitledBorder.titleColor", + "ToggleButton.background", + "ToggleButton.border", + "ToggleButton.darkShadow", + "ToggleButton.disabledText", + "ToggleButton.focusInputMap", + "ToggleButton.font", + "ToggleButton.foreground", + "ToggleButton.highlight", + "ToggleButton.light", + "ToggleButton.margin", + "ToggleButton.shadow", + "ToggleButton.textIconGap", + "ToggleButton.textShiftOffset", + "ToggleButtonUI", + "ToolBar.ancestorInputMap", + "ToolBar.background", + "ToolBar.border", + "ToolBar.darkShadow", + "ToolBar.dockingBackground", + "ToolBar.dockingForeground", + "ToolBar.floatingBackground", + "ToolBar.floatingForeground", + "ToolBar.font", + "ToolBar.foreground", + "ToolBar.highlight", + "ToolBar.light", + "ToolBar.shadow", + "ToolBarButton.insets", + "ToolBarButton.margin", + "ToolBarSeparatorUI", + "ToolBarUI", + "ToolTip.background", + "ToolTip.border", + "ToolTip.font", + "ToolTip.foreground", + "ToolTipManager.enableToolTipMode", + "ToolTipUI", + "Tree.ancestorInputMap", + "Tree.background", + "Tree.changeSelectionWithFocus", + "Tree.closedIcon", + "Tree.collapsedIcon", + "Tree.drawsFocusBorderAroundIcon", + "Tree.dropLineColor", + "Tree.editorBorder", + "Tree.expandedIcon", + "Tree.focusInputMap", + "Tree.focusInputMap.RightToLeft", + "Tree.font", + "Tree.foreground", + "Tree.hash", + "Tree.leafIcon", + "Tree.leftChildIndent", + "Tree.line", + "Tree.lineTypeDashed", + "Tree.openIcon", + "Tree.paintLines", + "Tree.rightChildIndent", + "Tree.rightToLeftCollapsedIcon", + "Tree.rowHeight", + "Tree.scrollsOnExpand", + "Tree.selectionBackground", + "Tree.selectionBorderColor", + "Tree.selectionForeground", + "Tree.textBackground", + "Tree.textForeground", + "Tree.timeFactor", + "TreeUI", + "Viewport.background", + "Viewport.font", + "Viewport.foreground", + "ViewportUI", + "_SecurityDecisionIcon", + "activeCaption", + "activeCaptionBorder", + "activeCaptionText", + "control", + "controlDkShadow", + "controlHighlight", + "controlLtHighlight", + "controlShadow", + "controlText", + "desktop", + "html.missingImage", + "html.pendingImage", + "inactiveCaption", + "inactiveCaptionBorder", + "inactiveCaptionText", + "info", + "infoText", + "menu", + "menuText", + "scrollbar", + "text", + "textHighlight", + "textHighlightText", + "textInactiveText", + "textText", + "window", + "windowBorder", + "windowText", + "nb_workplace_fill", + "customFontSize", + "nbDefaultFontSize", + "Nb.Editor.Status.leftBorder", + "Nb.Editor.Status.innerBorder", + "Nb.Editor.Status.rightBorder", + "Nb.Editor.Status.onlyOneBorder", + "Nb.Editor.Toolbar.border", + "Nb.Editor.ErrorStripe.ScrollBar.Insets", + "Nb.Explorer.Status.border", + "Nb.Explorer.Folder.icon", + "Nb.Explorer.Folder.openedIcon", + "Nb.Desktop.border", + "Nb.Toolbar.ui", + "Nb.Desktop.background", + "nb.output.selectionBackground", + "nb.hyperlink.foreground", + "nb.output.background", + "nb.output.foreground", + "Tree.altbackground", + "PropSheet.setBackground", + "PropSheet.selectedSetBackground", + "PropSheet.setForeground", + "PropSheet.selectedSetForeground", + "PropSheet.disabledForeground", + "PropSheet.selectionBackground", + "PropSheet.selectionForeground", + "PropSheet.customButtonForeground", + "netbeans.ps.buttonColor", + "netbeans.ps.background", + "netbeans.ps.iconmargin", + "netbeans.ps.rowheight", + "nb.errorForeground", + "nb.warningForeground", + "TabbedContainerUI", + "EditorTabDisplayerUI", + "ViewTabDisplayerUI", + "SlidingTabDisplayerUI", + "IndexButtonUI", + "SlidingButtonUI", + "TabbedContainer.editor.contentBorder", + "TabbedContainer.editor.tabsBorder", + "TabbedContainer.editor.outerBorder", + "TabbedContainer.view.contentBorder", + "TabbedContainer.view.tabsBorder", + "TabbedContainer.view.outerBorder", + "TabbedContainer.sliding.contentBorder", + "TabbedContainer.sliding.tabsBorder", + "TabbedContainer.sliding.outerBorder", + "TabRenderer.selectedActivatedBackground", + "TabRenderer.selectedActivatedForeground", + "TabRenderer.selectedForeground", + "TabRenderer.selectedBackground", + "nb.explorer.ministatusbar.border", + "nb.desktop.splitpane.border", + "nb.propertysheet", + "Nb.SplitPane.dividerSize.vertical", + "Nb.SplitPane.dividerSize.horizontal" + }; + +} diff --git a/src/org/twopm/laf/TitanEditor.java b/src/org/twopm/laf/TitanEditor.java new file mode 100644 index 0000000..b8f2cd6 --- /dev/null +++ b/src/org/twopm/laf/TitanEditor.java @@ -0,0 +1,557 @@ +package org.twopm.laf; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.Collection; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.Set; +import java.util.prefs.BackingStoreException; +import java.util.prefs.Preferences; +import javax.swing.UIManager; +import javax.swing.text.AttributeSet; +import javax.swing.text.SimpleAttributeSet; +import javax.swing.text.StyleConstants; +import org.openide.util.Exceptions; +import org.openide.util.Lookup; +import org.openide.util.NbPreferences; + +/** + * @author Edward M. Kagan + */ +@SuppressWarnings ({"rawtypes","unchecked"}) +public class TitanEditor { + + private static final String COLOR_MODEL_CLASS_NAME = "org.netbeans.modules.options.colors.ColorModel"; //NOI18N + private static final String EDITOR_SETTINGS_CLASS_NAME = "org.netbeans.api.editor.settings.EditorStyleConstants"; //NOI18N + private static final String ANNOTATION_TYPE_CLASS_NAME = "org.netbeans.editor.AnnotationType"; //NOI18N + + private static final String PROVIDER_CLASS_NAME = "org.netbeans.modules.versioning.util.OptionsPanelColorProvider"; //NOI18N + private static final String PROVIDER_GIT_CLASS_NAME = "org.netbeans.modules.git.GitModuleConfig"; //NOI18N + private static final String PROVIDER_SVN_CLASS_NAME = "org.netbeans.modules.subversion.SvnModuleConfig"; //NOI18N + private static final String PROVIDER_HG_CLASS_NAME = "org.netbeans.modules.mercurial.HgModuleConfig"; //NOI18N + private static final String PROVIDER_DIFF_CLASS_NAME = "org.netbeans.modules.diff.DiffModuleConfig"; //NOI18N + + private static final boolean no_load = false; + private static final String DEFAULT_THEME_NAME = "NetBeans 5.5"; //NOI18N + + private static ClassLoader working_classLoader = null; + + private static Class COLOR_MODEL; + private static Class EDITOR_SETTINGS; + private static Class ANNOTATION_TYPE; + + private static Field WaveUnderlineColor; + + private static Method getName; + + private static Method getCurrentProfile; + private static Method setCurrentProfile; + + private static Method isUseHighlightColor; + private static Method isInheritForegroundColor; + private static Method isUseWaveUnderlineColor; + + private static Method getHighlight; + private static Method getForegroundColor; + private static Method getWaveUnderlineColor; + + private static Method setHighlight; + private static Method setForegroundColor; + private static Method setWaveUnderlineColor; + + + private static Method getAnnotations; + private static Method getHighlightings; + private static Method getCategories; + + private static Method setAnnotations; + private static Method setHighlightings; + private static Method setCategories; + + private static Method getLanguages; + + private static Object const_WaveUnderlineColor; + private static Object colorModel; + + private static Class provider_GIT = null; + private static Class provider_SVN = null; + private static Class provider_HG = null; + private static Class provider_CLASS = null; + private static Class provider_DIFF = null; + private static Method provider_getDefault; + private static Method provider_getPreferences; + + + private static void extractDiffModule () throws IllegalAccessException + { + if (provider_DIFF != null) + { + HashMap linkMap = new HashMap(); + + java.awt.Color nb_diff_added_color = (java.awt.Color) UIManager.get ("nb.diff.added.color"); + java.awt.Color nb_diff_changed_color = (java.awt.Color) UIManager.get ("nb.diff.changed.color"); + java.awt.Color nb_diff_deleted_color = (java.awt.Color) UIManager.get ("nb.diff.deleted.color"); + java.awt.Color nb_diff_applied_color = (java.awt.Color) UIManager.get ("nb.diff.applied.color"); + java.awt.Color nb_diff_notapplied_color = (java.awt.Color) UIManager.get ("nb.diff.notapplied.color"); + java.awt.Color nb_diff_unresolved_color = (java.awt.Color) UIManager.get ("nb.diff.unresolved.color"); + java.awt.Color nb_diff_sidebar_deleted_color = (java.awt.Color) UIManager.get ("nb.diff.sidebar.deleted.color"); + java.awt.Color nb_diff_sidebar_changed_color = (java.awt.Color) UIManager.get ("nb.diff.sidebar.changed.color"); + + String[] keys = + { + "addedColor", + "changedColor", + "deletedColor", + "merge.appliedColor", + "merge.notappliedColor", + "merge.unresolvedColor", + "sidebar.changedColor", + "sidebar.deletedColor" + }; + + linkMap.put("addedColor" , nb_diff_added_color != null ? nb_diff_added_color.getRGB() : java.awt.Color.GREEN.getRGB()); + linkMap.put("changedColor" , nb_diff_changed_color != null ? nb_diff_changed_color.getRGB() : java.awt.Color.BLUE.getRGB()); + linkMap.put("deletedColor" , nb_diff_deleted_color != null ? nb_diff_deleted_color.getRGB() : java.awt.Color.RED.getRGB()); + linkMap.put("merge.appliedColor" , nb_diff_applied_color != null ? nb_diff_applied_color.getRGB() : java.awt.Color.YELLOW.getRGB()); + linkMap.put("merge.notappliedColor" , nb_diff_notapplied_color != null ? nb_diff_notapplied_color.getRGB() : java.awt.Color.ORANGE.getRGB()); + linkMap.put("merge.unresolvedColor" , nb_diff_unresolved_color != null ? nb_diff_unresolved_color.getRGB() : java.awt.Color.RED.getRGB()); + linkMap.put("sidebar.changedColor" , nb_diff_sidebar_deleted_color != null ? nb_diff_sidebar_deleted_color.getRGB() : java.awt.Color.CYAN.getRGB()); + linkMap.put("sidebar.deletedColor" , nb_diff_sidebar_changed_color != null ? nb_diff_sidebar_changed_color.getRGB() : java.awt.Color.DARK_GRAY.getRGB()); + + + String res = "// " + + "\npublic static final org.twopm.laf.Color[] DIFF = {\n"; + + try + { + Object defaults = provider_getDefault.invoke(null, new Object[0]); + Preferences preferences = (Preferences) provider_getPreferences.invoke(defaults, new Object[0]); + for (int i = 0; i < keys.length; i ++) + { + java.awt.Color c = new java.awt.Color(preferences.getInt(keys[i], linkMap.get(keys[i]))); + + res += " " + (new Color(keys[i], Color.ColorClass.AT, + c.getRed(), + c.getGreen(), + c.getBlue(), + c.getAlpha(), "")).getString(); + + if (i != keys.length - 1) + { + res += ", \n"; + } + else + { + res += "\n"; + } + } + } + catch (InvocationTargetException ex) {} + + res += "};\n"; + res += "// \n"; + System.out.println(res); + } + } + + private static void applyColorForDiffModule () throws IllegalAccessException, IllegalArgumentException, InvocationTargetException + { + Object defaults = provider_getDefault.invoke(null, new Object[0]); + Preferences preferences = (Preferences) provider_getPreferences.invoke(defaults, new Object[0]); + + for (org.twopm.laf.Color cc : ColorTheme.DIFF) + { + preferences.putInt(cc.getPname(), ((java.awt.Color)cc.getObject()).getRGB()); + } + } + + private static boolean pre_load () + { + working_classLoader = Lookup.getDefault().lookup( ClassLoader.class ); + if( null != working_classLoader ) + { + try { + + COLOR_MODEL = working_classLoader.loadClass( COLOR_MODEL_CLASS_NAME ); + EDITOR_SETTINGS = working_classLoader.loadClass(EDITOR_SETTINGS_CLASS_NAME); + ANNOTATION_TYPE = working_classLoader.loadClass(ANNOTATION_TYPE_CLASS_NAME); + + getName = ANNOTATION_TYPE.getDeclaredMethod("getName", new Class[0]); + + WaveUnderlineColor = EDITOR_SETTINGS.getField("WaveUnderlineColor"); //NOI18N + + getCurrentProfile = COLOR_MODEL.getDeclaredMethod( "getCurrentProfile", new Class[0] ); //NOI18N + setCurrentProfile = COLOR_MODEL.getDeclaredMethod( "setCurrentProfile", String.class ); //NOI18N + + getHighlight = ANNOTATION_TYPE.getDeclaredMethod( "getHighlight", new Class[0] ); //NOI18N + getForegroundColor = ANNOTATION_TYPE.getDeclaredMethod( "getForegroundColor", new Class[0] ); //NOI18N + getWaveUnderlineColor = ANNOTATION_TYPE.getDeclaredMethod( "getWaveUnderlineColor", new Class[0] ); //NOI18N + + setHighlight = ANNOTATION_TYPE.getDeclaredMethod( "setHighlight", java.awt.Color.class ); //NOI18N + setForegroundColor = ANNOTATION_TYPE.getDeclaredMethod( "setForegroundColor", java.awt.Color.class ); //NOI18N + setWaveUnderlineColor = ANNOTATION_TYPE.getDeclaredMethod( "setWaveUnderlineColor", java.awt.Color.class ); //NOI18N + + isUseHighlightColor = ANNOTATION_TYPE.getDeclaredMethod( "isUseHighlightColor", new Class[0] ); //NOI18N + isInheritForegroundColor = ANNOTATION_TYPE.getDeclaredMethod( "isInheritForegroundColor", new Class[0] ); //NOI18N + isUseWaveUnderlineColor = ANNOTATION_TYPE.getDeclaredMethod( "isUseWaveUnderlineColor", new Class[0] ); //NOI18N + + getAnnotations = COLOR_MODEL.getDeclaredMethod( "getAnnotations", String.class ); //NOI18N + getHighlightings = COLOR_MODEL.getDeclaredMethod( "getHighlightings", String.class ); //NOI18N + getCategories = COLOR_MODEL.getDeclaredMethod( "getCategories",String.class, String.class ); //NOI18N + + setAnnotations = COLOR_MODEL.getDeclaredMethod( "setAnnotations", String.class, Collection.class ); //NOI18N + setHighlightings = COLOR_MODEL.getDeclaredMethod( "setHighlightings", String.class, Collection.class ); //NOI18N + setCategories = COLOR_MODEL.getDeclaredMethod( "setCategories",String.class, String.class, Collection.class ); //NOI18N + + getLanguages = COLOR_MODEL.getDeclaredMethod( "getLanguages", new Class[0] ); //NOI18N + + const_WaveUnderlineColor = WaveUnderlineColor.get(EDITOR_SETTINGS); + colorModel = COLOR_MODEL.newInstance(); + + provider_CLASS = working_classLoader.loadClass(PROVIDER_CLASS_NAME); + provider_DIFF = working_classLoader.loadClass(PROVIDER_DIFF_CLASS_NAME); + + if (provider_DIFF != null) + { + provider_getDefault = provider_DIFF.getDeclaredMethod( "getDefault", new Class[0] ); //NOI18N + provider_getPreferences = provider_DIFF.getDeclaredMethod( "getPreferences", new Class[0] ); //NOI18N + } + + if (provider_CLASS != null) + { + try + { + provider_HG = working_classLoader.loadClass(PROVIDER_HG_CLASS_NAME); + } + catch (ClassNotFoundException ex) {} + + try + { + provider_SVN = working_classLoader.loadClass(PROVIDER_SVN_CLASS_NAME); + } + catch (ClassNotFoundException ex) {} + + try + { + provider_GIT = working_classLoader.loadClass(PROVIDER_GIT_CLASS_NAME); + } + catch (ClassNotFoundException ex) {} + } + + return true; + } catch (ClassNotFoundException ex) { + Exceptions.printStackTrace(ex); + } catch (NoSuchFieldException ex) { + Exceptions.printStackTrace(ex); + } catch (SecurityException ex) { + Exceptions.printStackTrace(ex); + } catch (NoSuchMethodException ex) { + Exceptions.printStackTrace(ex); + } catch (IllegalArgumentException ex) { + Exceptions.printStackTrace(ex); + } catch (IllegalAccessException ex) { + Exceptions.printStackTrace(ex); + } catch (InstantiationException ex) { + Exceptions.printStackTrace(ex); + } + } + return false; + } + + private static void extractColorsForModule (String name, Class provider) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException + { + + String res = "// " + + "\npublic static final org.twopm.laf.Color[] " + name + " = {\n"; + + if (provider != null) + { + Preferences forModule = NbPreferences.forModule(provider); + try + { + for (String key : forModule.keys()) + { + java.awt.Color cc = new java.awt.Color(Integer.parseInt(forModule.get(key, null))); + res += " " + (new Color(key, Color.ColorClass.AT, + cc.getRed(), + cc.getGreen(), + cc.getBlue(), + cc.getAlpha(), "")).getString() + ",\n"; + } + } + catch (BackingStoreException ex) {} + } + res += "};\n"; + res += "// \n"; + + System.out.println(res); + } + + private static void applyColorForModule (Class provider, org.twopm.laf.Color[] colors_theme) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException + { + if (provider != null) + { + Preferences forModule = NbPreferences.forModule(provider); + for (org.twopm.laf.Color cc : colors_theme) + { + java.awt.Color toSet = (java.awt.Color) cc.getObject(); + forModule.put(cc.getPname(), String.valueOf(toSet.getRGB())); + } + } + } + + public static void load_editor (boolean first_run) + { + if (!pre_load()) return; + + try { + + String swith_back = (String) getCurrentProfile.invoke( colorModel, new Object[0] ); + + if (no_load) + { + Collection annotations = (Collection) getAnnotations.invoke(colorModel, DEFAULT_THEME_NAME); + process_set ("annotations", annotations, true); + + + Collection highlightings = (Collection) getHighlightings.invoke(colorModel, DEFAULT_THEME_NAME); + process_set ("highlightings", highlightings, false); + + Object languages = getLanguages.invoke( colorModel, new Object[0] ); + Set languages_set = (Set) languages; + + for (String str : languages_set) + { + if (str.equals("All Languages") || + str.equals("Java") || + str.equals("C++") || + str.equals("C")) + { + Collection category = (Collection) getCategories.invoke(colorModel, DEFAULT_THEME_NAME, str); + process_set (str, category, false); + } + } + + extractColorsForModule ("GIT", provider_GIT); + extractColorsForModule ("SVN", provider_SVN); + extractColorsForModule ("HG", provider_HG); + + extractDiffModule(); + } + else + { + setCurrentProfile.invoke(colorModel, DEFAULT_THEME_NAME); + Collection annotations = (Collection) getAnnotations.invoke(colorModel, DEFAULT_THEME_NAME); + Collection annotations_upd = apply_set ("annotations", annotations, true); + setAnnotations.invoke(colorModel, DEFAULT_THEME_NAME, annotations_upd); + + Collection highlightings = (Collection) getHighlightings.invoke(colorModel, DEFAULT_THEME_NAME); + Collection highlightings_upd = apply_set ("highlightings", highlightings, false); + setHighlightings.invoke(colorModel, DEFAULT_THEME_NAME, highlightings_upd); + + Object languages = getLanguages.invoke( colorModel, new Object[0] ); + Set languages_set = (Set) languages; + + for (String str : languages_set) + { + if (str.equals("All Languages") || + str.equals("Java") || + str.equals("C++") || + str.equals("C")) + { + Collection category = (Collection) getCategories.invoke(colorModel, DEFAULT_THEME_NAME, str); + Collection category_upd = apply_set (str, category, false); + setCategories.invoke(colorModel, DEFAULT_THEME_NAME, str, category_upd); + + } + } + + if (!first_run) + { + setCurrentProfile.invoke(colorModel, swith_back); + } + else + { + applyColorForModule (provider_GIT, ColorTheme.GIT); + applyColorForModule (provider_SVN, ColorTheme.SVN); + applyColorForModule (provider_HG, ColorTheme.HG); + + applyColorForDiffModule (); + } + } + } catch (IllegalAccessException ex) { + Exceptions.printStackTrace(ex); + } catch (IllegalArgumentException ex) { + Exceptions.printStackTrace(ex); + } catch (InvocationTargetException ex) { + Exceptions.printStackTrace(ex); + } + } + + private static Collection apply_set(String set_name, Collection data, boolean annotation) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException + { + LinkedList res = new LinkedList(); + + for (AttributeSet at : data) + { + HashMap cluster = ColorTheme.color_map.get(set_name); + if (cluster != null) + { + String name = "BAD ASS"; + if (annotation) + { + Object annotationType = at.getAttribute("annotationType"); + name = (String) getName.invoke(annotationType, new Object[0]); + } + else + { + name = (String) at.getAttribute(javax.swing.text.StyleConstants.NameAttribute); + } + + AttributeSetConfigured asc = cluster.get(name); + if (asc != null) + { + if (!name.equals("default")) + { + res.add(apply_colors(asc, at, annotation)); + } + else + { + res.add(apply_text_size_fix(apply_colors(asc, at, annotation))); + } + } + } + } + return res; + } + + private static SimpleAttributeSet apply_text_size_fix (SimpleAttributeSet old) + { + if (old.isDefined(StyleConstants.FontSize)) + { + old.removeAttribute(StyleConstants.FontSize); + } + old.addAttribute(StyleConstants.FontSize, 18); + return old; + } + + private static SimpleAttributeSet apply_colors (AttributeSetConfigured asc, AttributeSet at, boolean annotation) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException + { + SimpleAttributeSet sas = new SimpleAttributeSet(at); + + if (sas.isDefined(StyleConstants.Background)) sas.removeAttribute(StyleConstants.Background); + if (sas.isDefined(StyleConstants.Foreground)) sas.removeAttribute(StyleConstants.Foreground); + if (sas.isDefined(const_WaveUnderlineColor)) sas.removeAttribute(const_WaveUnderlineColor); + + if (sas.isDefined(javax.swing.text.StyleConstants.FontConstants.Bold)) + sas.removeAttribute(javax.swing.text.StyleConstants.FontConstants.Bold); + + if (sas.isDefined(javax.swing.text.StyleConstants.FontConstants.Italic)) + sas.removeAttribute(javax.swing.text.StyleConstants.FontConstants.Italic); + + if (asc.bgColor != null) sas.addAttribute(StyleConstants.Background, asc.bgColor); + if (asc.fgColor != null) sas.addAttribute(StyleConstants.Foreground, asc.fgColor); + + if (sas.isDefined(const_WaveUnderlineColor)) + { + sas.removeAttribute(const_WaveUnderlineColor); + if (asc.underColor != null) sas.addAttribute(const_WaveUnderlineColor, asc.underColor); + } + + Object annotationType = at.getAttribute("annotationType"); + if (annotationType != null) + { + if (annotation) + { + Boolean v_isUseHighlightColor = (Boolean) isUseHighlightColor.invoke(annotationType, new Object[0]); + Boolean v_isInheritForegroundColor = (Boolean) isInheritForegroundColor.invoke(annotationType, new Object[0]); + Boolean v_isUseWaveUnderlineColor = (Boolean) isUseWaveUnderlineColor.invoke(annotationType, new Object[0]); + + if (v_isUseHighlightColor) + { + setHighlight.invoke(annotationType, asc.a_getHighlight); + } + + if (v_isInheritForegroundColor) + { + setForegroundColor.invoke(annotationType, asc.a_getForegroundColor); + } + + if (v_isUseWaveUnderlineColor) + { + setWaveUnderlineColor.invoke(annotationType, asc.a_getWaveUnderlineColor); + } + } + } + + return sas; + } + + private static void process_set(String set_name, Collection data, boolean annotation) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException + { + System.out.println("\n// "); + LinkedList conf_annotations = new LinkedList(); + + for (AttributeSet at : data) + { + //String description; + String name = "BAD ASS"; + Boolean v_isUseHighlightColor = null; + Boolean v_isInheritForegroundColor = null; + Boolean v_isUseWaveUnderlineColor = null; + java.awt.Color a_getHighlight = null; + java.awt.Color a_getForegroundColor = null; + java.awt.Color a_getWaveUnderlineColor = null; + + if (annotation) + { + Object annotationType = at.getAttribute("annotationType"); + if (annotationType != null) + { + name = (String) getName.invoke(annotationType, new Object[0]); + v_isUseHighlightColor = (Boolean) isUseHighlightColor.invoke(annotationType, new Object[0]); + v_isInheritForegroundColor = (Boolean) isInheritForegroundColor.invoke(annotationType, new Object[0]); + v_isUseWaveUnderlineColor = (Boolean) isUseWaveUnderlineColor.invoke(annotationType, new Object[0]); + a_getHighlight = (java.awt.Color) getHighlight.invoke(annotationType, new Object[0]); + a_getForegroundColor = (java.awt.Color) getForegroundColor.invoke(annotationType, new Object[0]); + a_getWaveUnderlineColor = (java.awt.Color) getWaveUnderlineColor.invoke(annotationType, new Object[0]); + } + else + { + System.err.println("ANNOTATION WITHOUT TYPE FOUND " + at); + } + } + else + { + name = (String) at.getAttribute(javax.swing.text.StyleConstants.NameAttribute); + } + + java.awt.Color bgColor = (java.awt.Color) at.getAttribute(StyleConstants.Background); + java.awt.Color fgColor = (java.awt.Color) at.getAttribute(StyleConstants.Foreground); + java.awt.Color underColor = (java.awt.Color) at.getAttribute(const_WaveUnderlineColor); + + Boolean bold = (Boolean) at.getAttribute(javax.swing.text.StyleConstants.FontConstants.Bold); + Boolean italic = (Boolean) at.getAttribute(javax.swing.text.StyleConstants.FontConstants.Italic); + + conf_annotations.add(new AttributeSetConfigured(name, + bgColor, + fgColor, + underColor, + v_isUseHighlightColor, + v_isInheritForegroundColor, + v_isUseWaveUnderlineColor, + a_getHighlight, + a_getForegroundColor, + a_getWaveUnderlineColor, + bold, + italic)); + } + + AttributeSetConfigured.compileSet(set_name, conf_annotations); + System.out.println("// "); + } + + +} diff --git a/src/org/twopm/laf/TitanLookAndFeel.java b/src/org/twopm/laf/TitanLookAndFeel.java new file mode 100644 index 0000000..4c72e94 --- /dev/null +++ b/src/org/twopm/laf/TitanLookAndFeel.java @@ -0,0 +1,62 @@ +package org.twopm.laf; + +import java.util.prefs.Preferences; +import javax.swing.UIDefaults; +import javax.swing.UIManager; +import javax.swing.plaf.metal.MetalLookAndFeel; +import static javax.swing.plaf.metal.MetalLookAndFeel.getCurrentTheme; +import static javax.swing.plaf.metal.MetalLookAndFeel.setCurrentTheme; +import org.openide.util.NbPreferences; + +/** + * @author Edward M. Kagan + */ +public class TitanLookAndFeel extends MetalLookAndFeel { + + public static boolean self_install () + { + UIManager.LookAndFeelInfo[] installedLookAndFeels = UIManager.getInstalledLookAndFeels(); + for (UIManager.LookAndFeelInfo lafi : installedLookAndFeels) + { + String laf_name = "[twopm!] Titan"; //NOI18N + if (lafi.getName().equals(laf_name)) + { + System.out.println("LAF Persist - no install."); + return false; + } + } + System.out.print("NO LAF - installing... "); + UIManager.installLookAndFeel(new UIManager.LookAndFeelInfo("[twopm!] Titan" , TitanLookAndFeel.class.getName()) ); //NOI18N + System.out.println("OK"); + + System.out.print("Applying LAf... "); + Preferences prefs = NbPreferences.root().node( "laf" ); //NOI18N + prefs.put( "laf", TitanLookAndFeel.class.getName() ); //NOI18N + System.out.println("OK"); + return true; + } + + @Override + public String getName() { + return "[twopm!] Titan"; //NOI18N + } + + @Override + protected void createDefaultTheme() { + super.createDefaultTheme(); + if( !(getCurrentTheme() instanceof TitanTheme) ) + setCurrentTheme( new TitanTheme() ); + } + + @Override + public UIDefaults getDefaults() { + UIDefaults defaults = super.getDefaults(); + return defaults; + } + + @Override + public void initialize() { + super.initialize(); + } + +} diff --git a/src/org/twopm/laf/TitanTheme.java b/src/org/twopm/laf/TitanTheme.java new file mode 100644 index 0000000..b9d9ab6 --- /dev/null +++ b/src/org/twopm/laf/TitanTheme.java @@ -0,0 +1,131 @@ +package org.twopm.laf; + +import java.awt.Font; +import javax.swing.UIDefaults; +import javax.swing.plaf.ColorUIResource; +import javax.swing.plaf.FontUIResource; +import javax.swing.plaf.metal.MetalTheme; + +/** + * @author Edward M. Kagan + */ +public class TitanTheme extends MetalTheme { + + private static ColorUIResource primary1 = new ColorUIResource( 128, 128, 128); + private static ColorUIResource primary2 = new ColorUIResource( 64 , 64, 64 ); + private static ColorUIResource primary3 = new ColorUIResource( 128, 128, 128); + private static ColorUIResource secondary1 = new ColorUIResource( 208, 208, 208); + private static ColorUIResource secondary2 = new ColorUIResource( 96 , 96 , 96); + private static ColorUIResource secondary3 = new ColorUIResource( 64 , 64 , 64 ); + private static ColorUIResource black = new ColorUIResource( 255 , 255 , 255 ); + private static ColorUIResource white = new ColorUIResource( 0 , 0 , 0 ); + + + @Override + public void addCustomEntriesToTable(UIDefaults table) { + super.addCustomEntriesToTable(table); //To change body of generated methods, choose Tools | Templates. + table.put( "nb.imageicon.filter", new DarkIconFilter() ); //NOI18N + } + + private final static FontUIResource DEFAULT_FONT = new FontUIResource("Dialog", Font.PLAIN, 11); //NOI18N + + + + public static void self_tuneup (Color[] color_scheme_loaded) + { + for (int i = 0; i < color_scheme_loaded.length; i ++) + { + grep_needed (color_scheme_loaded[i]); + } + } + + private static void grep_needed (Color c) + { + if (c.getName().equals("primary1")) primary1 = (ColorUIResource) c.getObject(); + else if (c.getName().equals("primary2")) primary2 = (ColorUIResource) c.getObject(); + else if (c.getName().equals("primary3")) primary3 = (ColorUIResource) c.getObject(); + else if (c.getName().equals("secondary1")) secondary1 = (ColorUIResource) c.getObject(); + else if (c.getName().equals("secondary2")) secondary2 = (ColorUIResource) c.getObject(); + else if (c.getName().equals("secondary3")) secondary3 = (ColorUIResource) c.getObject(); + else if (c.getName().equals("black")) black = (ColorUIResource) c.getObject(); + else if (c.getName().equals("white")) white = (ColorUIResource) c.getObject(); + } + + @Override + public String getName() { + return "[twopm!] Titan"; //NOI18N + } + + // FUCKERS - it's not obligatory to override this - IDIOTS!!! + @Override + protected ColorUIResource getWhite() { + return white; + } + + @Override + protected ColorUIResource getBlack() { + return black; + } + + + @Override + protected ColorUIResource getPrimary1() { + return primary1; + } + + @Override + protected ColorUIResource getPrimary2() { + return primary2; + } + + @Override + protected ColorUIResource getPrimary3() { + return primary3; + } + + @Override + protected ColorUIResource getSecondary1() { + return secondary1; + } + + @Override + protected ColorUIResource getSecondary2() { + return secondary2; + } + + @Override + protected ColorUIResource getSecondary3() { + return secondary3; + } + + @Override + public FontUIResource getControlTextFont() { + return DEFAULT_FONT; + } + + @Override + public FontUIResource getSystemTextFont() { + return DEFAULT_FONT; + } + + @Override + public FontUIResource getUserTextFont() { + return DEFAULT_FONT; + } + + @Override + public FontUIResource getMenuTextFont() { + return DEFAULT_FONT; + } + + @Override + public FontUIResource getWindowTitleFont() { + return DEFAULT_FONT; + } + + @Override + public FontUIResource getSubTextFont() { + return DEFAULT_FONT; + } + +} diff --git a/src/org/twopm/laf/tools/Scheme2Java.java b/src/org/twopm/laf/tools/Scheme2Java.java new file mode 100644 index 0000000..decd15a --- /dev/null +++ b/src/org/twopm/laf/tools/Scheme2Java.java @@ -0,0 +1,18 @@ +package org.twopm.laf.tools; + +import org.twopm.laf.Color; + +/** + * @author Edward M. Kagan + */ +public class Scheme2Java { + + public static void printJava(Color[] color_scheme_loaded) + { + for (int i = 0; i < color_scheme_loaded.length; i ++) + { + color_scheme_loaded[i].printJava(); + } + } + +} diff --git a/update/generate_update.sh b/update/generate_update.sh new file mode 100755 index 0000000..8d416ca --- /dev/null +++ b/update/generate_update.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +full_name=$(date "+%H/%M/%S/%d/%m/%Y") +releasedate=$(date "+%Y/%m/%d") +target_nbm=$1 +build_number=$2 +version_number=$3 + +file_size_kb=`du -b "$target_nbm" | cut -f1` + +cat > updates.xml << EOF + + + + + + + + + + + + + + + + +EOF diff --git a/update/updates.xml b/update/updates.xml index 4a6c29f..e1f8efa 100644 --- a/update/updates.xml +++ b/update/updates.xml @@ -1,16 +1,33 @@ - + - - + + - - + + diff --git a/update/updates_base.xml b/update/updates_base.xml new file mode 100644 index 0000000..d3e1108 --- /dev/null +++ b/update/updates_base.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + +