From: <jum...@li...> - 2015-04-22 14:15:33
|
Revision: 4403 http://sourceforge.net/p/jump-pilot/code/4403 Author: ma15569 Date: 2015-04-22 12:52:14 +0000 (Wed, 22 Apr 2015) Log Message: ----------- 2015-04-12 Giuseppe Aruta <giu...@ya...> * Raster Color Editor Panel. Added an option to invert color range and an option to set values outside choosen range to transparent. Optimized color ramp. Added more color ramps Modified Paths: -------------- core/trunk/ChangeLog core/trunk/src/language/jump.properties core/trunk/src/language/jump_cz.properties core/trunk/src/language/jump_de.properties core/trunk/src/language/jump_es.properties core/trunk/src/language/jump_fi.properties core/trunk/src/language/jump_fr.properties core/trunk/src/language/jump_hu.properties core/trunk/src/language/jump_it.properties core/trunk/src/language/jump_ja_JP.properties core/trunk/src/language/jump_ml.properties core/trunk/src/language/jump_pt.properties core/trunk/src/language/jump_pt_BR.properties core/trunk/src/language/jump_ta_IN.properties core/trunk/src/language/jump_te.properties core/trunk/src/language/jump_zh_CN.properties core/trunk/src/language/jump_zh_HK.properties core/trunk/src/org/openjump/core/ui/plugin/layer/pirolraster/panel/RasterColorEditorPanel.java Modified: core/trunk/ChangeLog =================================================================== --- core/trunk/ChangeLog 2015-04-21 04:54:25 UTC (rev 4402) +++ core/trunk/ChangeLog 2015-04-22 12:52:14 UTC (rev 4403) @@ -1,4 +1,7 @@ # for display continuity sake please use 2 spaces instead of tabs +2015-04-12 Giuseppe Aruta <giu...@ya...> + * Raster Color Editor Panel. Added an option to invert color range and an option to set + values outside choosen range to transparent. Optimized color ramp. Added more color ramps 2015-04-18 mmichaud <m.m...@or...> * FR #220 : add an option to snap on feature being edited. Indeed, the new snap Modified: core/trunk/src/language/jump.properties =================================================================== --- core/trunk/src/language/jump.properties 2015-04-21 04:54:25 UTC (rev 4402) +++ core/trunk/src/language/jump.properties 2015-04-22 12:52:14 UTC (rev 4403) @@ -1117,6 +1117,8 @@ org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Toggle-transparency-for-no-data-values = Toggle transparency for no-data values. org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.change = change org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.no-data-value-color = no-data value color +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Invert-colors= Invert colors +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Set-values-outside-transparent=Set values outside the range to transparent org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.Must-Select-Location-Of-SLD = The next step is to select the SLD that was\n\ \tgenerated by ArcMap2SLD. org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.Must-Select-Location-Of-Tool = To be able to use the external program ArcMap2SLD,\n\ Modified: core/trunk/src/language/jump_cz.properties =================================================================== --- core/trunk/src/language/jump_cz.properties 2015-04-21 04:54:25 UTC (rev 4402) +++ core/trunk/src/language/jump_cz.properties 2015-04-22 12:52:14 UTC (rev 4403) @@ -1089,6 +1089,8 @@ org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Toggle-transparency-for-no-data-values = Zapnout pr\u016Fhlednost pro bu\u0148ky bez hodnoty. org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.change = zm\u011Bnit org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.no-data-value-color = barva pro bu\u0148ky bez hodnoty +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Invert-colors= \#T\:Invert colors +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Set-values-outside-transparent=\#T\:Set values outside the range to transparent org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.Must-Select-Location-Of-SLD = N\u00E1sleduj\u00EDc\u00ED krok je vybrat SLD kter\u00E9 bylo\n\ \tvygenerov\u00E1no s pomoc\u00ED ArcMap2SLD. org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.Must-Select-Location-Of-Tool = Aby bylo mo\u017Eno vyu\u017E\u00EDvat extern\u00ED program ArcMap2SLD,\n\ Modified: core/trunk/src/language/jump_de.properties =================================================================== --- core/trunk/src/language/jump_de.properties 2015-04-21 04:54:25 UTC (rev 4402) +++ core/trunk/src/language/jump_de.properties 2015-04-22 12:52:14 UTC (rev 4403) @@ -1090,6 +1090,8 @@ org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Toggle-transparency-for-no-data-values = Transparenz f\u00fcr no-data Werte. org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.change = anpassen org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.no-data-value-color = Farbe f\u00fcr no-data Werte +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Invert-colors= \#T\:Invert colors +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Set-values-outside-transparent=\#T\:Set values outside the range to transparent org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.Must-Select-Location-Of-SLD = Der n\u00e4chste Schritt ist, das von ArcMap2SLD\n\ \tgenerierte SLD auszuw\u00e4hlen. org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.Must-Select-Location-Of-Tool = Um das externe Programm ArcMap2SLD benutzen zu k\u00f6nnen,\n\ Modified: core/trunk/src/language/jump_es.properties =================================================================== --- core/trunk/src/language/jump_es.properties 2015-04-21 04:54:25 UTC (rev 4402) +++ core/trunk/src/language/jump_es.properties 2015-04-22 12:52:14 UTC (rev 4403) @@ -991,6 +991,8 @@ org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Selected-Layer=Capa seleccionada org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Toggle-transparency-for-no-data-values=Activar transparencia para las celdas sin valores org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.To-value=Al valor +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Invert-colors= Invertir colores +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Set-values-outside-transparent=Definir los valores fuera del rango a transparente org.openjump.core.ui.plugin.raster.CreateLatticeFromSelectedImageLayerPlugIn.Create-Lattice-from-Raster=Crear una malla de puntos del raster org.openjump.core.ui.plugin.raster.CreateLatticeFromSelectedImageLayerPlugIn.creating-points=creando puntos org.openjump.core.ui.plugin.raster.CreateLatticeFromSelectedImageLayerPlugIn.lattice=Malla_pts Modified: core/trunk/src/language/jump_fi.properties =================================================================== --- core/trunk/src/language/jump_fi.properties 2015-04-21 04:54:25 UTC (rev 4402) +++ core/trunk/src/language/jump_fi.properties 2015-04-22 12:52:14 UTC (rev 4403) @@ -1015,6 +1015,8 @@ org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Selected-Layer=Valittu taso org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Toggle-transparency-for-no-data-values=Vaihda puuttuvan tiedon alueiden l\u00E4pin\u00E4kyvyytt\u00E4 org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.To-value=arvoon +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Invert-colors= \#T\:Invert colors +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Set-values-outside-transparent=\#T\:Set values outside the range to transparent org.openjump.core.ui.plugin.raster.CreateLatticeFromSelectedImageLayerPlugIn.Create-Lattice-from-Raster=Tee rasterikuvasta pistehila org.openjump.core.ui.plugin.raster.CreateLatticeFromSelectedImageLayerPlugIn.creating-points=luodaan pisteit\u00E4 org.openjump.core.ui.plugin.raster.CreateLatticeFromSelectedImageLayerPlugIn.lattice=Pistehila Modified: core/trunk/src/language/jump_fr.properties =================================================================== --- core/trunk/src/language/jump_fr.properties 2015-04-21 04:54:25 UTC (rev 4402) +++ core/trunk/src/language/jump_fr.properties 2015-04-22 12:52:14 UTC (rev 4403) @@ -1092,6 +1092,8 @@ org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Toggle-transparency-for-no-data-values = Rendre les cellules sans valeur transparentes org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.change = Changer org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.no-data-value-color = couleur des cellules sans valeur +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Invert-colors= \#T\:Invert colors +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Set-values-outside-transparent=\#T\:Set values outside the range to transparent org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.Must-Select-Location-Of-SLD = L'\u00e9tape suivante consiste \u00e0 s\u00e9lectionner le fichier SLD \n\ \tgener\u00e9 par ArcMap2SLD. org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.Must-Select-Location-Of-Tool = Pour utiliser le programme externe ArcMap2SLD,\n\ Modified: core/trunk/src/language/jump_hu.properties =================================================================== --- core/trunk/src/language/jump_hu.properties 2015-04-21 04:54:25 UTC (rev 4402) +++ core/trunk/src/language/jump_hu.properties 2015-04-22 12:52:14 UTC (rev 4403) @@ -1090,6 +1090,8 @@ org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Toggle-transparency-for-no-data-values = \u00C1tl\u00E1tsz\u00F3s\u00E1g \u00E1tv\u00E1lt\u00E1sa a nincs adat \u00E9rt\u00E9kekre. org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.change = m\u00F3dos\u00EDt org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.no-data-value-color = "nincs adat" \u00E9rt\u00E9k sz\u00EDne +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Invert-colors= \#T\:Invert colors +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Set-values-outside-transparent=\#T\:Set values outside the range to transparent org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.Must-Select-Location-Of-SLD = A k\u00F6vetkez\u0151 l\u00E9p\u00E9sben ki kell v\u00E1lasztanod az\n\ \tArcMap2SLD \u00E1ltal gener\u00E1lt SLD-t. org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.Must-Select-Location-Of-Tool = Az ArcMap2SLD program haszn\u00E1lat\u00E1hoz k\u00E9rlek, add meg\n\ Modified: core/trunk/src/language/jump_it.properties =================================================================== --- core/trunk/src/language/jump_it.properties 2015-04-21 04:54:25 UTC (rev 4402) +++ core/trunk/src/language/jump_it.properties 2015-04-22 12:52:14 UTC (rev 4403) @@ -991,6 +991,8 @@ org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Selected-Layer=Livello selezionato org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Toggle-transparency-for-no-data-values=Imposta le celle senza valore trasparenti org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.To-value=Al valore +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Invert-colors= Inverti colori +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Set-values-outside-transparent=Imposta i valori esterni all'intervallo come trasparenti org.openjump.core.ui.plugin.raster.CreateLatticeFromSelectedImageLayerPlugIn.Create-Lattice-from-Raster=Crea una griglia di punti dal Raster org.openjump.core.ui.plugin.raster.CreateLatticeFromSelectedImageLayerPlugIn.creating-points=creando punti org.openjump.core.ui.plugin.raster.CreateLatticeFromSelectedImageLayerPlugIn.lattice=Griglia-pts Modified: core/trunk/src/language/jump_ja_JP.properties =================================================================== --- core/trunk/src/language/jump_ja_JP.properties 2015-04-21 04:54:25 UTC (rev 4402) +++ core/trunk/src/language/jump_ja_JP.properties 2015-04-22 12:52:14 UTC (rev 4403) @@ -1088,6 +1088,8 @@ org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Toggle-transparency-for-no-data-values = \#T\:Toggle transparency for no-data values. org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.change = \#T\:change org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.no-data-value-color = \#T\:no-data value color +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Invert-colors= \#T\:Invert colors +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Set-values-outside-transparent=\#T\:Set values outside the range to transparent org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.Must-Select-Location-Of-SLD = \u6B21\u306E\u30B9\u30C6\u30C3\u30D7\u3067 ArcMap2SLD \u306E\u751F\u6210\u3057\u305F SLD \u3092\u9078\u629E\u3057\u307E\u3059. org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.Must-Select-Location-Of-Tool = \u5916\u90E8\u30D7\u30ED\u30B0\u30E9\u30E0 ArcMap2SLD, \u3092\u5229\u7528\u3059\u308B\u306B\u306F\n\ \t\u6B21\u306E\u30C0\u30A4\u30A2\u30ED\u30B0\u3067\u5834\u6240\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044. Modified: core/trunk/src/language/jump_ml.properties =================================================================== --- core/trunk/src/language/jump_ml.properties 2015-04-21 04:54:25 UTC (rev 4402) +++ core/trunk/src/language/jump_ml.properties 2015-04-22 12:52:14 UTC (rev 4403) @@ -1448,6 +1448,8 @@ org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Toggle-transparency-for-no-data-values = \#T\: org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.change = \#T\: org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.no-data-value-color = \#T\: +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Invert-colors= \#T\:Invert colors +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Set-values-outside-transparent=\#T\:Set values outside the range to transparent org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.Must-Select-Location-Of-SLD = \#T\: org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.Must-Select-Location-Of-Tool = \#T\: #T:org.openjump.core.ui.plugin.queries.SimpleQuery.numeric = Numeric Modified: core/trunk/src/language/jump_pt.properties =================================================================== --- core/trunk/src/language/jump_pt.properties 2015-04-21 04:54:25 UTC (rev 4402) +++ core/trunk/src/language/jump_pt.properties 2015-04-22 12:52:14 UTC (rev 4403) @@ -1088,6 +1088,8 @@ org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Toggle-transparency-for-no-data-values = T\:Toggle transparency for no-data values. org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.change = T\:change org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.no-data-value-color = T\:no-data value color +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Invert-colors= \#T\:Invert colors +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Set-values-outside-transparent=\#T\:Set values outside the range to transparent org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.Must-Select-Location-Of-SLD = O pr\u00f3ximo passo \u00e9 selecionar o SLD que\n\ \tfoi gerado pelo ArcMap2SLD. org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.Must-Select-Location-Of-Tool = Para possibilitar o uso de um programa ArcMap2SLD externo,\n\ Modified: core/trunk/src/language/jump_pt_BR.properties =================================================================== --- core/trunk/src/language/jump_pt_BR.properties 2015-04-21 04:54:25 UTC (rev 4402) +++ core/trunk/src/language/jump_pt_BR.properties 2015-04-22 12:52:14 UTC (rev 4403) @@ -1088,6 +1088,8 @@ org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Toggle-transparency-for-no-data-values = T\:Toggle transparency for no-data values. org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.change = T\:change org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.no-data-value-color = T\:no-data value color +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Invert-colors= \#T\:Invert colors +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Set-values-outside-transparent=\#T\:Set values outside the range to transparent org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.Must-Select-Location-Of-SLD = O pr\u00f3ximo passo \u00e9 selecionar o SLD que\n\ \tfoi gerado pelo ArcMap2SLD. org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.Must-Select-Location-Of-Tool = Para possibilitar o uso de um programa ArcMap2SLD externo,\n\ Modified: core/trunk/src/language/jump_ta_IN.properties =================================================================== --- core/trunk/src/language/jump_ta_IN.properties 2015-04-21 04:54:25 UTC (rev 4402) +++ core/trunk/src/language/jump_ta_IN.properties 2015-04-22 12:52:14 UTC (rev 4403) @@ -1086,6 +1086,8 @@ org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Toggle-transparency-for-no-data-values = \u0B8E\u0BA8\u0BCD\u0BA4-\u0BA4\u0BB0\u0BB5\u0BC1\u0B95\u0BB3\u0BC8 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BC1\u0B95\u0BCD\u0B95\u0BBE\u0B95 \u0BAE\u0BBE\u0BB1\u0BCD\u0BB1\u0BC1\u0BAE\u0BCD \u0BB5\u0BC6\u0BB3\u0BBF\u0BAA\u0BCD\u0BAA\u0B9F\u0BC8\u0BA4\u0BCD\u0BA4\u0BA9\u0BCD\u0BAE\u0BC8. org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.change = \u0BAE\u0BBE\u0BB1\u0BCD\u0BB1\u0BB5\u0BC1\u0BAE\u0BCD org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.no-data-value-color = no-data value color +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Invert-colors= \#T\:Invert colors +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Set-values-outside-transparent=\#T\:Set values outside the range to transparent org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.Must-Select-Location-Of-SLD = The next step is to select the SLD that was\n\ \tgenerated by ArcMap2SLD. org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.Must-Select-Location-Of-Tool = To be able to use the external program ArcMap2SLD,\n\ Modified: core/trunk/src/language/jump_te.properties =================================================================== --- core/trunk/src/language/jump_te.properties 2015-04-21 04:54:25 UTC (rev 4402) +++ core/trunk/src/language/jump_te.properties 2015-04-22 12:52:14 UTC (rev 4403) @@ -1263,6 +1263,8 @@ org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Toggle-transparency-for-no-data-values = Toggle transparency for no-data values. org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.change = change org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.no-data-value-color = no-data value color +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Invert-colors= \#T\:Invert colors +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Set-values-outside-transparent=\#T\:Set values outside the range to transparent org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.Must-Select-Location-Of-SLD = The next step is to select the SLD that was\n\ \ generated by ArcMap2SLD. org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.Must-Select-Location-Of-Tool = To be able to use the external program ArcMap2SLD,\n\ Modified: core/trunk/src/language/jump_zh_CN.properties =================================================================== --- core/trunk/src/language/jump_zh_CN.properties 2015-04-21 04:54:25 UTC (rev 4402) +++ core/trunk/src/language/jump_zh_CN.properties 2015-04-22 12:52:14 UTC (rev 4403) @@ -1091,6 +1091,8 @@ org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Toggle-transparency-for-no-data-values = \u5207\u6362\u900f\u660e\u5ea6\u65e0\u6570\u636e\u503c\u3002 org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.change = \u6539\u53d8 org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.no-data-value-color = \u65e0\u6570\u636e\u503c\u7684\u989c\u8272 +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Invert-colors= \#T\:Invert colors +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Set-values-outside-transparent=\#T\:Set values outside the range to transparent org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.Must-Select-Location-Of-SLD = \u4e0b\u4e00\u6b65\u662f\u9009\u62e9\u8be5SLD\u8fd9\u662f\\u00f1"\tgenerated by ArcMap2SLD."\t\= org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.Must-Select-Location-Of-Tool = \u4e3a\u4e86\u80fd\u591f\u4f7f\u7528\u5916\u90e8\u7a0b\u5e8fArcMap2SLD\uff0c\\u00f1"\tplease specify its location in the following dialog."\t\= org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.name = \u5bfc\u5165ArcMap\u7684\u98ce\u683c Modified: core/trunk/src/language/jump_zh_HK.properties =================================================================== --- core/trunk/src/language/jump_zh_HK.properties 2015-04-21 04:54:25 UTC (rev 4402) +++ core/trunk/src/language/jump_zh_HK.properties 2015-04-22 12:52:14 UTC (rev 4403) @@ -1091,6 +1091,8 @@ org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Toggle-transparency-for-no-data-values = \u5207\u63DB\u900F\u660E\u5EA6\u7121\u6578\u64DA\u503C\u3002 org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.change = \u6539\u8B8A org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.no-data-value-color = \u7121\u6578\u64DA\u503C\u7684\u984F\u8272 +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Invert-colors= \#T\:Invert colors +org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Set-values-outside-transparent=\#T\:Set values outside the range to transparent org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.Must-Select-Location-Of-SLD = \u4E0B\u4E00\u6B65\u662F\u9078\u64C7\u8A72SLD\u9019\u662F\\u00f1"\tgenerated by ArcMap2SLD."\t\= org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.Must-Select-Location-Of-Tool = \u70BA\u4E86\u80FD\u5920\u4F7F\u7528\u5916\u90E8\u7A0B\u5E8FArcMap2SLD\uFF0C\\u00f1"\tplease specify its location in the following dialog."\t\= org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn.name = \u5C0E\u5165ArcMap\u7684\u98A8\u683C Modified: core/trunk/src/org/openjump/core/ui/plugin/layer/pirolraster/panel/RasterColorEditorPanel.java =================================================================== --- core/trunk/src/org/openjump/core/ui/plugin/layer/pirolraster/panel/RasterColorEditorPanel.java 2015-04-21 04:54:25 UTC (rev 4402) +++ core/trunk/src/org/openjump/core/ui/plugin/layer/pirolraster/panel/RasterColorEditorPanel.java 2015-04-22 12:52:14 UTC (rev 4403) @@ -1,149 +1,141 @@ package org.openjump.core.ui.plugin.layer.pirolraster.panel; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.GridBagLayout; +import java.awt.LayoutManager; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.geom.NoninvertibleTransformException; +import java.io.IOException; + +import javax.swing.BorderFactory; +import javax.swing.JCheckBox; +import javax.swing.JComboBox; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JTextField; +import javax.swing.border.Border; + +import org.openjump.core.rasterimage.RasterImageLayer; +import org.openjump.core.rasterimage.RasterSymbology; +import org.openjump.core.ui.color.ColorGenerator; +import org.openjump.core.ui.swing.ValueChecker; +import org.saig.core.gui.swing.sldeditor.util.FormUtils; + import com.vividsolutions.jump.I18N; import com.vividsolutions.jump.workbench.WorkbenchContext; import com.vividsolutions.jump.workbench.plugin.PlugInContext; -import com.vividsolutions.jump.workbench.ui.ColorChooserPanel; import com.vividsolutions.jump.workbench.ui.ColorPanel; import com.vividsolutions.jump.workbench.ui.GUIUtil; import com.vividsolutions.jump.workbench.ui.style.StylePanel; -import org.openjump.core.rasterimage.RasterImageLayer; -import org.openjump.core.rasterimage.sextante.OpenJUMPSextanteRasterLayer; -import org.openjump.core.ui.color.ColorGenerator; -import org.openjump.core.ui.plugin.raster.color.RasterColorEditor; -import org.openjump.core.ui.swing.ValueChecker; - -import javax.media.jai.PlanarImage; -import javax.swing.*; -import javax.swing.border.Border; -import java.awt.*; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.geom.NoninvertibleTransformException; -import java.awt.image.BufferedImage; -import java.awt.image.Raster; -import java.io.IOException; -import java.util.logging.Level; -import java.util.logging.Logger; -import org.openjump.core.rasterimage.RasterSymbology; - /** * @version $Rev: 4221 $ Dic 23 2014 [Giuseppe Aruta] - Derived from * RasterColorEditorDialog + * @version $Rev: 4403 $ Apr 22 2015 [Giuseppe Aruta] - Added inverse color + * ramps and transparency to values outside choosen range */ public class RasterColorEditorPanel extends JPanel implements ValueChecker, ActionListener, StylePanel { - /** - * - */ + public static final String COLOR_KEY = RasterColorEditorPanel.class + .getName() + " - COLOR_TYPE"; + public static final String MIN_KEY = RasterColorEditorPanel.class.getName() + + " - MIN_VAL"; + public static final String MAX_KEY = RasterColorEditorPanel.class.getName() + + " - MAX_VAL"; + private static final long serialVersionUID = 1L; private RasterImageLayer layer = null; - - private JTextField fromValue; - + public JTextField fromValue; + private JLabel warning; private JLabel fromValueLabel; - private JLabel toValueLabel; - - private JTextField toValue; - - private JLabel layerLabel; - - private JComboBox colorScaleChooser; - + public JTextField toValue; + public JTextField Chooser; + public JComboBox<?> colorScaleChooser; + public JComboBox<?> colorRampChooser; + public JComboBox<?> typeChooser; private ColorGenerator colorGenerator; private String[] colorTableList = { - I18N.get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorDialog.Default-colors"), - I18N.get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorDialog.Green-Yellow-Red"), - I18N.get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorDialog.Blue-Green-Red"), - I18N.get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorDialog.Red-Blue"), - I18N.get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorDialog.Blue-Red"), - I18N.get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorDialog.Black-White"), - I18N.get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorDialog.White-Black"), - I18N.get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorDialog.Rainbow"), - "Color Relief 1", "Color Relief 2", "Slope", - "Spectral (colorbrewer)", "Spectral 4", "Spectral 8", - "Spectral 12", "Landcarpet Europe", "Red", "Yellow", "Blue" }; + I18N.get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorDialog.Default-colors"),// 0 + I18N.get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorDialog.Green-Yellow-Red"),// 1 + I18N.get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorDialog.Blue-Green-Red"),// 2 + I18N.get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorDialog.Red-Blue"),// 3 + "Red-Yellow", // 4 + // I18N.get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorDialog.Blue-Red"),// + // 5 + I18N.get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorDialog.Black-White"),// 5 + // I18N.get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorDialog.White-Black"),// + // 7 + "Stripes sixties", // 6 + I18N.get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorDialog.Rainbow"),// 7 + "Color Relief", // 8 + "Topo", // 9 + "Spectral (Color brewer)", // 10 + "BrBG (Color brewer)", // 11 + "RdBu (Color Brewer)", // 12 + "RdYlBu (Color Bewer)", // 13 + "RdYlGn (Color Bewer)", // 14 + "Reds", // 15 + "Greens", // 16 + "Blues" }; // 17 - private JPanel mainPanel = new JPanel(); - - // private OKCancelPanel okCancelPanel = new OKCancelPanel(); - + private JPanel strechedPanel = new JPanel(); + private JPanel warningPanel = new JPanel(); + private JPanel statisticPanel = new JPanel(new GridBagLayout()); + private JTextField nodataField = new JTextField(); + private JTextField maxdataField = new JTextField(); + private JTextField mindataField = new JTextField(); + public JCheckBox transparentBox = new JCheckBox(); + public JCheckBox discreteBox = new JCheckBox(); + public JCheckBox invertBox = new JCheckBox(); + public JCheckBox intervalBox = new JCheckBox(); + public String fromValueText = new String(); + public String toValueText = new String(); private PlugInContext plugInContext; - private Border border = BorderFactory.createEmptyBorder(10, 10, 10, 10); - private Border borderRaised = BorderFactory.createRaisedBevelBorder(); - - private Border borderLowerered = BorderFactory.createLoweredBevelBorder(); - private Color[] valuesColors; - - private Color noDataColor; - private LayoutManager layout = new BorderLayout(); - - private ColorChooserPanel colorChooser; - private LayoutManager gridBagLayout = new GridBagLayout(); - - private JButton NoDataColorButton = new JButton(); - - private JComboBox combo = new JComboBox(); - - private JLabel NodataColor = new JLabel( - I18N.get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorDialog.No-data-color")); //$NON-NLS-1$ - private ColorPanel NoDataColorPanel = new ColorPanel(); - - private JCheckBox transparent = new JCheckBox( - I18N.get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorDialog.Transparency")); //$NON-NLS-1$ - private int alpha = 255; - private JPanel panelSeparator = new JPanel(); - - private boolean enabled = true; - - String[] value = { "2", "4", "5", "7", "10", "12", "15", "20", "25", "35" }; - private String sToolTip = I18N .get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Choose-a-color-range-It-will-be-automaticaly-expanded-between-the-2-values"); - private String sColorRange = I18N - .get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Color-range"); private String sFromValue = I18N .get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.From-value"); private String sToValue = I18N .get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.To-value"); - private String sNoDataValueColor = I18N - .get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.no-data-value-color"); - private String sChange = I18N - .get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.change"); - private String sChoseOtherColor = I18N - .get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Choose-other-color-for-no-data-values"); - private String sToggleTransparency = I18N - .get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Toggle-transparency-for-no-data-values"); - private String sSelectColor = I18N - .get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Select-color"); - private String sLayerName = I18N - .get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Selected-Layer"); + private static String STATISTICS = I18N + .get("org.openjump.core.ui.plugin.raster.nodata.CellStatistics"); + private static String TITLE = I18N + .get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Raster-Color-Editor"); + private static String NUMBER = I18N + .get("org.openjump.core.ui.plugin.tools.statistics.ClassifyAttributesPlugin.Number-of-classes"); + private static String NODATA = I18N + .get("org.openjump.core.ui.plugin.raster.nodata.nodata"); + private static String MIN = I18N + .get("org.openjump.core.ui.plugin.raster.nodata.min"); + private static String MAX = I18N + .get("org.openjump.core.ui.plugin.raster.nodata.max"); + private static String WARNING = I18N + .get("org.openjump.core.ui.plugin.raster.RasterQueryPlugIn.info"); + private static String TRANSPARENT = I18N + .get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Set-values-outside-transparent"); + private static String INVERT = I18N + .get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Invert-colors"); public RasterColorEditorPanel(PlugInContext context, RasterImageLayer actualLayer) { - super(); //$NON-NLS-1$ + super(); plugInContext = context; setLayer(actualLayer); - setVisible(true); - // setSize(500, 350); - - // GUIUtil.setLocation(this, new GUIUtil.Location(100, true, 100, true), - // plugInContext.getWorkbenchFrame()); - try { jbInit(); } catch (Exception ex) { @@ -154,490 +146,347 @@ public void setLayer(RasterImageLayer actualLayer) { this.layer = actualLayer; - } + @SuppressWarnings({ "unchecked", "rawtypes" }) void jbInit() throws Exception { setLayout(layout); - layerLabel = new JLabel(sLayerName + ": " + layer.getName()); - layerLabel.setBorder(border); - add(layerLabel, BorderLayout.NORTH); - - mainPanel.setBorder(border); - mainPanel.setLayout(gridBagLayout); - - GridBagConstraints c = new GridBagConstraints(0, 0, 4, 1, 0.0, 0.0, - GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, - new Insets(10, 10, 0, 10), 0, 0); - - colorScaleChooser = new JComboBox(colorTableList); - colorScaleChooser.setSelectedIndex(0); - String fieldName = sColorRange; //$NON-NLS-1$ - colorScaleChooser.setToolTipText(sToolTip); //$NON-NLS-1$ - colorScaleChooser.setBorder(borderRaised); - mainPanel.add(colorScaleChooser, c); - //OpenJUMPSextanteRasterLayer ojraster = new OpenJUMPSextanteRasterLayer(); - // [mmichaud 2013-05-25] false : this is a temporary image not a file - // based image - //ojraster.create(layer, false); - - fromValue = new JTextField(Double.toString(layer.getMetadata().getStats().getMin(0)), 15); - fromValueLabel = new JLabel(sFromValue); //$NON-NLS-1$ - - fromValue.setCaretPosition(0); - fromValue.selectAll(); - - toValue = new JTextField(Double.toString(layer.getMetadata().getStats().getMax(0)), 15); - toValue.setCaretPosition(0); - fromValue.selectAll(); - toValueLabel = new JLabel(sToValue); //$NON-NLS-1$ - - // panelSeparator.setSize(300, 50); - NoDataColorPanel.setFillColor(Color.WHITE); - NoDataColorPanel.setLineColor(Color.BLACK); - NoDataColorPanel.setBorder(borderLowerered); - NoDataColorPanel.setToolTipText(sNoDataValueColor); //$NON-NLS-1$ - - NoDataColorButton.setText(sChange); //$NON-NLS-1$ - NoDataColorButton.setToolTipText(sChoseOtherColor); //$NON-NLS-1$ - NoDataColorButton - .addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent e) { - changeButton_actionPerformed(e); - } - }); - - transparent.setToolTipText(sToggleTransparency); //$NON-NLS-1$ - - transparent.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent e) { - transparent_actionPerformed(e); - } - }); - - c.weightx = 1; - c.gridx = 0; - c.gridy = 1; - c.gridwidth = 1; - mainPanel.add(fromValueLabel, c); - - c.gridx = 0; - c.gridy = 2; - c.gridwidth = 1; - mainPanel.add(fromValue, c); - - c.weightx = 1; - c.gridx = 3; - c.gridy = 1; - c.gridwidth = 1; - mainPanel.add(toValueLabel, c); - - c.gridx = 3; - c.gridy = 2; - c.gridwidth = 1; - mainPanel.add(toValue, c); - - c.weightx = 1; - c.weighty = 1; - c.gridx = 0; - c.gridy = 3; - c.gridheight = 2; - c.gridwidth = 4; - - // c.ipady = 100; - mainPanel.add(panelSeparator, c); - - /* - * [sstein - 28.Sept.2010] since this stuff doesn't work yet we don't - * display it. - * - * - * - * c.gridheight = 1; c.weightx = 0.5; c.gridy = 5; c.gridwidth = 1; - * c.ipady = 0; mainPanel.add(NodataColor, c); - * - * c.gridx = 1; c.gridwidth = 2; mainPanel.add(NoDataColorPanel, c); - * - * c.gridy = 6; mainPanel.add(NoDataColorButton, c); - * - * c.gridx = 0; mainPanel.add(transparent, c); - */ - - add(mainPanel, BorderLayout.CENTER); - - } - - public void actionPerformed(ActionEvent e) { - if (!areValuesOk()) { - setVisible(false); - return; - } - - if (areValuesOk() && Float.parseFloat(fromValue.getText()) < Float - .parseFloat(toValue.getText())) { - - switch (colorScaleChooser.getSelectedIndex()) { - case 0: { - valuesColors = null; - break; - } - case 1: { - valuesColors = new Color[] { Color.GREEN, Color.YELLOW, Color.RED }; - break; - } - case 2: { - valuesColors = new Color[] { Color.BLUE, Color.GREEN, Color.RED }; - break; - } - case 3: { - valuesColors = new Color[] { Color.RED, Color.BLUE }; - break; - } - case 4: { - valuesColors = new Color[] { Color.BLUE, Color.RED }; - break; - } - case 5: { - valuesColors = new Color[] { Color.WHITE, Color.BLACK }; - break; - } - case 6: { - valuesColors = new Color[] { Color.BLACK, Color.WHITE }; - break; - } - case 7: { - valuesColors = new Color[] { Color.decode("#9400D3"), //$NON-NLS-1$ - Color.decode("#4B0082"), Color.BLUE, Color.GREEN, //$NON-NLS-1$ - Color.YELLOW, Color.ORANGE, Color.RED }; - break; - } - case 8: { - valuesColors = new Color[] {new Color(110,220,110), //$NON-NLS-1$ - new Color(240,250,160), new Color(230,220,70),new Color(220,220,220), //$NON-NLS-1$ - new Color(250,250,250)}; - break; - } - case 9: { - valuesColors = new Color[] { - new Color(46,154,88), - new Color(251,255,128), - new Color(224,108,31), - new Color(200,55,55), - new Color(215,244,244)}; - break; - } - case 10: { - valuesColors = new Color[] { - new Color(0,255,0), - new Color(36,255,0), - new Color(73,255,0), - new Color(109,255,0), - new Color(146,255,0), - new Color(182,255, 0), - new Color(219,255,0), - new Color(255,255,0), - new Color(255,219,0), - new Color(255,182,0), - new Color(255,146,0), - new Color(255,109,0), - new Color(255,73,0), - new Color(255,36,0), - new Color(255,0,0)}; - break; - } - case 11: { - valuesColors = new Color[] { - new Color(215,25,28), - new Color(253,174,97), - new Color(171,221,164), - new Color(43,131,186)}; - break; - } - - case 12: { - valuesColors = new Color[] { - new Color(255,0,0), - new Color(255,128,0), - new Color(0,255,0), - new Color(0,255,128), - new Color(0,255,255), - new Color(0,128,255), - new Color(0,0,255), - new Color(255,0,255)}; - break; - } - - case 13: { - - valuesColors = new Color[] { - new Color(213,62,79), - new Color(244,109,67), - new Color(253,174,97), - new Color(254,224,139), - new Color(230,245,152), - new Color(171,221,164), - new Color(102,194,165), - new Color(50,136,89)}; - break; - } - case 14: { - - valuesColors = new Color[] { - new Color(158,1,66), - new Color(213,62,79), - new Color(244,109,67), - new Color(253,174,97), - new Color(254,224,139), - new Color(255,255,191), - new Color(230,245,152), - new Color(171,221,164), - new Color(102,194,165), - new Color(50,136,189), - new Color(94,79,162)}; - - - - break; - } - case 15: { - - valuesColors = new Color[] { - new Color(218,179,122), - new Color(213,213,149), - new Color(127,166,122), - new Color(151,106,47), - new Color(121,117,10), - new Color(254,254,254), - new Color(255,255,255)}; - - break; - } - - - - - - } - - try { - changeColors(plugInContext.getWorkbenchContext(), - valuesColors, GUIUtil.alphaColor(NoDataColorPanel - .getFillColor(), alpha), Float.parseFloat(fromValue - .getText()), Float.parseFloat(toValue.getText())); - } catch (NumberFormatException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } catch (NoninvertibleTransformException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } catch (IOException ex) { - Logger.getLogger(RasterColorEditorPanel.class.getName()).log(Level.SEVERE, null, ex); - } - - setVisible(false); - - return; + if (layer.getNumBands() > 1) { + warning = new JLabel(WARNING); + warningPanel.add(warning); + add(warningPanel, BorderLayout.CENTER); } else { - plugInContext.getWorkbenchFrame().warnUser("min > max!"); //$NON-NLS-1$ - return; - } + // Giuseppe Aruta - 2015_4_21 + // First panel: show statistics of cells of the layer + // Deactivate for now + statisticPanel.setBorder(BorderFactory + .createTitledBorder(STATISTICS)); + nodataField = new JTextField(String.valueOf(layer.getNoDataValue())); + nodataField.setEditable(false); + maxdataField = new JTextField(String.valueOf(layer.getMetadata() + .getStats().getMax(0))); + maxdataField.setEditable(false); + mindataField = new JTextField(String.valueOf(layer.getMetadata() + .getStats().getMin(0))); + mindataField.setEditable(false); + JLabel nd_label = new JLabel(NODATA); + JLabel min_label = new JLabel(MIN); + JLabel max_label = new JLabel(MAX); + FormUtils.addRowInGBL(statisticPanel, 1, 0, nd_label, nodataField); + FormUtils + .addRowInGBL(statisticPanel, 1, 2, min_label, mindataField); + FormUtils + .addRowInGBL(statisticPanel, 1, 4, max_label, maxdataField); + // add(statisticPanel, BorderLayout.PAGE_START); - } + // Giuseppe Aruta - 2015_4_21 + // Second panel: Change color model + strechedPanel.setBorder(border); + strechedPanel.setLayout(gridBagLayout); + colorScaleChooser = new JComboBox(colorTableList); + final String selectedIndex = (String) colorScaleChooser + .getSelectedItem(); + colorScaleChooser.setSelectedItem(selectedIndex); + colorScaleChooser.setToolTipText(sToolTip); //$NON-NLS-1$ + colorScaleChooser.setBorder(borderRaised); + FormUtils.addRowInGBL(strechedPanel, 2, 0, colorScaleChooser); - /* - * private boolean validateInput() { - * - * return (Float.parseFloat(fromValue.getText()) < Float - * .parseFloat(toValue.getText())); } - */ - void changeButton_actionPerformed(ActionEvent e) { + fromValueLabel = new JLabel(sFromValue); + toValueLabel = new JLabel(sToValue); //$NON-NLS-1$ + fromValue = new JTextField(Double.toString(layer.getMetadata() + .getStats().getMin(0)), 15); + fromValue.setCaretPosition(0); + fromValue.selectAll(); + toValue = new JTextField(Double.toString(layer.getMetadata() + .getStats().getMax(0)), 15); + toValue.setCaretPosition(0); + toValue.selectAll(); + FormUtils.addRowInGBL(strechedPanel, 3, 0, fromValueLabel, + toValueLabel); + FormUtils.addRowInGBL(strechedPanel, 4, 0, fromValue, toValue); - Color newColor = JColorChooser.showDialog( - SwingUtilities.windowForComponent(this), sSelectColor, - Color.WHITE); //$NON-NLS-1$ + invertBox = new JCheckBox(INVERT); + invertBox.setSelected(false); + FormUtils.addRowInGBL(strechedPanel, 5, 0, invertBox); - if (newColor == null) { - return; - } + new JLabel(NUMBER); - NoDataColorPanel.setFillColor(newColor); - NoDataColorPanel.repaint(); + /* + * Text field to choose number of intervals. Deactivated. Chooser = + * new JTextField("11", 15); Chooser.setColumns(4); + * Chooser.setSize(4, 4); // Chooser.setCaretPosition(0); + * FormUtils.addRowInGBL(strechedPanel, 6, 0, classes, Chooser); + */ - } + transparentBox = new JCheckBox(TRANSPARENT); + transparentBox.setSelected(false); + FormUtils.addRowInGBL(strechedPanel, 7, 0, transparentBox); + add(strechedPanel, BorderLayout.NORTH); - void transparent_actionPerformed(ActionEvent e) { - - if (transparent.isSelected()) { - alpha = 0; - enabled = false; - - } else { - alpha = 255; - enabled = true; } - NoDataColorButton.setEnabled(enabled); - NoDataColorPanel.setVisible(enabled); - return; } public String getTitle() { - // TODO Auto-generated method stub - return I18N - .get("org.openjump.core.ui.plugin.raster.color.RasterColorEditorPlugIn.Raster-Color-Editor"); - + return TITLE; } public String validateInput() { - // TODO Auto-generated method stub return null; } public boolean areValuesOk() { - return true; } - public void updateStyles() { + public void changeColorsRamp(WorkbenchContext context, Color[] colors, + Color noDataColor, double min, double max) + throws NoninvertibleTransformException, IOException { - /* - * Giuseppe Aruta [dic 23 2014] Copied from ActionPerformed. Maybe it is - * not elegant but it was easier and it did work - */ + if (colors == null || colors.length == 0) { + layer.setNeedToKeepImage(false); + layer.flushImages(true); + // layer.setWholeImageEnvelope(layer.getWholeImageEnvelope()); + context.getLayerViewPanel().getViewport().update(); + return; + } + int step = 6; + colorGenerator = new ColorGenerator(step, colors); + // Deactivated. As 6 steps seems to work better than 35 + // colorGenerator = new ColorGenerator(35, colors); + RasterSymbology symbology = new RasterSymbology( + RasterSymbology.ColorMapType.RAMP); + min = Double.parseDouble(fromValue.getText()); + max = Double.parseDouble(toValue.getText()); + // Max cell value taken from raster statistics. Need to exclude upper + // values for the symbolizing + double maxlayer = layer.getMetadata().getStats().getMax(0); + double interval = (max - min) / colorGenerator.getSteps(); + symbology.addColorMapEntry(layer.getNoDataValue(), noDataColor); + // Giuseppe Aruta 2015_4_17 Set value outside min-max range to a light + // grey-green color + // Than the color can be set to transparent + for (double i = 0; i < min; i++) { + symbology.addColorMapEntry(i, new Color(202, 218, 186));// Color.BLACK); + } + for (double j = maxlayer; j > max; j--) { + symbology.addColorMapEntry(j, new Color(202, 218, 186));// Color.BLACK); + } + for (int c = 0; c < colorGenerator.getSteps(); c++) { + Color color = colorGenerator.getColor(c); + double value = min + c * interval; + symbology.addColorMapEntry(value, color); + } + layer.setSymbology(symbology); + if (transparentBox.isSelected()) { + layer.setTransparentColor(new Color(202, 218, 186)); + } + } + public void updateStyles() { switch (colorScaleChooser.getSelectedIndex()) { + case 0: { valuesColors = null; break; } case 1: { - valuesColors = new Color[] { Color.GREEN, Color.YELLOW, Color.RED }; + if (invertBox.isSelected()) { + valuesColors = new Color[] { Color.RED, Color.YELLOW, + Color.GREEN }; + } else { + valuesColors = new Color[] { Color.GREEN, Color.YELLOW, + Color.RED }; + } break; } case 2: { - valuesColors = new Color[] { Color.BLUE, Color.GREEN, Color.RED }; + if (invertBox.isSelected()) { + valuesColors = new Color[] { Color.RED, Color.GREEN, Color.BLUE }; + } else { + valuesColors = new Color[] { Color.BLUE, Color.GREEN, Color.RED }; + } break; } case 3: { - valuesColors = new Color[] { Color.RED, Color.BLUE }; + if (invertBox.isSelected()) { + valuesColors = new Color[] { Color.BLUE, Color.RED }; + } else { + valuesColors = new Color[] { Color.RED, Color.BLUE }; + } break; } case 4: { - valuesColors = new Color[] { Color.BLUE, Color.RED }; + if (invertBox.isSelected()) { + valuesColors = new Color[] { Color.YELLOW, Color.RED }; + } else { + valuesColors = new Color[] { Color.RED, Color.YELLOW }; + } break; } case 5: { - valuesColors = new Color[] { Color.WHITE, Color.BLACK }; + if (invertBox.isSelected()) { + valuesColors = new Color[] { Color.BLACK, Color.WHITE }; + } else { + valuesColors = new Color[] { Color.WHITE, Color.BLACK }; + } break; } case 6: { - valuesColors = new Color[] { Color.BLACK, Color.WHITE }; + if (invertBox.isSelected()) { + valuesColors = new Color[] { Color.WHITE, Color.BLACK, + Color.WHITE, Color.BLACK, Color.WHITE, Color.BLACK, + Color.WHITE, Color.BLACK, Color.WHITE, Color.BLACK, + Color.WHITE, Color.BLACK }; + } else { + valuesColors = new Color[] { Color.BLACK, Color.WHITE, + Color.BLACK, Color.WHITE, Color.BLACK, Color.WHITE, + Color.BLACK, Color.WHITE, Color.BLACK, Color.WHITE, + Color.BLACK, Color.WHITE }; + } break; } case 7: { - valuesColors = new Color[] { Color.decode("#9400D3"), //$NON-NLS-1$ - Color.decode("#4B0082"), Color.BLUE, Color.GREEN, //$NON-NLS-1$ - Color.YELLOW, Color.ORANGE, Color.RED }; + // Rainbow + if (invertBox.isSelected()) { + valuesColors = new Color[] { Color.RED, Color.ORANGE, + Color.YELLOW, + Color.GREEN, //$NON-NLS-1$ + Color.BLUE, Color.decode("#4B0082"), + Color.decode("#9400D3") }; + } else { + + valuesColors = new Color[] { Color.decode("#9400D3"), //$NON-NLS-1$ + Color.decode("#4B0082"), Color.BLUE, Color.GREEN, //$NON-NLS-1$ + Color.YELLOW, Color.ORANGE, Color.RED }; + } break; } - case 8: { - valuesColors = new Color[] { - new Color(110, 220, 110), //$NON-NLS-1$ - new Color(240, 250, 160), new Color(230, 220, 70), - new Color(220, 220, 220), //$NON-NLS-1$ - new Color(250, 250, 250) }; + case 8: {// Color Relief + if (invertBox.isSelected()) { + valuesColors = new Color[] { new Color(215, 244, 244), + new Color(200, 55, 55), new Color(224, 108, 31), + new Color(251, 255, 128), new Color(46, 154, 88) }; + } else { + valuesColors = new Color[] { new Color(46, 154, 88), + new Color(251, 255, 128), new Color(224, 108, 31), + new Color(200, 55, 55), new Color(215, 244, 244) }; + } break; } case 9: { - valuesColors = new Color[] { new Color(46, 154, 88), - new Color(251, 255, 128), new Color(224, 108, 31), - new Color(200, 55, 55), new Color(215, 244, 244) }; + // Topo + if (invertBox.isSelected()) { + valuesColors = new Color[] { new Color(76, 0, 255), + new Color(0, 46, 255), + new Color(0, 229, 255), + new Color(77, 255, 0), //$NON-NLS-1$ + new Color(255, 255, 0), new Color(255, 222, 89), + new Color(255, 224, 179) }; + + } else { + valuesColors = new Color[] { new Color(255, 224, 179), + new Color(255, 222, 89), + new Color(255, 255, 0), + new Color(77, 255, 0), //$NON-NLS-1$ + new Color(0, 229, 255), new Color(0, 46, 255), + new Color(76, 0, 255) }; + } break; } case 10: { - valuesColors = new Color[] { new Color(0, 255, 0), - new Color(36, 255, 0), new Color(73, 255, 0), - new Color(109, 255, 0), new Color(146, 255, 0), - new Color(182, 255, 0), new Color(219, 255, 0), - new Color(255, 255, 0), new Color(255, 219, 0), - new Color(255, 182, 0), new Color(255, 146, 0), - new Color(255, 109, 0), new Color(255, 73, 0), - new Color(255, 36, 0), new Color(255, 0, 0) }; + if (invertBox.isSelected()) { + valuesColors = new Color[] { new Color(43, 131, 186), + new Color(171, 221, 164), new Color(255, 255, 191), + new Color(253, 174, 97), new Color(215, 25, 28) }; + } else { + valuesColors = new Color[] { new Color(215, 25, 28), + new Color(253, 174, 97), new Color(255, 255, 191), + new Color(171, 221, 164), new Color(43, 131, 186) }; + } break; } case 11: { - valuesColors = new Color[] { new Color(215, 25, 28), - new Color(253, 174, 97), new Color(171, 221, 164), - new Color(43, 131, 186) }; + if (invertBox.isSelected()) { + valuesColors = new Color[] { new Color(1, 133, 113), + new Color(128, 205, 193), new Color(245, 245, 245), + new Color(223, 194, 125), new Color(166, 97, 26) }; + } else { + valuesColors = new Color[] { new Color(166, 97, 26), + new Color(223, 194, 125), new Color(245, 245, 245), + new Color(128, 205, 193), new Color(1, 133, 113) }; + } break; } - case 12: { - valuesColors = new Color[] { new Color(255, 0, 0), - new Color(255, 128, 0), new Color(0, 255, 0), - new Color(0, 255, 128), new Color(0, 255, 255), - new Color(0, 128, 255), new Color(0, 0, 255), - new Color(255, 0, 255) }; + if (invertBox.isSelected()) { + valuesColors = new Color[] { new Color(5, 113, 176), + new Color(146, 197, 222), new Color(247, 247, 247), + new Color(244, 165, 130), new Color(202, 0, 32) }; + } else { + valuesColors = new Color[] { new Color(202, 0, 32), + new Color(244, 165, 130), new Color(247, 247, 247), + new Color(146, 197, 222), new Color(5, 113, 176) }; + } break; } - case 13: { - - valuesColors = new Color[] { new Color(213, 62, 79), - new Color(244, 109, 67), new Color(253, 174, 97), - new Color(254, 224, 139), new Color(230, 245, 152), - new Color(171, 221, 164), new Color(102, 194, 165), - new Color(50, 136, 189) }; + if (invertBox.isSelected()) { + valuesColors = new C... [truncated message content] |