From: <de...@us...> - 2009-01-20 23:25:38
|
Revision: 4387 http://fudaa.svn.sourceforge.net/fudaa/?rev=4387&view=rev Author: deniger Date: 2009-01-20 23:25:33 +0000 (Tue, 20 Jan 2009) Log Message: ----------- Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BVueCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueGrille.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/ressource/ebli_en.fr_txt branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetFusionCalques.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCoordinatesModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigGrillePalette.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeModel.java Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BVueCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BVueCalque.java 2009-01-20 19:35:40 UTC (rev 4386) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BVueCalque.java 2009-01-20 23:25:33 UTC (rev 4387) @@ -33,6 +33,7 @@ import com.memoire.fu.Fu; import com.memoire.fu.FuLog; +import org.fudaa.ctulu.CtuluLib; import org.fudaa.ctulu.CtuluLibArray; import org.fudaa.ctulu.image.CtuluLibImage; @@ -373,6 +374,7 @@ repere.ajouteTransformation(RepereEvent.ROT_Z, _rz, false); } repereModifie(repere); + // System.err.println(getViewBoite()+" == "+_boite); } /** @@ -485,7 +487,13 @@ * final GrBoite b = new GrBoite(new GrPoint(insets.left, insets.top, 0), new GrPoint(getWidth() - insets.left - * insets.right, getHeight() - insets.top - insets.bottom, 0)).; */ - final GrBoite b = new GrBoite(new GrPoint(0, 0, 0), new GrPoint(getWidth(), getHeight(), 0)); + final GrBoite b = new GrBoite(new GrPoint(0, getHeight(), 0), new GrPoint(getWidth(),0, 0)); + if (insets_ != null) { + b.o_.x_ += insets_.left; + b.o_.y_ = b.o_.y_-(insets_.bottom+insets_.top); + b.e_.x_ =b.e_.x_- (insets_.left + insets_.right); + b.e_.y_ += insets_.top ; + } b.autoApplique(getCalque().getVersReel()); return b; } @@ -681,7 +689,8 @@ */ public void reshape(final int _x, final int _y, final int _width, final int _height) { final Rectangle r = new Rectangle(_x, _y, _width, _height); - if (!r.equals(getBounds())) { + Rectangle bounds = getBounds(); + if (!r.equals(bounds)) { super.reshape(_x, _y, _width, _height); changeMorphismes(); } @@ -737,11 +746,16 @@ } public void setUserInsets(final Insets _insets) { + if (CtuluLib.isEquals(insets_, _insets)) return; Insets old = insets_; insets_ = _insets; firePropertyChange("insets", old, insets_); } + public Insets getUserInsets() { + return (Insets) (insets_ == null ? null : insets_.clone()); + } + public void translateXLeft(final boolean _largeTranslate, final boolean _rapide) { translateX(-getTranslateStep(_largeTranslate), _rapide); } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueGrille.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueGrille.java 2009-01-20 19:35:40 UTC (rev 4386) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueGrille.java 2009-01-20 23:25:33 UTC (rev 4387) @@ -25,12 +25,12 @@ import org.fudaa.ctulu.CtuluListSelection; import org.fudaa.ctulu.iterator.NumberIterator; import org.fudaa.ebli.commun.EbliLib; +import org.fudaa.ebli.commun.EbliUIProperties; import org.fudaa.ebli.geometrie.GrBoite; import org.fudaa.ebli.geometrie.GrMorphisme; import org.fudaa.ebli.geometrie.GrPoint; import org.fudaa.ebli.trace.TraceLigne; -import com.vividsolutions.jts.geom.Envelope; import com.vividsolutions.jts.geom.LineString; import com.vividsolutions.jts.geom.LinearRing; @@ -46,28 +46,29 @@ boolean drawGrid_; boolean drawX_ = true; boolean drawY_ = true; - Envelope customBounds_; - boolean useCustom_; + // Envelope customBounds_; + // boolean useCustom_; int nbGraduationX_ = 10; int nbGraduationY_ = 10; final BVueCalque vue_; - public void paintAllInImage(final Graphics2D _g, final GrMorphisme _versEcran, final GrMorphisme _versReel, - final GrBoite _clipReel) { - // super.paintAllInImage(_g, _versEcran, _versReel, _clipReel); - } - public ZCalqueGrille(final BVueCalque _vue) { super(); vue_ = _vue; setDestructible(false); + setName("cqGrille"); setTitle(EbliLib.getS("Grille")); // setForeground(new Color(204, 153, 0)); setForeground(Color.BLACK); } + public void paintAllInImage(final Graphics2D _g, final GrMorphisme _versEcran, final GrMorphisme _versReel, + final GrBoite _clipReel) { + // super.paintAllInImage(_g, _versEcran, _versReel, _clipReel); + } + public void changeZoom(double minx, double miny, double maxx, double maxy) { vue_.changeViewBoite(this, new GrBoite(new GrPoint(minx, miny, 0), new GrPoint(maxx, maxy, 0)), false); } @@ -103,7 +104,7 @@ // } // return r; } - + public GrBoite getDomaineOnSelected() { return getDomaine(); } @@ -122,7 +123,7 @@ final GrBoite zv = _clipReel.intersectionXY(domaine); if (zv == null) { return; } - updateBounds(zv); + // updateBounds(zv); final GrBoite targetBoite = new GrBoite(); targetBoite.ajuste(0, 0, 0); // la boite d'affichage @@ -319,26 +320,26 @@ int minYDraw = _ordxAxe; int maxYDraw = (int) _minYForAxe; - if (useCustom_) { - tmp_.y_ = _zv.getMinY(); - if (_yValue.size() > 0) { - tmp_.y_ = Math.min(_yValue.get(0), tmp_.y_); - } - tmp_.autoApplique(_versEcran); - tmp_.y_ = Math.floor(tmp_.y_); - if (tmp_.y_ > minYDraw) { - minYDraw = (int) tmp_.y_; - } - tmp_.y_ = _zv.getMaxY(); - if (_yValue.size() > 1) { - tmp_.y_ = Math.max(_yValue.get(_yValue.size() - 1), tmp_.y_); - } - tmp_.autoApplique(_versEcran); - tmp_.y_ = Math.ceil(tmp_.y_); - if (tmp_.y_ < maxYDraw) { - maxYDraw = (int) tmp_.y_; - } - } + // if (useCustom_) { + // tmp_.y_ = _zv.getMinY(); + // if (_yValue.size() > 0) { + // tmp_.y_ = Math.min(_yValue.get(0), tmp_.y_); + // } + // tmp_.autoApplique(_versEcran); + // tmp_.y_ = Math.floor(tmp_.y_); + // if (tmp_.y_ > minYDraw) { + // minYDraw = (int) tmp_.y_; + // } + // tmp_.y_ = _zv.getMaxY(); + // if (_yValue.size() > 1) { + // tmp_.y_ = Math.max(_yValue.get(_yValue.size() - 1), tmp_.y_); + // } + // tmp_.autoApplique(_versEcran); + // tmp_.y_ = Math.ceil(tmp_.y_); + // if (tmp_.y_ < maxYDraw) { + // maxYDraw = (int) tmp_.y_; + // } + // } tl_.setCouleur(getDrawColor()); tl_.setTypeTrait(TraceLigne.LISSE); tl_.dessineTrait(_g, _absyAxe, minYDraw, _absyAxe, maxYDraw); @@ -351,26 +352,26 @@ int minXDraw = _absyAxe; int maxXDraw = (int) _maxXForAxe; - if (useCustom_) { - tmp_.x_ = _zv.getMinX(); - if (_xValue.size() > 0) { - tmp_.x_ = Math.min(_xValue.get(0), tmp_.x_); - } - tmp_.autoApplique(_versEcran); - tmp_.x_ = Math.floor(tmp_.x_); - if (tmp_.x_ < minXDraw) { - minXDraw = (int) tmp_.x_; - } - tmp_.x_ = _zv.getMaxX(); - if (_xValue.size() > 1) { - tmp_.x_ = Math.max(_xValue.get(_xValue.size() - 1), tmp_.x_); - } - tmp_.autoApplique(_versEcran); - tmp_.x_ = Math.ceil(tmp_.x_); - if (tmp_.x_ < maxXDraw) { - maxXDraw = (int) tmp_.x_; - } - } + // if (useCustom_) { + // tmp_.x_ = _zv.getMinX(); + // if (_xValue.size() > 0) { + // tmp_.x_ = Math.min(_xValue.get(0), tmp_.x_); + // } + // tmp_.autoApplique(_versEcran); + // tmp_.x_ = Math.floor(tmp_.x_); + // if (tmp_.x_ < minXDraw) { + // minXDraw = (int) tmp_.x_; + // } + // tmp_.x_ = _zv.getMaxX(); + // if (_xValue.size() > 1) { + // tmp_.x_ = Math.max(_xValue.get(_xValue.size() - 1), tmp_.x_); + // } + // tmp_.autoApplique(_versEcran); + // tmp_.x_ = Math.ceil(tmp_.x_); + // if (tmp_.x_ < maxXDraw) { + // maxXDraw = (int) tmp_.x_; + // } + // } tl_.setCouleur(getDrawColor()); tl_.setTypeTrait(TraceLigne.LISSE); @@ -433,14 +434,14 @@ return yMax; } - private void updateBounds(final GrBoite _zv) { - if (useCustom_ && customBounds_ != null) { - _zv.o_.x_ = Math.max(_zv.o_.x_, customBounds_.getMinX()); - _zv.e_.x_ = Math.min(_zv.e_.x_, customBounds_.getMaxX()); - _zv.o_.y_ = Math.max(_zv.o_.y_, customBounds_.getMinY()); - _zv.e_.y_ = Math.min(_zv.e_.y_, customBounds_.getMaxY()); - } - } + // private void updateBounds(final GrBoite _zv) { + // if (useCustom_ && customBounds_ != null) { + // _zv.o_.x_ = Math.max(_zv.o_.x_, customBounds_.getMinX()); + // _zv.e_.x_ = Math.min(_zv.e_.x_, customBounds_.getMaxX()); + // _zv.o_.y_ = Math.max(_zv.o_.y_, customBounds_.getMinY()); + // _zv.e_.y_ = Math.min(_zv.e_.y_, customBounds_.getMaxY()); + // } + // } // Icon /** @@ -504,6 +505,7 @@ } else { super.setVisible(_v); } + firePropertyChange("grille", true, false); } @@ -514,32 +516,32 @@ public void setDrawGrid(final boolean _drawGrid) { if (_drawGrid != drawGrid_) { drawGrid_ = _drawGrid; - repaint(); + grilleChanged(); } } - public boolean isUseCustom() { - return useCustom_; - } + // public boolean isUseCustom() { + // return useCustom_; + // } + // + // public void setUseCustom(final boolean _useCustom) { + // if (useCustom_ != _useCustom) { + // useCustom_ = _useCustom; + // repaint(); + // } + // } + // + // public Envelope getCustomBounds() { + // return customBounds_ == null ? null : new Envelope(customBounds_); + // } + // + // public void setCustomBounds(final Envelope _customBounds) { + // if (customBounds_ != _customBounds) { + // customBounds_ = _customBounds; + // repaint(); + // } + // } - public void setUseCustom(final boolean _useCustom) { - if (useCustom_ != _useCustom) { - useCustom_ = _useCustom; - repaint(); - } - } - - public Envelope getCustomBounds() { - return customBounds_ == null ? null : new Envelope(customBounds_); - } - - public void setCustomBounds(final Envelope _customBounds) { - if (customBounds_ != _customBounds) { - customBounds_ = _customBounds; - repaint(); - } - } - public boolean isDrawX() { return drawX_; } @@ -547,7 +549,7 @@ public void setDrawX(final boolean _drawX) { if (drawX_ != _drawX) { drawX_ = _drawX; - repaint(); + grilleChanged(); } } @@ -558,21 +560,59 @@ public void setDrawY(final boolean _drawY) { if (drawY_ != _drawY) { drawY_ = _drawY; - repaint(); + grilleChanged(); } } + private void grilleChanged() { + repaint(); + firePropertyChange("grille", true, false); + } + + + + @Override + public EbliUIProperties saveUIProperties() { + final EbliUIProperties res = super.saveUIProperties(); + res.put("graduation.x.nb", getNbXGraduations()); + res.put("graduation.y.nb", getNbYGraduations()); + res.put("graduation.x.visible", isDrawX()); + res.put("graduation.y.visible", isDrawY()); + res.put("grille.visible", isDrawGrid()); + return res; + } + + @Override + public void initFrom(EbliUIProperties _p) { + super.initFrom(_p); + if (_p.isDefined("graduation.x.nb")) { + setNbGraduationX(_p.getInteger("graduation.x.nb")); + } + if (_p.isDefined("graduation.y.nb")) { + setNbGraduationX(_p.getInteger("graduation.y.nb")); + } + if (_p.isDefined("graduation.y.visible")) { + setDrawY(_p.getBoolean("graduation.y.visible")); + } + if (_p.isDefined("graduation.x.visible")) { + setDrawX(_p.getBoolean("graduation.x.visible")); + } + if (_p.isDefined("grille.visible")) { + setDrawGrid(_p.getBoolean("grille.visible")); + } + } + public void setNbGraduationX(final int _nbGraduationX) { if (_nbGraduationX > 0 && nbGraduationX_ != _nbGraduationX) { nbGraduationX_ = _nbGraduationX; - repaint(); + grilleChanged(); } } public void setNbGraduationY(final int _nbGraduationY) { if (_nbGraduationY > 0 && nbGraduationY_ != _nbGraduationY) { nbGraduationY_ = _nbGraduationY; - repaint(); + grilleChanged(); } } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/ressource/ebli_en.fr_txt =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/ressource/ebli_en.fr_txt 2009-01-20 19:35:40 UTC (rev 4386) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/ressource/ebli_en.fr_txt 2009-01-20 23:25:33 UTC (rev 4387) @@ -3,6 +3,8 @@ Centrer horizontalement=Center horizontally Centrer verticalement=Center vertically Dessiner l'axe=Draw axis +Dessiner l'axe Y=Draw Y axis +Dessiner l'axe X=Draw X axis Nombre de graduation=Number of Scale marks Changer le zoom=Change zoom Appliquer le zoom=Apply zoom Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetFusionCalques.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetFusionCalques.java 2009-01-20 19:35:40 UTC (rev 4386) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetFusionCalques.java 2009-01-20 23:25:33 UTC (rev 4387) @@ -1,17 +1,22 @@ package org.fudaa.ebli.visuallibrary.calque; +import java.awt.Insets; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.util.ArrayList; +import java.util.HashMap; import java.util.Iterator; import java.util.List; +import java.util.Map; +import org.fudaa.ebli.calque.BCalque; import org.fudaa.ebli.calque.BVueCalque; +import org.fudaa.ebli.calque.ZCalqueGrille; import org.fudaa.ebli.calque.ZCalqueSondeInteraction; import org.fudaa.ebli.calque.ZCalqueSondeSynchroniserFusion; import org.fudaa.ebli.calque.ZEbliCalquesPanel; +import org.fudaa.ebli.commun.EbliUIProperties; import org.fudaa.ebli.geometrie.GrBoite; -import org.fudaa.ebli.repere.RepereEvent; import org.fudaa.ebli.visuallibrary.EbliScene; import org.fudaa.ebli.visuallibrary.EbliWidget; import org.fudaa.ebli.visuallibrary.EbliWidgetGroup; @@ -55,38 +60,64 @@ // -- on met a jour le modele de zoom pour toutes les filles en prenant le // dernier widget (= la widget temoin) - ZEbliCalquesPanel pn = listeWidgetCalque_.get(listeWidgetCalque_.size() - 1).calquePanel_; + final ZEbliCalquesPanel pn = listeWidgetCalque_.get(listeWidgetCalque_.size() - 1).calquePanel_; + // le zoom changeAllZoomFrom(pn.getVueCalque()); + // les espaces + changeAllInsetsFrom(pn.getVueCalque()); + // les grilles + registerGrilles(); + changeAllGrilleFrom(pn.getVueCalque()); for (int i = listeWidgetCalque_.size() - 1; i >= 0; i--) { - EbliWidgetVueCalque vue = listeWidgetCalque_.get(i); + final EbliWidgetVueCalque vue = listeWidgetCalque_.get(i); vue.calquePanel_.getVueCalque().addPropertyChangeListener("repere", this); + vue.calquePanel_.getVueCalque().addPropertyChangeListener("insets", this); } + getEbliScene().refresh(); - } - private final Object sync = new Object(); + // private final Object sync = new Object(); public void propertyChange(final PropertyChangeEvent _evt) { -// synchronized (sync) { - - if (!noCyclePropertieChange) return; - noCyclePropertieChange = false; - // listeWidgetCalque_.get(0).calquePanel_.getVueCalque().changeViewBoite( - // _source, _boite, _rapide) - final BVueCalque vueCalque = (BVueCalque) _evt.getSource(); - if (getVueInEdition() != vueCalque) { - noCyclePropertieChange = true; - return; - } - // RepereEvent newRepere = (RepereEvent) _evt.getNewValue(); - changeAllZoomFrom(vueCalque); + // synchronized (sync) { + final boolean isRepere = "repere".equals(_evt.getPropertyName()); + // pour eviter de boucler indefiniment + if (!noCyclePropertieChange) return; + noCyclePropertieChange = false; + final BVueCalque vueCalque = (BVueCalque) _evt.getSource(); + if (getVueInEdition() != vueCalque) { noCyclePropertieChange = true; - getEbliScene().refresh(); -// } + return; + } + // RepereEvent newRepere = (RepereEvent) _evt.getNewValue(); + if (isRepere) changeAllZoomFrom(vueCalque); + else changeAllInsetsFrom(vueCalque); + noCyclePropertieChange = true; + getEbliScene().refresh(); + // } } + private PropertyChangeListener grillePropertyChangeListener = new PropertyChangeListener() { + + public void propertyChange(PropertyChangeEvent _evt) { + propertyChangeFromGrille(_evt); + + } + }; + + public void propertyChangeFromGrille(final PropertyChangeEvent _evt) { + // synchronized (sync) { + // pour eviter de boucler indefiniment + final BVueCalque vueCalque = getVueCalque((ZCalqueGrille) _evt.getSource()); + if (getVueInEdition() != vueCalque) { return; } + // RepereEvent newRepere = (RepereEvent) _evt.getNewValue(); + changeAllGrilleFrom(vueCalque); + getEbliScene().refresh(); + // } + } + private BVueCalque getVueInEdition() { for (final Iterator<Widget> it = getChildren().iterator(); it.hasNext();) { final EbliWidgetVueCalque widget = (EbliWidgetVueCalque) ((EbliWidget) it.next()).getIntern(); @@ -95,16 +126,69 @@ return null; } + ZCalqueGrille getGrille(final ZEbliCalquesPanel _panel) { + final BCalque calqueParNom = _panel.getCqInfos().getCalqueParNom("cqGrille"); + return (ZCalqueGrille) (calqueParNom instanceof ZCalqueGrille ? calqueParNom : null); + } + + Map<BVueCalque, ZCalqueGrille> grilles_ = new HashMap<BVueCalque, ZCalqueGrille>(); + + private BVueCalque getVueCalque(ZCalqueGrille _grille) { + for (Map.Entry<BVueCalque, ZCalqueGrille> entry : grilles_.entrySet()) { + if (entry.getValue() == _grille) { return entry.getKey(); } + + } + return null; + } + + private void registerGrilles() { + for (int i = listeWidgetCalque_.size() - 1; i >= 0; i--) { + final EbliWidgetVueCalque vue = listeWidgetCalque_.get(i); + final ZCalqueGrille grille = getGrille(vue.calquePanel_); + if (grille != null) { + grilles_.put(vue.calquePanel_.getVueCalque(), grille); + grille.addPropertyChangeListener("grille", grillePropertyChangeListener); + } + } + } + + private void changeAllGrilleFrom(final BVueCalque vueCalque) { + ZCalqueGrille grille = grilles_.get(vueCalque); + if (grille == null) return; + final EbliUIProperties ui = grille.saveUIProperties(); + for (Map.Entry<BVueCalque, ZCalqueGrille> entry : grilles_.entrySet()) { + if (entry.getKey() != vueCalque) { + entry.getValue().initFrom(ui); + } + + } + + } + private void changeAllZoomFrom(final BVueCalque vueCalque) { + final GrBoite viewBoite = vueCalque.getViewBoite(); for (final Iterator<Widget> it = getChildren().iterator(); it.hasNext();) { final EbliWidgetVueCalque widget = (EbliWidgetVueCalque) ((EbliWidget) it.next()).getIntern(); if (widget.calquePanel_.getVueCalque() != vueCalque) { - widget.setZoom(vueCalque.getViewBoite()); + widget.setZoom(viewBoite); } } } + private void changeAllInsetsFrom(final BVueCalque vueCalque) { + final Insets init = vueCalque.getUserInsets(); + for (final Iterator<Widget> it = getChildren().iterator(); it.hasNext();) { + final EbliWidgetVueCalque widget = (EbliWidgetVueCalque) ((EbliWidget) it.next()).getIntern(); + if (widget.calquePanel_.getVueCalque() != vueCalque) { + widget.calquePanel_.getVueCalque().setUserInsets(init); + widget.clearCacheImage(); + + } + + } + } + /** * Surcharge de la methode de ebli, utilisse pour virer les property change listener */ @@ -113,8 +197,13 @@ EbliWidgetVueCalque widgetCalque; if (child instanceof EbliWidgetVueCalque) widgetCalque = (EbliWidgetVueCalque) child; else widgetCalque = (EbliWidgetVueCalque) ((EbliWidget) child.getChildren().get(0)).getIntern(); - widgetCalque.calquePanel_.getVueCalque().getAbstractCalque().removePropertyChangeListener("repere", this); - + BVueCalque vueCalque = widgetCalque.calquePanel_.getVueCalque(); + vueCalque.getAbstractCalque().removePropertyChangeListener("repere", this); + vueCalque.getAbstractCalque().removePropertyChangeListener("insets", this); + ZCalqueGrille remove = grilles_.remove(vueCalque); + if (remove != null) { + remove.removePropertyChangeListener("grille", grillePropertyChangeListener); + } } ZCalqueSondeSynchroniserFusion managerSondesFusion_; @@ -159,18 +248,20 @@ managerSondesFusion_.removeAllListenningSonde(); } + @Override public boolean hasSattelite() { return true; } + @Override public List<EbliWidget> getSattelite() { - List<EbliWidget> liste = new ArrayList<EbliWidget>(); + final List<EbliWidget> liste = new ArrayList<EbliWidget>(); for (int i = listeWidgetCalque_.size() - 1; i >= 0; i--) { - EbliWidgetVueCalque vue = listeWidgetCalque_.get(i); + final EbliWidgetVueCalque vue = listeWidgetCalque_.get(i); if (vue.hasSattelite()) liste.addAll(vue.getSattelite()); } return liste; Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java 2009-01-20 19:35:40 UTC (rev 4386) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java 2009-01-20 23:25:33 UTC (rev 4387) @@ -3,6 +3,7 @@ import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics2D; +import java.awt.Insets; import java.awt.Rectangle; import java.awt.Window; import java.awt.image.BufferedImage; @@ -103,6 +104,8 @@ final Widget widget, final BuPanel editor, final boolean commit) { editingStop(); setZoom(calquePanel_.getVueCalque().getViewBoite()); + //le zoom n'a pas chang\xE9. +// zoomChanged_=false; getEbliScene().refresh(); } @@ -121,6 +124,8 @@ } private void initSize(final Rectangle rec) { + calquePanel_.setSize(rec.width, rec.height); + calquePanel_.setPreferredSize(new Dimension(rec.width, rec.height)); final BCalque[] tousCalques = calquePanel_.getVueCalque().getCalque().getTousCalques(); calquePanel_.getVueCalque().setSize(rec.width, rec.height); // calquePanel_.setPreferredSize(new Dimension(rec.width, rec.height)); @@ -139,6 +144,7 @@ } boolean zoomChanged_ = true; + @Override protected void paintWidget() { Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCoordinatesModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCoordinatesModel.java 2009-01-20 19:35:40 UTC (rev 4386) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCoordinatesModel.java 2009-01-20 23:25:33 UTC (rev 4387) @@ -15,6 +15,7 @@ import org.fudaa.ctulu.ProgressionInterface; import org.fudaa.dodico.ef.operation.EfLineIntersectionsResultsBuilder; import org.fudaa.dodico.ef.operation.EfLineIntersectionsResultsI; +import org.fudaa.ebli.courbe.EGGrapheTreeModel; import org.fudaa.ebli.courbe.EGModel; import org.fudaa.ebli.palette.BPaletteInfo.InfoData; @@ -40,6 +41,8 @@ updateRes(); } + + public void replayData(EGGrapheTreeModel _model, Map _infos, CtuluUI _impl) {} public int getActiveTimeIdx() { return 0; Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigGrillePalette.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigGrillePalette.java 2009-01-20 19:35:40 UTC (rev 4386) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigGrillePalette.java 2009-01-20 23:25:33 UTC (rev 4387) @@ -95,12 +95,6 @@ return r; } - private void addXYLAbels(final BuPanel pnXY) { - pnXY.add(new BuLabel("")); - pnXY.add(new BuLabel("X")); - pnXY.add(new BuLabel("Y")); - } - @Override public JComponent buildContentPane() { final BuPanel content = new BuPanel(new BuVerticalLayout(2)); @@ -110,9 +104,12 @@ return content; } - private void buildDrawAxes(final BuPanel _pn) { - _pn.add(new BuLabel(EbliLib.getS("Dessiner l'axe"))); - final BuCheckBox cbX = new BuCheckBox(); + private BuPanel createAxis() { + final BuPanel pnXY = new BuPanel(new BuGridLayout(2, 3, 3, false, false, false, false, false)); + pnXY.setBorder(CtuluLibSwing.createTitleBorder(EbliLib.getS("Axes"))); + pnXY.add(new BuLabel("")); + pnXY.add(new BuLabel(EbliLib.getS("Nombre de graduation"))); + final BuCheckBox cbX = new BuCheckBox(EbliLib.getS("Dessiner l'axe X")); cbX.setSelected(target_.isDrawX()); cbX.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent _e) { @@ -120,23 +117,10 @@ } }); - _pn.add(cbX); - final BuCheckBox cbY = new BuCheckBox(); - cbY.setSelected(target_.isDrawY()); - cbY.addActionListener(new ActionListener() { - public void actionPerformed(final ActionEvent _e) { - target_.setDrawY(cbY.isSelected()); - } - - }); - _pn.add(cbY); - } - - private void buildGraduation(final BuPanel _pn) { + pnXY.add(cbX); final BuTextField btGraduationX = BuTextField.createIntegerField(); - _pn.add(new BuLabel(EbliLib.getS("Nombre de graduation"))); btGraduationX.setValue(new Integer(target_.getNbXGraduations())); - _pn.add(btGraduationX); + pnXY.add(btGraduationX); btGraduationX.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent _e) { @@ -150,9 +134,20 @@ } }); + + final BuCheckBox cbY = new BuCheckBox(EbliLib.getS("Dessiner l'axe Y")); + cbY.setSelected(target_.isDrawY()); + cbY.addActionListener(new ActionListener() { + public void actionPerformed(final ActionEvent _e) { + target_.setDrawY(cbY.isSelected()); + } + + }); + pnXY.add(cbY); + final BuTextField btGraduationY = BuTextField.createIntegerField(); btGraduationY.setValue(new Integer(target_.getNbYGraduations())); - _pn.add(btGraduationY); + pnXY.add(btGraduationY); btGraduationY.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent _e) { @@ -166,14 +161,6 @@ } }); - } - - private BuPanel createAxis() { - final BuPanel pnXY = new BuPanel(new BuGridLayout(3, 3, 3, false, false, false, false, false)); - pnXY.setBorder(CtuluLibSwing.createTitleBorder(EbliLib.getS("Axes"))); - addXYLAbels(pnXY); - buildDrawAxes(pnXY); - buildGraduation(pnXY); return pnXY; } @@ -235,12 +222,14 @@ private BuPanel createZoom() { final BuPanel select = new BuPanel(new BuGridLayout(3, 3, 3, false, false, false, false, false)); - addXYLAbels(select); + select.add(new BuLabel(EbliLib.getS(""))); select.add(new BuLabel(EbliLib.getS("Min"))); - final BuTextField tfMinX = addDoubleText(select); - final BuTextField tfMinY = addDoubleText(select); select.add(new BuLabel(EbliLib.getS("Max"))); + select.add(new BuLabel(EbliLib.getS("X"))); + final BuTextField tfMinX = addDoubleText(select); final BuTextField tfMaxX = addDoubleText(select); + select.add(new BuLabel(EbliLib.getS("Y"))); + final BuTextField tfMinY = addDoubleText(select); final BuTextField tfMaxY = addDoubleText(select); final BuPanel zoom = new BuPanel(new BuVerticalLayout(3, false, false)); zoom.setBorder(CtuluLibSwing.createTitleBorder(EbliLib.getS("Changer le zoom"))); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeModel.java 2009-01-20 19:35:40 UTC (rev 4386) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeModel.java 2009-01-20 23:25:33 UTC (rev 4387) @@ -7,44 +7,29 @@ */ package org.fudaa.fudaa.tr.post; -import java.awt.Dimension; -import java.awt.Rectangle; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; -import javax.swing.JScrollPane; - import org.fudaa.ctulu.CtuluCommandContainer; -import org.fudaa.ctulu.CtuluLib; import org.fudaa.ctulu.CtuluLibArray; import org.fudaa.ctulu.CtuluLibString; import org.fudaa.ctulu.CtuluListSelectionInterface; import org.fudaa.ctulu.CtuluRange; import org.fudaa.ctulu.CtuluUI; -import org.fudaa.ctulu.collection.CtuluArrayDouble; -import org.fudaa.ctulu.gui.CtuluDialogPanel; import org.fudaa.dodico.ef.EfData; import org.fudaa.dodico.h2d.type.H2dVariableType; -import org.fudaa.ebli.calque.BArbreCalque; -import org.fudaa.ebli.calque.BCalque; -import org.fudaa.ebli.calque.BCalqueLegende; import org.fudaa.ebli.courbe.EGCourbeChild; import org.fudaa.ebli.courbe.EGGroup; import org.fudaa.ebli.courbe.EGModel; import org.fudaa.ebli.palette.BPaletteInfo.InfoData; import org.fudaa.ebli.visuallibrary.EbliWidget; - import org.fudaa.fudaa.commun.courbe.FudaaCourbeTime; import org.fudaa.fudaa.commun.courbe.FudaaCourbeTimeModel; import org.fudaa.fudaa.tr.common.TrResource; -import com.memoire.bu.BuBorderLayout; -import com.memoire.bu.BuBorders; -import com.memoire.bu.BuLabel; -import com.memoire.bu.BuScrollPane; import com.memoire.fu.FuLog; import com.vividsolutions.jts.geom.Coordinate; @@ -104,13 +89,15 @@ @Override protected void updateY() { createY(); - for (int i = 0; i < y_.length; i++) { - final EfData data = source_.getData(var_, i); + //pour chaque pas de temps + for (int tIdx = 0; tIdx < y_.length; tIdx++) { + //on recupere la valeur + final EfData data = source_.getData(var_, tIdx); if (data == null) { FuLog.warning("TRP: data is null for " + var_); - }else - super.y_[i] = ptIdx_.getInterpolateValue(getVar(), data, i, source_); + //on interpole + super.y_[tIdx] = ptIdx_.getInterpolateValue(var_, data, tIdx, source_); } } @@ -208,7 +195,7 @@ // if (data == null) { // FuLog.warning("TRP: data is null for " + var_); try { - super.y_[i] = source_.getData(var_, i, ptIdx_); + y_[i] = source_.getData(var_, i, ptIdx_); } catch (final IOException e) { FuLog.error(e); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |