* operation that affects the data in the current view (selection changed,
* etc) to update the menus to reflect the new state.
*/
+ @Override
public void setMenusForViewport()
{
setMenusFromViewport(viewport);
alignPanel.makeEPS(f);
}
+ @Override
public void createSVG(File f)
{
alignPanel.makeSVG(f);
}
}
+ @Override
public void addHistoryItem(CommandI command)
{
if (command.getSize() > 0)
* @param cs
* DOCUMENT ME!
*/
+ @Override
public void changeColour(ColourSchemeI cs)
{
// TODO: pull up to controller method
@Override
public void run()
{
+ boolean isNuclueotide = alignPanel.alignFrame
+ .getViewport().getAlignment()
+ .isNucleotide();
new jalview.ws.DBRefFetcher(alignPanel.av
- .getSequenceSelection(), alignPanel.alignFrame)
+ .getSequenceSelection(),
+ alignPanel.alignFrame, null,
+ alignPanel.alignFrame.featureSettings,
+ isNuclueotide)
.fetchDBRefs(false);
}
}).start();
@Override
public void run()
{
+ boolean isNuclueotide = alignPanel.alignFrame
+ .getViewport().getAlignment()
+ .isNucleotide();
new jalview.ws.DBRefFetcher(alignPanel.av
.getSequenceSelection(),
- alignPanel.alignFrame, dassource)
+ alignPanel.alignFrame, dassource,
+ alignPanel.alignFrame.featureSettings,
+ isNuclueotide)
.fetchDBRefs(false);
}
}).start();
@Override
public void run()
{
+ boolean isNuclueotide = alignPanel.alignFrame
+ .getViewport().getAlignment()
+ .isNucleotide();
new jalview.ws.DBRefFetcher(alignPanel.av
.getSequenceSelection(),
- alignPanel.alignFrame, dassource)
+ alignPanel.alignFrame, dassource,
+ alignPanel.alignFrame.featureSettings,
+ isNuclueotide)
.fetchDBRefs(false);
}
}).start();
@Override
public void run()
{
+ boolean isNuclueotide = alignPanel.alignFrame
+ .getViewport().getAlignment()
+ .isNucleotide();
new jalview.ws.DBRefFetcher(alignPanel.av
.getSequenceSelection(),
- alignPanel.alignFrame, dassrc)
+ alignPanel.alignFrame, dassrc,
+ alignPanel.alignFrame.featureSettings,
+ isNuclueotide)
.fetchDBRefs(false);
}
}).start();
viewport.firePropertyChange("alignment", null, al);
}
+ @Override
public void setShowSeqFeatures(boolean b)
{
showSeqFeatures.setSelected(b);
import jalview.datamodel.Mapping;
import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceI;
-import jalview.gui.AlignFrame;
import jalview.gui.CutAndPasteTransfer;
import jalview.gui.Desktop;
+import jalview.gui.FeatureSettings;
import jalview.gui.IProgressIndicator;
import jalview.gui.OOMWarning;
import jalview.util.MessageManager;
}
/**
- * Creates a new SequenceFeatureFetcher object and fetches from the currently
- * selected set of databases.
+ * Creates a new DBRefFetcher object and fetches from the currently selected
+ * set of databases, if this is null then it fetches based on feature settings
*
* @param seqs
- * fetch references for these sequences
- * @param af
- * the parent alignframe for progress bar monitoring.
- */
- public DBRefFetcher(SequenceI[] seqs, AlignFrame af)
- {
- this(seqs, af, null);
- }
-
- /**
- * Creates a new SequenceFeatureFetcher object and fetches from the currently
- * selected set of databases.
- *
- * @param seqs
- * fetch references for these sequences
- * @param af
- * the parent alignframe for progress bar monitoring.
+ * fetch references for these SequenceI array
+ * @param progressIndicatorFrame
+ * the frame for progress bar monitoring
* @param sources
- * array of database source strings to query references from
+ * array of DbSourceProxy to query references form
+ * @param featureSettings
+ * FeatureSettings to get alternative DbSourceProxy from
+ * @param isNucleotide
+ * indicates if the array of SequenceI are Nucleotides or not
*/
- public DBRefFetcher(SequenceI[] seqs, AlignFrame af,
- DbSourceProxy[] sources)
+ public DBRefFetcher(SequenceI[] seqs,
+ IProgressIndicator progressIndicatorFrame,
+ DbSourceProxy[] sources, FeatureSettings featureSettings, boolean isNucleotide)
{
- this.af = af;
+ this.af = progressIndicatorFrame;
alseqs = new SequenceI[seqs.length];
SequenceI[] ds = new SequenceI[seqs.length];
for (int i = 0; i < seqs.length; i++)
}
this.dataset = ds;
// TODO Jalview 2.5 lots of this code should be in the gui package!
- sfetcher = jalview.gui.SequenceFetcher.getSequenceFetcherSingleton(af);
+ sfetcher = jalview.gui.SequenceFetcher
+ .getSequenceFetcherSingleton(progressIndicatorFrame);
// set default behaviour for transferring excess sequence data to the
// dataset
trimDsSeqs = Cache.getDefault("TRIM_FETCHED_DATASET_SEQS", true);
String[] defdb = null, otherdb = sfetcher
.getDbInstances(jalview.ws.dbsources.das.datamodel.DasSequenceSource.class);
List<DbSourceProxy> selsources = new ArrayList<DbSourceProxy>();
- Vector dasselsrc = (af.featureSettings != null) ? af.featureSettings
+ Vector dasselsrc = (featureSettings != null) ? featureSettings
.getSelectedSources() : new jalview.gui.DasSourceBrowser()
.getSelectedSources();
Enumeration<jalviewSourceI> en = dasselsrc.elements();
}
}
// select appropriate databases based on alignFrame context.
- if (af.getViewport().getAlignment().isNucleotide())
+ if (isNucleotide)
{
defdb = DBRefSource.DNACODINGDBS;
}
/**
* DOCUMENT ME!
*/
+ @Override
public void run()
{
if (dbSources == null)