.getStructureSelectionManager(applet);
}
- @Override
- public boolean isNormaliseSequenceLogo()
- {
- return normaliseSequenceLogo;
- }
-
- public void setNormaliseSequenceLogo(boolean state)
- {
- normaliseSequenceLogo = state;
- }
-
/**
*
* @return true if alignment characters should be displayed
// TODO implement for applet
}
- @Override
- public boolean isNormaliseHMMSequenceLogo()
- {
- return normaliseHMMSequenceLogo;
- }
-
}
import jalview.datamodel.AlignmentI;
import jalview.datamodel.ColumnSelection;
import jalview.datamodel.HiddenColumns;
-import jalview.datamodel.PDBEntry;
import jalview.datamodel.SearchResults;
import jalview.datamodel.SearchResultsI;
import jalview.datamodel.SequenceGroup;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Rectangle;
-import java.util.ArrayList;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
-import java.util.Vector;
import javax.swing.JInternalFrame;
.getStructureSelectionManager(Desktop.instance);
}
- @Override
- public boolean isNormaliseSequenceLogo()
- {
- return normaliseSequenceLogo;
- }
-
-
- public void setNormaliseSequenceLogo(boolean state)
- {
- normaliseSequenceLogo = state;
- }
-
- public void setNormaliseHMMSequenceLogo(boolean state)
- {
- normaliseHMMSequenceLogo = state;
- }
-
/**
*
* @return true if alignment characters should be displayed
fr.setTransparency(featureSettings.getTransparency());
}
- @Override
- public boolean isNormaliseHMMSequenceLogo()
- {
- return normaliseHMMSequenceLogo;
- }
-
}
import jalview.analysis.TreeBuilder;
import jalview.analysis.scoremodels.ScoreModels;
import jalview.analysis.scoremodels.SimilarityParams;
+import jalview.api.AlignViewportI;
import jalview.api.analysis.ScoreModelI;
import jalview.api.analysis.SimilarityParamsI;
import jalview.datamodel.SequenceGroup;
import jalview.util.MessageManager;
+import jalview.viewmodel.AlignmentViewport;
import java.awt.BorderLayout;
import java.awt.Color;
final ComboBoxTooltipRenderer renderer = new ComboBoxTooltipRenderer();
- List<String> tips = new ArrayList<String>();
+ List<String> tips = new ArrayList<>();
/*
* the most recently opened PCA results panel
*/
protected JComboBox<String> buildModelOptionsList()
{
- final JComboBox<String> scoreModelsCombo = new JComboBox<String>();
+ final JComboBox<String> scoreModelsCombo = new JComboBox<>();
scoreModelsCombo.setRenderer(renderer);
/*
{
Object curSel = comboBox.getSelectedItem();
toolTips.clear();
- DefaultComboBoxModel<String> model = new DefaultComboBoxModel<String>();
+ DefaultComboBoxModel<String> model = new DefaultComboBoxModel<>();
/*
* now we can actually add entries to the combobox,
* gui validation shouldn't allow insufficient sequences here, but leave
* this check in in case this method gets exposed programmatically in future
*/
- AlignViewport viewport = af.getViewport();
+ AlignViewportI viewport = af.getViewport();
SequenceGroup sg = viewport.getSelectionGroup();
if (sg != null && sg.getSize() < MIN_TREE_SELECTION)
{
*/
protected void openPcaPanel(String modelName, SimilarityParamsI params)
{
- AlignViewport viewport = af.getViewport();
+ AlignViewportI viewport = af.getViewport();
/*
* gui validation shouldn't allow insufficient sequences here, but leave
return;
}
- AlignmentViewport source = null, target = null;
+ AlignViewportI source = null;
+ AlignViewportI target = null;
if (frames[0] instanceof AlignFrame)
{
source = ((AlignFrame) frames[0]).getCurrentView();
*/
package jalview.gui;
+import jalview.api.AlignViewportI;
import jalview.bin.Cache;
import jalview.renderer.OverviewRenderer;
import jalview.util.MessageManager;
private OverviewCanvas oviewCanvas;
- private AlignViewport av;
+ private AlignViewportI av;
private AlignmentPanel ap;
package jalview.gui;
import jalview.analysis.AlignSeq;
+import jalview.api.AlignViewportI;
import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentView;
import jalview.datamodel.SequenceGroup;
import jalview.datamodel.SequenceI;
import jalview.jbgui.GPairwiseAlignPanel;
import jalview.util.MessageManager;
-import jalview.viewmodel.AlignmentViewport;
import java.awt.event.ActionEvent;
import java.util.Vector;
private static final String DASHES = "---------------------\n";
- AlignmentViewport av;
+ AlignViewportI av;
Vector<SequenceI> sequences;
* Creates a new PairwiseAlignPanel object.
*
* @param viewport
- * DOCUMENT ME!
*/
- public PairwiseAlignPanel(AlignmentViewport viewport)
+ public PairwiseAlignPanel(AlignViewportI viewport)
{
super();
this.av = viewport;
- sequences = new Vector<SequenceI>();
+ sequences = new Vector<>();
SequenceGroup selectionGroup = viewport.getSelectionGroup();
boolean isSelection = selectionGroup != null
*/
package jalview.gui;
+import jalview.api.AlignViewportI;
import jalview.api.SplitContainerI;
import jalview.datamodel.AlignmentI;
import jalview.jbgui.GAlignFrame;
topFrame.alignPanel.adjustAnnotationHeight();
bottomFrame.alignPanel.adjustAnnotationHeight();
- final AlignViewport topViewport = topFrame.viewport;
- final AlignViewport bottomViewport = bottomFrame.viewport;
+ final AlignViewportI topViewport = topFrame.viewport;
+ final AlignViewportI bottomViewport = bottomFrame.viewport;
final AlignmentI topAlignment = topViewport.getAlignment();
final AlignmentI bottomAlignment = bottomViewport.getAlignment();
boolean topAnnotations = topViewport.isShowAnnotation();
import jalview.datamodel.SequenceGroup;
import jalview.datamodel.SequenceI;
import jalview.gui.AlignFrame;
-import jalview.gui.AlignViewport;
import jalview.gui.JvOptionPane;
import jalview.io.DataSourceType;
import jalview.io.FileParse;
import jalview.io.HMMFile;
import jalview.util.MessageManager;
+import jalview.viewmodel.AlignmentViewport;
import jalview.ws.params.ArgumentI;
import java.io.File;
af.setProgressBar(MessageManager.getString("status.running_hmmbuild"),
msgID);
- AlignViewport viewport = af.getViewport();
+ AlignViewportI viewport = af.getViewport();
try
{
/*
{
return currentTree;
}
+
+ @Override
+ public boolean isNormaliseSequenceLogo()
+ {
+ return normaliseSequenceLogo;
+ }
+
+ public void setNormaliseSequenceLogo(boolean state)
+ {
+ normaliseSequenceLogo = state;
+ }
+
+ @Override
+ public boolean isNormaliseHMMSequenceLogo()
+ {
+ return normaliseHMMSequenceLogo;
+ }
+
+ public void setNormaliseHMMSequenceLogo(boolean state)
+ {
+ normaliseHMMSequenceLogo = state;
+ }
}
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
+import jalview.api.AlignViewportI;
import jalview.api.analysis.ScoreModelI;
import jalview.api.analysis.SimilarityParamsI;
import jalview.datamodel.Alignment;
import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceI;
import jalview.gui.AlignFrame;
-import jalview.gui.AlignViewport;
import jalview.gui.JvOptionPane;
import jalview.io.DataSourceType;
import jalview.io.FileLoader;
public void testFindDistances_withParams()
{
AlignFrame af = setupAlignmentView();
- AlignViewport viewport = af.getViewport();
+ AlignViewportI viewport = af.getViewport();
AlignmentView view = viewport.getAlignmentView(false);
ScoreModelI sm = new FeatureDistanceModel();
import static org.testng.Assert.assertEquals;
import jalview.gui.AlignFrame;
-import jalview.gui.AlignViewport;
import jalview.gui.JvOptionPane;
import jalview.io.DataSourceType;
import jalview.io.FileLoader;
+import jalview.viewmodel.AlignmentViewport;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
{
AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(
">s1\n0123456789\n", DataSourceType.PASTE);
- AlignViewport av = af.getViewport();
+ AlignmentViewport av = af.getViewport();
AlignmentView view = av.getAlignmentView(true);
/*
import jalview.gui.AlignViewport;
import jalview.gui.JvOptionPane;
+import jalview.viewmodel.AlignmentViewport;
import java.util.List;
* represent seqs 2-4 with seq3
* this hides seq2 and seq4 but not seq3
*/
- AlignViewport av = new AlignViewport(al);
+ AlignmentViewport av = new AlignViewport(al);
SequenceGroup sg = new SequenceGroup();
sg.addSequence(seqs[1], false);
sg.addSequence(seqs[2], false);
import static org.testng.Assert.assertSame;
import static org.testng.Assert.assertTrue;
+import jalview.api.AlignViewportI;
import jalview.api.FeatureColourI;
import jalview.bin.Cache;
import jalview.bin.Jalview;
import jalview.schemes.StrandColourScheme;
import jalview.schemes.TurnColourScheme;
import jalview.util.MessageManager;
+import jalview.viewmodel.AlignmentViewport;
import java.awt.Color;
import java.util.Iterator;
@Test(groups = "Functional")
public void testChangeColour_background_groupsAndThresholds()
{
- AlignViewport av = af.getViewport();
+ AlignViewportI av = af.getViewport();
AlignmentI al = av.getAlignment();
/*
@Test(groups = "Functional")
public void testColourThresholdActions()
{
- AlignViewport av = af.getViewport();
+ AlignViewportI av = af.getViewport();
AlignmentI al = av.getAlignment();
/*
@Test(groups = "Functional")
public void testNewView_colourThresholds()
{
- AlignViewport av = af.getViewport();
+ AlignViewportI av = af.getViewport();
AlignmentI al = av.getAlignment();
/*
*/
af.newView_actionPerformed(null);
assertEquals(af.alignPanel.getViewName(), "View 1");
- AlignViewport av2 = af.getViewport();
+ AlignmentViewport av2 = af.getViewport();
assertNotSame(av, av2);
assertSame(av2, af.alignPanel.av);
rs = av2.getResidueShading();
import static org.testng.AssertJUnit.assertSame;
import static org.testng.AssertJUnit.assertTrue;
+import jalview.api.AlignViewportI;
import jalview.bin.Cache;
import jalview.bin.Jalview;
import jalview.datamodel.AlignedCodonFrame;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.Annotation;
-import jalview.datamodel.PDBEntry;
-import jalview.datamodel.PDBEntry.Type;
import jalview.datamodel.SearchResults;
import jalview.datamodel.SearchResultsI;
import jalview.datamodel.Sequence;
import jalview.schemes.PIDColourScheme;
import jalview.structure.StructureSelectionManager;
import jalview.util.MapList;
+import jalview.viewmodel.AlignmentViewport;
import jalview.viewmodel.ViewportRanges;
import java.util.ArrayList;
AlignmentI al;
- AlignViewport testee;
+ AlignmentViewport testee;
@BeforeClass(alwaysRun = true)
public static void setUpBeforeClass() throws Exception
{
AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(
"examples/uniref50.fa", DataSourceType.FILE);
- AlignViewport av = af.getViewport();
+ AlignViewportI av = af.getViewport();
SequenceGroup sg1 = new SequenceGroup();
SequenceGroup sg2 = new SequenceGroup();
SequenceGroup sg3 = new SequenceGroup();
jalview.bin.Cache.setProperty("SHOW_OCCUPANCY", Boolean.FALSE.toString());
AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(
"examples/uniref50.fa", DataSourceType.FILE);
- AlignViewport av = af.getViewport();
+ AlignViewportI av = af.getViewport();
Assert.assertNull(av.getOccupancyAnnotation(), "Preference did not disable occupancy row.");
int c = 0;
for (AlignmentAnnotation aa : av.getAlignment().findAnnotations(null,
String fasta = ">s1\nA-C\n>s2\nA-C\n>s3\nA-D\n>s4\n--D\n";
AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(fasta,
DataSourceType.PASTE);
- AlignViewport testme = af.getViewport();
+ AlignmentViewport testme = af.getViewport();
SequenceI cons = testme.getConsensusSeq();
assertEquals("A-C", cons.getSequenceAsString());
}
import static org.testng.Assert.assertEquals;
+import jalview.api.AlignViewportI;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.SequenceGroup;
import jalview.io.DataSourceType;
import jalview.io.FileLoader;
+import jalview.viewmodel.AlignmentViewport;
import javax.swing.JTextArea;
-import junit.extensions.PA;
-
import org.testng.annotations.Test;
+import junit.extensions.PA;
+
public class PairwiseAlignmentPanelTest
{
@Test(groups = "Functional")
{
AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(
"examples/uniref50.fa", DataSourceType.FILE);
- AlignViewport viewport = af.getViewport();
+ AlignViewportI viewport = af.getViewport();
AlignmentI al = viewport.getAlignment();
/*
String seqs = ">Q93XJ9_SOLTU/23-29\nL-KAISNV\n>FER1_PEA/26-32\nV-TTTKAF\n";
AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(seqs,
DataSourceType.PASTE);
- AlignViewport viewport = af.getViewport();
+ AlignViewportI viewport = af.getViewport();
PairwiseAlignPanel testee = new PairwiseAlignPanel(viewport);
import static org.testng.Assert.assertEquals;
+import jalview.api.AlignViewportI;
import jalview.bin.Jalview;
import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentI;
public class SequenceRendererTest
{
AlignmentI al;
- AlignViewport av;
+ AlignViewportI av;
SequenceI seq1;
import jalview.datamodel.features.FeatureMatcherSet;
import jalview.datamodel.features.FeatureMatcherSetI;
import jalview.gui.AlignFrame;
-import jalview.gui.AlignViewport;
import jalview.gui.AlignmentPanel;
import jalview.gui.Desktop;
import jalview.gui.FeatureRenderer;
AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(
"examples/uniref50.fa", DataSourceType.FILE);
- AlignViewport av = af.getViewport();
+ AlignViewportI av = af.getViewport();
AlignmentI al = av.getAlignment();
/*
import static org.testng.AssertJUnit.assertEquals;
+import jalview.api.AlignViewportI;
import jalview.bin.Cache;
import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentI;
import jalview.schemes.ColourSchemeI;
import jalview.schemes.UserColourScheme;
import jalview.schemes.ZappoColourScheme;
+import jalview.viewmodel.AlignmentViewport;
import java.awt.Color;
import java.util.ArrayList;
{
SequenceI seq = new Sequence("name", "MA--TVLGSPRAPAFF");
AlignmentI al = new Alignment(new SequenceI[] { seq });
- final AlignViewport av = new AlignViewport(al);
+ final AlignViewportI av = new AlignViewport(al);
ResidueColourFinder rcf = new OverviewResColourFinder();
// gaps are grey, residues white
SequenceI seq = new Sequence("name", "MAT--GSPRAPAFF"); // FER1_MAIZE... + a
// gap
AlignmentI al = new Alignment(new SequenceI[] { seq });
- final AlignViewport av = new AlignViewport(al);
+ final AlignViewportI av = new AlignViewport(al);
ResidueColourFinder rcf = new OverviewResColourFinder();
av.setGlobalColourScheme(new ZappoColourScheme());
SequenceI seq = new Sequence("name", "MAT--GSPRAPAFF"); // FER1_MAIZE... + a
// gap
AlignmentI al = new Alignment(new SequenceI[] { seq });
- final AlignViewport av = new AlignViewport(al);
+ final AlignViewportI av = new AlignViewport(al);
ResidueColourFinder rcf = new OverviewResColourFinder();
Color[] newColours = new Color[24];
SequenceGroup[] groups = new SequenceGroup[1];
groups[0] = sg;
- final AlignViewport av = new AlignViewport(al);
+ final AlignViewportI av = new AlignViewport(al);
ResidueColourFinder rcf = new OverviewResColourFinder();
// G in group specified as magenta in Zappo
{
SequenceI seq = new Sequence("name", "MAT--GSPRAPAFF"); // FER1_MAIZE... + a
// gap
- AlignmentI al = new Alignment(new SequenceI[] { seq });
- final AlignViewport av = new AlignViewport(al);
// non-legacy colouring
ResidueColourFinder rcf = new OverviewResColourFinder();
// gaps gap colour
c = rcf.getBoxColour(shader, seq, 3);
- assertEquals(
- jalview.renderer.OverviewResColourFinder.OVERVIEW_DEFAULT_GAP,
- c);
+ assertEquals(OverviewResColourFinder.OVERVIEW_DEFAULT_GAP, c);
// non legacy colouring with colour scheme
rcf = new OverviewResColourFinder(false, Color.blue, Color.red);
import static org.testng.AssertJUnit.assertEquals;
+import jalview.api.AlignViewportI;
import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.Sequence;
import jalview.gui.JvOptionPane;
import jalview.schemes.UserColourScheme;
import jalview.schemes.ZappoColourScheme;
+import jalview.viewmodel.AlignmentViewport;
import java.awt.Color;
{
SequenceI seq = new Sequence("name", "MATVLGSPRAPAFF"); // FER1_MAIZE...
AlignmentI al = new Alignment(new SequenceI[] { seq });
- final AlignViewport av = new AlignViewport(al);
+ final AlignViewportI av = new AlignViewport(al);
ResidueColourFinder rcf = new ResidueColourFinder();
av.setGlobalColourScheme(new ZappoColourScheme());
{
SequenceI seq = new Sequence("name", "MA--TVLGSPRAPAFF");
AlignmentI al = new Alignment(new SequenceI[] { seq });
- final AlignViewport av = new AlignViewport(al);
+ final AlignViewportI av = new AlignViewport(al);
ResidueColourFinder rcf = new ResidueColourFinder();
assertEquals(Color.white,
SequenceI seq = new Sequence("name", "MAT--GSPRAPAFF"); // FER1_MAIZE... + a
// gap
AlignmentI al = new Alignment(new SequenceI[] { seq });
- final AlignViewport av = new AlignViewport(al);
+ final AlignViewportI av = new AlignViewport(al);
ResidueColourFinder rcf = new ResidueColourFinder();
Color[] newColours = new Color[24];
import static org.testng.Assert.assertTrue;
import jalview.gui.AlignFrame;
-import jalview.gui.AlignViewport;
import jalview.io.DataSourceType;
import jalview.io.FileLoader;
import jalview.renderer.ScaleRenderer.ScaleMark;
+import jalview.viewmodel.AlignmentViewport;
import java.util.List;
String data = ">Seq/20-45\nABCDEFGHIJKLMNOPQRSTUVWXYS\n";
AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(data,
DataSourceType.PASTE);
- AlignViewport av = af.getViewport();
+ AlignmentViewport av = af.getViewport();
/*
* scale has minor ticks at 5, 15, 25, major at 10 and 20
import static org.testng.Assert.assertNull;
import static org.testng.Assert.assertTrue;
+import jalview.api.AlignViewportI;
import jalview.api.FeatureColourI;
import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceI;
import jalview.gui.AlignFrame;
-import jalview.gui.AlignViewport;
import jalview.gui.FeatureRenderer;
import jalview.io.DataSourceType;
import jalview.io.FileLoader;
*/
public class FeatureColourFinderTest
{
- private AlignViewport av;
+ private AlignViewportI av;
private SequenceI seq;
import jalview.datamodel.SequenceI;
import jalview.gui.AlignFrame;
-import jalview.gui.AlignViewport;
import jalview.io.DataSourceType;
import jalview.io.FileLoader;
+import jalview.viewmodel.AlignmentViewport;
import java.awt.Color;
*/
AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(seqs,
DataSourceType.PASTE);
- AlignViewport viewport = af.getViewport();
+ AlignmentViewport viewport = af.getViewport();
viewport.setIgnoreGapsConsensus(false, af.alignPanel);
while (viewport.getConsensusSeq() == null)
{