Class SequenceViewerExtension.StatisticsFactory
- java.lang.Object
-
- com.biomatters.geneious.publicapi.plugin.SequenceViewerExtension.Factory
-
- com.biomatters.geneious.publicapi.plugin.SequenceViewerExtension.StatisticsFactory
-
- Enclosing class:
- SequenceViewerExtension
public abstract static class SequenceViewerExtension.StatisticsFactory extends SequenceViewerExtension.Factory
A convenience Factory for creating statistics. A plugin can return a StatisticsFactory directly fromGeneiousPlugin.getSequenceViewerExtensionFactories()
- Since:
- API 4.700 (Geneious 7.0.0)
-
-
Constructor Summary
Constructors Constructor Description StatisticsFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description SequenceViewerExtension
createSequenceViewerExtension(DocumentViewer sequenceViewer, AnnotatedPluginDocument[] documents, SequenceViewerExtension.PropertyRetrieverAndEditor propertyRetriever)
Creates an instance of a sequence viewer extension.abstract java.util.List<SequenceViewerExtension.StatisticsSection>
createStatistics(SequenceViewerExtension.PropertyRetrieverAndEditor propertyRetriever, jebl.util.ProgressListener progressListener)
Generates one or more sections of statistics to be displayed in the statistics controls section.java.lang.String
getUniqueId()
-
-
-
Method Detail
-
createSequenceViewerExtension
public SequenceViewerExtension createSequenceViewerExtension(DocumentViewer sequenceViewer, AnnotatedPluginDocument[] documents, SequenceViewerExtension.PropertyRetrieverAndEditor propertyRetriever)
Description copied from class:SequenceViewerExtension.Factory
Creates an instance of a sequence viewer extension.- Specified by:
createSequenceViewerExtension
in classSequenceViewerExtension.Factory
- Parameters:
sequenceViewer
- the sequence viewer the extension will be embedded in. There should be no need to for an extension to refer to this directly but it might be useful.documents
- the documents the sequence viewer is referring to. Most of the time these should be ignored since the way the sequence viewer may interpret the data on the documents can vary. In particularly withSequenceListDocuments
containing mixtures of amino acid and nucleotide sequences and onCombinedAlignmentAndSequenceDocuments
. An implementation should instead usepropertyRetriever.getAlphabet()
,propertyRetriever.getNumberOfSequences()
, andpropertyRetriever.isAlignmentOrContig()
to decide if it should appear on this particular SequenceViewer.propertyRetriever
- for retrieving data describing the current state of the sequence viewer.- Returns:
- a new SequenceViewerExtension instance or null to not create one for this particular view.
-
createStatistics
public abstract java.util.List<SequenceViewerExtension.StatisticsSection> createStatistics(SequenceViewerExtension.PropertyRetrieverAndEditor propertyRetriever, jebl.util.ProgressListener progressListener)
Generates one or more sections of statistics to be displayed in the statistics controls section.- Parameters:
propertyRetriever
- for obtaining properties about the current state of the sequence viewer. The implementation should take the selection (available viagetSelectionForStatistics
) into accountprogressListener
- for reporting progress and checking if statistics should be cancelled. It is important that an implementation cancel promptly or it can hang the sequence viewer when the user tries to edit.- Returns:
- the statistics or an empty list to provide no statistics
-
getUniqueId
public java.lang.String getUniqueId()
- Returns:
- a unique ID for this extension type. The default implementation returns the fully qualified class name.
-
-