Author: sletellier Date: 2009-02-25 17:23:52 +0000 (Wed, 25 Feb 2009) New Revision: 1888 Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/FisheryRegionUI.jaxx isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputSaveVerifier.java Log: Adding DialogBox with entity's names will be deleted Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/FisheryRegionUI.jaxx =================================================================== --- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/FisheryRegionUI.jaxx 2009-02-25 16:48:50 UTC (rev 1887) +++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/FisheryRegionUI.jaxx 2009-02-25 17:23:52 UTC (rev 1888) @@ -51,7 +51,6 @@ toolMap.add((Component)toolSet); setButtonTitle(_("isisfish.input.continueCells")); setNextPath("$root/$cells"); -setLayer(true); addPropertyChangeListener("bean", new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { if (evt.getOldValue() != null || evt.getNewValue() == null) { @@ -73,7 +72,6 @@ if (region != null){ setFieldMapfilesModel(getBean()); } - setLayer(true); } protected void setFieldMapfilesModel(FisheryRegion region){ DefaultListModel model = new DefaultListModel(); @@ -135,9 +133,7 @@ </row> <row> <cell columns='3' fill='horizontal' weightx='1.0'> - <JTextField id="fieldRegion" decorator='boxed' - text='{jaxx.runtime.SwingUtil.getStringValue(getBean().getName())}' - onKeyReleased='getBean().setName(fieldRegion.getText())'/> + <JTextField id="fieldRegion" text='{jaxx.runtime.SwingUtil.getStringValue(getBean().getName())}' onKeyReleased='getBean().setName(fieldRegion.getText())'/> </cell> </row> <row> @@ -150,8 +146,7 @@ <JLabel text="isisfish.fisheryRegion.latitude.min"/> </cell> <cell columns='2' fill='horizontal' weightx='1.0'> - <JTextField id="fieldLatMin" text='{getBean().getMinLatitude()}' decorator='boxed' - onKeyReleased='getBean().setMinLatitude(Float.parseFloat(fieldLatMin.getText()))'/> + <JTextField id="fieldLatMin" text='{getBean().getMinLatitude()}' onKeyReleased='getBean().setMinLatitude(Float.parseFloat(fieldLatMin.getText()))'/> </cell> </row> <row> @@ -159,8 +154,7 @@ <JLabel text="isisfish.fisheryRegion.latitude.max"/> </cell> <cell columns='2' fill='horizontal' weightx='1.0'> - <JTextField id="fieldLatMax" text='{getBean().getMaxLatitude()}' decorator='boxed' - onKeyReleased='getBean().setMaxLatitude(Float.parseFloat(fieldLatMax.getText()))'/> + <JTextField id="fieldLatMax" text='{getBean().getMaxLatitude()}' onKeyReleased='getBean().setMaxLatitude(Float.parseFloat(fieldLatMax.getText()))'/> </cell> </row> <row> @@ -168,8 +162,7 @@ <JLabel text="isisfish.fisheryRegion.longitude.min"/> </cell> <cell columns='2' fill='horizontal' weightx='1.0'> - <JTextField id="fieldLongMin" text='{getBean().getMinLongitude()}' decorator='boxed' - onKeyReleased='getBean().setMinLongitude(Float.parseFloat(fieldLongMin.getText()))'/> + <JTextField id="fieldLongMin" text='{getBean().getMinLongitude()}' onKeyReleased='getBean().setMinLongitude(Float.parseFloat(fieldLongMin.getText()))'/> </cell> </row> <row> @@ -177,8 +170,7 @@ <JLabel text="isisfish.fisheryRegion.longitude.max"/> </cell> <cell columns='2' fill='horizontal' weightx='1.0'> - <JTextField id="fieldLongMax" text='{getBean().getMaxLongitude()}' decorator='boxed' - onKeyReleased='getBean().setMaxLongitude(Float.parseFloat(fieldLongMax.getText()))'/> + <JTextField id="fieldLongMax" text='{getBean().getMaxLongitude()}' onKeyReleased='getBean().setMaxLongitude(Float.parseFloat(fieldLongMax.getText()))'/> </cell> </row> <row> @@ -191,8 +183,7 @@ <JLabel text="isisfish.fisheryRegion.latitude"/> </cell> <cell columns='2' fill='horizontal' weightx='1.0'> - <JTextField id="fieldCellLengthLatitude" text='{getBean().getCellLengthLatitude()}' decorator='boxed' - onKeyReleased='getBean().setCellLengthLatitude(Float.parseFloat(fieldCellLengthLatitude.getText()))'/> + <JTextField id="fieldCellLengthLatitude" text='{getBean().getCellLengthLatitude()}' onKeyReleased='getBean().setCellLengthLatitude(Float.parseFloat(fieldCellLengthLatitude.getText()))'/> </cell> </row> <row> @@ -200,8 +191,7 @@ <JLabel text="isisfish.fisheryRegion.longitude"/> </cell> <cell columns='2' fill='horizontal' weightx='1.0'> - <JTextField id="fieldCellLengthLongitude" text='{getBean().getCellLengthLongitude()}' decorator='boxed' - onKeyReleased='getBean().setCellLengthLongitude(Float.parseFloat(fieldCellLengthLongitude.getText()))'/> + <JTextField id="fieldCellLengthLongitude" text='{getBean().getCellLengthLongitude()}' onKeyReleased='getBean().setCellLengthLongitude(Float.parseFloat(fieldCellLengthLongitude.getText()))'/> </cell> </row> <row> @@ -233,8 +223,7 @@ <row> <cell columns='3' fill='both' weightx='1.0' weighty='0.4'> <JScrollPane> - <JTextArea id="fieldComment" text='{jaxx.runtime.SwingUtil.getStringValue(getBean().getComment())}' decorator='boxed' - onKeyReleased='getBean().setComment(fieldComment.getText())'/> + <JTextArea id="fieldComment" text='{jaxx.runtime.SwingUtil.getStringValue(getBean().getComment())}' onKeyReleased='getBean().setComment(fieldComment.getText())'/> </JScrollPane> </cell> </row> Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputSaveVerifier.java =================================================================== --- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputSaveVerifier.java 2009-02-25 16:48:50 UTC (rev 1887) +++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputSaveVerifier.java 2009-02-25 17:23:52 UTC (rev 1888) @@ -152,13 +152,8 @@ String msg = ""; try { boolean doDelete; - ArrayList<TopiaEntity> allWillBeRemoved = new ArrayList<TopiaEntity>(); - for (TopiaEntity te : currentEntities){ -// if (te.getComposite() != null){ -// allWillBeRemoved.addAll(te.getComposite()); -// } - allWillBeRemoved.add(te); - } + TopiaEntity topiaEntity = (TopiaEntity)currentNode.getJAXXContextValue(rootUI); + List<TopiaEntity> allWillBeRemoved = topiaEntity.getComposite(); if (allWillBeRemoved.size() > 0) { String text = _( "isisfish.message.delete.object", currentEntities.get(0).toString()); @@ -177,9 +172,7 @@ } if (doDelete) { - for (TopiaEntity te : allWillBeRemoved){ - te.delete(); - } + topiaEntity.delete(); isisContext.commitTransaction(); msg = _("isisfish.message.remove.finished"); } else {
participants (1)
-
sletellier@users.labs.libre-entreprise.org