|
From: <de...@us...> - 2003-12-11 12:41:55
|
Update of /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/commun
In directory sc8-pr-cvs1:/tmp/cvs-serv22991/commun
Modified Files:
EbliLib.java EbliListeSelectionMulti.java
Log Message:
Modification du paquetage graphe pour prendre en compte les modeles
Index: EbliLib.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/commun/EbliLib.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** EbliLib.java 25 Nov 2003 10:06:39 -0000 1.6
--- EbliLib.java 11 Dec 2003 12:41:52 -0000 1.7
***************
*** 19,22 ****
--- 19,28 ----
public class EbliLib {
public final static boolean DEBUG= "TRUE".equals(System.getProperty("DEBUG"));
+ public static void debug(String _s) {
+ System.out.println("DEBUG: " + _s);
+ }
+ public static void error(String _s) {
+ System.out.println("ERROR: " + _s);
+ }
/**
* Cherche l'index de la chaine <code>_string</code>
Index: EbliListeSelectionMulti.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/commun/EbliListeSelectionMulti.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** EbliListeSelectionMulti.java 25 Nov 2003 10:06:40 -0000 1.4
--- EbliListeSelectionMulti.java 11 Dec 2003 12:41:52 -0000 1.5
***************
*** 70,74 ****
it.advance();
int idx= it.key();
! EbliListeSelection e= (EbliListeSelection)idxListSelection_.get(idx);
if (e == null) {
e= new EbliListeSelection();
--- 70,74 ----
it.advance();
int idx= it.key();
! EbliListeSelection e= (EbliListeSelection)it.value();
if (e == null) {
e= new EbliListeSelection();
***************
*** 92,96 ****
it.advance();
int idx= it.key();
! EbliListeSelection e= (EbliListeSelection)idxListSelection_.get(idx);
if (e == null) {
e= new EbliListeSelection();
--- 92,96 ----
it.advance();
int idx= it.key();
! EbliListeSelection e= (EbliListeSelection)it.value();
if (e == null) {
e= new EbliListeSelection();
***************
*** 101,104 ****
--- 101,117 ----
return r;
}
+
+ /**
+ * Return the total number of selected index.
+ */
+ public int getNbSelectedItem() {
+ int r= 0;
+ TIntObjectIterator it= idxListSelection_.iterator();
+ for (int i= idxListSelection_.size(); i-- > 0;) {
+ it.advance();
+ r += ((EbliListeSelection)it.value()).getNbSelectedIndex();
+ }
+ return r;
+ }
public boolean remove(EbliListeSelectionMulti _m) {
if ((_m == null) || _m.isEmpty()) {
***************
*** 110,114 ****
it.advance();
int idx= it.key();
! EbliListeSelection e= (EbliListeSelection)idxListSelection_.get(idx);
if (e != null) {
r |= e.remove((EbliListeSelection)it.value());
--- 123,127 ----
it.advance();
int idx= it.key();
! EbliListeSelection e= (EbliListeSelection)it.value();
if (e != null) {
r |= e.remove((EbliListeSelection)it.value());
***************
*** 138,145 ****
return idxListSelection_.iterator();
}
! public void add(int _idxGlobal, int _idxSelected) {
EbliListeSelection l= new EbliListeSelection();
l.setSelectionInterval(_idxSelected, _idxSelected);
idxListSelection_.put(_idxGlobal, l);
}
}
--- 151,167 ----
return idxListSelection_.iterator();
}
! public void set(int _idxGlobal, int _idxSelected) {
! idxListSelection_.clear();
EbliListeSelection l= new EbliListeSelection();
l.setSelectionInterval(_idxSelected, _idxSelected);
idxListSelection_.put(_idxGlobal, l);
+ }
+ public void add(int _idxGlobal, int _idxSelected) {
+ EbliListeSelection l= (EbliListeSelection)idxListSelection_.get(_idxGlobal);
+ if (l == null) {
+ l= new EbliListeSelection();
+ idxListSelection_.put(_idxGlobal, l);
+ }
+ l.add(_idxSelected);
}
}
|