Update of /cvsroot/fudaa//fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper
In directory sc8-pr-cvs1:/tmp/cvs-serv19224/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper
Modified Files:
Hydraulique1dIHM_Profil.java
Log Message:
Correction bug trie des profils.
Index: Hydraulique1dIHM_Profil.java
===================================================================
RCS file: /cvsroot/fudaa//fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_Profil.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Hydraulique1dIHM_Profil.java 25 Nov 2003 10:13:47 -0000 1.4
--- Hydraulique1dIHM_Profil.java 18 Dec 2003 11:25:36 -0000 1.5
***************
*** 169,173 ****
/* Hydraulique1dTableauBaseModel model
=((Hydraulique1dTableauBaseModel)table.getModel());
!
model.restreintA(0,table.getRowCount()); */
//on sait que le profil est ajoute en premiere position
--- 169,173 ----
/* Hydraulique1dTableauBaseModel model
=((Hydraulique1dTableauBaseModel)table.getModel());
!
model.restreintA(0,table.getRowCount()); */
//on sait que le profil est ajoute en premiere position
***************
*** 185,215 ****
} else if ("TRIER".equals(cmdDL)) {
if (bief != null) {
! /* System.out.println("trie");
! IObjet select=table.getSelectedObject();
! IProfil p=null;
! if(select!=null)
! {
! p=(IProfil)select;
! }
! if(p!=null) System.out.println("p non nul");
! bief.profils(bief.profils());
! table.repaint();
! int nb=table.getRowCount();
! int n=0;
! IProfil o;
! Hydraulique1dTableauBaseModel model
! =((Hydraulique1dTableauBaseModel)table.getModel());
! for(int i=nb-1;i>=0;i--)
! {
! o=(IProfil)model.getObject(i);
! if(o.egale(p)) n=i;
! break;
! }
! JComponent parent=(JComponent)table.getParent();
! if(parent!=null)
! {
! if(JScrollPane.class.isInstance(parent.getParent()))
! ((JScrollPane)parent.getParent()).getVerticalScrollBar().setValue(n);
! } */
bief.profils(bief.profils());
table.removeRowSelectionInterval(0, table.getRowCount() - 1);
--- 185,189 ----
} else if ("TRIER".equals(cmdDL)) {
if (bief != null) {
! System.out.println("trie");
bief.profils(bief.profils());
table.removeRowSelectionInterval(0, table.getRowCount() - 1);
|