|
From: <jm_...@us...> - 2003-12-08 18:22:51
|
Update of /cvsroot/fudaa//fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/casier
In directory sc8-pr-cvs1:/tmp/cvs-serv30418/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/casier
Modified Files:
Hydraulique1dCasierCaracLiaisonPanel.java
Log Message:
Mise à jour des nouvelles fonctionnalités Casier
YapodTestEnumereCorba : sérialise aussi
Debug léger
Index: Hydraulique1dCasierCaracLiaisonPanel.java
===================================================================
RCS file: /cvsroot/fudaa//fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/casier/Hydraulique1dCasierCaracLiaisonPanel.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Hydraulique1dCasierCaracLiaisonPanel.java 25 Nov 2003 10:13:45 -0000 1.4
--- Hydraulique1dCasierCaracLiaisonPanel.java 8 Dec 2003 18:22:47 -0000 1.5
***************
*** 8,29 ****
*/
package org.fudaa.fudaa.hydraulique1d.editor.casier;
! import org.fudaa.dodico.corba.objet.*;
import org.fudaa.dodico.corba.hydraulique1d.ILiaison;
import org.fudaa.dodico.corba.hydraulique1d.LSensDebitLiaison;
- import org.fudaa.dodico.hydraulique1d.*;
- import com.memoire.bu.*;
- import org.fudaa.ebli.ressource.*;
- import org.fudaa.ebli.dialog.*;
import org.fudaa.ebli.controle.border.LineChoiceBorder;
! import org.fudaa.ebli.commun.*;
! import org.fudaa.fudaa.commun.*;
! import org.fudaa.fudaa.hydraulique1d.*;
! import org.fudaa.fudaa.hydraulique1d.editor.*;
! import javax.swing.*;
! import javax.swing.border.*;
! import java.awt.*;
! import java.awt.event.*;
! import java.beans.*;
! import java.util.*;
/**
* @version $Revision$ $Date$ by $Author$
--- 8,31 ----
*/
package org.fudaa.fudaa.hydraulique1d.editor.casier;
! import java.awt.Dimension;
! import java.awt.GridBagConstraints;
! import java.awt.GridBagLayout;
! import java.awt.Insets;
! import java.awt.event.ActionEvent;
! import java.awt.event.ActionListener;
! import javax.swing.BorderFactory;
! import javax.swing.ButtonGroup;
! import javax.swing.JFrame;
! import javax.swing.border.Border;
import org.fudaa.dodico.corba.hydraulique1d.ILiaison;
import org.fudaa.dodico.corba.hydraulique1d.LSensDebitLiaison;
import org.fudaa.ebli.controle.border.LineChoiceBorder;
! import com.memoire.bu.BuBorderLayout;
! import com.memoire.bu.BuComboBox;
! import com.memoire.bu.BuGridLayout;
! import com.memoire.bu.BuLabel;
! import com.memoire.bu.BuPanel;
! import com.memoire.bu.BuRadioButton;
! import com.memoire.bu.BuTextField;
/**
* @version $Revision$ $Date$ by $Author$
***************
*** 40,47 ****
tfSiphonSection_,
tfSiphonCoefPerteCharge_;
! private BuTextField tfOrificeCoefPerteCharge_,
! tfOrificeSection_,
! tfOrificeCoefQ_;
! private BuTextField tfOrificeLargeur_, tfOrificeCoteMin_;
private BuComboBox cmbSensDebit_;
private BuPanel pnTFSeuil_, pnTFChenal_, pnTFSiphon_, pnTFOrifice_;
--- 42,47 ----
tfSiphonSection_,
tfSiphonCoefPerteCharge_;
! private BuTextField tfOrificeSection_, tfOrificeCoefQSeuil_;
! private BuTextField tfOrificeLargeur_, tfOrificeCoefQOrifice_;
private BuComboBox cmbSensDebit_;
private BuPanel pnTFSeuil_, pnTFChenal_, pnTFSiphon_, pnTFOrifice_;
***************
*** 126,131 ****
double coefActivation=
((Double)tfSeuilCoefActivation_.getValue()).doubleValue();
! if (coefActivation != model_.getCoefEnnoiment()) {
! model_.setCoefEnnoiment(coefActivation);
changed= true;
}
--- 126,131 ----
double coefActivation=
((Double)tfSeuilCoefActivation_.getValue()).doubleValue();
! if (coefActivation != model_.getCoefActivation()) {
! model_.setCoefActivation(coefActivation);
changed= true;
}
***************
*** 196,218 ****
changed= true;
}
! double coefQ= ((Double)tfOrificeCoefQ_.getValue()).doubleValue();
if (coefQ != model_.getCoefQ()) {
model_.setCoefQ(coefQ);
changed= true;
}
! double perteCharge=
! ((Double)tfOrificeCoefPerteCharge_.getValue()).doubleValue();
! if (perteCharge != model_.getCoefPerteCharge()) {
! model_.setCoefPerteCharge(perteCharge);
! changed= true;
! }
! double coteMin= ((Double)tfOrificeCoteMin_.getValue()).doubleValue();
! if (coteMin != model_.getCoteMin()) {
! model_.setCoteMin(coteMin);
changed= true;
}
int sensDebit= cmbSensDebit_.getSelectedIndex();
if (sensDebit != model_.getSensDebit().value()) {
! model_.setSensDebit(LSensDebitLiaison.from_int(sensDebit));
changed= true;
}
--- 196,218 ----
changed= true;
}
! double coefQ= ((Double)tfOrificeCoefQSeuil_.getValue()).doubleValue();
if (coefQ != model_.getCoefQ()) {
model_.setCoefQ(coefQ);
changed= true;
}
! double coefQOrifice= ((Double)tfOrificeCoefQOrifice_.getValue()).doubleValue();
! if (coefQOrifice != model_.getCoefQOrifice()) {
! model_.setCoefQOrifice(coefQOrifice);
changed= true;
}
int sensDebit= cmbSensDebit_.getSelectedIndex();
+ System.out.println("cmbSensDebit_.getSelectedIndex()="+sensDebit);
+ System.out.println("model_.getSensDebit().value()="+model_.getSensDebit().value());
if (sensDebit != model_.getSensDebit().value()) {
! System.out.println("changed= true");
! System.out.println("newValeur = LSensDebitLiaison.from_int("+sensDebit+")");
! LSensDebitLiaison newValeur = LSensDebitLiaison.from_int(sensDebit);
! System.out.println("newValeur.value()="+newValeur.value());
! model_.setSensDebit(newValeur);
changed= true;
}
***************
*** 253,257 ****
setEnabledSiphon(false);
setEnabledOrifice(false);
! tfSeuilCoefActivation_.setValue(new Double(model_.getCoefEnnoiment()));
tfSeuilCoefQ_.setValue(new Double(model_.getCoefQ()));
tfSeuilLargeur_.setValue(new Double(model_.getLargeur()));
--- 253,257 ----
setEnabledSiphon(false);
setEnabledOrifice(false);
! tfSeuilCoefActivation_.setValue(new Double(model_.getCoefActivation()));
tfSeuilCoefQ_.setValue(new Double(model_.getCoefQ()));
tfSeuilLargeur_.setValue(new Double(model_.getLargeur()));
***************
*** 272,279 ****
tfOrificeLargeur_.setValue(new Double(model_.getLargeur()));
tfOrificeSection_.setValue(new Double(model_.getSection()));
! tfOrificeCoefQ_.setValue(new Double(model_.getCoefQ()));
! tfOrificeCoefPerteCharge_.setValue(
! new Double(model_.getCoefPerteCharge()));
! tfOrificeCoteMin_.setValue(new Double(model_.getCoteMin()));
cmbSensDebit_.setSelectedIndex(model_.getSensDebit().value());
}
--- 272,277 ----
tfOrificeLargeur_.setValue(new Double(model_.getLargeur()));
tfOrificeSection_.setValue(new Double(model_.getSection()));
! tfOrificeCoefQSeuil_.setValue(new Double(model_.getCoefQ()));
! tfOrificeCoefQOrifice_.setValue(new Double(model_.getCoefQOrifice()));
cmbSensDebit_.setSelectedIndex(model_.getSensDebit().value());
}
***************
*** 371,376 ****
dimPlusGrandLabel);
// pour la construction du Panel contenant les champs de saisie de l'Orifice
! tabConstraintsLabel= new GridBagConstraints[6];
! tabConstraintsTextField= new GridBagConstraints[6];
for (int i= 0; i < tabConstraintsLabel.length; i++) {
tabConstraintsLabel[i]=
--- 369,374 ----
dimPlusGrandLabel);
// pour la construction du Panel contenant les champs de saisie de l'Orifice
! tabConstraintsLabel= new GridBagConstraints[5];
! tabConstraintsTextField= new GridBagConstraints[5];
for (int i= 0; i < tabConstraintsLabel.length; i++) {
tabConstraintsLabel[i]=
***************
*** 401,406 ****
0);
}
! tabTextLabel= new String[6];
! tabTextField= new BuTextField[5];
tabTextLabel[0]= "largeur (m)";
tfOrificeLargeur_= BuTextField.createDoubleField();
--- 399,404 ----
0);
}
! tabTextLabel= new String[5];
! tabTextField= new BuTextField[4];
tabTextLabel[0]= "largeur (m)";
tfOrificeLargeur_= BuTextField.createDoubleField();
***************
*** 409,422 ****
tfOrificeSection_= BuTextField.createDoubleField();
tabTextField[1]= tfOrificeSection_;
! tabTextLabel[2]= "coef. de débit";
! tfOrificeCoefQ_= BuTextField.createDoubleField();
! tabTextField[2]= tfOrificeCoefQ_;
! tabTextLabel[3]= "coef. perte de charge";
! tfOrificeCoefPerteCharge_= BuTextField.createDoubleField();
! tabTextField[3]= tfOrificeCoefPerteCharge_;
! tabTextLabel[4]= "cote minimale";
! tfOrificeCoteMin_= BuTextField.createDoubleField();
! tabTextField[4]= tfOrificeCoteMin_;
! tabTextLabel[5]= "sens débit";
cmbSensDebit_= new BuComboBox(TYPES_SENS_DEBIT);
pnTFOrifice_=
--- 407,417 ----
tfOrificeSection_= BuTextField.createDoubleField();
tabTextField[1]= tfOrificeSection_;
! tabTextLabel[2]= "coef. de débit seuil";
! tfOrificeCoefQSeuil_= BuTextField.createDoubleField();
! tabTextField[2]= tfOrificeCoefQSeuil_;
! tabTextLabel[3]= "coef. de débit orifice";
! tfOrificeCoefQOrifice_= BuTextField.createDoubleField();
! tabTextField[3]= tfOrificeCoefQOrifice_;
! tabTextLabel[4]= "sens débit";
cmbSensDebit_= new BuComboBox(TYPES_SENS_DEBIT);
pnTFOrifice_=
***************
*** 469,473 ****
lb.setPreferredSize(dimPlusGrandLabel);
panel.add(lb, tabConstraintsLabel[i]);
! if (i != 5) {
BuTextField tf= tabTextField[i];
tf.setColumns(10);
--- 464,468 ----
lb.setPreferredSize(dimPlusGrandLabel);
panel.add(lb, tabConstraintsLabel[i]);
! if (i != 4) {
BuTextField tf= tabTextField[i];
tf.setColumns(10);
***************
*** 514,520 ****
tfOrificeLargeur_.setEnabled(enabled);
tfOrificeSection_.setEnabled(enabled);
! tfOrificeCoefQ_.setEnabled(enabled);
! tfOrificeCoefPerteCharge_.setEnabled(enabled);
! tfOrificeCoteMin_.setEnabled(enabled);
cmbSensDebit_.setEnabled(enabled);
pnTFOrifice_.setEnabled(enabled);
--- 509,514 ----
tfOrificeLargeur_.setEnabled(enabled);
tfOrificeSection_.setEnabled(enabled);
! tfOrificeCoefQSeuil_.setEnabled(enabled);
! tfOrificeCoefQOrifice_.setEnabled(enabled);
cmbSensDebit_.setEnabled(enabled);
pnTFOrifice_.setEnabled(enabled);
***************
*** 538,544 ****
tfOrificeLargeur_.setValue(new Double(1));
tfOrificeSection_.setValue(new Double(10));
! tfOrificeCoefQ_.setValue(new Double(0.4));
! tfOrificeCoefPerteCharge_.setValue(new Double(0.5));
! tfOrificeCoteMin_.setValue(new Double(1));
cmbSensDebit_.setSelectedIndex(LSensDebitLiaison._DEUX_SENS);
}
--- 532,537 ----
tfOrificeLargeur_.setValue(new Double(1));
tfOrificeSection_.setValue(new Double(10));
! tfOrificeCoefQSeuil_.setValue(new Double(0.4));
! tfOrificeCoefQOrifice_.setValue(new Double(0.5));
cmbSensDebit_.setSelectedIndex(LSensDebitLiaison._DEUX_SENS);
}
|