irstv/orbisgis — pull request #442 by agueganno (2013-06-19 09:18:39+00:00)
Title: Third part of the integration of interval classifications.

Here, some UI integration appears. Note that the work is not finished yet, but I hope it's usable enough to be integrated.

I've done a huge factorization work here. Some things about that:

- We know have a PnlAbstractTableAnalysis. This class intends to contain methods that are shared between the UI for unique value and interval classifications.
- With the same idea, we know have editors and TableModels that have a huge, common basis. I needed dedicated editors for type safety, but I tried to use generics when possible in order to decrease the number of lines of code.

There were still some gaps in the legend APi for interval classifications. This PR fills them as some methods were needed in order to crate a useful UI.

About the UI: we're now able to make some interval classifications on lines, area and points. It is possible to add/remove keys and to edit them. When using the dedicated button to add a new key, it will:

- Add 1.0 as a new key if there is only negative infinity in the mapping
- Adds a new key whose value will be the maximum value present in the mapping augmented of 1.0.

This behaviour may of course change : I mainly needed to make some choices.

You can generate a classification by:
- Choosing a start and end colour for the generated configurations
- Choosing a number of classes
- Choosing a classification method
- Click on the "create classification" button. It will be disabled if the chosen is "manual".

The currently included classification methods are "Manual", "Mean - Standard deviation", "Quantiles" and "Equal Intervals". More will come in the future : Fisher-Jenks, "Aggregated means" (not sure of the translation), and maybe even Maximum breaks... This ones are a bit more complicated, and I think we already have a testable basis.

Statistics are computed thanks to Apache commons-maths. The implemented methods were quite simple to add, then :-) The Thresholds class takes care of managing that. I've put it outside of the UI classes as it maybe useful somewhere else someday. It could even be put outside of orbisgis-view...

The last commits of this PR fixes some bug and do the merge with irstv/master. I've removed EPLegendHelper again, as it had been added during the merge, and edited SimpleStyleEditor so that all the analysis are available.

And now I will :

- Try to introduce palettes in these editors
- Add new analysis