From: <emm...@us...> - 2008-11-07 14:30:53
|
Revision: 4193 http://fudaa.svn.sourceforge.net/fudaa/?rev=4193&view=rev Author: emmanuel_martin Date: 2008-11-07 14:30:46 +0000 (Fri, 07 Nov 2008) Log Message: ----------- Ajout du nom dans la popup de demande du Z lors du d?\195?\169placement de g?\195?\169om?\195?\169tries dans un calque diff?\195?\169rent Modified Paths: -------------- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlSceneEditor.java Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlSceneEditor.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlSceneEditor.java 2008-11-07 14:06:27 UTC (rev 4192) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlSceneEditor.java 2008-11-07 14:30:46 UTC (rev 4193) @@ -7,6 +7,7 @@ */ package org.fudaa.fudaa.modeleur; +import java.awt.Dimension; import java.awt.Frame; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -185,8 +186,8 @@ // Utilisation d'une fen\xEAtre modale pour l'obtension du Z. class myDialogModal extends JDialog implements ActionListener{ private JComponent text_; - public myDialogModal(Frame _frame){ - super(_frame, MdlResource.MDL.getString("Choix du Z"), true); + public myDialogModal(Frame _frame, String _title){ + super(_frame, _title, true); // Position & resizable setLocation(_frame.getLocation().x+_frame.getSize().width/2, _frame.getLocation().y+_frame.getSize().height/2); setResizable(false); @@ -210,7 +211,14 @@ return (Double) GISAttributeConstants.BATHY.getEditor().getValue(text_); } } - myDialogModal dialog =new myDialogModal(calquePanel_.getDefaultGisEditor().getFrame()); + // Pour le titre de la popup, on met le titre de la geom si possible + String titre=MdlResource.MDL.getString("Nom : "); + if(colsrc.getIndiceOf(GISAttributeConstants.TITRE)!=-1) + titre+=(String) colsrc.getValue(colsrc.getIndiceOf(GISAttributeConstants.TITRE), getScene().sceneId2LayerId(idxGeom[i])); + else + titre+=MdlResource.MDL.getString("sans nom"); + // Instanciation de la popup + myDialogModal dialog =new myDialogModal(calquePanel_.getDefaultGisEditor().getFrame(), titre); dialog.setVisible(true); datadest[iatt]=dialog.getValue(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |