Minor Fixes

master
Wizard Atman 11 years ago
parent 0ad567aa08
commit efea5856d8

@ -9,18 +9,16 @@ import java.io.Serializable;
import javax.swing.plaf.ColorUIResource;
import static org.idp.laf.Color.ColorClass.AT;
import static org.idp.laf.Color.ColorClass.SF;
//import static org.idp.laf.Color.ColorClass.SS;
/**
* @author Edward M. Kagan <pagan@idp-crew.com>
*/
@SuppressWarnings("rawtypes")
public class Color implements Serializable{
public void printJava() {
//c);
//Color c = new Color(Keys.color_keys[i], Color.ColorClass.SF, oo.getRed(), oo.getGreen(), oo.getBlue(), oo.getAlpha(),"...");
String res = "color_map.add(new Color(\"";// + EditorPane.border"\", new" invisable_border);"
String res = "color_map.add(new Color(\"";
res += this.pname + "\", ";
if (this.cls ==SF)
@ -43,10 +41,8 @@ public class Color implements Serializable{
}
public enum ColorClass {
SF (javax.swing.plaf.ColorUIResource.class),
// SS (sun.swing.PrintColorUIResource.class),
AT (java.awt.Color.class);
private final Class cls;
@ -111,10 +107,6 @@ public class Color implements Serializable{
{
this.cls = SF;
}
// else if (vals[1].equals("SS"))
// {
// this.cls = SS;
// }
else if (vals[1].equals("AT"))
{
this.cls = AT;
@ -146,14 +138,9 @@ public class Color implements Serializable{
{
case SF : {
javax.swing.plaf.ColorUIResource res = new ColorUIResource(cc);
return res;
}
// case SS : {
// sun.swing.PrintColorUIResource res = new PrintColorUIResource(cc.getRGB(), cc);
// return res;
// }
case AT : {
return cc;
}

@ -49,7 +49,7 @@ public class Defaults {
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, 255, 0, 0, 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, "..."));
@ -230,6 +230,8 @@ public class Defaults {
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, "..."));

@ -42,6 +42,7 @@ import org.openide.windows.WindowManager;
/**
* @author Edward M. Kagan <pagan@idp-crew.com>
*/
@SuppressWarnings("rawtypes")
public class Kernel {
private static final boolean w_init = false;
@ -527,7 +528,8 @@ public class Kernel {
private static final String COLOR_MODEL = "org.netbeans.modules.options.colors.ColorModel"; //NOI18N
private static final String TITAN_THEME_NAME = NbBundle.getMessage(Kernel.class, "LBL_TITAN_EDITOR");
@SuppressWarnings("unchecked")
static void load_companion() {
ClassLoader cl = Lookup.getDefault().lookup( ClassLoader.class );
@ -538,6 +540,7 @@ public class Kernel {
try
{
Class clazz = cl.loadClass( COLOR_MODEL );
Object colorModel = clazz.newInstance();
Method get_profile_method = clazz.getDeclaredMethod( "getCurrentProfile", new Class[0] ); //NOI18N

@ -45,6 +45,7 @@ import org.openide.util.NbBundle.Messages;
"CTL_ColorEditorTopComponent=ColorEditor Window",
"HINT_ColorEditorTopComponent=This is a ColorEditor window"
})
public final class ColorEditorTopComponent extends TopComponent {
public ColorEditorTopComponent() {

Loading…
Cancel
Save