|
From: <jm_...@us...> - 2003-10-20 17:34:16
|
Update of /cvsroot/fudaa//fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/casier
In directory sc8-pr-cvs1:/tmp/cvs-serv19646/dodico/src/org/fudaa/dodico/hydraulique1d/casier
Modified Files:
DCaracteristiqueLiaison.java
Added Files:
DOrificeLiaison.java
Log Message:
Ajout de la liaison casier "Orifice".
Ajout d'un scrollPane pour les éditeurs de conditions initiales,
paramètres résultats, variables résultats et graphes résultats.
Amélioration des perfs pour l'affichage des résultats généraux en utilisant
les évènements du modèle hydrauliques1d.
--- NEW FILE: DOrificeLiaison.java ---
/*
* @file DOrificeLiaison.java
* @creation 2003-10-20
* @modification $Date: 2003/10/20 17:25:31 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.hydraulique1d.casier;
import org.fudaa.dodico.corba.objet.*;
import org.fudaa.dodico.objet.*;
import org.fudaa.dodico.corba.hydraulique1d.*;
import org.fudaa.dodico.corba.hydraulique1d.casier.*;
import java.util.*;
/**
* @version $Revision: 1.1 $ $Date: 2003/10/20 17:25:31 $ by $Author: jm_lacombe $
* @author Jean-Marc Lacombe
*/
public final class DOrificeLiaison
extends DCaracteristiqueLiaison
implements IOrificeLiaisonOperations
{
public void initialise(IObjet _o)
{
super.initialise(_o);
if(_o instanceof IOrificeLiaison) {
IOrificeLiaison q=(IOrificeLiaison)_o;
coefPerteCharge(q.coefPerteCharge());
coefQ(q.coefQ());
coteMin(q.coteMin());
largeur(q.largeur());
section(q.section());
sensDebit(LSensDebitLiaison.from_int(q.sensDebit().value()));
}
}
final public IObjet creeClone()
{
IOrificeLiaison p=CDodico.findUsine().creeHydraulique1dOrificeLiaison();
p.initialise(tie());
return p;
}
public String[] getInfos()
{
String[] res = new String[2];
res[0]="Orifice";
res[1]=super.getInfos()[1]+" larg. : "+largeur_+" coef. Q : "+coefQ_+" coef. Perte Charge : "+coefPerteCharge_+" cote min : "+coteMin_;
return res;
}
/*** ILiaison ***/
// constructeurs
public DOrificeLiaison()
{
super();
largeur_=1;
coefQ_=0.40;
section_=1;
coefPerteCharge_=0.5;
coteMin_=1;
sensDebit_=LSensDebitLiaison.DEUX_SENS;
}
public void dispose()
{
id_=0;
largeur_=0;
coefQ_=0;
section_=0;
coefPerteCharge_=0;
coteMin_=0;
sensDebit_=null;
super.dispose();
}
/*** ISeuilLiaison ***/
// attributs
private double largeur_;
public double largeur() {
return largeur_;
}
public void largeur(double s) {
largeur_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "largeur");
}
private double coefQ_;
public double coefQ() {
return coefQ_;
}
public void coefQ(double s) {
coefQ_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "coefQ");
}
private double section_;
public double section() {
return section_;
}
public void section(double s) {
section_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "section");
}
private double coefPerteCharge_;
public double coefPerteCharge() {
return coefPerteCharge_;
}
public void coefPerteCharge(double s) {
coefPerteCharge_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "coefPerteCharge");
}
private double coteMin_;
public double coteMin() {
return coteMin_;
}
public void coteMin(double s) {
coteMin_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "coteMin");
}
private LSensDebitLiaison sensDebit_;
public LSensDebitLiaison sensDebit() {
return sensDebit_;
}
public void sensDebit(LSensDebitLiaison s) {
sensDebit_=s;
CDodico.findUsine().fireObjetModifie(toString(), tie(), "sensDebit");
}
// méthodes
public boolean isOrifice(){
return true;
}
public double getLargeur(){
return largeur();
}
public void setLargeur(double largeur){
largeur(largeur);
}
public double getCoefQ(){
return coefQ();
}
public void setCoefQ(double coefQ){
coefQ(coefQ);
}
public double getSection(){
return section();
}
public void setSection(double section){
section(section);
}
public double getCoefPerteCharge(){
return coefPerteCharge();
}
public void setCoefPerteCharge(double coefPerteCharge){
coefPerteCharge(coefPerteCharge);
}
public double getCoteMin(){
return coteMin();
}
public void setCoteMin(double coteMin){
coteMin(coteMin);
}
public LSensDebitLiaison getSensDebit(){
return sensDebit();
}
public void setSensDebit(LSensDebitLiaison sensDebit){
sensDebit(sensDebit);
}
}
Index: DCaracteristiqueLiaison.java
===================================================================
RCS file: /cvsroot/fudaa//fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/casier/DCaracteristiqueLiaison.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DCaracteristiqueLiaison.java 22 Jul 2003 13:32:22 -0000 1.2
--- DCaracteristiqueLiaison.java 20 Oct 2003 17:25:31 -0000 1.3
***************
*** 89,92 ****
--- 89,96 ----
}
+ public boolean isOrifice(){
+ return false;
+ }
+
public double getCote(){
return cote();
***************
*** 151,154 ****
--- 155,174 ----
public void setCoefPerteCharge(double coefPerteCharge){
throw new IllegalArgumentException("methode invalide : setCoefPerteCharge()");
+ }
+
+ public double getCoteMin(){
+ throw new IllegalArgumentException("methode invalide : getCoteMin()");
+ }
+
+ public void setCoteMin(double coteMin){
+ throw new IllegalArgumentException("methode invalide : setCoteMin()");
+ }
+
+ public LSensDebitLiaison getSensDebit(){
+ throw new IllegalArgumentException("methode invalide : getSensDebit()");
+ }
+
+ public void setSensDebit(LSensDebitLiaison sensDebit){
+ throw new IllegalArgumentException("methode invalide : setSensDebit()");
}
}
|