diff --git a/src/org/twopm/laf/Bundle.properties b/src/org/twopm/laf/Bundle.properties index a0083ea..2cbcc64 100644 --- a/src/org/twopm/laf/Bundle.properties +++ b/src/org/twopm/laf/Bundle.properties @@ -2,4 +2,4 @@ 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 +OpenIDE-Module-Short-Description=Editor for Netbeans Titan Look and Feel diff --git a/src/org/twopm/laf/Color.java b/src/org/twopm/laf/Color.java index 400ad2f..9785ead 100644 --- a/src/org/twopm/laf/Color.java +++ b/src/org/twopm/laf/Color.java @@ -11,6 +11,14 @@ import static org.twopm.laf.Color.ColorClass.SF; @SuppressWarnings("rawtypes") public class Color implements Serializable{ + int R; + int G; + int B; + int A; + String pname; + ColorClass cls; + String description; + public void printJava() { String res = "color_map.add("; @@ -19,7 +27,7 @@ public class Color implements Serializable{ System.out.println(res); } - public String getString() { + public String getString() { String res = "new org.twopm.laf.Color(\""; res += this.pname + "\", "; @@ -42,9 +50,7 @@ public class Color implements Serializable{ res += ")"; return res; } - - public enum ColorClass { SF (javax.swing.plaf.ColorUIResource.class), AT (java.awt.Color.class); @@ -61,15 +67,6 @@ public class Color implements Serializable{ } } - 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(); @@ -80,7 +77,7 @@ public class Color implements Serializable{ this.description = ""; } - public Color(String pname, ColorClass cls, int red, int green, int blue, int alpha, String desc) { + 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; @@ -99,8 +96,7 @@ public class Color implements Serializable{ return "C[" + this.pname + ":" + this.cls + ":" + R + "," + G + "," + B + "," + A + ":" + description + "]"; } - public Color (String str) - { + public Color (String str) { if (str.startsWith("C")) { String real = str.substring(2, str.length() - 1); @@ -135,8 +131,7 @@ public class Color implements Serializable{ } - public Object getObject () - { + public Object getObject () { java.awt.Color cc = new java.awt.Color(R, G, B, A); switch (this.cls) { @@ -187,16 +182,14 @@ public class Color implements Serializable{ return pname; } - public void setObject ( java.awt.Color obj) - { + 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 () - { + 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 index 918099c..94335c0 100644 --- a/src/org/twopm/laf/ColorTheme.java +++ b/src/org/twopm/laf/ColorTheme.java @@ -12,7 +12,7 @@ public class ColorTheme { // 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 ("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), @@ -228,7 +228,7 @@ private static final AttributeSetConfigured [] lang_Java = { // private static final AttributeSetConfigured [] lang_CPP = { - new AttributeSetConfigured ("string", 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 ("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), @@ -397,7 +397,6 @@ public static final org.twopm.laf.Color[] DIFF = { }; //// - public static final HashMap > color_map; static @@ -414,8 +413,6 @@ static } - - private static HashMap wrap (AttributeSetConfigured [] data) { HashMap data_map = new HashMap(); @@ -426,5 +423,4 @@ private static HashMap wrap (AttributeSetConfi return data_map; } - } diff --git a/src/org/twopm/laf/Installer.java b/src/org/twopm/laf/Installer.java index 8f013fd..55b82c1 100644 --- a/src/org/twopm/laf/Installer.java +++ b/src/org/twopm/laf/Installer.java @@ -47,11 +47,6 @@ public class Installer extends ModuleInstall } }); } - - - - - } @Override diff --git a/src/org/twopm/laf/Kernel.java b/src/org/twopm/laf/Kernel.java index 9e61373..7a20be4 100644 --- a/src/org/twopm/laf/Kernel.java +++ b/src/org/twopm/laf/Kernel.java @@ -40,11 +40,11 @@ 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"; + private static final String scheme_file_name = "netbeans.2pm_scheme"; public static void load_kernel () { - if (UIManager.getLookAndFeel().getName().equals("[twopm!] Titan")) //NOI18N + if (UIManager.getLookAndFeel().getName().equals("[2pm.tech] Titan")) //NOI18N { String nb_etc = retrieve_netbeans_etc_dir(); String cfh_dir = retrieve_app_folder(); @@ -180,10 +180,7 @@ public class Kernel { UIManager.put ("MenuBar.border", buttons_border); UIManager.put ("Menu.border", mainMenuBorder); UIManager.put ("MenuItem.border", itemBorder); - - - - + String [] side_components ={ "CheckBoxMenuItem.border", "ScrollPane.border", @@ -238,7 +235,7 @@ public class Kernel { private static String retrieve_app_folder () { if (System.getProperty("os.name").startsWith("Windows")) { - return System.getenv("APPDATA") + File.separator + "twopm_scheme"; + return System.getenv("APPDATA") + File.separator + "2pm_scheme"; } else { return retrieve_netbeans_etc_dir (); } @@ -379,12 +376,6 @@ public class Kernel { Exceptions.printStackTrace(ex); return false; } - //} -// else -// { -// JOptionPane.showMessageDialog(null, "Unable to write '" + scheme_file + "'" ); -// return false; -// } } private static boolean read_scheme(String scheme_file) { diff --git a/src/org/twopm/laf/TitanLookAndFeel.java b/src/org/twopm/laf/TitanLookAndFeel.java index 4c72e94..075a996 100644 --- a/src/org/twopm/laf/TitanLookAndFeel.java +++ b/src/org/twopm/laf/TitanLookAndFeel.java @@ -18,7 +18,7 @@ public class TitanLookAndFeel extends MetalLookAndFeel { UIManager.LookAndFeelInfo[] installedLookAndFeels = UIManager.getInstalledLookAndFeels(); for (UIManager.LookAndFeelInfo lafi : installedLookAndFeels) { - String laf_name = "[twopm!] Titan"; //NOI18N + String laf_name = "[2pm.tech] Titan"; //NOI18N if (lafi.getName().equals(laf_name)) { System.out.println("LAF Persist - no install."); @@ -26,7 +26,7 @@ public class TitanLookAndFeel extends MetalLookAndFeel { } } System.out.print("NO LAF - installing... "); - UIManager.installLookAndFeel(new UIManager.LookAndFeelInfo("[twopm!] Titan" , TitanLookAndFeel.class.getName()) ); //NOI18N + UIManager.installLookAndFeel(new UIManager.LookAndFeelInfo("[2pm.tech] Titan" , TitanLookAndFeel.class.getName()) ); //NOI18N System.out.println("OK"); System.out.print("Applying LAf... "); @@ -38,7 +38,7 @@ public class TitanLookAndFeel extends MetalLookAndFeel { @Override public String getName() { - return "[twopm!] Titan"; //NOI18N + return "[2pm.tech] Titan"; //NOI18N } @Override diff --git a/src/org/twopm/laf/TitanTheme.java b/src/org/twopm/laf/TitanTheme.java index b9d9ab6..f03f342 100644 --- a/src/org/twopm/laf/TitanTheme.java +++ b/src/org/twopm/laf/TitanTheme.java @@ -24,7 +24,7 @@ public class TitanTheme extends MetalTheme { @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 + table.put("nb.imageicon.filter", new DarkIconFilter() ); //NOI18N } private final static FontUIResource DEFAULT_FONT = new FontUIResource("Dialog", Font.PLAIN, 11); //NOI18N @@ -53,7 +53,7 @@ public class TitanTheme extends MetalTheme { @Override public String getName() { - return "[twopm!] Titan"; //NOI18N + return "[2pm.tech] Titan"; //NOI18N } // FUCKERS - it's not obligatory to override this - IDIOTS!!! diff --git a/theme/netbeans.idp_scheme b/theme/netbeans.2pm_scheme similarity index 100% rename from theme/netbeans.idp_scheme rename to theme/netbeans.2pm_scheme