Author: chatellier Date: 2009-06-04 14:55:49 +0000 (Thu, 04 Jun 2009) New Revision: 2319 Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/ZoneUI.jaxx Log: Make cancel refresh work Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/ZoneUI.jaxx =================================================================== --- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/ZoneUI.jaxx 2009-06-04 14:50:05 UTC (rev 2318) +++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/ZoneUI.jaxx 2009-06-04 14:55:49 UTC (rev 2319) @@ -1,7 +1,6 @@ <!-- /* *##% - * Copyright (C) 2005 - * Ifremer, Code Lutin, Cedric Pineau, Benjamin Poussin + * Copyright (C) 2005 - 2009 Ifremer, Code Lutin * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -17,24 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *##%*/ - -/* * - * IsisFish.java - * - * Created: 1 aout 2005 18:37:25 CEST - * - * @author Benjamin POUSSIN <poussin at codelutin.com> - * @version $Revision: 1312 $ - * - * Last update: $Date: 2008-08-28 10:21:07 +0200 (jeu, 28 aoû 2008) $ - * by : $Author: sletellier $ - */ --> - - - <!-- - + Zone - +--> <fr.ifremer.isisfish.ui.input.InputContentUI> <!-- bean property --> @@ -46,9 +28,7 @@ import fr.ifremer.isisfish.entities.ZoneImpl; import fr.ifremer.isisfish.map.CellSelectionLayer; import com.bbn.openmap.event.SelectMouseMode; -import com.bbn.openmap.event.MapMouseListener; import com.bbn.openmap.gui.OMToolSet; -import jaxx.runtime.swing.Item; protected OMToolSet toolSet = new OMToolSet(); protected OpenMapEvents mapListener = null; @@ -58,6 +38,7 @@ zoneMap.addMapMouseListener(getMapListener()); setButtonTitle(_("isisfish.input.continuePorts")); setNextPath("$root/$ports"); + addPropertyChangeListener("bean", new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { if (log.isDebugEnabled()) { @@ -83,8 +64,13 @@ getVerifier().setNewButton(create, "Zone"); getVerifier().setDeleteButton(remove); Zone zone = getVerifier().getEntity(Zone.class); + + // add null before, for second to be considered as a changed event + // otherwize, setBean has no effect + setBean(null); setBean((ZoneImpl) zone); - if (getBean() != null){ + + if (getBean() != null) { setZoneCells(); zoneMap.setSelectedCells(getBean().getCell()); }
participants (1)
-
chatellier@users.labs.libre-entreprise.org