public abstract static class SequenceViewerExtension.StatisticsFactory extends SequenceViewerExtension.Factory
GeneiousPlugin.getSequenceViewerExtensionFactories()
Constructor and Description |
---|
SequenceViewerExtension.StatisticsFactory() |
Modifier and Type | Method and Description |
---|---|
SequenceViewerExtension |
createSequenceViewerExtension(DocumentViewer sequenceViewer,
AnnotatedPluginDocument[] documents,
SequenceViewerExtension.PropertyRetrieverAndEditor propertyRetriever)
Creates an instance of a sequence viewer extension.
|
abstract List<SequenceViewerExtension.StatisticsSection> |
createStatistics(SequenceViewerExtension.PropertyRetrieverAndEditor propertyRetriever,
ProgressListener progressListener)
Generates one or more sections of statistics to be displayed in the statistics controls section.
|
String |
getUniqueId() |
public SequenceViewerExtension.StatisticsFactory()
public SequenceViewerExtension createSequenceViewerExtension(DocumentViewer sequenceViewer, AnnotatedPluginDocument[] documents, SequenceViewerExtension.PropertyRetrieverAndEditor propertyRetriever)
SequenceViewerExtension.Factory
createSequenceViewerExtension
in class SequenceViewerExtension.Factory
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 with SequenceListDocuments
containing mixtures of amino acid and nucleotide sequences and on
CombinedAlignmentAndSequenceDocuments
. An implementation should
instead use propertyRetriever.getAlphabet()
,
propertyRetriever.getNumberOfSequences()
,
and propertyRetriever.isAlignmentOrContig()
to decide if it should appear on this particular SequenceViewer.propertyRetriever
- for retrieving data describing the current state of the sequence viewer.public abstract List<SequenceViewerExtension.StatisticsSection> createStatistics(SequenceViewerExtension.PropertyRetrieverAndEditor propertyRetriever, ProgressListener progressListener)
propertyRetriever
- for obtaining properties about the current state of the sequence viewer. The implementation should take the selection (available via getSelectionForStatistics
) 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.public String getUniqueId()