* along with Jalview. If not, see <http://www.gnu.org/licenses/>.
* The Jalview Authors are detailed in the 'AUTHORS' file.
*/
-/*
- * Jalview - A Sequence Alignment Editor and Viewer
- * Copyright (C) 2007 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- */
package jalview.gui;
import jalview.analysis.AlignmentUtils;
import jalview.datamodel.ColumnSelection;
import jalview.datamodel.PDBEntry;
import jalview.datamodel.SearchResults;
+import jalview.datamodel.SearchResultsI;
import jalview.datamodel.Sequence;
import jalview.datamodel.SequenceGroup;
import jalview.datamodel.SequenceI;
+import jalview.renderer.ResidueShader;
+import jalview.schemes.ColourSchemeI;
import jalview.schemes.ColourSchemeProperty;
import jalview.schemes.UserColourScheme;
import jalview.structure.CommandListener;
import java.util.Vector;
import javax.swing.JInternalFrame;
-import javax.swing.JOptionPane;
/**
* DOCUMENT ME!
}
if (propertyValue != null)
{
- globalColourScheme = ColourSchemeProperty.getColour(alignment,
- propertyValue);
+ ColourSchemeI colourScheme = ColourSchemeProperty.getColourScheme(
+ alignment, propertyValue);
+ globalColourScheme = new ResidueShader(colourScheme);
- if (globalColourScheme instanceof UserColourScheme)
+ if (colourScheme instanceof UserColourScheme)
{
- globalColourScheme = UserDefinedColours.loadDefaultColours();
- ((UserColourScheme) globalColourScheme).setThreshold(0,
- isIgnoreGapsConsensus());
+ globalColourScheme = new ResidueShader(
+ UserDefinedColours.loadDefaultColours());
+ globalColourScheme.setThreshold(0, isIgnoreGapsConsensus());
}
if (globalColourScheme != null)
super.setViewStyle(settingsForView);
setFont(new Font(viewStyle.getFontName(), viewStyle.getFontStyle(),
viewStyle.getFontSize()), false);
-
+ if (globalColourScheme != null)
+ {
+ globalColourScheme.setConservationApplied(settingsForView
+ .isConservationColourSelected());
+ }
}
/**
* @param align
* DOCUMENT ME!
*/
+ @Override
public void setAlignment(AlignmentI align)
{
replaceMappings(align);
- this.alignment = align;
+ super.setAlignment(align);
}
/**
/**
* DOCUMENT ME!
*
- * @return DOCUMENT ME!
- */
- @Override
- public ColumnSelection getColumnSelection()
- {
- return colSel;
- }
-
- /**
- * DOCUMENT ME!
- *
* @param tree
* DOCUMENT ME!
*/
List<SequenceI> choosenSeqs = new ArrayList<SequenceI>();
for (SequenceI sq : alignment.getSequences())
{
- Vector<PDBEntry> pdbRefEntries = sq.getDatasetSequence().getAllPDBEntries();
+ Vector<PDBEntry> pdbRefEntries = sq.getDatasetSequence()
+ .getAllPDBEntries();
if (pdbRefEntries == null)
{
continue;
}
}
}
- seqvectors.add(choosenSeqs.toArray(new SequenceI[choosenSeqs.size()]));
+ seqvectors
+ .add(choosenSeqs.toArray(new SequenceI[choosenSeqs.size()]));
}
return seqvectors.toArray(new SequenceI[seqvectors.size()][]);
}
MessageManager.getString("label.new_window"), };
final String question = JvSwingUtils.wrapTooltip(true,
MessageManager.getString("label.open_split_window?"));
- int response = JOptionPane.showOptionDialog(Desktop.desktop, question,
+ int response = JvOptionPane.showOptionDialog(Desktop.desktop, question,
MessageManager.getString("label.open_split_window"),
- JOptionPane.DEFAULT_OPTION, JOptionPane.PLAIN_MESSAGE, null,
+ JvOptionPane.DEFAULT_OPTION, JvOptionPane.PLAIN_MESSAGE, null,
options, options[0]);
if (response != 1 && response != 2)
* there is no complement, or it is not following highlights, or no mapping
* is found, the result will be empty.
*/
- SearchResults sr = new SearchResults();
+ SearchResultsI sr = new SearchResults();
int verticalOffset = findComplementScrollTarget(sr);
if (!sr.isEmpty())
{