From: <emm...@us...> - 2008-11-05 16:13:03
|
Revision: 4174 http://fudaa.svn.sourceforge.net/fudaa/?rev=4174&view=rev Author: emmanuel_martin Date: 2008-11-05 16:12:55 +0000 (Wed, 05 Nov 2008) Log Message: ----------- Utilisation de la scene ?\195?\160 la place des calques dans le panel de visibilit?\195?\169. Modified Paths: -------------- branches/FudaaModeleur_TC1Bis/fudaa_devel/ebli/src/org/fudaa/ebli/calque/action/EditVisibilityAction.java branches/FudaaModeleur_TC1Bis/fudaa_devel/ebli/src/org/fudaa/ebli/calque/edition/BPaletteEditVisibility.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/layer/FSigVisuPanel.java Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/ebli/src/org/fudaa/ebli/calque/action/EditVisibilityAction.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/ebli/src/org/fudaa/ebli/calque/action/EditVisibilityAction.java 2008-11-05 14:56:59 UTC (rev 4173) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/ebli/src/org/fudaa/ebli/calque/action/EditVisibilityAction.java 2008-11-05 16:12:55 UTC (rev 4174) @@ -11,6 +11,7 @@ import org.fudaa.ctulu.CtuluCommandManager; import org.fudaa.ebli.calque.BArbreCalqueModel; +import org.fudaa.ebli.calque.ZScene; import org.fudaa.ebli.calque.edition.BPaletteEditVisibility; import org.fudaa.ebli.commun.EbliActionPaletteAbstract; import org.fudaa.ebli.ressource.EbliResource; @@ -28,11 +29,13 @@ protected BPaletteEditVisibility palette_; protected final BArbreCalqueModel treeModel_; + protected final ZScene scene_; protected CtuluCommandManager cmd_; - public EditVisibilityAction(BArbreCalqueModel _treeModel, CtuluCommandManager _cmd) { + public EditVisibilityAction(BArbreCalqueModel _treeModel, ZScene _scene, CtuluCommandManager _cmd) { super(EbliResource.EBLI.getString("Edition visibilit\xE9"), BuResource.BU.getIcon("visibilite"), "VISIBILITY_EDITION", true); treeModel_=_treeModel; + scene_=_scene; cmd_=_cmd; } @@ -44,7 +47,7 @@ @Override public JComponent buildContentPane() { if(palette_==null) - palette_=new BPaletteEditVisibility(treeModel_, cmd_); + palette_=new BPaletteEditVisibility(treeModel_, scene_, cmd_); return palette_.getComponent(); } Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/ebli/src/org/fudaa/ebli/calque/edition/BPaletteEditVisibility.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/ebli/src/org/fudaa/ebli/calque/edition/BPaletteEditVisibility.java 2008-11-05 14:56:59 UTC (rev 4173) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/ebli/src/org/fudaa/ebli/calque/edition/BPaletteEditVisibility.java 2008-11-05 16:12:55 UTC (rev 4174) @@ -15,13 +15,9 @@ import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.lang.reflect.Array; import java.util.ArrayList; import java.util.Arrays; import java.util.EventObject; -import java.util.HashMap; -import java.util.List; -import java.util.Map; import javax.swing.AbstractCellEditor; import javax.swing.BorderFactory; @@ -39,7 +35,6 @@ import javax.swing.table.AbstractTableModel; import javax.swing.table.TableCellEditor; import javax.swing.table.TableCellRenderer; -import javax.swing.table.TableModel; import org.fudaa.ctulu.CtuluCommandManager; import org.fudaa.ctulu.gis.GISAttributeConstants; @@ -47,18 +42,12 @@ import org.fudaa.ctulu.gis.GISZoneCollection; import org.fudaa.ctulu.gui.CtuluTable; import org.fudaa.ebli.calque.BArbreCalqueModel; -import org.fudaa.ebli.calque.BCalque; -import org.fudaa.ebli.calque.CalqueSelectorVisitor; -import org.fudaa.ebli.calque.ZCalqueAffichageDonnees; -import org.fudaa.ebli.calque.ZCalqueAffichageDonneesInterface; import org.fudaa.ebli.calque.ZModelGeometryListener; -import org.fudaa.ebli.calque.ZModeleDonnees; -import org.fudaa.ebli.calque.ZModeleGeometry; +import org.fudaa.ebli.calque.ZScene; import org.fudaa.ebli.calque.ZSelectionEvent; import org.fudaa.ebli.calque.ZSelectionListener; import org.fudaa.ebli.commun.BPalettePanelInterface; import org.fudaa.ebli.commun.EbliLib; -import org.jfree.util.ArrayUtilities; import com.memoire.bu.BuBorderLayout; import com.memoire.bu.BuButton; @@ -76,15 +65,19 @@ * ou d\xE9cocher une checkbox correspondant \xE0 la valeur de visibilit\xE9 de la * g\xE9om\xE9trie et r\xE9percute imm\xE9diatement le changement effectu\xE9. * + * De plus deux boutons permettent de changer l'ordre des g\xE9om\xE9tries dans le + * tableau et dans le model les contenant. + * * @author Emmanuel MARTIN - * @version $Id$ + * @version $Id: BPaletteEditVisibility.java 4172 2008-11-05 14:49:55Z + * emmanuel_martin $ */ public class BPaletteEditVisibility extends BuPanel implements ListSelectionListener, ZSelectionListener, ZModelGeometryListener, TreeModelListener, BPalettePanelInterface, ActionListener, ChangeListener { - // Attributs de fonctionnement - protected final BArbreCalqueModel treeModel_; - protected ZCalqueAffichageDonneesInterface[] calques_; - protected ZCalqueAffichageDonneesInterface[] listenCalques_; + /** Calques disponible pour l'utilisateur. */ + protected ZCalqueEditable[] calques_; + /** Models en cours d'\xE9coute. */ + protected ZModeleEditable[] listenModels_; protected final String allCalquesEntry_=EbliLib.getS("Tous les calques"); /** * vrai quand une modification de la selection dans le tableau ou dans le @@ -95,26 +88,29 @@ /** Vrai quand la visibilit\xE9 n'est pas en train d'\xEAtre chang\xE9 par le panel. */ protected boolean listenVisibility=true; protected CtuluCommandManager cmd_; + protected ZScene scene_; // Composants graphiques protected final BuComboBox calque_; protected boolean onlyInvisible_; protected final CtuluTable table_; - protected TableModel geomTableModel_; protected BuButton btUp_; protected BuButton btDown_; /** * @param _treeModel - * utile pour r\xE9cup\xE9rer la liste des calques contenant les - * g\xE9om\xE9tries et pour avoir connaissance de la cr\xE9ation et de la - * suppression de calque. + * utile pour avoir connaissance de la cr\xE9ation et de la suppression + * de calque. + * @param _scene + * utile pour l'\xE9coute des selections. */ - public BPaletteEditVisibility(BArbreCalqueModel _treeModel, CtuluCommandManager _cmd){ + public BPaletteEditVisibility(BArbreCalqueModel _treeModel, ZScene _scene, CtuluCommandManager _cmd){ cmd_=_cmd; - calques_=new ZCalqueAffichageDonneesInterface[0]; - listenCalques_=new ZCalqueAffichageDonneesInterface[0]; - treeModel_=_treeModel; - treeModel_.addTreeModelListener(this); + scene_=_scene; + calques_=new ZCalqueEditable[0]; + listenModels_=new ZModeleEditable[0]; + _treeModel.addTreeModelListener(this); + scene_.addSelectionListener(this); + // Configuration du panel \\ setLayout(new BuBorderLayout()); setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2)); setPreferredSize(new Dimension(210, 350)); @@ -148,7 +144,9 @@ Container btCont=new Container(); btCont.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0)); btUp_=new BuButton(BuResource.BU.getIcon("crystal22_monter")); + btUp_.setToolTipText(EbliLib.getS("D\xE9cr\xE9menter l'index de la g\xE9om\xE9trie")); btDown_=new BuButton(BuResource.BU.getIcon("crystal22_descendre")); + btDown_.setToolTipText(EbliLib.getS("Incr\xE9menter l'index de la g\xE9om\xE9trie")); btUp_.addActionListener(this); btDown_.addActionListener(this); btCont.add(btUp_); @@ -210,7 +208,7 @@ } public boolean isCellEditable(int rowIndex, int columnIndex) { - return columnIndex==1&&((ZCalqueAffichageDonneesInterface) rows_[rowIndex][2]).isEditable(); + return columnIndex==1; } public void setValueAt(Object value, int rowIndex, int columnIndex) { @@ -223,7 +221,7 @@ } else if(columnIndex==1){ rows_[rowIndex][columnIndex]=value; - changeVisibility((Integer) rows_[rowIndex][3], (ZCalqueAffichageDonneesInterface) rows_[rowIndex][2], (Boolean) rows_[rowIndex][1]); + changeVisibility((Integer) rows_[rowIndex][3], (ZModeleEditable) rows_[rowIndex][2], (Boolean) rows_[rowIndex][1]); // Dans le cas o\xF9 on n'affiche que les g\xE9om\xE9tries invisibles, on enl\xE8ve celle qu'on passe \xE0 visible. if(onlyInvisible_&&((Boolean) rows_[rowIndex][1])==true){ Object[][] newRows=new Object[rows_.length-1][]; @@ -327,9 +325,7 @@ Object selectedItem=calque_.getSelectedItem(); calque_.removeAllItems(); // R\xE9cup\xE9ration des calques - CalqueSelectorVisitor visitor = new CalqueSelectorVisitor(ZModeleGeometry.class); - ((BCalque)treeModel_.getRoot()).apply(visitor); - calques_=visitor.getSelectedCalques(); + calques_=scene_.getEditableLayers(); // Ajout des noms dans le comboBox calque_.addItem(allCalquesEntry_); for(int i=0;i<calques_.length;i++) @@ -338,38 +334,36 @@ calque_.setSelectedItem(selectedItem); else calque_.setSelectedIndex(0); - updateListenAndMoveBt(); + updateListen(); } /** - * Met \xE0 jour l'\xE9coute des calques et de leurs model + * Met \xE0 jour l'\xE9coute des models */ - protected void updateListenAndMoveBt(){ - // Suppression de l'\xE9coute de tout les calques - for(int i=0;i<listenCalques_.length;i++){ - listenCalques_[i].removeSelectionListener(this); - ((ZModeleGeometry) listenCalques_[i].modeleDonnees()).removeModelListener(this); + protected void updateListen(){ + // Suppression de l'\xE9coute de tout les models + for(int i=0;i<listenModels_.length;i++) + listenModels_[i].removeModelListener(this); + // Mise a jour du tableau de listeners + if(calque_.getSelectedItem()==allCalquesEntry_){ + listenModels_=new ZModeleEditable[calques_.length]; + for(int i=0;i<calques_.length;i++) + listenModels_[i]=calques_[i].getModelEditable(); } - // Mise a jour du tableau - if(calque_.getSelectedItem()==allCalquesEntry_) - listenCalques_=calques_; else{ boolean found=false; int i=-1; while(!found&&++i<calques_.length) found=calques_[i].getTitle().equals(calque_.getSelectedItem()); if(found) - listenCalques_=new ZCalqueAffichageDonneesInterface[]{calques_[i]}; + listenModels_=new ZModeleEditable[]{calques_[i].getModelEditable()}; else - listenCalques_=new ZCalqueAffichageDonneesInterface[0]; + listenModels_=new ZModeleEditable[0]; } // Ajout de l'\xE9coute de tout les calques - for(int i=0;i<listenCalques_.length;i++){ - listenCalques_[i].addSelectionListener(this); - ((ZModeleGeometry) listenCalques_[i].modeleDonnees()).addModelListener(this); + for(int i=0;i<listenModels_.length;i++){ + listenModels_[i].addModelListener(this); } - // Mise \xE0 jour des boutons de d\xE9placement - updateBtMovement(); } /** @@ -387,7 +381,7 @@ ArrayList<Object[]> rows=new ArrayList<Object[]>(); for(int i=0;i<calques_.length;i++){ if(calques_[i].getTitle().equals(calque_.getSelectedItem())||calque_.getSelectedItem()==allCalquesEntry_){ - ZModeleGeometry model = (ZModeleGeometry)calques_[i].modeleDonnees(); + ZModeleEditable model = calques_[i].getModelEditable(); // Extraction des donn\xE9es utiles GISZoneCollection zone=model.getGeomData(); int indexTitre=zone.getIndiceOf(GISAttributeConstants.TITRE); @@ -395,11 +389,10 @@ if(indexTitre!=-1&&indexVisibility!=-1) for(int j=0;j<zone.getNbGeometries();j++) if(!onlyInvisible_||zone.getValue(indexVisibility, j)==GISAttributeConstants.ATT_VAL_FALSE) - rows.add(new Object[]{zone.getValue(indexTitre, j), zone.getValue(indexVisibility, j).equals(GISAttributeConstants.ATT_VAL_TRUE)?true:false, calques_[i], j}); + rows.add(new Object[]{zone.getValue(indexTitre, j), zone.getValue(indexVisibility, j).equals(GISAttributeConstants.ATT_VAL_TRUE)?true:false, model, scene_.layerId2SceneId(calques_[i], j)}); } } - geomTableModel_=new GeomTableModel(new String[]{EbliLib.getS("Nom"), EbliLib.getS("Visibilit\xE9")}, rows.toArray(new Object[0][])); - table_.setModel(geomTableModel_); + table_.setModel(new GeomTableModel(new String[]{EbliLib.getS("Nom"), EbliLib.getS("Visibilit\xE9")}, rows.toArray(new Object[0][]))); table_.getColumnModel().getColumn(0).setCellRenderer(new GeomTableRenderer()); table_.getColumnModel().getColumn(1).setCellRenderer(new GeomTableRenderer()); table_.getColumnModel().getColumn(1).setPreferredWidth(25); @@ -417,9 +410,9 @@ * @param _visibility * la nouvelle valeur de visibilit\xE9 */ - protected void changeVisibility(int _numGeom, ZCalqueAffichageDonneesInterface _calque, boolean _visibility) { + protected void changeVisibility(int _numGeom, ZModeleEditable _model, boolean _visibility) { listenVisibility=false; - GISZoneCollection zone=((ZModeleGeometry)_calque.modeleDonnees()).getGeomData(); + GISZoneCollection zone=_model.getGeomData(); int indexVisibility=zone.getIndiceOf(GISAttributeConstants.VISIBILITE); if (indexVisibility!=-1) zone.getModel(indexVisibility).setObject(_numGeom, _visibility==true ? GISAttributeConstants.ATT_VAL_TRUE:GISAttributeConstants.ATT_VAL_FALSE, cmd_); @@ -427,75 +420,46 @@ } /** - * Met \xE0 jour la selection dans le tableau pour qu'elle corresponde \xE0 la selection dans le calque. - * @param _calque le calque dans lequel la selection a \xE9t\xE9 modifi\xE9. + * Met \xE0 jour la selection dans le tableau pour qu'elle corresponde \xE0 la selection dans les calques. */ - protected void updateTableSelection(ZCalqueAffichageDonneesInterface _calque) { - if (_calque.getTitle().equals(calque_.getSelectedItem())||calque_.getSelectedItem()==allCalquesEntry_) { - // Construction de l'ensemble de selection - List<Integer> selection=new ArrayList<Integer>(); - int[] selectionTmp=_calque.getLayerSelection().getSelectedIndex(); - if (selectionTmp!=null) - for (int i=0; i<selectionTmp.length; i++) - selection.add(selectionTmp[i]); - // Selection des lignes correspondantes dans le tableau - for (int i=0; i<table_.getModel().getRowCount(); i++) { - ZCalqueAffichageDonneesInterface calque=(ZCalqueAffichageDonneesInterface)table_.getModel().getValueAt(i, 2); - if (calque==_calque) { - int indexGeom=(Integer)table_.getModel().getValueAt(i, 3); - if (selection.contains(indexGeom)&&!table_.getSelectionModel().isSelectedIndex(i)) - table_.getSelectionModel().addSelectionInterval(i, i); - else - if(!selection.contains(indexGeom)&&table_.getSelectionModel().isSelectedIndex(i)) - table_.getSelectionModel().removeSelectionInterval(i, i); - } - } - } + protected void updateTableSelection() { + int[] selection=scene_.getLayerSelection().getSelectedIndex(); + for(int i=0;i<table_.getRowCount();i++) + // Si la g\xE9om\xE9trie n'est pas s\xE9lectionn\xE9e dans le calque mais dans le tableau => d\xE9s\xE9lectionne + if(!in(((Integer) table_.getModel().getValueAt(i, 3)).intValue(), selection)&&table_.getSelectionModel().isSelectedIndex(i)) + table_.getSelectionModel().removeSelectionInterval(i, i); + // Si la g\xE9om\xE9trie est selectionn\xE9 dans le calque mais pas dans le tableau => s\xE9lection + else if(in(((Integer) table_.getModel().getValueAt(i, 3)).intValue(), selection)&&!table_.getSelectionModel().isSelectedIndex(i)) + table_.getSelectionModel().addSelectionInterval(i, i); } /** * Met \xE0 jour la selection dans le(s) calque(s) pour qu'elle corresponde \xE0 la selection dans le tableau. */ protected void updateCalqueSelection() { - // Suppression de la selection dans tout les calques - for (int i=0; i<calques_.length; i++) - if (!calques_[i].isSelectionEmpty()&&calques_[i] instanceof ZCalqueAffichageDonnees) - ((ZCalqueAffichageDonnees)calques_[i]).setSelection(new int[0]); - // R\xE9cup\xE9ration des index de g\xE9om\xE9tries selectionn\xE9s dans le tableau - HashMap<ZCalqueAffichageDonneesInterface, ArrayList<Integer>> completeSelection=new HashMap<ZCalqueAffichageDonneesInterface, ArrayList<Integer>>(); - int[] selectedRows=table_.getSelectedRows(); - for (int i=0; i<selectedRows.length; i++) { - ZCalqueAffichageDonneesInterface calque=((ZCalqueAffichageDonneesInterface)table_.getModel().getValueAt(selectedRows[i], 2)); - if (!completeSelection.containsKey(calque)) - completeSelection.put(calque, new ArrayList<Integer>()); - completeSelection.get(calque).add((Integer)table_.getModel().getValueAt(selectedRows[i], 3)); - } - // R\xE9percution de la selection du tableau sur les calques correspondants - for (Map.Entry<ZCalqueAffichageDonneesInterface, ArrayList<Integer>> entry : completeSelection.entrySet()) { - if (entry.getValue().size()>0&&entry.getKey() instanceof ZCalqueAffichageDonnees) { - int[] selection=new int[entry.getValue().size()]; - for (int i=0; i<selection.length; i++) - selection[i]=entry.getValue().get(i); - ((ZCalqueAffichageDonnees)entry.getKey()).setSelection(selection); - } - } + // Conversion des indices de lignes selectionn\xE9es en index globals de g\xE9om\xE9tries + int[] selection=table_.getSelectedRows(); + int[] selectedIdx=new int[selection.length]; + for(int i=0;i<selectedIdx.length;i++) + selectedIdx[i]=((Integer) table_.getModel().getValueAt(selection[i], 3)).intValue(); + scene_.setSelection(selectedIdx); } + /** + * Active ou d\xE9active les deux boutons de mouvement + */ protected void updateBtMovement(){ - boolean base=calque_.getSelectedItem()!=allCalquesEntry_&&table_.getSelectedRowCount()>0; boolean enableUp=false; boolean enableDown=false; - if(base){ - boolean prob=false; + if(calque_.getSelectedItem()!=allCalquesEntry_&&table_.getSelectedRowCount()>0){ + // Verification qu'il est possible de d\xE9placer la s\xE9lection vers le haut int i=0; - while(!prob&&++i<table_.getRowCount()) - prob=!table_.getSelectionModel().isSelectedIndex(i-1)&&table_.getSelectionModel().isSelectedIndex(i); - enableUp=prob; - prob=false; + while(!enableUp&&++i<table_.getRowCount()) + enableUp=!table_.getSelectionModel().isSelectedIndex(i-1)&&table_.getSelectionModel().isSelectedIndex(i); + // V\xE9rification qu'il est possible de d\xE9placer la selection vers le bas i=table_.getRowCount()-1; - while(!prob&&--i>=0) - prob=!table_.getSelectionModel().isSelectedIndex(i+1)&&table_.getSelectionModel().isSelectedIndex(i); - enableDown=prob; + while(!enableDown&&--i>=0) + enableDown=!table_.getSelectionModel().isSelectedIndex(i+1)&&table_.getSelectionModel().isSelectedIndex(i); } btUp_.setEnabled(enableUp); btDown_.setEnabled(enableDown); @@ -526,12 +490,13 @@ Arrays.sort(selection); int lastIndexCompute=-1; for(int i=0;i<selection.length;i++){ + // Si la place du dessus est libre, on monte if(selection[i]>0&&(!in(selection[i]-1, selection)||selection[i]-1==lastIndexCompute)){ newSelection.add(selection[i]-1); lastIndexCompute=selection[i]; - ZModeleGeometry model=(ZModeleGeometry) ((ZCalqueAffichageDonneesInterface) table_.getModel().getValueAt(selection[i], 2)).modeleDonnees(); + ZModeleEditable model=(ZModeleEditable) table_.getModel().getValueAt(selection[i], 2); int indexGeom=((Integer) table_.getModel().getValueAt(selection[i], 3)).intValue(); - model.getGeomData().switchGeometries(indexGeom, indexGeom-1, cmd_); + model.getGeomData().switchGeometries(scene_.sceneId2LayerId(indexGeom), scene_.sceneId2LayerId(indexGeom-1), cmd_); } else newSelection.add(selection[i]); @@ -553,12 +518,13 @@ Arrays.sort(selection); int lastIndexCompute=-1; for(int i=selection.length-1;i>=0;i--){ + // Si la place du dessous est libre, on descend if(selection[i]<(table_.getRowCount()-1)&&(!in(selection[i]+1, selection)||selection[i]+1==lastIndexCompute)){ newSelection.add(selection[i]+1); lastIndexCompute=selection[i]; - ZModeleGeometry model=(ZModeleGeometry) ((ZCalqueAffichageDonneesInterface) table_.getModel().getValueAt(selection[i], 2)).modeleDonnees(); + ZModeleEditable model=(ZModeleEditable) table_.getModel().getValueAt(selection[i], 2); int indexGeom=((Integer) table_.getModel().getValueAt(selection[i], 3)).intValue(); - model.getGeomData().switchGeometries(indexGeom, indexGeom+1, cmd_); + model.getGeomData().switchGeometries(scene_.sceneId2LayerId(indexGeom), scene_.sceneId2LayerId(indexGeom+1), cmd_); } else newSelection.add(selection[i]); @@ -573,7 +539,10 @@ * Est appel\xE9e par EditVisibilityAction quand la palette est d\xE9couverte. */ public void doShow(){ - updateListenAndMoveBt(); + updateListen(); + fillCalqueComboBox(); + fillTableGeometry(); + updateBtMovement(); } /** @@ -581,12 +550,10 @@ */ public void doHide(){ // Suppression de l'\xE9coute de tout les calques - for(int i=0;i<listenCalques_.length;i++){ - listenCalques_[i].removeSelectionListener(this); - ((ZModeleGeometry) listenCalques_[i].modeleDonnees()).removeModelListener(this); - } - // Mise a jour du tableau - listenCalques_=new ZCalqueAffichageDonneesInterface[0]; + for(int i=0;i<listenModels_.length;i++) + listenModels_[i].removeModelListener(this); + // Mise a jour du tableau de listeners + listenModels_=new ZModeleEditable[0]; } /* (non-Javadoc) @@ -619,8 +586,9 @@ public void actionPerformed(ActionEvent e) { if(e.getSource()==calque_){ - updateListenAndMoveBt(); + updateListen(); fillTableGeometry(); + updateBtMovement(); } else if(e.getSource()==btUp_) moveUpSelectedGeometies(); @@ -666,7 +634,7 @@ boolean found=false; int i=-1; while(!found&&++i<table_.getModel().getRowCount()){ - ZModeleDonnees model=((ZCalqueAffichageDonneesInterface) table_.getModel().getValueAt(i, 2)).modeleDonnees(); + ZModeleEditable model=(ZModeleEditable) table_.getModel().getValueAt(i, 2); Integer indexGeom=(Integer) table_.getModel().getValueAt(i, 3); found=(model==_source)&&(indexGeom==_geom); } @@ -691,7 +659,7 @@ public void selectionChanged(ZSelectionEvent _evt) { if (listenSelection) { listenSelection=false; - updateTableSelection(_evt.getSource()); + updateTableSelection(); updateBtMovement(); listenSelection=true; } Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/layer/FSigVisuPanel.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/layer/FSigVisuPanel.java 2008-11-05 14:56:59 UTC (rev 4173) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/sig/layer/FSigVisuPanel.java 2008-11-05 16:12:55 UTC (rev 4174) @@ -171,7 +171,7 @@ arrayList.add(new CalqueGISEditionAction(getArbreCalqueModel().getTreeSelectionModel(), gisEditor_, getScene())); arrayList.add(new SceneRotationAction(getArbreCalqueModel().getTreeSelectionModel(), gisEditor_, gisEditor_.getSceneEditor(),getEbliFormatter())); arrayList.add(new SceneDeplacementAction(getArbreCalqueModel().getTreeSelectionModel(), gisEditor_.getSceneEditor(),getEbliFormatter(), getCalqueDeplacement())); - arrayList.add(new EditVisibilityAction(getArbreCalqueModel(), mng_)); + arrayList.add(new EditVisibilityAction(getArbreCalqueModel(), getScene(), mng_)); return (EbliActionInterface[]) arrayList.toArray(new EbliActionInterface[arrayList.size()]); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |