super();\r
frame = new JInternalFrame();\r
frame.setContentPane(this);\r
- Desktop.addInternalFrame(frame, "User defined colours", 450,530, false );\r
+ Desktop.addInternalFrame(frame, "User Defined Colours", 450,530, false );\r
if(System.getProperty("os.name").startsWith("Mac"))\r
frame.setSize(450,560);\r
\r
{\r
File choice = chooser.getSelectedFile();\r
jalview.bin.Cache.setProperty("LAST_DIRECTORY", choice.getParent());\r
+ jalview.bin.Cache.setProperty("USER_DEFINED_COLOUR", choice.getPath());\r
Color[] colors = loadColours(choice.getAbsolutePath());\r
for (int i = 0; i < colors.length; i++)\r
{\r
public static UserColourScheme loadDefaultColours(String file)\r
{\r
UserColourScheme ucs = null;\r
- ucs = new UserColourScheme(loadColours(file));\r
- ucs.setThreshold(0);\r
+ Color cols[] = loadColours(file);\r
+ if(cols!=null)\r
+ {\r
+ ucs = new UserColourScheme(cols);\r
+ ucs.setThreshold(0);\r
+ }\r
return ucs;\r
}\r
\r
\r
}\r
catch (Exception ex)\r
- {ex.printStackTrace();}\r
+ {System.out.println("Error loading UserColourFile "+file);}\r
\r
return newColours;\r
}\r