From aee942d972498d3e51334fc890221b1827e0b255 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Thu, 28 Apr 2005 15:28:28 +0000 Subject: [PATCH] Preferences panel added --- src/jalview/gui/Preferences.java | 113 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100755 src/jalview/gui/Preferences.java diff --git a/src/jalview/gui/Preferences.java b/src/jalview/gui/Preferences.java new file mode 100755 index 0000000..6c07d23 --- /dev/null +++ b/src/jalview/gui/Preferences.java @@ -0,0 +1,113 @@ +package jalview.gui; + +import jalview.jbgui.*; +import jalview.schemes.*; + +import jalview.bin.Cache; +import javax.swing.*; +import java.awt.event.ActionEvent; +import java.awt.*; + +public class Preferences extends GPreferences +{ + AlignViewport av; + JInternalFrame frame; + public Preferences(AlignViewport av) + { + this.av = av; + frame = new JInternalFrame(); + frame.setContentPane(this); + Desktop.addInternalFrame(frame, "Preferences", 480,350 ); + + + fullID.setSelected(av.getShowFullId()); + String string = Cache.getProperty("SHOW_FULLSCREEN"); + boolean value = false; + if(string!=null) + value = Boolean.valueOf(string).booleanValue(); + + fullScreen.setSelected(value); + annotations.setSelected(av.getShowAnnotation()); + + conservation.setEnabled(av.getShowAnnotation()); + quality.setEnabled(av.getShowAnnotation()); + identity.setEnabled(av.getShowAnnotation()); + + conservation.setSelected(av.showConservation); + quality.setSelected(av.showQuality); + identity.setSelected(av.showIdentity); + + for(int i=0; i<12; i++) + colour.addItem( ColourSchemeProperty.getColourName(i) ); + + string = Cache.getProperty("DEFAULT_COLOUR"); + if(string!=null) + colour.setSelectedItem( string ); + else + colour.setSelectedIndex( 11 ); + + String fonts[] = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames(); + for(int i=0; i