>The behavior is simple and sufficient for most of cases for users: selection
>tool just sets filter for the layer and somehow highlights selected
>Problem: for the developers using UDIG as a framework with custom extended
>functionality more customizable behavior of selection tool is needed.
>Writing own custom selection tool solves the problem but only half of them.
>Try to explain.
>The semantic of selection in GIS is the same as in other applications,
>Photoshop, for example. If something is selected and I select another entity
>- the old selection disappears (if it is not special case of modifying
>current selection). There can be different selection tools with different
>functionality, but it is necessary to easy integrate them into the platform
>and behavior of all selection tools should be heterogeneous.
>The example: in my project I developed multi-selection tool for defining
>let's call "Area of Interest". The tool just selects polygonal geometries
>making geometric predicates (union, cutting, etc) if needed forming "Area of
>Interest".. (AOI is used with arbitrary purposes later).
>I expect that if filter is defined by default selection tool and there is
>that yellow graphic rendered on the map - it should be cleared and graphic
>of AOI selection tool is rendererd - "substitution" behavior.
>The same "substitution" policy can be used in other places for the
>flexibility and extendibility of the platform. Now selection tool is
>strongly integrated and there is no possibility to add custom functionality
>with "selection" behavior without changing "net.refractions.*" code that is
>bad approach from my point of view.
It seems to me that you want to be able to customize how a selection is handled. Not be tied to the default behaviour, which is rendering the selection in yellow lines. Is that correct? You also mention a substitution policy. I don't really follow that.
For the first point, making selection behaviour more customizable: We could make that an extension point where extenders can provide more options and a preference page that allows an option to be chosen (programmatic access would be provided as well). Would that be an acceptable solution?