Given the choice I would rather we set up a builder, clone has so many problems.
Here is a rant; not indicative of what will happen ... just a rant. 1. I would like to define a MapBuilder that has a series of methods that build up a map data structure in memory 2. I would like to make a WMSContext reader that calls the above builder 3. I would like to make a OWSContext reader that calls the above builder 4. To accommodate an open ended set of layer types (FeatureLayer, CoverageLayer, ScaleBarLayer, WMSLayer, WorldWindLayer, WMSTileLayer) i would like to define a LayerFactory With this in mind ...MapBuilder can have a duplicate method that can effectively copy the various layers provided in the original. We would just need to add a method to LayerFactory allowing the duplicate method to test which factory created what content. Note this suggestion is not completely above the board, there is scalebar and legend code in uDig that I would like to kick out of that codebase. It could just as easily call a ScaleBarLayer to get the job done. Jody > hello > > > i am having a few problems to make things correct. > I added cut/copy/paste/duplicate actions on my widget but they are not really > exact copys. every MapLayer duplicate become a DefaultMapLayer. So if someone > use different implementation of MapLayer there will be some lost values when > we > duplicate. > > screenshot : > http://img442.imageshack.us/img442/3098/tempaa5.jpg > > > I think it would be necessary to add a method clone() on the MapLayer and > MapContext interface, add related Classes like Filter, Query ...( implements > Cloneable ) > > But doing so will change many things... are perhaps not... i dont know > > could this be possible? > > > For now i'm using a kind of factory to "clone", but it only copy the visible > attributs that provide the interface ... far to be real clone. > > > what you think about it? > > > johann sorel > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Geotools-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-devel > ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
