irstv/orbisgis — pull request #288 by agueganno (2013-03-13 09:43:52+00:00)
Title: Implementation of a unique value analysis for lines based on SE

This pull request expects to be the logical consequence of #254. It can be divided in two main parts. Firstly, we have changes in the legend API :

- RecodedLegend has been thought as a Map implementation. It is not complete but it seems to be working. It is not extremely efficient either... Basically, it's a map hiding four other maps...
- I've tried to factorize my codes so that it will be usable for other unique value analysis
- I've tried to do the same so that it will be usable for interval classifications too. The basic idea will probably be the same. However the API may be different in the end as we have different constraints on Recode and Categorize

An important concept is used here, introduced by the class LineParameters. I consider that a given value in a value classification can be associated to a configuration that could be used to define a unique symbol. I consequently communicate much using these parameters. As a result, it is now possible to build some unique symbols from these parameters. This eases the building of some UI too.

On the UI side :

- Added an analysis in the simple legend editor
- Built the UI to edit unique value classifications

This UI is as close as possible to the outline made by Gwendall. It provides way to edit the current analysis and to generate a new one from the fallback value. It lets the user cancel the generation of the new analysis too. This last point is really import as RecodedLine is not an efficient map : it's not made to handle hundreds of values...

There is still some polishing needed. The UOM configuration is absolutely useuless, currently, the previews are too huge, there are some title problems... All of these are "details" from the code point of view (even if really important for the user). We need a warning message when trying to build a classification with more values than an arbitrary threshold. "Just another JDialog"... ;-)

The PR is huge already so we are only dealing with lines. Those for areas and points should be lighter : part of the work is already made. In legend, factorization has been prepared already. In view, I still need to do it. It will be included in the next PR (for areas).