[brailleblaster] JFace ProjectionViewer looking good

  • From: "Susan Jolly" <easjolly@xxxxxxxxxxxxx>
  • To: <brailleblaster@xxxxxxxxxxxxx>
  • Date: Mon, 13 Jun 2011 18:43:16 -0600

OK, it looks as though the Annotations may not be relevant but that the ProjectionViewer is useful.


I've written a short stand-alone Java code testing out the ProjectionViewer functionality.

The code creates a GUI using two ProjectionViewers which each provide their own StyledText widgets. I created one master document with three lines. I made two ProjectionDocuments (slaves) from this master. I then deleted one line from one of the ProjectionDocuments and a different line from the other one. I set one of these ProjectionDocuments as the input to one of the viewers and the other as input to the other viewer. Each view showed the expected two lines of the master document. The master document was properly updated no matter which view I edited. Moreover, when I edited the line that was common to both views, it instantly updated in the other view.

JFace took care of all this. I didn't end up needing much code but, as is typical, it took me quite a while to discover the right approach and to deal with quirks that aren't obvious from the documentation.

I probably won't do any more work on this tonight.

If I'm not fooling myself it should be possible to use a UTDML document directly as a master document if you figure out how to not display the markup.

Susan

Other related posts: