From: gilleain t. <gil...@gm...> - 2009-01-26 18:23:32
|
yeees. sorry, I should have mentioned that. I am not fond of this legacy solution, as there is currently no way to highlight multiple substructures. Also, I don't see any particular distinction between the 'external' and 'internal' selections. Both are simply selections. However, yes the external highlight will still work. The only distinction, really will be what 'layer' the ...no, wait, the external highlight will not work in the IntermediateRenderer (if you are using that) unless you add: this.generators.add(new ExternalHighlightGenerator(rendererModel)); to the list of generators in the constructor. What I was saying about the layers is important - the elements are drawn in the same order that they are generated, so if you put the external highlight generator at the beginning of the list, you get highlights in the lowest layer and v.v. A more general idea might be to have 'lower layer selection' and 'upper layer selection' and for the selection objects to store their colors. gilleain On Mon, Jan 26, 2009 at 5:49 PM, Rajarshi Guha <rg...@in...> wrote: > Thanks for the pointer. It turns out I need > > setExternalHighlightColor > > and > > setExternalSelectedPart > > > On Jan 26, 2009, at 9:39 AM, gilleain torrance wrote: > >> Hi, >> >> The RendererModel has a getSelection() method that returns a class >> implementing ISelection. This interface specifies a method >> select(IAtomContainer) which you can use. Like: >> >> renderModel.getSelection().select(subStructure); >> >> there used to be a distinction between external highlights and >> internal (jcp?) highlights, but this - as with much - is still in >> flux. It seems (to me) that a list of selections could be maintained, >> and each selection would have an identifier. Oh, and another important >> method is: >> >> renderModel.setSelectionShape(ISelectionShape.Shape) >> >> which allows you to set the highlight shape as SQUARE (default) or >> OVAL. >> >> gilleain >> >> On Mon, Jan 26, 2009 at 2:07 PM, Rajarshi Guha <rg...@in...> >> wrote: >>> Hi, in the old version of the 2D depiction code it was possible to >>> set a substructure of a molecule to be highlightd by specifying an >>> IAtomContainer containing the atoms and bonds to highlight. >>> >>> Could anybody provide a pointer as to how I can achieve this with the >>> new renderer code? >>> >>> Thanks, >>> >>> ------------------------------------------------------------------- >>> Rajarshi Guha <rg...@in...> >>> GPG Fingerprint: D070 5427 CC5B 7938 929C DD13 66A1 922C 51E7 9E84 >>> ------------------------------------------------------------------- >>> All great discoveries are made by mistake. >>> -- Young >>> >>> >>> >>> --------------------------------------------------------------------- >>> --------- >>> This SF.net email is sponsored by: >>> SourcForge Community >>> SourceForge wants to tell your story. >>> http://p.sf.net/sfu/sf-spreadtheword >>> _______________________________________________ >>> Cdk-jchempaint mailing list >>> Cdk...@li... >>> https://lists.sourceforge.net/lists/listinfo/cdk-jchempaint >>> >> >> ---------------------------------------------------------------------- >> -------- >> This SF.net email is sponsored by: >> SourcForge Community >> SourceForge wants to tell your story. >> http://p.sf.net/sfu/sf-spreadtheword >> _______________________________________________ >> Cdk-jchempaint mailing list >> Cdk...@li... >> https://lists.sourceforge.net/lists/listinfo/cdk-jchempaint > > ------------------------------------------------------------------- > Rajarshi Guha <rg...@in...> > GPG Fingerprint: D070 5427 CC5B 7938 929C DD13 66A1 922C 51E7 9E84 > ------------------------------------------------------------------- > Writing software is more fun than working. > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword > _______________________________________________ > Cdk-jchempaint mailing list > Cdk...@li... > https://lists.sourceforge.net/lists/listinfo/cdk-jchempaint > |