sr.renderGaps = false;
fr = new jalview.renderer.seqfeatures.FeatureRenderer(av);
- boolean useLegacy = Cache.getDefault("USE_LEGACY_GAP", false);
- Color gapCol = Cache.getDefaultColour("GAP_COLOUR", Color.lightGray);
- Color hiddenCol = Cache.getDefaultColour("HIDDEN_COLOUR",
- Color.DARK_GRAY.darker());
+ boolean useLegacy = Cache.getDefault(Preferences.USE_LEGACY_GAP, false);
+ Color gapCol = Cache.getDefaultColour(Preferences.GAP_COLOUR,
+ Preferences.OVERVIEW_DEFAULT_GAP);
+ Color hiddenCol = Cache.getDefaultColour(Preferences.HIDDEN_COLOUR,
+ Preferences.OVERVIEW_DEFAULT_HIDDEN);
cf = new OverviewResColourFinder(useLegacy, gapCol, hiddenCol);
}
this.av = alPanel.av;
this.ap = alPanel;
- showHidden = Cache.getDefault("SHOW_OV_HIDDEN_AT_START", true);
+ showHidden = Cache.getDefault(Preferences.SHOW_OV_HIDDEN_AT_START,
+ true);
if (showHidden)
{
od = new OverviewDimensionsShowHidden(av.getRanges(),
public static final String USE_LEGACY_GAP = "USE_LEGACY_GAP";
+ public static final String GAP_COLOUR = "GAP_COLOUR";
+
+ public static final String HIDDEN_COLOUR = "HIDDEN_COLOUR";
+
private static final int MIN_FONT_SIZE = 1;
private static final int MAX_FONT_SIZE = 30;
- private static final Color OVERVIEW_DEFAULT_GAP = Color.lightGray;
+ public static final Color OVERVIEW_DEFAULT_GAP = Color.lightGray;
- private static final Color OVERVIEW_DEFAULT_LEGACY_GAP = Color.white;
+ public static final Color OVERVIEW_DEFAULT_LEGACY_GAP = Color.white;
- private static final Color OVERVIEW_DEFAULT_HIDDEN = Color.darkGray
+ public static final Color OVERVIEW_DEFAULT_HIDDEN = Color.darkGray
.darker();
/**
* Set overview panel defaults
*/
gapColour.setBackground(
- Cache.getDefaultColour("GAP_COLOUR", OVERVIEW_DEFAULT_GAP));
+ Cache.getDefaultColour(GAP_COLOUR, OVERVIEW_DEFAULT_GAP));
hiddenColour.setBackground(
- Cache.getDefaultColour("HIDDEN_COLOUR",
+ Cache.getDefaultColour(HIDDEN_COLOUR,
OVERVIEW_DEFAULT_HIDDEN));
- useLegacyGap.setSelected(Cache.getDefault("USE_LEGACY_GAP", false));
+ useLegacyGap.setSelected(Cache.getDefault(USE_LEGACY_GAP, false));
gapLabel.setEnabled(!useLegacyGap.isSelected());
gapColour.setEnabled(!useLegacyGap.isSelected());
showHiddenAtStart
- .setSelected(Cache.getDefault("SHOW_OV_HIDDEN_AT_START", true));
+ .setSelected(Cache.getDefault(SHOW_OV_HIDDEN_AT_START, true));
/*
* Set Structure tab defaults.
/*
* Save Overview settings
*/
- Cache.setColourProperty("GAP_COLOUR", gapColour.getBackground());
- Cache.setColourProperty("HIDDEN_COLOUR", hiddenColour.getBackground());
+ Cache.setColourProperty(GAP_COLOUR, gapColour.getBackground());
+ Cache.setColourProperty(HIDDEN_COLOUR, hiddenColour.getBackground());
Cache.applicationProperties.setProperty(USE_LEGACY_GAP,
Boolean.toString(useLegacyGap.isSelected()));
Cache.applicationProperties.setProperty(SHOW_OV_HIDDEN_AT_START,
/*
* Overview tab components
*/
- protected JPanel overviewTab;
-
protected JPanel gapColour = new JPanel();
protected JPanel hiddenColour = new JPanel();
protected JLabel gapLabel;
- protected JButton resetButton;
-
/*
* Connections tab components
*/
c6.insets = new Insets(0, 0, 0, 15);
overviewPanel.add(hiddenColour, c6);
- resetButton = new JButton(
+ JButton resetButton = new JButton(
MessageManager.getString("label.reset_to_defaults"));
resetButton.addActionListener(new ActionListener()
import jalview.datamodel.SequenceGroup;
import jalview.datamodel.SequenceI;
+import jalview.gui.Preferences;
import jalview.util.Comparison;
import java.awt.Color;
*/
public OverviewResColourFinder()
{
- GAP_COLOUR = Color.lightGray;
- RESIDUE_COLOUR = Color.white;
- HIDDEN_COLOUR = Color.DARK_GRAY.darker();
+ this(false, Preferences.OVERVIEW_DEFAULT_GAP,
+ Preferences.OVERVIEW_DEFAULT_HIDDEN);
}
/**
// settings
if (shader.getColourScheme() != null)
{
- if (!shader.getColourScheme().hasGapColour()
- && Comparison.isGap(currentChar))
+ if (Comparison.isGap(currentChar)
+ && (!shader.getColourScheme().hasGapColour()))
{
resBoxColour = GAP_COLOUR;
}