Naming fixed where needed

master
Wizard Atman 11 years ago
parent a3cb7fc4ac
commit af75aa5783

@ -1,7 +1,7 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
/* Copyright (C) Edward M. Kagan - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
* Written by Edward M. Kagan <atman@idp-crew.com>, 2015
*/
package org.idp.laf;
@ -9,8 +9,7 @@ import java.awt.Color;
import java.util.List;
/**
*
* @author Clochard Pagan <pagan@idp-crew.com>
* @author Edward M. Kagan <atman@idp-crew.com>
*/
public class AttributeSetConfigured {

@ -1,7 +1,7 @@
/* Copyright (C) Edward M. Kagan - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
* Written by Edward M. Kagan <pagan@idp-crew.com>, 2015
* Written by Edward M. Kagan <atman@idp-crew.com>, 2015
*/
package org.idp.laf;
@ -11,7 +11,7 @@ import static org.idp.laf.Color.ColorClass.AT;
import static org.idp.laf.Color.ColorClass.SF;
/**
* @author Edward M. Kagan <pagan@idp-crew.com>
* @author Edward M. Kagan <atman@idp-crew.com>
*/
@SuppressWarnings("rawtypes")
public class Color implements Serializable{

@ -1,7 +1,7 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
/* Copyright (C) Edward M. Kagan - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
* Written by Edward M. Kagan <atman@idp-crew.com>, 2015
*/
package org.idp.laf;
@ -9,8 +9,7 @@ import java.awt.Color;
import java.util.HashMap;
/**
*
* @author Clochard Pagan <pagan@idp-crew.com>
* @author Edward M. Kagan <atman@idp-crew.com>
*/
public class ColorTheme {
@ -204,7 +203,7 @@ private static final AttributeSetConfigured [] lang_Java = {
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, new Color (0, 255, 255, 255), 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),

@ -1,7 +1,7 @@
/* Copyright (C) Edward M. Kagan - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
* Written by Edward M. Kagan <pagan@idp-crew.com>, 2015
* Written by Edward M. Kagan <atman@idp-crew.com>, 2015
*/
package org.idp.laf;
@ -9,7 +9,7 @@ import java.util.ArrayList;
import static org.idp.laf.Kernel.color_scheme_loaded;
/**
* @author Edward M. Kagan <pagan@idp-crew.com>
* @author Edward M. Kagan <atman@idp-crew.com>
* @author Helen A. Kukhar <carpenter@idp-crew.com>
*/
public class Defaults {

@ -1,20 +1,18 @@
/* Copyright (C) Edward M. Kagan - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
* Written by Edward M. Kagan <pagan@idp-crew.com>, 2015
* Written by Edward M. Kagan <atman@idp-crew.com>, 2015
*/
package org.idp.laf;
import java.util.prefs.Preferences;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import org.openide.modules.ModuleInstall;
import org.openide.util.NbBundle;
import org.openide.util.NbPreferences;
import org.openide.windows.WindowManager;
/**
* @author Edward M. Kagan <pagan@idp-crew.com>
* @author Edward M. Kagan <atman@idp-crew.com>
*/
public class Installer extends ModuleInstall
{
@ -32,30 +30,28 @@ public class Installer extends ModuleInstall
}
});
// System.out.println(">>>>>>>>>>>>>>> L&F = " + UIManager.getLookAndFeel().getName());
//
//// if (UIManager.getLookAndFeel().getName().equals(NbBundle.getMessage(TitanLookAndFeel.class, "LBL_TITAN")))
//// {
//
// //}
//
//
final Preferences prefs = NbPreferences.root().node( "laf" ); //NOI18N
if( !prefs.getBoolean("idp.titan_editor.installed", false) ) //NOI18N
Preferences prefs = NbPreferences.root().node( "laf" ); //NOI18N
if( !prefs.getBoolean("idp.titan.installed", false) ) //NOI18N
{
prefs.putBoolean("idp.titan.installed", true ); //NOI18N
WindowManager.getDefault().invokeWhenUIReady( new Runnable()
{
@Override
public void run() {
TitanEditor.load_editor();
prefs.putBoolean("idp.titan_editor.installed", true ); //NOI18N
TitanEditor.load_editor(true);
}
});
}
else
{
WindowManager.getDefault().invokeWhenUIReady( new Runnable()
{
@Override
public void run() {
TitanEditor.load_editor(false);
}
});
}
@ -69,7 +65,7 @@ public class Installer extends ModuleInstall
if (TitanLookAndFeel.self_install())
{
System.out.print("Setting up anti-aliasing hints to conf file...");
if (Kernel.setup_font_antialiaing_hints())
if (!Kernel.setup_font_antialiaing_hints())
{
System.err.println("FAIL");
return;

@ -1,7 +1,7 @@
/* Copyright (C) Edward M. Kagan - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
* Written by Edward M. Kagan <pagan@idp-crew.com>, 2015
* Written by Edward M. Kagan <atman@idp-crew.com>, 2015
*/
package org.idp.laf;
@ -14,7 +14,6 @@ import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Method;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.nio.file.FileSystems;
@ -36,20 +35,16 @@ import javax.swing.text.html.HTMLEditorKit;
import javax.swing.text.html.StyleSheet;
import org.idp.laf.tools.Scheme2Java;
import org.openide.util.Exceptions;
import org.openide.util.Lookup;
import org.openide.util.NbBundle;
import org.openide.windows.WindowManager;
/**
* @author Edward M. Kagan <pagan@idp-crew.com>
* @author Edward M. Kagan <atman@idp-crew.com>
*/
@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.idp_scheme";
public static void load_kernel ()
@ -76,13 +71,6 @@ public class Kernel {
}
}
// private static boolean prepare_titan_laf ()
// {
// // UIManager.put("nb.forceui", true);
// // UIManager.put("netbeans.plaf.disable.ui.customizations", false);
// return ;
// }
public static boolean setup_font_antialiaing_hints ()
{
try
@ -138,23 +126,15 @@ public class Kernel {
private static void apply_border_managment_hints ()
{
// UIManager.put("ComboBoxUI", "javax.swing.plaf.basic.BasicComboBoxUI");
// UIManager.put("SliderUI", "javax.swing.plaf.basic.BasicSliderUI");
// UIManager.put("TreeUI", "javax.swing.plaf.basic.BasicTreeUI");
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
@ -255,9 +235,6 @@ public class Kernel {
UIManager.put(o, status_border);
}
// </editor-fold>
// UIManager.put("nb.forceui", true);
// UIManager.put("netbeans.plaf.disable.ui.customizations", false);
}

@ -1,12 +1,12 @@
/* Copyright (C) Edward M. Kagan - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
* Written by Edward M. Kagan <pagan@idp-crew.com>, 2015
* Written by Edward M. Kagan <atman@idp-crew.com>, 2015
*/
package org.idp.laf;
/**
* @author Edward M. Kagan <pagan@idp-crew.com>
* @author Edward M. Kagan <atman@idp-crew.com>
*/
public class Keys {

@ -1,20 +1,16 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
/* Copyright (C) Edward M. Kagan - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
* Written by Edward M. Kagan <atman@idp-crew.com>, 2015
*/
package org.idp.laf;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Map;
import java.util.Set;
import java.util.prefs.BackingStoreException;
import java.util.prefs.Preferences;
@ -24,11 +20,9 @@ import javax.swing.text.SimpleAttributeSet;
import javax.swing.text.StyleConstants;
import org.openide.util.Exceptions;
import org.openide.util.Lookup;
import org.openide.util.NbBundle;
import org.openide.util.NbPreferences;
/**
*
* @author Edward M. Kagan <atman@idp-crew.com>
*/
@SuppressWarnings ({"rawtypes","unchecked"})
@ -39,28 +33,24 @@ public class TitanEditor {
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.options.AnnotationColorProvider"; //NOI18N
// private static final String PROVIDER_SVN_CLASS_NAME = "org.netbeans.modules.subversion.options.AnnotationColorProvider"; //NOI18N
// private static final String PROVIDER_HG_CLASS_NAME = "org.netbeans.modules.mercurial.options.AnnotationColorProvider"; //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 Class GIT_CONFIG;
private static Field DisplayName;
private static Field WaveUnderlineColor;
private static Method getName;
private static Method getProfiles;
private static Method getCurrentProfile;
private static Method setCurrentProfile;
@ -87,35 +77,22 @@ public class TitanEditor {
private static Method getLanguages;
private static Object const_DisplayName;
private static Object const_WaveUnderlineColor;
private static Object colorModel;
private static final String DEFAULT_THEME_NAME = "NetBeans 5.5"; //NOI18N
//private static final String TITAN_THEME_NAME = NbBundle.getMessage(TitanLookAndFeel.class, "LBL_TITAN");
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_getInstance;
// private static Method provider_getColors;
// private static Method provider_colorsChanged;
private static Method provider_getDefault;
private static Method provider_getPreferences;
private static ClassLoader working_classLoader = null;
private static void extractDiffModule () throws IllegalAccessException
{
if (provider_DIFF != null)
{
HashMap <String, Integer> linkMap = new HashMap<String, Integer>();
java.awt.Color nb_diff_added_color = (java.awt.Color) UIManager.get ("nb.diff.added.color");
@ -175,17 +152,13 @@ public class TitanEditor {
res += "\n";
}
}
} catch (InvocationTargetException ex) {
Exceptions.printStackTrace(ex);
}
catch (InvocationTargetException ex) {}
res += "};\n";
res += "// </editor-fold>\n";
System.out.println(res);
}
}
private static void applyColorForDiffModule () throws IllegalAccessException, IllegalArgumentException, InvocationTargetException
@ -212,10 +185,8 @@ public class TitanEditor {
getName = ANNOTATION_TYPE.getDeclaredMethod("getName", new Class[0]);
DisplayName = EDITOR_SETTINGS.getField("DisplayName"); //NOI18N
WaveUnderlineColor = EDITOR_SETTINGS.getField("WaveUnderlineColor"); //NOI18N
getProfiles = COLOR_MODEL.getDeclaredMethod( "getProfiles", new Class[0] ); //NOI18N
getCurrentProfile = COLOR_MODEL.getDeclaredMethod( "getCurrentProfile", new Class[0] ); //NOI18N
setCurrentProfile = COLOR_MODEL.getDeclaredMethod( "setCurrentProfile", String.class ); //NOI18N
@ -241,7 +212,6 @@ public class TitanEditor {
getLanguages = COLOR_MODEL.getDeclaredMethod( "getLanguages", new Class[0] ); //NOI18N
const_DisplayName = DisplayName.get(EDITOR_SETTINGS);
const_WaveUnderlineColor = WaveUnderlineColor.get(EDITOR_SETTINGS);
colorModel = COLOR_MODEL.newInstance();
@ -256,22 +226,23 @@ public class TitanEditor {
if (provider_CLASS != null)
{
try {
try
{
provider_HG = working_classLoader.loadClass(PROVIDER_HG_CLASS_NAME);
} catch (ClassNotFoundException ex) {}
}
catch (ClassNotFoundException ex) {}
try {
try
{
provider_SVN = working_classLoader.loadClass(PROVIDER_SVN_CLASS_NAME);
} catch (ClassNotFoundException ex) {}
}
catch (ClassNotFoundException ex) {}
try {
try
{
provider_GIT = working_classLoader.loadClass(PROVIDER_GIT_CLASS_NAME);
} catch (ClassNotFoundException ex) {}
// provider_getColors = provider_CLASS.getDeclaredMethod( "getColors", new Class[0] ); //NOI18N
// provider_colorsChanged = provider_CLASS.getDeclaredMethod( "colorsChanged", Map.class ); //NOI18N
}
catch (ClassNotFoundException ex) {}
}
return true;
@ -294,61 +265,17 @@ public class TitanEditor {
return false;
}
// private static String setup_theme () throws IllegalAccessException, IllegalArgumentException, InvocationTargetException
// {
// // String current_profile
////
//// Set<String> profile_set = (Set<String>) getProfiles.invoke( colorModel, new Object[0] );
//// //boolean contain_target_theme = false;
////// for (String str : profile_set)
////// {
////// System.out.println("> " + str);
//////// if (str.equals(TITAN_THEME_NAME)) contain_target_theme = true;
//// }
////
//// if (!contain_target_theme)
//// {
// // Ugly dublication routine, sorry NB developers...
//
// // }
//
// // setCurrentProfile.invoke(colorModel, TITAN_THEME_NAME);
// //}
// return current_profile;
// }
// public static void remove_editor () throws IllegalAccessException, IllegalArgumentException, InvocationTargetException
// {
// Set<String> profile_set = (Set<String>) getProfiles.invoke( colorModel, new Object[0] );
// boolean contain_target_theme = false;
// for (String str : profile_set)
// {
// if (str.equals(TITAN_THEME_NAME)) contain_target_theme = true;
// }
//
// if (contain_target_theme)
// {
// setCurrentProfile.invoke(colorModel, TITAN_THEME_NAME);
//
//
// setCurrentProfile.invoke(colorModel, DEFAULT_THEME_NAME);
// }
//
//
//
//
// }
private static void extractColorsForModule (String name, Class provider) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException
{
String res = "// <editor-fold desc=\"" +name + "\" defaultstate=\"collapsed\">" +
"\npublic static final org.idp.laf.Color[] " + name + " = {\n";
if (provider != null)
{
Preferences forModule = NbPreferences.forModule(provider);
try {
try
{
for (String key : forModule.keys())
{
java.awt.Color cc = new java.awt.Color(Integer.parseInt(forModule.get(key, null)));
@ -358,51 +285,35 @@ public class TitanEditor {
cc.getBlue(),
cc.getAlpha(), "")).getString() + ",\n";
}
} catch (BackingStoreException ex) {
Exceptions.printStackTrace(ex);
}
catch (BackingStoreException ex) {}
}
res += "};\n";
res += "// </editor-fold>\n";
System.out.println(res);
}
private static void applyColorForModule (Class provider, org.idp.laf.Color[] colors_theme) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException
{
if (provider != null)
{
Preferences forModule = NbPreferences.forModule(provider);
try {
for (String key : forModule.keys())
{
for (org.idp.laf.Color cc : colors_theme)
{
if (cc.getName().equals(key))
{
java.awt.Color toSet = (java.awt.Color) cc.getObject();
forModule.put(key, String.valueOf(toSet.getRGB()));
break;
}
}
}
} catch (BackingStoreException ex) {
Exceptions.printStackTrace(ex);
forModule.put(cc.getPname(), String.valueOf(toSet.getRGB()));
}
}
}
public static void load_editor ()
public static void load_editor (boolean first_run)
{
if (!pre_load()) return;
try {
// String swith_back = (String) getCurrentProfile.invoke( colorModel, new Object[0] );
String swith_back = (String) getCurrentProfile.invoke( colorModel, new Object[0] );
if (no_load)
{
@ -432,15 +343,10 @@ public class TitanEditor {
extractColorsForModule ("SVN", provider_SVN);
extractColorsForModule ("HG", provider_HG);
extractDiffModule();
}
else
{
setCurrentProfile.invoke(colorModel, DEFAULT_THEME_NAME);
Collection<AttributeSet> annotations = (Collection<AttributeSet>) getAnnotations.invoke(colorModel, DEFAULT_THEME_NAME);
Collection<AttributeSet> annotations_upd = apply_set ("annotations", annotations, true);
@ -467,19 +373,19 @@ public class TitanEditor {
}
}
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 ();
// if (!first_run)
// {
// setCurrentProfile.invoke(colorModel, swith_back);
// }
}
}
} catch (IllegalAccessException ex) {
Exceptions.printStackTrace(ex);
} catch (IllegalArgumentException ex) {
@ -538,7 +444,6 @@ public class TitanEditor {
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);
@ -560,19 +465,14 @@ public class TitanEditor {
if (asc.underColor != null) sas.addAttribute(const_WaveUnderlineColor, asc.underColor);
}
Object annotationType = at.getAttribute("annotationType");
if (annotationType != null)
{
Boolean v_isUseHighlightColor = null;
Boolean v_isInheritForegroundColor = null;
Boolean v_isUseWaveUnderlineColor = null;
if (annotation)
{
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]);
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)
{
@ -586,8 +486,6 @@ public class TitanEditor {
if (v_isUseWaveUnderlineColor)
{
setWaveUnderlineColor.invoke(annotationType, asc.a_getWaveUnderlineColor);
}
}
@ -598,14 +496,11 @@ public class TitanEditor {
private static void process_set(String set_name, Collection<AttributeSet> data, boolean annotation) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException
{
System.out.println("\n// <editor-fold desc=\"" +set_name + "\" defaultstate=\"collapsed\">");
LinkedList<AttributeSetConfigured> conf_annotations = new LinkedList<AttributeSetConfigured>();
for (AttributeSet at : data)
{
//String description;
String name = "BAD ASS";
Boolean v_isUseHighlightColor = null;
@ -615,12 +510,9 @@ public class TitanEditor {
java.awt.Color a_getForegroundColor = null;
java.awt.Color a_getWaveUnderlineColor = null;
if (annotation)
{
Object annotationType = at.getAttribute("annotationType");
//System.out.println(">>> " + description + " | " + annotationType);
//String name = "BAD ASS";
if (annotationType != null)
{
name = (String) getName.invoke(annotationType, new Object[0]);
@ -640,25 +532,14 @@ public class TitanEditor {
{
name = (String) at.getAttribute(javax.swing.text.StyleConstants.NameAttribute);
}
// else if (type == 2)
// {
// name = (String) at.getAttribute(javax.swing.text.StyleConstants.NameAttribute);
// }
//System.out.println(type + " : " + name );
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,
@ -671,7 +552,6 @@ public class TitanEditor {
a_getWaveUnderlineColor,
bold,
italic));
}
AttributeSetConfigured.compileSet(set_name, conf_annotations);

@ -1,7 +1,7 @@
/* Copyright (C) Edward M. Kagan - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
* Written by Edward M. Kagan <pagan@idp-crew.com>, 2015
* Written by Edward M. Kagan <atman@idp-crew.com>, 2015
*/
package org.idp.laf;
@ -11,11 +11,10 @@ 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.NbBundle;
import org.openide.util.NbPreferences;
/**
* @author Edward M. Kagan <pagan@idp-crew.com>
* @author Edward M. Kagan <atman@idp-crew.com>
*/
public class TitanLookAndFeel extends MetalLookAndFeel {
@ -42,43 +41,6 @@ public class TitanLookAndFeel extends MetalLookAndFeel {
return true;
}
// public static void self_remove ()
// {
// UIManager.LookAndFeelInfo[] installedLookAndFeels = UIManager.getInstalledLookAndFeels();
//
// for (UIManager.LookAndFeelInfo lafi : installedLookAndFeels)
// {
// System.out.println(">>>> " + lafi.getName());
// String laf_name = NbBundle.getMessage(TitanLookAndFeel.class, "LBL_TITAN");
// if (lafi.getName().equals(laf_name))
// {
// System.out.print("LAF Persist - removing...");
// int i = 0;
// UIManager.LookAndFeelInfo[] toSet = new UIManager.LookAndFeelInfo[installedLookAndFeels.length - 1];
// for (UIManager.LookAndFeelInfo copy : installedLookAndFeels)
// {
// if (!copy.getName().equals(laf_name))
// {
// toSet[i] = copy;
// i++;
// }
// }
// UIManager.setInstalledLookAndFeels(toSet);
// System.out.println("OK");
// System.out.print("Setting Metal theme by default...");
// try {
// UIManager.setLookAndFeel(MetalLookAndFeel.class.getName());
// System.out.print("OK");
// } catch (Exception ex) {
// System.out.print("FAIL");
// }
// return;
// }
// }
//
// System.out.println("NO LAF - nothing to remove.");
// }
@Override
public String getName() {
return "[idP!] Titan"; //NOI18N

@ -1,7 +1,7 @@
/* Copyright (C) Edward M. Kagan - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
* Written by Edward M. Kagan <pagan@idp-crew.com>, 2015
* Written by Edward M. Kagan <atman@idp-crew.com>, 2015
*/
package org.idp.laf;
@ -10,10 +10,9 @@ import javax.swing.UIDefaults;
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.FontUIResource;
import javax.swing.plaf.metal.MetalTheme;
import org.openide.util.NbBundle;
/**
* @author Edward M. Kagan <pagan@idp-crew.com>
* @author Edward M. Kagan <atman@idp-crew.com>
*/
public class TitanTheme extends MetalTheme {

@ -1,14 +1,14 @@
/* Copyright (C) Edward M. Kagan - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
* Written by Edward M. Kagan <pagan@idp-crew.com>, 2015
* Written by Edward M. Kagan <atman@idp-crew.com>, 2015
*/
package org.idp.laf.tools;
import org.idp.laf.Color;
/**
* @author Edward M. Kagan <pagan@idp-crew.com>
* @author Edward M. Kagan <atman@idp-crew.com>
*/
public class Scheme2Java {

Loading…
Cancel
Save