There is a way to add a feature to the selected set - something like layerViewPanel.getFeatureSelection().addFeature(feature).
That said, I like Sunburned's idea of adding a convenience method to SelectionManager (addFeaturesToSelection) to do this call. Jon > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Sunburned Surveyor > Sent: Monday, December 25, 2006 8:11 AM > To: List for discussion of JPP development and use. > Subject: Re: [JPP-Devel] To Set select features > > > Ben, > > I don't know very much about working with selections in > OpenJUMP, but I'm going to try to answer your question > briefly. I'm hoping some of the other developers will be able > to confirm or contradict what I'm about to tell you. :] > > I quickly looked at the Javadoc for the SelectionManager > class. It doesn't look like it exposes a method to allow > features to be added programmatically to the currently > "selected features" managed by the SelectionManager. I'm > guessing that is because the SelectionManager was originally > designed to handle features that were selected by user > interaction on the LayerViewPanel. (For example, by dragging > a selection window.) > > To do what you want we would need to modify the > SelectionManager to accept selected features in other ways. > (We could add a "addFeaturesToSelection()" method.) However, > I'm not familiar enough with this part of the source code to > know what unintended consequences it might have. > > There are a couple of other ways to achieve what you are > trying to do. Why not create a new Layer with the adjacent > features and then make this layer visible on the screen? > > I can help you with that code if you want. > > The Sunburned Surveyor > > On 12/25/06, ben abid haifa <[EMAIL PROTECTED]> wrote: > > Hei every body, > > I ve retreived all the IDs of the features which are > adjacent to one > > specific feature. I want that the adjacent features are > distinguished > > by the selection or by a different color so How can I set a feature > > selected by the selectionManager?? > > > > > > > > ________________________________ > > Découvrez une nouvelle façon d'obtenir des réponses à toutes vos > > questions ! Profitez des connaissances, des opinions et des > > expériences des internautes sur Yahoo! Questions/Réponses. > > > > > > > ---------------------------------------------------------------------- > > --- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the > chance to share your > > opinions on IT & business topics through brief surveys - > and earn cash > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge &CID=DEVDEV > > _______________________________________________ > Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > > > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel