Skip to main content

Creating custom tables

Comments

5 comments

  • Richard Moir

    You should use the ExampleDocumentViewerPlugin from the dev kit as a starting point. From there you can return a JTable as the viewer component and use DocumentViewer.getIncomingMessageHandler and getOutgoingMessageHandler to synchronize selection with the other viewers.

    0
  • VL

    DU eto the DocumentViewerFactory I was forced to use createViewer(AnnotatedPluginDocument[] arg0). But I defined valid documents as SequenceAlignmetnDocuments. How can I convert AnnotatedPluginDocument to SequenceAlignmentDocuments again?

     

    0
  • Richard Moir
    SequenceAlignmentDocument alignment = (SequenceAlignmentDocument) annotatedDocuments[0].getDocumentOrCrash();
    0
  • VL

    As far as I notices it is not the tracks (with SNPs) I wanted to have. But I want all bases which are different from the consensus, i.e. the colored bases.

    Furthermore I do not understand where to put the message handlers.

    I've got:

    public DocumentViewer createViewer(AnnotatedPluginDocument[] annotatedDocuments) {

    MyTable myViewer = new MyTable(...);

    // myViewer.getIncomingMessageHandler does not contain any information. Because it is only called once

    }

    0
  • Richard Moir

    The highlighted bases are calculated by the alignment view and not accessible via the API unfortunately, your viewer will have to determine where the mismatches are independently.

    Please refer to the Javadoc for DocumentViewerMessageHandler. Your DocumentViewer must override the getIncomingMessageHandler method and return a message handler to receive events.

    0

Please sign in to leave a comment.