From: <de...@us...> - 2008-09-21 23:14:59
|
Revision: 3966 http://fudaa.svn.sourceforge.net/fudaa/?rev=3966&view=rev Author: deniger Date: 2008-09-21 23:14:52 +0000 (Sun, 21 Sep 2008) Log Message: ----------- Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeTime.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/report/FudaaReportAnimationAdapter.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dGraphesResultatsEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCourbeTime.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileFlowrateFille.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/TrLauncherDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/Tr3DCalque.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrIsoLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrIsoModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFlecheLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFlecheModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/test/org/fudaa/fudaa/tr/Test3D.java Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeTime.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeTime.java 2008-09-21 23:14:14 UTC (rev 3965) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeTime.java 2008-09-21 23:14:52 UTC (rev 3966) @@ -28,9 +28,9 @@ final ListSelectionModel selection_; - final ListModel timeModel_; + final FudaaCourbeTimeListModel timeModel_; - public FudaaCourbeTime(EGGroup _m, EGModel _model, ListModel _timeModel) { + public FudaaCourbeTime(EGGroup _m, EGModel _model, FudaaCourbeTimeListModel _timeModel) { super(_m, _model); timeModel_ = _timeModel; selection_ = new DefaultListSelectionModel(); @@ -43,6 +43,10 @@ return selection_.getMaxSelectionIndex(); } + public double getTimeStepValueSec(int _idx) { + return timeModel_.getTimeInSec(_idx); + } + public ListModel getTimeListModel() { return timeModel_; } @@ -55,6 +59,10 @@ return (String) timeModel_.getElementAt(_idx); } + // public double getTimeStepValueSec(int _idx) { + // return timeModel_.; + // } + public void setTimeStep(int _idx) { selection_.setSelectionInterval(_idx, _idx); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/report/FudaaReportAnimationAdapter.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/report/FudaaReportAnimationAdapter.java 2008-09-21 23:14:14 UTC (rev 3965) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/report/FudaaReportAnimationAdapter.java 2008-09-21 23:14:52 UTC (rev 3966) @@ -54,6 +54,11 @@ return first == null ? CtuluLibString.ZERO : first.getTimeStep(_idx); } + public double getTimeStepValueSec(int _idx) { + EbliAnimationSourceInterface first = getFirstAnim(); + return first == null ? 0 : first.getTimeStepValueSec(_idx); + } + public String getTitle() { return controller_.owner_.getTitle(); } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dGraphesResultatsEditor.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dGraphesResultatsEditor.java 2008-09-21 23:14:14 UTC (rev 3965) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dGraphesResultatsEditor.java 2008-09-21 23:14:52 UTC (rev 3966) @@ -663,7 +663,13 @@ public String getTimeStep(int _idx) { return editeur_.getListePasTpsSection().getModel().getElementAt(_idx).toString(); } + + + public double getTimeStepValueSec(int _idx) { + //TODO a ameliorer + return Double.valueOf(getTimeStep(_idx)); + } /** * @param _idx l'indice a afficher */ Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCourbeTime.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCourbeTime.java 2008-09-21 23:14:14 UTC (rev 3965) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCourbeTime.java 2008-09-21 23:14:52 UTC (rev 3966) @@ -19,6 +19,7 @@ import org.fudaa.ctulu.CtuluVariable; import org.fudaa.ebli.animation.EbliAnimationAdapterInterface; import org.fudaa.ebli.controle.BSelecteurListTimeTarget; +import org.fudaa.fudaa.commun.courbe.FudaaCourbeTimeListModel; import com.memoire.bu.BuResource; @@ -31,9 +32,10 @@ final ListSelectionModel selection_ = new DefaultListSelectionModel(); - ListModel time_; + FudaaCourbeTimeListModel time_; - public MvProfileCourbeTime(final MvProfileCourbeGroup _m, final MVProfileCourbeModel _model, final ListModel _time) { + public MvProfileCourbeTime(final MvProfileCourbeGroup _m, final MVProfileCourbeModel _model, + final FudaaCourbeTimeListModel _time) { super(_m, _model); time_ = _time; time_.addListDataListener(this); @@ -42,16 +44,13 @@ selection_.addListSelectionListener(this); } - public MvProfileCourbe duplicate() { + public MvProfileCourbe duplicate() { final MvProfileCourbeTime res = new MvProfileCourbeTime((MvProfileCourbeGroup) getParent(), getM().duplicate(), time_); res.setAspectContour(getAspectContour()); res.getM().setTitle(getTitle() + CtuluLibString.ESPACE + BuResource.BU.getString("Copie")); return res; } - - - public void contentsChanged(final ListDataEvent _e) { updateTitle(); @@ -65,6 +64,10 @@ return time_.getElementAt(_idx).toString(); } + public double getTimeStepValueSec(int _idx) { + return time_.getTimeInSec(_idx); + } + public void setTimeStep(final int _idx) { if (_idx >= 0 && _idx < getNbTimeStep()) { selection_.setSelectionInterval(_idx, _idx); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileFlowrateFille.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileFlowrateFille.java 2008-09-21 23:14:14 UTC (rev 3965) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileFlowrateFille.java 2008-09-21 23:14:52 UTC (rev 3966) @@ -10,22 +10,19 @@ import java.awt.Color; import java.awt.Dimension; -import javax.swing.AbstractListModel; -import javax.swing.ListModel; +import javax.swing.event.ListDataListener; import org.fudaa.ctulu.CtuluLibArray; import org.fudaa.ctulu.CtuluLibString; - +import org.fudaa.ctulu.CtuluNumberFormatI; import org.fudaa.dodico.commun.DodicoLib; import org.fudaa.dodico.h2d.type.H2dVariableType; - import org.fudaa.ebli.courbe.EGAxeHorizontal; import org.fudaa.ebli.courbe.EGAxeVertical; import org.fudaa.ebli.courbe.EGCourbeChild; import org.fudaa.ebli.courbe.EGGraphe; import org.fudaa.ebli.courbe.EGGrapheTreeModel; import org.fudaa.ebli.courbe.EGGroup; - import org.fudaa.fudaa.commun.courbe.FudaaCourbeTime; import org.fudaa.fudaa.commun.courbe.FudaaCourbeTimeListModel; import org.fudaa.fudaa.commun.courbe.FudaaCourbeTimeModel; @@ -42,6 +39,7 @@ public final class MvProfileFlowrateFille extends FudaaGrapheTimeAnimatedFille { private int idx_; private int idxVolume_; + // private static int idxFrame_; protected static class FlowrateTreeModel extends EGGrapheTreeModel { @@ -50,7 +48,6 @@ return true; } - } public static String getCommonTitle(final FudaaCommonImplementation _impl) { @@ -76,10 +73,11 @@ _impl.getRootPane().putClientProperty("fudaa.flowrate.frame.idx", new Integer(next)); return fille; } + EGGroup grQ_; EGGroup grVolume_; double[] commonTime_; - ListModel commonTimeModel_; + FudaaCourbeTimeListModel commonTimeModel_; protected MvProfileFlowrateFille(final FudaaGrapheTimeAnimatedVisuPanel _g, final String _titre, final FudaaCommonImplementation _appli, final FudaaCourbeTimeListModel _timeFmt) { @@ -87,7 +85,7 @@ getGraphe().setXAxe(EGAxeHorizontal.buildDefautTimeAxe(_timeFmt == null ? null : _timeFmt.getTimeFmt())); } - protected class CommonListModel extends AbstractListModel { + protected class CommonListModel implements FudaaCourbeTimeListModel { final double[] times_; public CommonListModel(final double[] _times) { @@ -103,6 +101,30 @@ return times_ == null ? 0 : times_.length; } + public void fireContentChanged() {} + + public void fireStructureChanged() {} + + public CtuluNumberFormatI getTimeFmt() { + return MvProfileFlowrateFille.this.getTimeFmt(); + } + + public double getTimeInSec(int _i) { + return times_[_i]; + } + + public double[] getTimesInSec() { + return CtuluLibArray.copy(times_); + } + + public void setTimeFmt(CtuluNumberFormatI _fmt) { + MvProfileFlowrateFille.this.setTimeFmt(_fmt); + } + + public void addListDataListener(ListDataListener _l) {} + + public void removeListDataListener(ListDataListener _l) {} + } protected double[] getTime(final double[] _t) { @@ -115,10 +137,8 @@ } - protected ListModel getTimeModel(final double[] _t) { - if (_t == commonTime_ && commonTime_ != null) { - return commonTimeModel_; - } + protected FudaaCourbeTimeListModel getTimeModel(final double[] _t) { + if (_t == commonTime_ && commonTime_ != null) { return commonTimeModel_; } return new CommonListModel(_t); } @@ -134,7 +154,7 @@ mQCumulue.setTitle(cTitle); createFlowrateGroup(); - final ListModel timeModel = getTimeModel(time); + final FudaaCourbeTimeListModel timeModel = getTimeModel(time); final EGCourbeChild courbeChild = new FudaaCourbeTime(grQ_, mQ, timeModel); grQ_.addEGComponent(courbeChild); /* Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/TrLauncherDefault.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/TrLauncherDefault.java 2008-09-21 23:14:14 UTC (rev 3965) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/TrLauncherDefault.java 2008-09-21 23:14:52 UTC (rev 3966) @@ -134,8 +134,8 @@ infoSoft = new BuInformationsSoftware(); infoSoft.name = "prepro"; - infoSoft.version = "0.92-MAQUETTE-V3"; - infoSoft.date = "2008-09-12"; + infoSoft.version = "0.92-MAQUETTE-V4"; + infoSoft.date = "2008-09-20"; infoSoft.rights = TrResource.getS("Tous droits r\xE9serv\xE9s") + ". CETMEF (c)2003-2007"; infoSoft.contact = "fre...@fu..."; infoSoft.license = "GPL2"; Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/Tr3DCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/Tr3DCalque.java 2008-09-21 23:14:14 UTC (rev 3965) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/Tr3DCalque.java 2008-09-21 23:14:52 UTC (rev 3966) @@ -74,7 +74,13 @@ public int getNbTimeStep() { return srcInit_.getNbTimeStep(); } + + + public double getTimeStepValueSec(int _idx) { + return srcInit_.getTimeStep(_idx); + } + public boolean getRange(final CtuluRange _r) { getSrc().getExtrema(_r, getVarDisplayed(), null, null, false); return true; Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrIsoLayer.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrIsoLayer.java 2008-09-21 23:14:14 UTC (rev 3965) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrIsoLayer.java 2008-09-21 23:14:52 UTC (rev 3966) @@ -60,12 +60,8 @@ } public static EbliUIProperties saveTime(final EbliUIProperties _prop, final BSelecteurListTimeTarget _timeTarget) { - if (_prop == null) { - return null; - } - if (_timeTarget == null || _timeTarget.getTimeListSelectionModel().isSelectionEmpty()) { - return _prop; - } + if (_prop == null) { return null; } + if (_timeTarget == null || _timeTarget.getTimeListSelectionModel().isSelectionEmpty()) { return _prop; } if (!_timeTarget.getTimeListSelectionModel().isSelectionEmpty()) { final int i = _timeTarget.getTimeListSelectionModel().getMaxSelectionIndex(); _prop.put("post.timeSelected", i); @@ -74,13 +70,9 @@ } public static void restoreTime(final EbliUIProperties _prop, final BSelecteurListTimeTarget _timeTarget) { - if (_prop == null || _timeTarget == null) { - return; - } + if (_prop == null || _timeTarget == null) { return; } final int size = _timeTarget.getTimeListModel().getSize(); - if (size == 0) { - return; - } + if (size == 0) { return; } int idx = _prop.getInteger("post.timeSelected", size - 1); if (idx < 0 || idx >= size) { idx = size - 1; @@ -160,6 +152,10 @@ return getIsoModel().getT(_idx); } + public double getTimeStepValueSec(int _idx) { + return getIsoModel().getTInSec(_idx); + } + public JComponent getTimeTargetComponent() { return this; } @@ -231,9 +227,7 @@ } public void valueChanged(final ListSelectionEvent _e) { - if (_e.getValueIsAdjusting()) { - return; - } + if (_e.getValueIsAdjusting()) { return; } if (_e.getSource() == mainTimeSelectionModel_) { getIsoModel().setT(this.mainTimeSelectionModel_.getMinSelectionIndex()); // FuLog.warning(new Throwable()); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrIsoModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrIsoModel.java 2008-09-21 23:14:14 UTC (rev 3965) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrIsoModel.java 2008-09-21 23:14:52 UTC (rev 3966) @@ -282,6 +282,10 @@ public String getT(final int _i) { return (String) timeModel_.getElementAt(_i); } + + public double getTInSec(final int _i) { + return s_.getTimeStep(_i); + } public ListModel getTimeList() { return timeModel_; Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFlecheLayer.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFlecheLayer.java 2008-09-21 23:14:14 UTC (rev 3965) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFlecheLayer.java 2008-09-21 23:14:52 UTC (rev 3966) @@ -431,6 +431,10 @@ return (String) initModel_.getTimeListModel().getElementAt(_idx); } + public double getTimeStepValueSec(int _idx) { + return initModel_.getTimeStep(_idx); + } + public JComponent getTimeTargetComponent() { return this; } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFlecheModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFlecheModel.java 2008-09-21 23:14:14 UTC (rev 3965) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFlecheModel.java 2008-09-21 23:14:52 UTC (rev 3966) @@ -314,6 +314,11 @@ public final int getTimeIdx() { return timeIdx_; } + + public final double getTimeStep(int _i){ + return s_.getTimeStep(_i); + + } /** * @return la liste des pas de temps. Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/test/org/fudaa/fudaa/tr/Test3D.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/test/org/fudaa/fudaa/tr/Test3D.java 2008-09-21 23:14:14 UTC (rev 3965) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/test/org/fudaa/fudaa/tr/Test3D.java 2008-09-21 23:14:52 UTC (rev 3966) @@ -105,6 +105,10 @@ return initSrc_.getTimeListModel().getElementAt(_idx).toString(); } + public double getTimeStepValueSec(int _idx) { + return initSrc_.getTime().getTimeStep(_idx); + } + public String getTitle() { return super.getName(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |