there is also a method: getFeaturesWithSelectedItems() does this help? and you may look for instance what the bufferplugin or the union plugin do. Because they present two different dialogs if features are selected. "Geometry Functions" has a checkbox for selected features.
stefan luca marletta schrieb: > Hi list, > > I've not yet much clear a way to implement the ALL_Layer_Feature or > just Selected > > I mean if I do > > Collection candidateFeatures = selection_only ? > > context.getLayerViewPanel().getSelectionManager().getSelectedItems(layer) > :layer.getFeatureCollectionWrapper().getFeatures(); > > for (Iterator it = candidateFeatures.iterator() ; it.hasNext() ;) { > Geometry g = (Geometry) it.next().getGeometry(); > > It only works with all features because in this case candidateFeatures > are Features and in the other case are already Geometry. > > Is there an elegant way to solve this condition and casting? > > I ask because I've already browsed a lot of code but I've not been > lucky, thanks a lot > > luca > > > and > > luca marletta > www.beopen.it > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > > ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel