Revision: 4428 http://sourceforge.net/p/jump-pilot/code/4428 Author: michaudm Date: 2015-05-08 13:51:35 +0000 (Fri, 08 May 2015) Log Message: ----------- Refactor ToggleVisiblityPlugIn to ToggleVisibilityPlugIn
Modified Paths: -------------- core/trunk/ChangeLog core/trunk/scripts/default-plugins.xml 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/OpenJumpConfiguration.java Added Paths: ----------- core/trunk/src/org/openjump/core/ui/plugin/layer/ToggleVisibilityPlugIn.java Removed Paths: ------------- core/trunk/src/org/openjump/core/ui/plugin/layer/ToggleVisiblityPlugIn.java Modified: core/trunk/ChangeLog =================================================================== --- core/trunk/ChangeLog 2015-05-08 13:21:20 UTC (rev 4427) +++ core/trunk/ChangeLog 2015-05-08 13:51:35 UTC (rev 4428) @@ -4204,7 +4204,7 @@ 2007-08-16 beckerl <becker.la...@gmail.com> * fixed a problem with the Toggle Visibility Layer Name popup menu item. It was totally nonfunctional. - org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.java + org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn.java 2007-08-16 michaudm <michael.mich...@free.fr> @@ -4316,7 +4316,7 @@ 2007-08-03 Andreas Schmitz <schm...@lat-lon.de> * src/org/openjump/OpenJumpConfiguration.java, - src/org/openjump/core/ui/plugin/layer/ToggleVisiblityPlugIn.java, + src/org/openjump/core/ui/plugin/layer/ToggleVisibilityPlugIn.java, src/org/openjump/core/ui/plugin/layer/ChangeLayerableNamePlugIn.java, src/com/vividsolutions/jump/workbench/ui/plugin/wms/AddWMSQueryPlugIn.java: Added context menu entry on layer list that allows changing the layer name. @@ -6977,7 +6977,7 @@ edittoolbox/cursortools/CrossHairCursor.gif, edittoolbox/cursortools/RotateSelectedItemTool.java, edittoolbox/cursortools/ScaleSelectedItemsTool.java, - layer/AddSIDLayerPlugIn.java, layer/ToggleVisiblityPlugIn.java: + layer/AddSIDLayerPlugIn.java, layer/ToggleVisibilityPlugIn.java: update isa tools 1.1 2006-02-12 mentaer <sst...@geo.unizh.ch> @@ -7663,7 +7663,7 @@ core/ui/plugin/edittoolbox/tab/absAngle.png, core/ui/plugin/edittoolbox/tab/relAngle.png, core/ui/plugin/layer/AddSIDLayerPlugIn.java, - core/ui/plugin/layer/ToggleVisiblityPlugIn.java, + core/ui/plugin/layer/ToggleVisibilityPlugIn.java, io/SIDLayer.java, io/SIDLayer.java2xml: adding isa plugin functionality (without string translation in all property files) Modified: core/trunk/scripts/default-plugins.xml =================================================================== --- core/trunk/scripts/default-plugins.xml 2015-05-08 13:21:20 UTC (rev 4427) +++ core/trunk/scripts/default-plugins.xml 2015-05-08 13:51:35 UTC (rev 4428) @@ -964,8 +964,8 @@ <!-- ================ LayerName Popup Menu =============================== --> <plug-in> - org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn - </plug-in> + org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn + </plug-in> <plug-in> com.vividsolutions.jump.workbench.ui.plugin.EditablePlugIn <menus> @@ -1195,7 +1195,7 @@ <!-- ================ WMS LayerName Popup Menu =============================== --> <plug-in> - org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn + org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn <menus> <layername-popup-wms /> </menus> @@ -1258,7 +1258,7 @@ <!-- ================ Sextante Raster LayerName Popup Menu =============== --> <plug-in> - org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn + org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn <menus> <layername-popup-raster install="true" checkbox="true" /> </menus> Modified: core/trunk/src/language/jump.properties =================================================================== --- core/trunk/src/language/jump.properties 2015-05-08 13:21:20 UTC (rev 4427) +++ core/trunk/src/language/jump.properties 2015-05-08 13:51:35 UTC (rev 4428) @@ -788,8 +788,8 @@ org.openjump.core.ui.plugin.layer.SortCategoryByNamePlugIn.Descending = Descending org.openjump.core.ui.plugin.layer.SortCategoryRestorePlugIn.Restore = Restore org.openjump.core.ui.plugin.layer.SortCategorySavePlugIn.Save = Save -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Error-See-Output-Window = Error\: see output window -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Toggle-Visibility = Toggle Visibility +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn.Error-See-Output-Window = Error\: see output window +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn = Toggle Visibility org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImagePropertiesPlugIn.Change-Raster-Image-Properties = Change Raster Image Properties org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImageStyleDialog.Change-RasterImage-Style-Dialog-intro-text = With the controls of this dialog the raster image properties can be changed. org.openjump.core.ui.plugin.layer.pirolraster.CopySelectedRasterImageLayersPlugIn.Copy-Selected-Raster-Image-Layers = Copy Selected Raster Image Layers Modified: core/trunk/src/language/jump_cz.properties =================================================================== --- core/trunk/src/language/jump_cz.properties 2015-05-08 13:21:20 UTC (rev 4427) +++ core/trunk/src/language/jump_cz.properties 2015-05-08 13:51:35 UTC (rev 4428) @@ -766,8 +766,8 @@ org.openjump.core.ui.plugin.layer.SortCategoryByNamePlugIn.Descending = Sestupn\u011B org.openjump.core.ui.plugin.layer.SortCategoryRestorePlugIn.Restore = Obnovit org.openjump.core.ui.plugin.layer.SortCategorySavePlugIn.Save = Ulo\u017Eit -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Error-See-Output-Window = Chyba\: prohl\u00E9dn\u011Bte v\u00FDstupn\u00ED okno -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Toggle-Visibility = Zm\u011Bnit viditelnost +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn.Error-See-Output-Window = Chyba\: prohl\u00E9dn\u011Bte v\u00FDstupn\u00ED okno +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn = Zm\u011Bnit viditelnost org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImagePropertiesPlugIn.Change-Raster-Image-Properties = Zm\u011Bnit vlastnosti rastru org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImageStyleDialog.Change-RasterImage-Style-Dialog-intro-text = Vlastnosti obr\u00E1zku mohou b\u00FDt zm\u011Bn\u011Bny s vyu\u017Eit\u00EDm n\u00E1stroj\u016F tohoto dialogov\u00E9ho okna. org.openjump.core.ui.plugin.layer.pirolraster.CopySelectedRasterImageLayersPlugIn.Copy-Selected-Raster-Image-Layers = Kop\u00EDrovat vybran\u00E9 rastrov\u00E9 vrstvy Modified: core/trunk/src/language/jump_de.properties =================================================================== --- core/trunk/src/language/jump_de.properties 2015-05-08 13:21:20 UTC (rev 4427) +++ core/trunk/src/language/jump_de.properties 2015-05-08 13:51:35 UTC (rev 4428) @@ -767,8 +767,8 @@ org.openjump.core.ui.plugin.layer.SortCategoryByNamePlugIn.Descending = Absteigend org.openjump.core.ui.plugin.layer.SortCategoryRestorePlugIn.Restore = Wiederherstellen org.openjump.core.ui.plugin.layer.SortCategorySavePlugIn.Save = Sichern -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Error-See-Output-Window = Fehler\: bitte im Ausgabefenster schauen -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Toggle-Visibility = Sichtbarkeit Ein-/Ausschalten +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn.Error-See-Output-Window = Fehler\: bitte im Ausgabefenster schauen +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn = Sichtbarkeit Ein-/Ausschalten org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImagePropertiesPlugIn.Change-Raster-Image-Properties = Rasterbild-Eigenschaften \u00e4ndern org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImageStyleDialog.Change-RasterImage-Style-Dialog-intro-text = Die Einstellungen dieses Dialogs erlauben es Rasterbildeinstellungen zu \u00e4ndern org.openjump.core.ui.plugin.layer.pirolraster.CopySelectedRasterImageLayersPlugIn.Copy-Selected-Raster-Image-Layers = Ausgew\u00e4hlte Rasterbild-Ebenen kopieren Modified: core/trunk/src/language/jump_es.properties =================================================================== --- core/trunk/src/language/jump_es.properties 2015-05-08 13:21:20 UTC (rev 4427) +++ core/trunk/src/language/jump_es.properties 2015-05-08 13:51:35 UTC (rev 4428) @@ -792,8 +792,8 @@ org.openjump.core.ui.plugin.layer.SortCategoryByNamePlugIn.Descending=Descendente org.openjump.core.ui.plugin.layer.SortCategoryRestorePlugIn.Restore=Restaurar org.openjump.core.ui.plugin.layer.SortCategorySavePlugIn.Save=Guardar -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Error-See-Output-Window=Error\: vea la Ventana de Salida -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Toggle-Visibility=Establecer la visibilidad +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn.Error-See-Output-Window=Error\: vea la Ventana de Salida +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn=Establecer la visibilidad org.openjump.core.ui.plugin.mousemenu.category.MoveCategoryOneDown.Move-Category-One-Down=Mover la categor\u00EDa abajo org.openjump.core.ui.plugin.mousemenu.category.MoveCategoryOneDown.Only-a-single-category-can-be-moved\!=S\u00F3lo una categor\u00EDa se puede mover\! org.openjump.core.ui.plugin.mousemenu.category.MoveCategoryOneUp.Move-Category-One-Up=Mover categor\u00EDa arriba Modified: core/trunk/src/language/jump_fi.properties =================================================================== --- core/trunk/src/language/jump_fi.properties 2015-05-08 13:21:20 UTC (rev 4427) +++ core/trunk/src/language/jump_fi.properties 2015-05-08 13:51:35 UTC (rev 4428) @@ -2497,3 +2497,5 @@ ui.zoom.ZoomPreviousPlugIn.already-at-start=T\u00E4m\u00E4 on jo alussa ui.zoom.ZoomToCoordinatePlugIn.enter-coordinate-to-zoom-to=Anna koordinaatit, joihin kohdistetaan\: ui.zoom.ZoomTool.zoom-in-out=L\u00E4henn\u00E4/Loitonna +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn.Error-See-Output-Window=\#T\:Error\: see output window +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn=\#T\:Toggle Visibility Modified: core/trunk/src/language/jump_fr.properties =================================================================== --- core/trunk/src/language/jump_fr.properties 2015-05-08 13:21:20 UTC (rev 4427) +++ core/trunk/src/language/jump_fr.properties 2015-05-08 13:51:35 UTC (rev 4428) @@ -769,8 +769,8 @@ org.openjump.core.ui.plugin.layer.SortCategoryByNamePlugIn.Descending = Descendant org.openjump.core.ui.plugin.layer.SortCategoryRestorePlugIn.Restore = Restaurer org.openjump.core.ui.plugin.layer.SortCategorySavePlugIn.Save = Sauver -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Error-See-Output-Window = Erreur\: voir la fen\u00eatre de sortie -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Toggle-Visibility = Changer la visibilit\u00e9 +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn.Error-See-Output-Window = Erreur\: voir la fen\u00eatre de sortie +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn = Changer la visibilit\u00e9 org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImagePropertiesPlugIn.Change-Raster-Image-Properties = Changer les propri\u00e9t\u00e9s de l'image raster org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImageStyleDialog.Change-RasterImage-Style-Dialog-intro-text = Les propri\u00e9t\u00e9s de l'image peuvent \u00eatre chang\u00e9es \u00e0 l'aide des contr\u00f4les de cette boite de dialogue. org.openjump.core.ui.plugin.layer.pirolraster.CopySelectedRasterImageLayersPlugIn.Copy-Selected-Raster-Image-Layers = Copier les couches raster s\u00e9lectionn\u00e9es Modified: core/trunk/src/language/jump_hu.properties =================================================================== --- core/trunk/src/language/jump_hu.properties 2015-05-08 13:21:20 UTC (rev 4427) +++ core/trunk/src/language/jump_hu.properties 2015-05-08 13:51:35 UTC (rev 4428) @@ -766,8 +766,8 @@ org.openjump.core.ui.plugin.layer.SortCategoryByNamePlugIn.Descending = Cs\u00F6kken\u0151 org.openjump.core.ui.plugin.layer.SortCategoryRestorePlugIn.Restore = Vissza\u00E1ll\u00EDt\u00E1s org.openjump.core.ui.plugin.layer.SortCategorySavePlugIn.Save = Ment\u00E9s -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Error-See-Output-Window = Hiba\: l\u00E1sd a kimeneti ablakot -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Toggle-Visibility = L\u00E1that\u00F3s\u00E1g be/kikapcsol\u00E1sa +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn.Error-See-Output-Window = Hiba\: l\u00E1sd a kimeneti ablakot +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn = L\u00E1that\u00F3s\u00E1g be/kikapcsol\u00E1sa org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImagePropertiesPlugIn.Change-Raster-Image-Properties = Raszter k\u00E9p jellemz\u0151inek megv\u00E1ltoztat\u00E1sa org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImageStyleDialog.Change-RasterImage-Style-Dialog-intro-text = A p\u00E1rbesz\u00E9dablak vez\u00E9rl\u0151elemeivel a raszter k\u00E9p jellemz\u0151i v\u00E1ltoztathat\u00F3k meg. org.openjump.core.ui.plugin.layer.pirolraster.CopySelectedRasterImageLayersPlugIn.Copy-Selected-Raster-Image-Layers = Kijel\u00F6lt raszter r\u00E9tegek m\u00E1sol\u00E1sa Modified: core/trunk/src/language/jump_it.properties =================================================================== --- core/trunk/src/language/jump_it.properties 2015-05-08 13:21:20 UTC (rev 4427) +++ core/trunk/src/language/jump_it.properties 2015-05-08 13:51:35 UTC (rev 4428) @@ -792,8 +792,8 @@ org.openjump.core.ui.plugin.layer.SortCategoryByNamePlugIn.Descending=Discendente org.openjump.core.ui.plugin.layer.SortCategoryRestorePlugIn.Restore=Ripristina org.openjump.core.ui.plugin.layer.SortCategorySavePlugIn.Save=Salva -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Error-See-Output-Window=Errore\: Vedi finestra rapporti -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Toggle-Visibility=Imposta visibilit\u00E0 +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn.Error-See-Output-Window=Errore\: Vedi finestra rapporti +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn=Imposta visibilit\u00E0 org.openjump.core.ui.plugin.mousemenu.category.MoveCategoryOneDown.Move-Category-One-Down=Muovi categoria gi\u00F9 org.openjump.core.ui.plugin.mousemenu.category.MoveCategoryOneDown.Only-a-single-category-can-be-moved\!=Solo una categoria pu\u00F2 essere mossa\! org.openjump.core.ui.plugin.mousemenu.category.MoveCategoryOneUp.Move-Category-One-Up=Muovi categoria su Modified: core/trunk/src/language/jump_ja_JP.properties =================================================================== --- core/trunk/src/language/jump_ja_JP.properties 2015-05-08 13:21:20 UTC (rev 4427) +++ core/trunk/src/language/jump_ja_JP.properties 2015-05-08 13:51:35 UTC (rev 4428) @@ -765,8 +765,8 @@ org.openjump.core.ui.plugin.layer.SortCategoryByNamePlugIn.Descending = \u6607\u9806 org.openjump.core.ui.plugin.layer.SortCategoryRestorePlugIn.Restore = \u5FA9\u5143 org.openjump.core.ui.plugin.layer.SortCategorySavePlugIn.Save = \u4FDD\u5B58\u3059\u308B -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Error-See-Output-Window = \u30A8\u30E9\u30FC\: \u51FA\u529B\u30A6\u30A3\u30F3\u30C9\u30FC\u3092\u3054\u89A7\u304F\u3060\u3055\u3044 -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Toggle-Visibility = \u8868\u793A\u306E\u5207\u308A\u66FF\u3048 +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn.Error-See-Output-Window = \u30A8\u30E9\u30FC\: \u51FA\u529B\u30A6\u30A3\u30F3\u30C9\u30FC\u3092\u3054\u89A7\u304F\u3060\u3055\u3044 +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn = \u8868\u793A\u306E\u5207\u308A\u66FF\u3048 org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImagePropertiesPlugIn.Change-Raster-Image-Properties = \u30E9\u30B9\u30BF\u30FC\u753B\u50CF\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u5909\u66F4 org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImageStyleDialog.Change-RasterImage-Style-Dialog-intro-text = \u3053\u306E\u30C0\u30A4\u30A2\u30ED\u30B0\u306E\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB\u3092\u4F7F\u3063\u3066\uFF0C\u30E9\u30B9\u30BF\u30FC\u753B\u50CF\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u5909\u66F4\u3059\u308B\uFF0E org.openjump.core.ui.plugin.layer.pirolraster.CopySelectedRasterImageLayersPlugIn.Copy-Selected-Raster-Image-Layers = \:\u9078\u629E\u30E9\u30B9\u30BF\u30FC\u753B\u50CF\u30EC\u30A4\u30E4\u306E\u30B3\u30D4\u30FC Modified: core/trunk/src/language/jump_ml.properties =================================================================== --- core/trunk/src/language/jump_ml.properties 2015-05-08 13:21:20 UTC (rev 4427) +++ core/trunk/src/language/jump_ml.properties 2015-05-08 13:51:35 UTC (rev 4428) @@ -938,8 +938,8 @@ org.openjump.core.ui.plugin.layer.SortCategoryByNamePlugIn.Descending = \u0d07\u0d31\u0d15\u0d4d\u0d15\u0d02 org.openjump.core.ui.plugin.layer.SortCategoryRestorePlugIn.Restore = \u0d2a\u0d42\u0d30\u0d4d\u200d\u0d35\u0d4d\u0d35\u0d38\u0d4d\u0d25\u0d3f\u0d24\u0d3f\u0d2f\u0d3f\u0d32\u0d4d\u0d32\u0d3e\u0d15\u0d4d\u0d15\u0d41\u0d15 org.openjump.core.ui.plugin.layer.SortCategorySavePlugIn.Save = \u0d38\u0d02\u0d2d\u0d30\u0d3f\u0d15\u0d4d\u0d15\u0d41\u0d15 -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Error-See-Output-Window = \#T\: -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Toggle-Visibility = \#T\: +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn.Error-See-Output-Window = \#T\:Error\: see output window +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn = \#T\:Toggle Visibility org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImagePropertiesPlugIn.Change-Raster-Image-Properties = \#T\: org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImageStyleDialog.Change-RasterImage-Style-Dialog-intro-text = \#T\: org.openjump.core.ui.plugin.layer.pirolraster.CopySelectedRasterImageLayersPlugIn.Copy-Selected-Raster-Image-Layers = \#T\: @@ -985,8 +985,8 @@ org.openjump.core.ui.plugin.mousemenu.EditSelectedSideDialog.Selected-Side = \#T\: org.openjump.core.ui.plugin.mousemenu.EditSelectedSideDialog.Side = \#T\: org.openjump.core.ui.plugin.mousemenu.EditSelectedSideDialog.Zoom-To-Side = \#T\: -#T:org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Error-See-Output-Window = Error\: see output window -#T:org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Toggle-Visibility = Toggle Visibility +#T:org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn.Error-See-Output-Window = Error\: see output window +#T:org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn.Toggle-Visibility = Toggle Visibility #T:org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImagePropertiesPlugIn.Change-Raster-Image-Properties = Change Raster Image Properties #T:org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImageStyleDialog.Change-RasterImage-Style-Dialog-intro-text = With the controls of this dialog the raster image properties can be changed. #T:org.openjump.core.ui.plugin.layer.pirolraster.CopySelectedRasterImageLayersPlugIn.Copy-Selected-Raster-Image-Layers = Copy Selected Raster Image Layers Modified: core/trunk/src/language/jump_pt.properties =================================================================== --- core/trunk/src/language/jump_pt.properties 2015-05-08 13:21:20 UTC (rev 4427) +++ core/trunk/src/language/jump_pt.properties 2015-05-08 13:51:35 UTC (rev 4428) @@ -765,8 +765,8 @@ org.openjump.core.ui.plugin.layer.SortCategoryByNamePlugIn.Descending = Descending org.openjump.core.ui.plugin.layer.SortCategoryRestorePlugIn.Restore = Restaurar org.openjump.core.ui.plugin.layer.SortCategorySavePlugIn.Save = Salvar -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Error-See-Output-Window = Erro\: veja janela de sa\u00edda -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Toggle-Visibility = Alternar Visibilidade +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn.Error-See-Output-Window = Erro\: veja janela de sa\u00edda +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn = Alternar Visibilidade org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImagePropertiesPlugIn.Change-Raster-Image-Properties = Modificar as propriedadas da imagem raster org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImageStyleDialog.Change-RasterImage-Style-Dialog-intro-text = Com os controles desta janela as propriedades da imagem raster podem ser modificados. org.openjump.core.ui.plugin.layer.pirolraster.CopySelectedRasterImageLayersPlugIn.Copy-Selected-Raster-Image-Layers = Copiar o layer com a imagem raster selecionada Modified: core/trunk/src/language/jump_pt_BR.properties =================================================================== --- core/trunk/src/language/jump_pt_BR.properties 2015-05-08 13:21:20 UTC (rev 4427) +++ core/trunk/src/language/jump_pt_BR.properties 2015-05-08 13:51:35 UTC (rev 4428) @@ -765,8 +765,8 @@ org.openjump.core.ui.plugin.layer.SortCategoryByNamePlugIn.Descending = Descendente org.openjump.core.ui.plugin.layer.SortCategoryRestorePlugIn.Restore = Restaurar org.openjump.core.ui.plugin.layer.SortCategorySavePlugIn.Save = Salvar -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Error-See-Output-Window = Erro\: veja janela de sa\u00edda -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Toggle-Visibility = Alternar Visibilidade +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn.Error-See-Output-Window = Erro\: veja janela de sa\u00edda +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn = Alternar Visibilidade org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImagePropertiesPlugIn.Change-Raster-Image-Properties = Modificar as propriedadas da imagem raster org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImageStyleDialog.Change-RasterImage-Style-Dialog-intro-text = Com os controles desta janela as propriedades da imagem raster podem ser modificados. org.openjump.core.ui.plugin.layer.pirolraster.CopySelectedRasterImageLayersPlugIn.Copy-Selected-Raster-Image-Layers = Copiar o layer com a imagem raster selecionada Modified: core/trunk/src/language/jump_ta_IN.properties =================================================================== --- core/trunk/src/language/jump_ta_IN.properties 2015-05-08 13:21:20 UTC (rev 4427) +++ core/trunk/src/language/jump_ta_IN.properties 2015-05-08 13:51:35 UTC (rev 4428) @@ -763,8 +763,8 @@ org.openjump.core.ui.plugin.layer.SortCategoryByNamePlugIn.Descending = \u0B87\u0BB1\u0B99\u0BCD\u0B95\u0BC1 org.openjump.core.ui.plugin.layer.SortCategoryRestorePlugIn.Restore = \u0BAE\u0BC0\u0B9F\u0BCD\u0B95\u0BB5\u0BC1\u0BAE\u0BCD org.openjump.core.ui.plugin.layer.SortCategorySavePlugIn.Save = \u0B9A\u0BC7\u0BAE\u0BBF\u0B95\u0BCD\u0B95\u0BB5\u0BC1\u0BAE\u0BCD -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Error-See-Output-Window = \u0BAA\u0BBF\u0BB4\u0BC8 \: \u0BB5\u0BC6\u0BB3\u0BBF\u0BAF\u0BC0\u0B9F\u0BC1 \u0B9A\u0BBE\u0BB3\u0BB0\u0BAE\u0BCD \u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95 -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Toggle-Visibility = \u0BAE\u0BBE\u0BB1\u0BCD\u0BB1\u0BC1 \u0BA4\u0BC6\u0BB0\u0BBF\u0BA4\u0BB2\u0BCD +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn.Error-See-Output-Window = \u0BAA\u0BBF\u0BB4\u0BC8 \: \u0BB5\u0BC6\u0BB3\u0BBF\u0BAF\u0BC0\u0B9F\u0BC1 \u0B9A\u0BBE\u0BB3\u0BB0\u0BAE\u0BCD \u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95 +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn = \u0BAE\u0BBE\u0BB1\u0BCD\u0BB1\u0BC1 \u0BA4\u0BC6\u0BB0\u0BBF\u0BA4\u0BB2\u0BCD org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImagePropertiesPlugIn.Change-Raster-Image-Properties = \u0BB0\u0BBE\u0BB8\u0BCD\u0B9F\u0BB0\u0BCD \u0BAA\u0B9F \u0BA4\u0BA9\u0BCD\u0BAE\u0BC8\u0B95\u0BB3\u0BCD \u0BAE\u0BBE\u0BB1\u0BCD\u0BB1\u0BB5\u0BC1\u0BAE\u0BCD org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImageStyleDialog.Change-RasterImage-Style-Dialog-intro-text = \u0B87\u0BA8\u0BCD\u0BA4 \u0B89\u0BB0\u0BC8\u0BAF\u0BBE\u0B9F\u0BB2\u0BCD \u0B95\u0B9F\u0BCD\u0B9F\u0BC1\u0BAA\u0BCD\u0BAA\u0BBE\u0B9F\u0BC1\u0B95\u0BB3\u0BC8 \u0B95\u0BC6\u0BBE\u0BA3\u0BCD\u0B9F \u0B89\u0BB0\u0BC1\u0BB5\u0BA4\u0BCD\u0BA4\u0BC8 \u0BAA\u0BA3\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BC8 \u0BAE\u0BBE\u0BB1\u0BCD\u0BB1 \u0BAE\u0BC1\u0B9F\u0BBF\u0BAF\u0BC1\u0BAE\u0BCD org.openjump.core.ui.plugin.layer.pirolraster.CopySelectedRasterImageLayersPlugIn.Copy-Selected-Raster-Image-Layers = \u0BA8\u0B95\u0BB2\u0BCD \u0BA4\u0BC7\u0BB0\u0BCD\u0BA8\u0BCD\u0BA4\u0BC6\u0B9F\u0BC1\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F \u0B89\u0BB0\u0BC1\u0BB5\u0BA4\u0BCD\u0BA4\u0BC8 \u0B85\u0B9F\u0BC1\u0B95\u0BCD\u0B95\u0BC1\u0B95\u0BB3\u0BCD Modified: core/trunk/src/language/jump_te.properties =================================================================== --- core/trunk/src/language/jump_te.properties 2015-05-08 13:21:20 UTC (rev 4427) +++ core/trunk/src/language/jump_te.properties 2015-05-08 13:51:35 UTC (rev 4428) @@ -772,8 +772,8 @@ #T:org.openjump.core.ui.plugin.layer.SortCategoryByNamePlugIn.Descending=Descending #T:org.openjump.core.ui.plugin.layer.SortCategoryRestorePlugIn.Restore=Restore #T:org.openjump.core.ui.plugin.layer.SortCategorySavePlugIn.Save=Save -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Error-See-Output-Window = Error\: see \u0c14\u0c1f\u0c4d\u0c2a\u0c41\u0c1f\u0c4d window -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Toggle-Visibility = \#T\: +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn.Error-See-Output-Window = Error\: see \u0c14\u0c1f\u0c4d\u0c2a\u0c41\u0c1f\u0c4d window +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn = \#T\:Toggle Visibility org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImagePropertiesPlugIn.Change-Raster-Image-Properties = \#T\: org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImageStyleDialog.Change-RasterImage-Style-Dialog-intro-text = \#T\: org.openjump.core.ui.plugin.layer.pirolraster.CopySelectedRasterImageLayersPlugIn.Copy-Selected-Raster-Image-Layers = \#T\: @@ -792,7 +792,7 @@ org.openjump.core.ui.plugin.layer.pirolraster.RasterImageLayerControllPanel.processing-speed = \#T\: org.openjump.core.ui.plugin.layer.pirolraster.RasterImageLayerControllPanel.set-overall-transparency = \#T\: org.openjump.core.ui.plugin.layer.pirolraster.RasterImageWizardPanel.east-coordinate = \#T\: -#T:org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Toggle-Visibility=Toggle Visibility +#T:org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn.Toggle-Visibility=Toggle Visibility #T:org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImagePropertiesPlugIn.Change-Raster-Image-Properties=Change Raster Image Properties #T:org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImageStyleDialog.Change-RasterImage-Style-Dialog-intro-text=With the controls of this dialog the raster image properties can be changed. #T:org.openjump.core.ui.plugin.layer.pirolraster.CopySelectedRasterImageLayersPlugIn.Copy-Selected-Raster-Image-Layers=Copy Selected Raster Image Layers Modified: core/trunk/src/language/jump_zh_CN.properties =================================================================== --- core/trunk/src/language/jump_zh_CN.properties 2015-05-08 13:21:20 UTC (rev 4427) +++ core/trunk/src/language/jump_zh_CN.properties 2015-05-08 13:51:35 UTC (rev 4428) @@ -768,8 +768,8 @@ org.openjump.core.ui.plugin.layer.SortCategoryByNamePlugIn.Descending = \u964d\u5e8f org.openjump.core.ui.plugin.layer.SortCategoryRestorePlugIn.Restore = \u8fd8\u539f org.openjump.core.ui.plugin.layer.SortCategorySavePlugIn.Save = \u4fdd\u5b58 -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Error-See-Output-Window = \u9519\u8bef\uff1a \u770b\u5230\u8f93\u51fa\u7a97\u53e3 -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Toggle-Visibility = \u5207\u6362\u663e\u793a +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn.Error-See-Output-Window = \u9519\u8bef\uff1a \u770b\u5230\u8f93\u51fa\u7a97\u53e3 +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn = \u5207\u6362\u663e\u793a org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImagePropertiesPlugIn.Change-Raster-Image-Properties = \u6805\u683c\u56fe\u50cf\u5c5e\u6027\u7684\u53d8\u5316 org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImageStyleDialog.Change-RasterImage-Style-Dialog-intro-text = \u4e0e\u5bf9\u7167\u7ec4\u7684\u6b64\u5bf9\u8bdd\u6846\u4e2d\u7684\u5149\u6805\u56fe\u50cf\u5c5e\u6027\u53ef\u4ee5\u6539\u53d8\u7684\u3002 org.openjump.core.ui.plugin.layer.pirolraster.CopySelectedRasterImageLayersPlugIn.Copy-Selected-Raster-Image-Layers = \u590d\u5236\u9009\u5b9a\u7684\u6805\u683c\u56fe\u50cf\u5c42 Modified: core/trunk/src/language/jump_zh_HK.properties =================================================================== --- core/trunk/src/language/jump_zh_HK.properties 2015-05-08 13:21:20 UTC (rev 4427) +++ core/trunk/src/language/jump_zh_HK.properties 2015-05-08 13:51:35 UTC (rev 4428) @@ -768,8 +768,8 @@ org.openjump.core.ui.plugin.layer.SortCategoryByNamePlugIn.Descending = \u964D\u5E8F org.openjump.core.ui.plugin.layer.SortCategoryRestorePlugIn.Restore = \u9084\u539F org.openjump.core.ui.plugin.layer.SortCategorySavePlugIn.Save = \u4FDD\u5B58 -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Error-See-Output-Window = \u932F\u8AA4\uFF1A \u770B\u5230\u8F38\u51FA\u7A97\u53E3 -org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Toggle-Visibility = \u5207\u63DB\u986F\u793A +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn.Error-See-Output-Window = \u932F\u8AA4\uFF1A \u770B\u5230\u8F38\u51FA\u7A97\u53E3 +org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn = \u5207\u63DB\u986F\u793A org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImagePropertiesPlugIn.Change-Raster-Image-Properties = \u67F5\u683C\u5716\u50CF\u5C6C\u6027\u7684\u8B8A\u5316 org.openjump.core.ui.plugin.layer.pirolraster.ChangeRasterImageStyleDialog.Change-RasterImage-Style-Dialog-intro-text = \u8207\u5C0D\u7167\u7D44\u7684\u6B64\u5C0D\u8A71\u6846\u4E2D\u7684\u5149\u67F5\u5716\u50CF\u5C6C\u6027\u53EF\u4EE5\u6539\u8B8A\u7684\u3002 org.openjump.core.ui.plugin.layer.pirolraster.CopySelectedRasterImageLayersPlugIn.Copy-Selected-Raster-Image-Layers = \u8907\u88FD\u9078\u5B9A\u7684\u67F5\u683C\u5716\u50CF\u5C64 Modified: core/trunk/src/org/openjump/OpenJumpConfiguration.java =================================================================== --- core/trunk/src/org/openjump/OpenJumpConfiguration.java 2015-05-08 13:21:20 UTC (rev 4427) +++ core/trunk/src/org/openjump/OpenJumpConfiguration.java 2015-05-08 13:51:35 UTC (rev 4428) @@ -46,7 +46,7 @@ import org.openjump.core.ui.plugin.file.OpenWizardPlugIn; //import org.openjump.core.ui.plugin.layer.ChangeSRIDPlugIn; //import org.openjump.core.ui.plugin.layer.LayerPropertiesPlugIn; -//import org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn; +//import org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn; import org.openjump.core.ui.plugin.layer.pirolraster.RasterImageContextMenu; //import org.openjump.core.ui.plugin.mousemenu.SaveDatasetsPlugIn; //import org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn; @@ -240,7 +240,7 @@ // myFullPathPlugin.initialize(new PlugInContext(workbenchContext, null, null, // null, null)); // -// ToggleVisiblityPlugIn myToggleVisPlugIn = new ToggleVisiblityPlugIn(); +// ToggleVisibilityPlugIn myToggleVisPlugIn = new ToggleVisibilityPlugIn(); // myToggleVisPlugIn.initialize(new PlugInContext(workbenchContext, null, // null, null, null)); Copied: core/trunk/src/org/openjump/core/ui/plugin/layer/ToggleVisibilityPlugIn.java (from rev 4427, core/trunk/src/org/openjump/core/ui/plugin/layer/ToggleVisiblityPlugIn.java) =================================================================== --- core/trunk/src/org/openjump/core/ui/plugin/layer/ToggleVisibilityPlugIn.java (rev 0) +++ core/trunk/src/org/openjump/core/ui/plugin/layer/ToggleVisibilityPlugIn.java 2015-05-08 13:51:35 UTC (rev 4428) @@ -0,0 +1,150 @@ +/* + * The Unified Mapping Platform (JUMP) is an extensible, interactive GUI + * for visualizing and manipulating spatial features with geometry and attributes. + * + * JUMP is Copyright (C) 2003 Vivid Solutions + * + * This program implements extensions to JUMP and is + * Copyright (C) 2004 Integrated Systems Analysts, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * For more information, contact: + * + * Integrated Systems Analysts, Inc. + * 630C Anchors St., Suite 101 + * Fort Walton Beach, Florida + * USA + * + * (850)862-7321 + * www.ashs.isa.com + */ + +package org.openjump.core.ui.plugin.layer; + +import java.util.Collection; +import java.util.Iterator; + +import javax.swing.Icon; +import javax.swing.ImageIcon; +import javax.swing.JCheckBoxMenuItem; +import javax.swing.JComponent; +import javax.swing.JPopupMenu; + +import com.vividsolutions.jump.I18N; +import com.vividsolutions.jump.workbench.WorkbenchContext; +import com.vividsolutions.jump.workbench.model.Layerable; +import com.vividsolutions.jump.workbench.plugin.AbstractPlugIn; +import com.vividsolutions.jump.workbench.plugin.EnableCheck; +import com.vividsolutions.jump.workbench.plugin.EnableCheckFactory; +import com.vividsolutions.jump.workbench.plugin.MultiEnableCheck; +import com.vividsolutions.jump.workbench.plugin.PlugInContext; +import com.vividsolutions.jump.workbench.ui.GUIUtil; +import com.vividsolutions.jump.workbench.ui.images.IconLoader; +import com.vividsolutions.jump.workbench.ui.plugin.FeatureInstaller; + +public class ToggleVisibilityPlugIn extends AbstractPlugIn { + private final static String toggleVisibility = I18N + .get("org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn"); + private final static String errorSeeOutputWindow = I18N + .get("org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn.Error-See-Output-Window"); + private final static String layerName = I18N + .get("org.openjump.core.ui.plugin.mousemenu.SaveDatasetsPlugIn.Layer-Name"); + + public void initialize(PlugInContext context) throws Exception { + WorkbenchContext workbenchContext = context.getWorkbenchContext(); + + FeatureInstaller featureInstaller = new FeatureInstaller(workbenchContext); + JPopupMenu layerNamePopupMenu = workbenchContext.getWorkbench().getFrame() + .getLayerNamePopupMenu(); + featureInstaller.addPopupMenuItem(layerNamePopupMenu, this, + toggleVisibility+"{pos:2}", true, + GUIUtil.toSmallIcon((ImageIcon) this.getIcon()), + ToggleVisibilityPlugIn.createEnableCheck(workbenchContext)); + + JPopupMenu wmsLayerNamePopupMenu = workbenchContext.getWorkbench() + .getFrame().getWMSLayerNamePopupMenu(); + featureInstaller.addPopupMenuItem(wmsLayerNamePopupMenu, this, + toggleVisibility+"{pos:2}", true, + GUIUtil.toSmallIcon((ImageIcon) this.getIcon()), + ToggleVisibilityPlugIn.createEnableCheck(workbenchContext)); + + } + + public Icon getIcon() { + return IconLoader.icon("eye.png"); + } + + public boolean execute(PlugInContext context) throws Exception { + try { + Collection layerCollection = (Collection) context.getWorkbenchContext() + .getLayerNamePanel().selectedNodes(Layerable.class); + boolean firingEvents = context.getLayerManager().isFiringEvents(); + context.getLayerManager().setFiringEvents(false); + try { + for (Iterator j = layerCollection.iterator(); j.hasNext();) { + Layerable layer = (Layerable) j.next(); + // monitor.report(layerName+": " + layer.getName()); + layer.setVisible(!layer.isVisible()); + } + } finally { + context.getLayerManager().setFiringEvents(firingEvents); + context.getLayerViewPanel().repaint(); + context.getWorkbenchFrame().repaint(); + } + } catch (Exception e) { + context.getWorkbenchFrame().warnUser(errorSeeOutputWindow); + context.getWorkbenchFrame().getOutputFrame().createNewDocument(); + context.getWorkbenchFrame().getOutputFrame() + .addText("ToggleVisibilityPlugIn Exception:" + e.toString()); + return false; + } + return true; + } + + // /** @deprecated */ + // public static MultiEnableCheck createEnableCheck( + // WorkbenchContext workbenchContext) { + // EnableCheckFactory checkFactory = new EnableCheckFactory(workbenchContext); + // return new MultiEnableCheck().add( + // checkFactory.createWindowWithSelectionManagerMustBeActiveCheck()).add( + // checkFactory.createAtLeastNLayersMustBeSelectedCheck(1)); + // } + + public static MultiEnableCheck createEnableCheck( + final WorkbenchContext workbenchContext) { + EnableCheckFactory checkFactory = new EnableCheckFactory(workbenchContext); + MultiEnableCheck mec = new MultiEnableCheck(); + + mec.add(checkFactory.createWindowWithSelectionManagerMustBeActiveCheck()); + + mec.add(checkFactory.createAtLeastNLayerablesMustBeSelectedCheck(1, + Layerable.class)); + + // switch checkbox according to layer state + mec.add(new EnableCheck() { + public String check(JComponent component) { + Collection<Layerable> layers = workbenchContext.createPlugInContext() + .getSelectedLayerables(); + Layerable layer = layers.iterator().next(); + ((JCheckBoxMenuItem) component).setSelected(layer != null + && layer.isVisible()); + return null; + } + }); + + return mec; + } +} Deleted: core/trunk/src/org/openjump/core/ui/plugin/layer/ToggleVisiblityPlugIn.java =================================================================== --- core/trunk/src/org/openjump/core/ui/plugin/layer/ToggleVisiblityPlugIn.java 2015-05-08 13:21:20 UTC (rev 4427) +++ core/trunk/src/org/openjump/core/ui/plugin/layer/ToggleVisiblityPlugIn.java 2015-05-08 13:51:35 UTC (rev 4428) @@ -1,150 +0,0 @@ -/* - * The Unified Mapping Platform (JUMP) is an extensible, interactive GUI - * for visualizing and manipulating spatial features with geometry and attributes. - * - * JUMP is Copyright (C) 2003 Vivid Solutions - * - * This program implements extensions to JUMP and is - * Copyright (C) 2004 Integrated Systems Analysts, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * For more information, contact: - * - * Integrated Systems Analysts, Inc. - * 630C Anchors St., Suite 101 - * Fort Walton Beach, Florida - * USA - * - * (850)862-7321 - * www.ashs.isa.com - */ - -package org.openjump.core.ui.plugin.layer; - -import java.util.Collection; -import java.util.Iterator; - -import javax.swing.Icon; -import javax.swing.ImageIcon; -import javax.swing.JCheckBoxMenuItem; -import javax.swing.JComponent; -import javax.swing.JPopupMenu; - -import com.vividsolutions.jump.I18N; -import com.vividsolutions.jump.workbench.WorkbenchContext; -import com.vividsolutions.jump.workbench.model.Layerable; -import com.vividsolutions.jump.workbench.plugin.AbstractPlugIn; -import com.vividsolutions.jump.workbench.plugin.EnableCheck; -import com.vividsolutions.jump.workbench.plugin.EnableCheckFactory; -import com.vividsolutions.jump.workbench.plugin.MultiEnableCheck; -import com.vividsolutions.jump.workbench.plugin.PlugInContext; -import com.vividsolutions.jump.workbench.ui.GUIUtil; -import com.vividsolutions.jump.workbench.ui.images.IconLoader; -import com.vividsolutions.jump.workbench.ui.plugin.FeatureInstaller; - -public class ToggleVisiblityPlugIn extends AbstractPlugIn { - private final static String toggleVisibility = I18N - .get("org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Toggle-Visibility"); - private final static String errorSeeOutputWindow = I18N - .get("org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Error-See-Output-Window"); - private final static String layerName = I18N - .get("org.openjump.core.ui.plugin.mousemenu.SaveDatasetsPlugIn.Layer-Name"); - - public void initialize(PlugInContext context) throws Exception { - WorkbenchContext workbenchContext = context.getWorkbenchContext(); - - FeatureInstaller featureInstaller = new FeatureInstaller(workbenchContext); - JPopupMenu layerNamePopupMenu = workbenchContext.getWorkbench().getFrame() - .getLayerNamePopupMenu(); - featureInstaller.addPopupMenuItem(layerNamePopupMenu, this, - toggleVisibility+"{pos:2}", true, - GUIUtil.toSmallIcon((ImageIcon) this.getIcon()), - ToggleVisiblityPlugIn.createEnableCheck(workbenchContext)); - - JPopupMenu wmsLayerNamePopupMenu = workbenchContext.getWorkbench() - .getFrame().getWMSLayerNamePopupMenu(); - featureInstaller.addPopupMenuItem(wmsLayerNamePopupMenu, this, - toggleVisibility+"{pos:2}", true, - GUIUtil.toSmallIcon((ImageIcon) this.getIcon()), - ToggleVisiblityPlugIn.createEnableCheck(workbenchContext)); - - } - - public Icon getIcon() { - return IconLoader.icon("eye.png"); - } - - public boolean execute(PlugInContext context) throws Exception { - try { - Collection layerCollection = (Collection) context.getWorkbenchContext() - .getLayerNamePanel().selectedNodes(Layerable.class); - boolean firingEvents = context.getLayerManager().isFiringEvents(); - context.getLayerManager().setFiringEvents(false); - try { - for (Iterator j = layerCollection.iterator(); j.hasNext();) { - Layerable layer = (Layerable) j.next(); - // monitor.report(layerName+": " + layer.getName()); - layer.setVisible(!layer.isVisible()); - } - } finally { - context.getLayerManager().setFiringEvents(firingEvents); - context.getLayerViewPanel().repaint(); - context.getWorkbenchFrame().repaint(); - } - } catch (Exception e) { - context.getWorkbenchFrame().warnUser(errorSeeOutputWindow); - context.getWorkbenchFrame().getOutputFrame().createNewDocument(); - context.getWorkbenchFrame().getOutputFrame() - .addText("ToggleVisiblityPlugIn Exception:" + e.toString()); - return false; - } - return true; - } - - // /** @deprecated */ - // public static MultiEnableCheck createEnableCheck( - // WorkbenchContext workbenchContext) { - // EnableCheckFactory checkFactory = new EnableCheckFactory(workbenchContext); - // return new MultiEnableCheck().add( - // checkFactory.createWindowWithSelectionManagerMustBeActiveCheck()).add( - // checkFactory.createAtLeastNLayersMustBeSelectedCheck(1)); - // } - - public static MultiEnableCheck createEnableCheck( - final WorkbenchContext workbenchContext) { - EnableCheckFactory checkFactory = new EnableCheckFactory(workbenchContext); - MultiEnableCheck mec = new MultiEnableCheck(); - - mec.add(checkFactory.createWindowWithSelectionManagerMustBeActiveCheck()); - - mec.add(checkFactory.createAtLeastNLayerablesMustBeSelectedCheck(1, - Layerable.class)); - - // switch checkbox according to layer state - mec.add(new EnableCheck() { - public String check(JComponent component) { - Collection<Layerable> layers = workbenchContext.createPlugInContext() - .getSelectedLayerables(); - Layerable layer = layers.iterator().next(); - ((JCheckBoxMenuItem) component).setSelected(layer != null - && layer.isVisible()); - return null; - } - }); - - return mec; - } -} ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel