Sunburned Surveyor wrote:
Hello,
> I must apologize, but I think I missed some of this thread. What is
> your patch for? I'm sure there won't be a problem checking it in, but
> I should get some idea of what it fixes first.
> I apologize if I am asking you to repeat information that was already posted.
it's a plugin that adds a context menu item for the layer names to
rename layers.
Additionally I included a fix for the ToggleVisibilityPlugIn so it works
with WMS layers.
I attached a new version of the patch and the new class.
Best regards, Andreas
--
l a t / l o n GmbH
Aennchenstrasse 19 53177 Bonn, Germany
phone ++49 +228 18496-11 fax ++49 +228 1849629
http://www.lat-lon.de http://www.deegree.org
Index: language/jump_fi.properties
===================================================================
--- language/jump_fi.properties (Revision 912)
+++ language/jump_fi.properties (Arbeitskopie)
@@ -438,6 +438,7 @@
org.openjump.core.ui.plugin.layer.AddSIDLayerPlugIn.files
= tiedostot
org.openjump.core.ui.plugin.layer.AddSIDLayerPlugIn.not-installed
= ei asennettu
org.openjump.core.ui.plugin.layer.AddSIDLayerPlugIn.open-MrSID-file
= Avaa MrSID-tiedosto
+org.openjump.core.ui.plugin.layer.ChangeLayerableName.Rename
= Rename Selected Layer
org.openjump.core.ui.plugin.layer.ChangeSRIDPlugIn.Change-SRID
= Vaihda projektiokoodi (SRID)
org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Error-See-Output-Window
= Virhe. Lis\u00E4tietoja
viesti-ikkunassa
org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Toggle-Visibility
= Vaihda n\u00E4kyvyytt\u00E4
Index: language/jump.properties
===================================================================
--- language/jump.properties (Revision 912)
+++ language/jump.properties (Arbeitskopie)
@@ -434,6 +434,7 @@
org.openjump.core.ui.plugin.layer.AddSIDLayerPlugIn.files
= files
org.openjump.core.ui.plugin.layer.AddSIDLayerPlugIn.not-installed
= not installed.
org.openjump.core.ui.plugin.layer.AddSIDLayerPlugIn.open-MrSID-file
= open MrSID file
+org.openjump.core.ui.plugin.layer.ChangeLayerableName.Rename
= Rename Selected Layer
org.openjump.core.ui.plugin.layer.ChangeSRIDPlugIn.Change-SRID
= Change SRID
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
Index: language/jump_zh_CN.properties
===================================================================
--- language/jump_zh_CN.properties (Revision 912)
+++ language/jump_zh_CN.properties (Arbeitskopie)
@@ -418,6 +418,7 @@
org.openjump.core.ui.plugin.layer.AddSIDLayerPlugIn.files
= files
org.openjump.core.ui.plugin.layer.AddSIDLayerPlugIn.not-installed
= not installed.
org.openjump.core.ui.plugin.layer.AddSIDLayerPlugIn.open-MrSID-file
= open MrSID file
+org.openjump.core.ui.plugin.layer.ChangeLayerableName.Rename
= Rename Selected Layer
org.openjump.core.ui.plugin.layer.ChangeSRIDPlugIn.Change-SRID
= Change SRID
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
Index: language/jump_en.properties
===================================================================
--- language/jump_en.properties (Revision 912)
+++ language/jump_en.properties (Arbeitskopie)
@@ -434,6 +434,7 @@
org.openjump.core.ui.plugin.layer.AddSIDLayerPlugIn.files
= files
org.openjump.core.ui.plugin.layer.AddSIDLayerPlugIn.not-installed
= not installed.
org.openjump.core.ui.plugin.layer.AddSIDLayerPlugIn.open-MrSID-file
= open MrSID file
+org.openjump.core.ui.plugin.layer.ChangeLayerableName.Rename
= Rename Selected Layer
org.openjump.core.ui.plugin.layer.ChangeSRIDPlugIn.Change-SRID
= Change SRID
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
Index: language/jump_pt.properties
===================================================================
--- language/jump_pt.properties (Revision 912)
+++ language/jump_pt.properties (Arbeitskopie)
@@ -426,6 +426,7 @@
org.openjump.core.ui.plugin.layer.AddSIDLayerPlugIn.files
= files
org.openjump.core.ui.plugin.layer.AddSIDLayerPlugIn.not-installed
= not installed.
org.openjump.core.ui.plugin.layer.AddSIDLayerPlugIn.open-MrSID-file
= open MrSID file
+org.openjump.core.ui.plugin.layer.ChangeLayerableName.Rename
= Rename Selected Layer
org.openjump.core.ui.plugin.layer.ChangeSRIDPlugIn.Change-SRID
= Change SRID
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
Index: language/jump_pt_BR.properties
===================================================================
--- language/jump_pt_BR.properties (Revision 912)
+++ language/jump_pt_BR.properties (Arbeitskopie)
@@ -424,6 +424,7 @@
org.openjump.core.ui.plugin.layer.AddSIDLayerPlugIn.files
= arquivos
org.openjump.core.ui.plugin.layer.AddSIDLayerPlugIn.not-installed
= n\u00E3o instalado
org.openjump.core.ui.plugin.layer.AddSIDLayerPlugIn.open-MrSID-file
= abrir arquivo MrSID
+org.openjump.core.ui.plugin.layer.ChangeLayerableName.Rename
= Rename Selected Layer
org.openjump.core.ui.plugin.layer.ChangeSRIDPlugIn.Change-SRID
= Trocar SRID
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
Index: language/jump_es.properties
===================================================================
--- language/jump_es.properties (Revision 912)
+++ language/jump_es.properties (Arbeitskopie)
@@ -426,6 +426,7 @@
org.openjump.core.ui.plugin.layer.AddSIDLayerPlugIn.files
= archivos
org.openjump.core.ui.plugin.layer.AddSIDLayerPlugIn.not-installed
= no instalado.
org.openjump.core.ui.plugin.layer.AddSIDLayerPlugIn.open-MrSID-file
= abrir archivo MrSID
+org.openjump.core.ui.plugin.layer.ChangeLayerableName.Rename
= Rename Selected Layer
org.openjump.core.ui.plugin.layer.ChangeSRIDPlugIn.Change-SRID
= Cambiar SRID
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
= Conmutar visibilidad
Index: language/jump_fr.properties
===================================================================
--- language/jump_fr.properties (Revision 912)
+++ language/jump_fr.properties (Arbeitskopie)
@@ -434,6 +434,7 @@
org.openjump.core.ui.plugin.layer.AddSIDLayerPlugIn.files
= fichiers
org.openjump.core.ui.plugin.layer.AddSIDLayerPlugIn.not-installed
= n'a pas \u00E9t\u00E9
install\u00E9.
org.openjump.core.ui.plugin.layer.AddSIDLayerPlugIn.open-MrSID-file
= ouvrir un fichier MrSID
+org.openjump.core.ui.plugin.layer.ChangeLayerableName.Rename
= Rename Selected Layer
org.openjump.core.ui.plugin.layer.ChangeSRIDPlugIn.Change-SRID
= Changer le SRID
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
Index: language/jump_de.properties
===================================================================
--- language/jump_de.properties (Revision 912)
+++ language/jump_de.properties (Arbeitskopie)
@@ -426,6 +426,7 @@
org.openjump.core.ui.plugin.layer.AddSIDLayerPlugIn.files
= Dateien
org.openjump.core.ui.plugin.layer.AddSIDLayerPlugIn.not-installed
= nicht installiert.
org.openjump.core.ui.plugin.layer.AddSIDLayerPlugIn.open-MrSID-file
= MrSID Bild \u00F6ffnen
+org.openjump.core.ui.plugin.layer.ChangeLayerableName.Rename
= Ausgew\u00E4hlte Ebene umbenennen
org.openjump.core.ui.plugin.layer.ChangeSRIDPlugIn.Change-SRID
= SRID \u00E4ndern
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
@@ -1192,7 +1193,7 @@
ui.plugin.analysis.SpatialJoinPlugIn.Executing-join
=
Ausf\u00FChrung
ui.plugin.analysis.SpatialJoinPlugIn.Join
=
Zusammenf\u00FChren
ui.plugin.analysis.SpatialJoinPlugIn.Joins-two-layers-on-a-given-spatial-relationship
= F\u00FChrt zwei
Ebenen zusammen unter Anwendung einer anzugegebenden r\u00E4umlichen Beziehung.
-ui.plugin.analysis.SpatialJoinPlugIn.Spatial-Join
=
R\u00E4umliches Zusammenfu00FChren
+ui.plugin.analysis.SpatialJoinPlugIn.Spatial-Join
=
R\u00E4umliches Zusammenf\u00FChren
ui.plugin.analysis.SpatialJoinPlugIn.example
= i.e. WAEHLE
A.*, B.* VON A MIT B FUER A.Geometrie <Beziehung> B.Geometrie
ui.plugin.analysis.SpatialQueryPlugIn.Allow-Duplicates-in-Result
= Erlaube
doppelte Ergebnisse
ui.plugin.analysis.SpatialQueryPlugIn.Complement-Result
=
Komplement\u00E4r-Ergebnis (Umkehrung)
Index: org/openjump/OpenJumpConfiguration.java
===================================================================
--- org/openjump/OpenJumpConfiguration.java (Revision 912)
+++ org/openjump/OpenJumpConfiguration.java (Arbeitskopie)
@@ -10,7 +10,6 @@
*/
package org.openjump;
-import javax.swing.JMenu;
import javax.swing.JPopupMenu;
import org.openjump.core.ccordsys.srid.EnsureAllLayersHaveSRIDStylePlugIn;
@@ -30,6 +29,7 @@
import org.openjump.core.ui.plugin.edittoolbox.SelectOneItemPlugIn;
import org.openjump.core.ui.plugin.file.SaveImageAsSVGPlugIn;
import org.openjump.core.ui.plugin.layer.AddSIDLayerPlugIn;
+import org.openjump.core.ui.plugin.layer.ChangeLayerableNamePlugIn;
import org.openjump.core.ui.plugin.layer.ChangeSRIDPlugIn;
import org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn;
import org.openjump.core.ui.plugin.mousemenu.EditSelectedSidePlugIn;
@@ -54,18 +54,15 @@
import org.openjump.core.ui.plugin.view.ShowScalePlugIn;
import org.openjump.core.ui.plugin.view.ZoomToScalePlugIn;
import org.openjump.core.ui.plugin.wms.ZoomToWMSPlugIn;
+import org.openjump.core.ui.style.decoration.ArrowLineStringMiddlepointStyle;
import org.openjump.sigle.plugin.geoprocessing.layers.SpatialJoinPlugIn;
import
org.openjump.sigle.plugin.geoprocessing.oneLayer.topology.PlanarGraphPlugIn;
import org.openjump.sigle.plugin.joinTable.JoinTablePlugIn;
import org.openjump.sigle.plugin.replace.ReplaceValuePlugIn;
-import org.openjump.core.ui.style.decoration.ArrowLineStringMiddlepointStyle;
-
import com.vividsolutions.jump.workbench.WorkbenchContext;
import com.vividsolutions.jump.workbench.plugin.PlugInContext;
import com.vividsolutions.jump.workbench.ui.LayerViewPanel;
-import com.vividsolutions.jump.workbench.ui.MenuNames;
-import com.vividsolutions.jump.workbench.ui.plugin.FeatureInstaller;
import com.vividsolutions.jump.workbench.ui.plugin.BeanShellPlugIn;
import
de.fho.jump.pirol.plugins.EditAttributeByFormula.EditAttributeByFormulaPlugIn;
@@ -299,7 +296,9 @@
JoinTablePlugIn joinTablePlugIn = new JoinTablePlugIn();
joinTablePlugIn.initialize(new PlugInContext(workbenchContext,
null, null, null, null));
-
+ ChangeLayerableNamePlugIn changeLayerableNamePlugIn = new
ChangeLayerableNamePlugIn();
+ changeLayerableNamePlugIn.initialize(new
PlugInContext(workbenchContext, null, null, null, null));
+
/***********************
* EDITing toolbox
**********************/
Index: org/openjump/core/ui/plugin/layer/ToggleVisiblityPlugIn.java
===================================================================
--- org/openjump/core/ui/plugin/layer/ToggleVisiblityPlugIn.java
(Revision 912)
+++ org/openjump/core/ui/plugin/layer/ToggleVisiblityPlugIn.java
(Arbeitskopie)
@@ -41,11 +41,10 @@
import javax.swing.JPopupMenu;
-import org.openjump.io.SIDLayer;
-
import com.vividsolutions.jump.I18N;
import com.vividsolutions.jump.workbench.WorkbenchContext;
import com.vividsolutions.jump.workbench.model.Layer;
+import com.vividsolutions.jump.workbench.model.Layerable;
import com.vividsolutions.jump.workbench.plugin.AbstractPlugIn;
import com.vividsolutions.jump.workbench.plugin.EnableCheckFactory;
import com.vividsolutions.jump.workbench.plugin.MultiEnableCheck;
@@ -54,8 +53,8 @@
public class ToggleVisiblityPlugIn extends AbstractPlugIn
{
- final static String toggleVisibility
=I18N.get("org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Toggle-Visibility");
- final static String errorSeeOutputWindow
=I18N.get("org.openjump.core.ui.plugin.layer.ToggleVisiblityPlugIn.Error-See-Output-Window");
+ 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");
public void initialize(PlugInContext context) throws Exception
{
@@ -92,10 +91,10 @@
layer.setVisible(!layer.isVisible());
}
- Collection sidLayerCollection = (Collection)
context.getWorkbenchContext().getLayerNamePanel().selectedNodes(SIDLayer.class);
+ Collection sidLayerCollection = (Collection)
context.getWorkbenchContext().getLayerNamePanel().selectedNodes(Layerable.class);
for (Iterator j = sidLayerCollection.iterator(); j.hasNext();)
{
- SIDLayer layer = (SIDLayer) j.next();
+ Layerable layer = (Layerable) j.next();
layer.setVisible(!layer.isVisible());
}
return true;
@@ -115,14 +114,14 @@
return new MultiEnableCheck()
.add(checkFactory.createWindowWithSelectionManagerMustBeActiveCheck())
.add(checkFactory.createAtLeastNLayersMustBeSelectedCheck(1));
- }
+ }
public static MultiEnableCheck createEnableCheck2(WorkbenchContext
workbenchContext)
{
EnableCheckFactory checkFactory = new
EnableCheckFactory(workbenchContext);
return new MultiEnableCheck()
.add(checkFactory.createWindowWithSelectionManagerMustBeActiveCheck())
- .add(checkFactory.createAtLeastNLayerablesMustBeSelectedCheck(1,
SIDLayer.class));
- }
+ .add(checkFactory.createAtLeastNLayerablesMustBeSelectedCheck(1,
Layerable.class));
+ }
}
Index: com/vividsolutions/jump/workbench/ui/plugin/wms/AddWMSQueryPlugIn.java
===================================================================
--- com/vividsolutions/jump/workbench/ui/plugin/wms/AddWMSQueryPlugIn.java
(Revision 913)
+++ com/vividsolutions/jump/workbench/ui/plugin/wms/AddWMSQueryPlugIn.java
(Arbeitskopie)
@@ -37,6 +37,7 @@
import java.util.List;
import com.vividsolutions.jump.I18N;
+import com.vividsolutions.jump.workbench.model.LayerManager;
import com.vividsolutions.jump.workbench.model.StandardCategoryNames;
import com.vividsolutions.jump.workbench.model.UndoableCommand;
import com.vividsolutions.jump.workbench.model.WMSLayer;
@@ -102,7 +103,8 @@
public void execute() {
Collection selectedCategories = context.getLayerNamePanel()
.getSelectedCategories();
-
context.getLayerManager().addLayerable(selectedCategories.isEmpty()
+ LayerManager mgr = context.getLayerManager();
+ mgr.addLayerable(selectedCategories.isEmpty()
? StandardCategoryNames.WORKING
: selectedCategories.iterator().next().toString(),
layer);
}
package org.openjump.core.ui.plugin.layer;
import javax.swing.JOptionPane;
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.model.UndoableCommand;
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.MenuNames;
import com.vividsolutions.jump.workbench.ui.plugin.FeatureInstaller;
/**
* <code>ChangeLayerableName</code> changes the name of a layer.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Andreas Schmitz</a>
* @author last edited by: $Author:$
*
* @version $Revision:$, $Date:$
*/
public class ChangeLayerableNamePlugIn extends AbstractPlugIn {
private MultiEnableCheck enableCheck;
@Override
public void initialize(PlugInContext context) throws Exception {
WorkbenchContext workbenchContext = context.getWorkbenchContext();
FeatureInstaller installer = new FeatureInstaller(workbenchContext);
installer.addMainMenuItemWithJava14Fix(this,
new String[] { MenuNames.LAYER }, getName() + "...", false,
null, enableCheck);
JPopupMenu popupMenu = workbenchContext.getWorkbench().getFrame()
.getLayerNamePopupMenu();
installer.addPopupMenuItem(popupMenu, this, getName() + "{pos:19}",
false, null, createEnableCheck(workbenchContext));
popupMenu = workbenchContext.getWorkbench().getFrame()
.getWMSLayerNamePopupMenu();
installer.addPopupMenuItem(popupMenu, this, getName() + "{pos:6}",
false, null, createEnableCheck(workbenchContext));
}
@Override
public String getName() {
return I18N
.get("org.openjump.core.ui.plugin.layer.ChangeLayerableName.Rename");
}
@Override
public boolean execute(PlugInContext context) throws Exception {
reportNothingToUndoYet(context);
final Layerable layer = (Layerable) context.getLayerNamePanel()
.selectedNodes(Layerable.class).iterator().next();
final String oldName = layer.getName();
final String newName = (String) JOptionPane
.showInputDialog(
context.getWorkbenchFrame(),
I18N
.get("org.openjump.core.ui.plugin.layer.ChangeLayerableName.Rename"),
getName(), JOptionPane.PLAIN_MESSAGE, null, null,
oldName);
execute(new UndoableCommand(getName()) {
@Override
public void execute() {
layer.setName(newName);
}
@Override
public void unexecute() {
layer.setName(oldName);
}
}, context);
return true;
}
/**
* @param workbenchContext
* @return an enable check
*/
public EnableCheck createEnableCheck(WorkbenchContext workbenchContext) {
if (enableCheck != null)
return enableCheck;
EnableCheckFactory enableCheckFactory = new EnableCheckFactory(
workbenchContext);
enableCheck = new MultiEnableCheck();
enableCheck.add(enableCheckFactory
.createWindowWithLayerManagerMustBeActiveCheck());
enableCheck
.add(enableCheckFactory
.createExactlyNLayerablesMustBeSelectedCheck(1,
Layerable.class));
return enableCheck;
}
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel