Post

2 followers Follow
0
Avatar

How to update the display after adding tracks?

Hello,

I have UX problem here. I am adding annotation to a track in my plugin:

 

SequenceTrack.Manager trackManager = SequenceTrack.getTrackManager(sequenceDocument,false);
SequenceTrack offTargetTrack = new SequenceTrack(trackManager.getUniqueTrackName("off target"));
List<SequenceAnnotation> offTargetTrackSequenceAnnotations = new LinkedList<SequenceAnnotation>();

//adding stuff into offTargetTrackSequenceAnnotations

offTargetTrack.setAnnotations(offTargetTrackSequenceAnnotations);
trackManager.addTrack(offTargetTrack);

When the plugin is finished, the sequence view is not updated. How do I do this? Which listener do I have to notify?

Thanks,
Stephan

Stephan Janosch

Please sign in to leave a comment.

2 comments

0
Avatar

Hi Stephan,

Have you saved changes to the document?

What kind of plugin are you writing? If your code is in a DocumentOperation then changes made to the input documents aren't saved by default.  Typically the operation is expected to create new documents for the results.

If the only thing you want to do with your plugin is add annotations then you might want to create an AnnotationGenerator instead.

Cheers,

Matthew

Matthew Cheung 0 votes
Comment actions Permalink
0
Avatar

I will try saving the document.

And I need a track, because only tracks can be coloured by some annotation values. At least I figured out colouring by value works only for tracks.

 

Thanks Matthew!

Stephan Janosch 0 votes
Comment actions Permalink