*/
private void applyViewProperties()
{
- antiAlias = Cache.getDefault("ANTI_ALIAS", false);
+ antiAlias = Cache.getDefault(Preferences.ANTI_ALIAS, false);
- viewStyle.setShowJVSuffix(Cache.getDefault("SHOW_JVSUFFIX", true));
+ viewStyle.setShowJVSuffix(
+ Cache.getDefault(Preferences.SHOW_JVSUFFIX, true));
setShowAnnotation(Cache.getDefault(Preferences.SHOW_ANNOTATIONS, true));
- setRightAlignIds(Cache.getDefault("RIGHT_ALIGN_IDS", false));
- setCentreColumnLabels(Cache.getDefault("CENTRE_COLUMN_LABELS", false));
- autoCalculateConsensus = Cache.getDefault("AUTO_CALC_CONSENSUS", true);
+ setRightAlignIds(Cache.getDefault(Preferences.RIGHT_ALIGN_IDS, false));
+ setCentreColumnLabels(Cache.getDefault(Preferences.CENTRE_COLUMN_LABELS, false));
+ autoCalculateConsensusAndConservation = Cache.getDefault(Preferences.AUTO_CALC_CONSENSUS, true);
- setPadGaps(Cache.getDefault("PAD_GAPS", true));
- setShowNPFeats(Cache.getDefault("SHOW_NPFEATS_TOOLTIP", true));
- setShowDBRefs(Cache.getDefault("SHOW_DBREFS_TOOLTIP", true));
- viewStyle.setSeqNameItalics(Cache.getDefault("ID_ITALICS", true));
+ setPadGaps(Cache.getDefault(Preferences.PAD_GAPS, true));
+ setShowNPFeats(Cache.getDefault(Preferences.SHOW_NPFEATS_TOOLTIP, true));
+ setShowDBRefs(Cache.getDefault(Preferences.SHOW_DBREFS_TOOLTIP, true));
+ viewStyle.setSeqNameItalics(Cache.getDefault(Preferences.ID_ITALICS, true));
viewStyle.setWrapAlignment(
Cache.getDefault(Preferences.WRAP_ALIGNMENT, false));
viewStyle.setShowUnconserved(
Cache.getDefault(Preferences.SHOW_UNCONSERVED, false));
sortByTree = Cache.getDefault(Preferences.SORT_BY_TREE, false);
- followSelection = Cache.getDefault("FOLLOW_SELECTIONS", true);
+ followSelection = Cache.getDefault(Preferences.FOLLOW_SELECTIONS, true);
sortAnnotationsBy = SequenceAnnotationOrder
.valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
SequenceAnnotationOrder.NONE.name()));
{
applyViewProperties();
- String fontName = Cache.getDefault("FONT_NAME", "SansSerif");
- String fontStyle = Cache.getDefault("FONT_STYLE", Font.PLAIN + "");
- String fontSize = Cache.getDefault("FONT_SIZE", "10");
+ String fontName = Cache.getDefault(Preferences.FONT_NAME, "SansSerif");
+ String fontStyle = Cache.getDefault(Preferences.FONT_STYLE,
+ Font.PLAIN + "");
+ String fontSize = Cache.getDefault(Preferences.FONT_SIZE, "10");
int style = 0;
setFont(new Font(fontName, style, Integer.parseInt(fontSize)), true);
alignment
- .setGapCharacter(Cache.getDefault("GAP_SYMBOL", "-").charAt(0));
+ .setGapCharacter(Cache.getDefault(Preferences.GAP_SYMBOL, "-")
+ .charAt(0));
// We must set conservation and consensus before setting colour,
// as Blosum and Clustal require this to be done
{
if (!alignment.isNucleotide())
{
- showConservation = Cache.getDefault(Preferences.SHOW_CONSERVATION, true);
+ showConservation = Cache.getDefault(Preferences.SHOW_CONSERVATION,
+ true);
showQuality = Cache.getDefault(Preferences.SHOW_QUALITY, true);
- showGroupConservation = Cache.getDefault("SHOW_GROUP_CONSERVATION",
- false);
+ showGroupConservation = Cache
+ .getDefault(Preferences.SHOW_GROUP_CONSERVATION, false);
}
- showConsensusHistogram = Cache.getDefault("SHOW_CONSENSUS_HISTOGRAM",
- true);
- showSequenceLogo = Cache.getDefault(Preferences.SHOW_CONSENSUS_LOGO, false);
-
- normaliseSequenceLogo = Cache.getDefault(
- Preferences.NORMALISE_CONSENSUS_LOGO,
+ showConsensusHistogram = Cache
+ .getDefault(Preferences.SHOW_CONSENSUS_HISTOGRAM, true);
+ showSequenceLogo = Cache.getDefault(Preferences.SHOW_CONSENSUS_LOGO,
false);
+
+ normaliseSequenceLogo = Cache
+ .getDefault(Preferences.NORMALISE_CONSENSUS_LOGO, false);
showGroupConsensus = Cache
.getDefault(Preferences.SHOW_GROUP_CONSENSUS, false);
- showConsensus = Cache.getDefault("SHOW_IDENTITY", true);
+ showConsensus = Cache.getDefault(Preferences.SHOW_IDENTITY, true);
showOccupancy = Cache.getDefault(Preferences.SHOW_OCCUPANCY, true);
}
schemeName = Cache.getDefault(Preferences.DEFAULT_COLOUR,
ResidueColourScheme.NONE);
}
- ColourSchemeI colourScheme = ColourSchemeProperty
- .getColourScheme(this, alignment, schemeName);
+ ColourSchemeI colourScheme = ColourSchemeProperty.getColourScheme(this,
+ alignment, schemeName);
residueShading = new ResidueShader(colourScheme);
if (colourScheme instanceof UserColourScheme)
*/
if (align != null)
{
- Desktop.getInstance().getStructureSelectionManager()
+ Desktop.getStructureSelectionManager()
.registerMappings(align.getCodonFrames());
}
List<AlignedCodonFrame> mappings = al.getCodonFrames();
if (mappings != null)
{
- StructureSelectionManager ssm = Desktop.getInstance()
+ StructureSelectionManager ssm = Desktop
.getStructureSelectionManager();
for (AlignedCodonFrame acf : mappings)
{
@Override
public void sendSelection()
{
- Desktop.getInstance().getStructureSelectionManager().sendSelection(
+ Desktop.getStructureSelectionManager().sendSelection(
new SequenceGroup(getSelectionGroup()),
new ColumnSelection(getColumnSelection()),
new HiddenColumns(getAlignment().getHiddenColumns()), this);
@Override
public StructureSelectionManager getStructureSelectionManager()
{
- return Desktop.getInstance().getStructureSelectionManager();
+ return Desktop.getStructureSelectionManager();
}
@Override
MessageManager.getString("label.new_window"), };
final String question = JvSwingUtils.wrapTooltip(true,
MessageManager.getString("label.open_split_window?"));
-
/*
* options No, Split Window, New Window correspond to
* dialog responses 0, 1, 2 (even though JOptionPane shows them
* in reverse order)
*/
- JvOptionPane dialog = JvOptionPane.newOptionDialog(Desktop.getDesktopPane())
+ JvOptionPane dialog = JvOptionPane
+ .newOptionDialog(Desktop.getDesktopPane())
.setResponseHandler(NO_SPLIT, new Runnable()
{
@Override
public void run()
{
- addDataToAlignment(al);
+ addDataToAlignment(al);
}
}).setResponseHandler(SPLIT_FRAME, new Runnable()
{
public void run()
{
openLinkedAlignmentAs(getAlignPanel().alignFrame,
- new Alignment(getAlignment()), al,
- title, SPLIT_FRAME);
+ new Alignment(getAlignment()), al, title,
+ SPLIT_FRAME);
}
}).setResponseHandler(NEW_WINDOW, new Runnable()
{
* @param mode
* SPLIT_FRAME or NEW_WINDOW
*/
- public static void openLinkedAlignmentAs(AlignFrame thisFrame, AlignmentI thisAlignment,
- AlignmentI al, String title,
- int mode)
+ public static void openLinkedAlignmentAs(AlignFrame thisFrame,
+ AlignmentI thisAlignment, AlignmentI al, String title, int mode)
{
/*
* Identify protein and dna alignments. Make a copy of this one if opening
try
{
- newAlignFrame.setMaximum(
- jalview.bin.Cache.getDefault("SHOW_FULLSCREEN", false));
+ newAlignFrame.setMaximum(jalview.bin.Cache
+ .getDefault(Preferences.SHOW_FULLSCREEN, false));
} catch (java.beans.PropertyVetoException ex)
{
}
* @return the protein alignment in the split frame
*/
static protected AlignmentI openSplitFrame(AlignFrame thisFrame,
- AlignFrame newAlignFrame,
- AlignmentI complement)
+ AlignFrame newAlignFrame, AlignmentI complement)
{
/*
* Make a new frame with a copy of the alignment we are adding to. If this