Hi SS,

  No magic here.  SelectTool is itself an abstract class, so selection
is initialized in the classes that extend SelectTool like
SelectFeaturesTool, SelectLineStringsTool, SelectPartsTool, and
SelectOneItemTool.

regards,
Larry

On 8/31/07, Sunburned Surveyor <[EMAIL PROTECTED]> wrote:
> I've been trying to find a quick way to create Polygons from selected
> LineStrings in one of my OpenJUMP GIS projects. I've been using the
> suggestion to set up a temporary Layer were I paste a copy of the
> LineStrings I've selected, then I use the polygonize tool to actually
> create the Polygons.
>
> I thought I would take a "quick" look at OpenJUMP's selection code to
> see if I could determine how to implement a CursorTool similar to the
> select tool that allows a little more control over selection. This
> includes the ability to have "sticky" selections, the ability to
> remove selected items from a sticky selection, and the ability to
> automatically copy selected items to a new or designated layer with a
> single click.
>
> I think I've got a good handle on how the selection code works, excpet
> for one problem that I can't figure out in the SelectTool class. The
> class defines and uses an instance of the AbstractSelection class
> named "selection". It is declared as a protexted variable in the
> class, but I can't for the life of me figure out where the variable is
> initialized. It isn't in the constructor of the SelectTool class, it
> isn't in the variable declaration, and I couldn't find an
> initialization reading through the file, searching for instances of
> the "new" keyword in the file, or using the "references" tool in
> Eclipse.
>
> Is there some black magic going on in the code that I don't know
> about. If the "selection" variable isn't initialized how come the
> calls to its methods in the class don't throw a null pointer
> exception? I know I am missing something, but I'm not sure what I am
> missing.
>
> I appreciate any help.
>
> The .java file for the SelectTool class is attached.
>
> The Sunburned Surveyor
>
> -------------------------------------------------------------------------
> 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/
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>
>


-- 
http://amusingprogrammer.blogspot.com/

-------------------------------------------------------------------------
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/
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to