git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
97f9bc5
)
Check if colos are null
author
amwaterhouse
<Andrew Waterhouse>
Fri, 27 May 2005 14:12:36 +0000
(14:12 +0000)
committer
amwaterhouse
<Andrew Waterhouse>
Fri, 27 May 2005 14:12:36 +0000
(14:12 +0000)
src/jalview/gui/UserDefinedColours.java
patch
|
blob
|
history
diff --git
a/src/jalview/gui/UserDefinedColours.java
b/src/jalview/gui/UserDefinedColours.java
index
a35180b
..
5fdcdf8
100755
(executable)
--- a/
src/jalview/gui/UserDefinedColours.java
+++ b/
src/jalview/gui/UserDefinedColours.java
@@
-28,7
+28,7
@@
public class UserDefinedColours extends GUserDefinedColours implements ChangeLis
super();
\r
frame = new JInternalFrame();
\r
frame.setContentPane(this);
\r
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
if(System.getProperty("os.name").startsWith("Mac"))
\r
frame.setSize(450,560);
\r
\r
@@
-145,6
+145,7
@@
public class UserDefinedColours extends GUserDefinedColours implements ChangeLis
{
\r
File choice = chooser.getSelectedFile();
\r
jalview.bin.Cache.setProperty("LAST_DIRECTORY", choice.getParent());
\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
Color[] colors = loadColours(choice.getAbsolutePath());
\r
for (int i = 0; i < colors.length; i++)
\r
{
\r
@@
-166,8
+167,12
@@
public class UserDefinedColours extends GUserDefinedColours implements ChangeLis
public static UserColourScheme loadDefaultColours(String file)
\r
{
\r
UserColourScheme ucs = null;
\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
return ucs;
\r
}
\r
\r
@@
-188,7
+193,7
@@
public class UserDefinedColours extends GUserDefinedColours implements ChangeLis
\r
}
\r
catch (Exception ex)
\r
\r
}
\r
catch (Exception ex)
\r
- {ex.printStackTrace();}
\r
+ {System.out.println("Error loading UserColourFile "+file);}
\r
\r
return newColours;
\r
}
\r
\r
return newColours;
\r
}
\r