From: <de...@us...> - 2008-08-25 20:36:20
|
Revision: 3834 http://fudaa.svn.sourceforge.net/fudaa/?rev=3834&view=rev Author: deniger Date: 2008-08-25 20:36:21 +0000 (Mon, 25 Aug 2008) Log Message: ----------- Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java Removed Paths: ------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCalqueLegende.java Deleted: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCalqueLegende.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCalqueLegende.java 2008-08-25 18:11:33 UTC (rev 3833) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCalqueLegende.java 2008-08-25 20:36:21 UTC (rev 3834) @@ -1,45 +0,0 @@ -package org.fudaa.ebli.visuallibrary.calque; - -import java.awt.Rectangle; - -import org.fudaa.ebli.calque.BCalqueLegendePanel; -import org.fudaa.ebli.visuallibrary.EbliScene; -import org.fudaa.ebli.visuallibrary.EbliWidget; -import org.netbeans.api.visual.layout.LayoutFactory.SerialAlignment; -import org.netbeans.api.visual.widget.ComponentWidget; -import org.netbeans.modules.visual.layout.FlowLayout; - -/** - * Classe de la l\xE9gende associ\xE9e au graphe. - * - * @author Adrien Hadoux - * - */ -public class EbliWidgetCalqueLegende extends EbliWidget { - - public BCalqueLegendePanel calqueLegende_; - ComponentWidget intern_; - - public EbliWidgetCalqueLegende(EbliScene scene, BCalqueLegendePanel _calqueLegende) { - super(scene); - calqueLegende_ = _calqueLegende; - - setLayout(new FlowLayout(false, SerialAlignment.CENTER, 5)); - - - intern_ = new ComponentWidget(scene, _calqueLegende); - - - // intern_.setPreferredSize(preferredSize) - addChild(intern_); - - this.setPreferredBounds(new Rectangle(200, 200)); - - intern_.setPreferredBounds(new Rectangle(150, 150)); - - } - - - - -} Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java 2008-08-25 18:11:33 UTC (rev 3833) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java 2008-08-25 20:36:21 UTC (rev 3834) @@ -3,30 +3,39 @@ import java.awt.Dimension; import org.fudaa.ebli.calque.ZEbliCalquesPanel; +import org.fudaa.ebli.geometrie.GrBoite; import org.fudaa.ebli.visuallibrary.EbliScene; import org.fudaa.ebli.visuallibrary.EbliWidget; import org.fudaa.ebli.visuallibrary.EbliWidgetCreator; public class EbliWidgetCreatorVueCalque implements EbliWidgetCreator { - ZEbliCalquesPanel calque; + ZEbliCalquesPanel calque_; + public ZEbliCalquesPanel getCalque() { - return calque; -} + return calque_; + } -public void setCalque(ZEbliCalquesPanel calque) { - this.calque = calque; -} + public void setCalque(ZEbliCalquesPanel calque) { + this.calque_ = calque; + } -EbliWidgetVueCalque res; + EbliWidgetVueCalque res; + GrBoite initZoom_; public EbliWidgetCreatorVueCalque(ZEbliCalquesPanel calque) { super(); - this.calque = calque; + this.calque_ = calque; } + public EbliWidgetCreatorVueCalque(ZEbliCalquesPanel calque, GrBoite _initZoom) { + super(); + this.calque_ = calque; + initZoom_ = _initZoom; + } + public EbliWidget create(EbliScene _scene) { - res = new EbliWidgetVueCalque(_scene, calque); + res = new EbliWidgetVueCalque(_scene, calque_,initZoom_); res.setPreferredSize(new Dimension(200, 200)); return res; } 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 2008-08-25 18:11:33 UTC (rev 3833) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java 2008-08-25 20:36:21 UTC (rev 3834) @@ -51,24 +51,34 @@ ZEbliCalquesPanel calquePanel_; - public Color couleurContour = Color.black; - public Color couleurFond = Color.white; - private EbliNodeDefault nodeLegende = null; Window frame_; BufferedImage image; + GrBoite initZoom_; BuPanel conteneurEditor; // GrBoite zoom_; + public EbliWidgetVueCalque(EbliScene _scene, ZEbliCalquesPanel _vue) { + this(_scene, _vue, null); - public EbliWidgetVueCalque(EbliScene _scene, ZEbliCalquesPanel _vue) { + } + + /** + * TODO a am\xE9liorer avec une Map + * + * @param _scene + * @param _vue + * @param _initZoom + */ + public EbliWidgetVueCalque(EbliScene _scene, ZEbliCalquesPanel _vue, GrBoite _initZoom) { super(_scene); calquePanel_ = _vue; + initZoom_ =_initZoom; calquePanel_.setBorder(null); -// calquePanel_.setBorder(BuBorders.EMPTY1111); + // calquePanel_.setBorder(BuBorders.EMPTY1111); // FIXME a enlever par la suite setPreferredSize(new Dimension(500, 400)); @@ -120,7 +130,7 @@ image = null; getEbliScene().refresh(); -// calquePanel_.setBorder(BuBorders.EMPTY1111); + // calquePanel_.setBorder(BuBorders.EMPTY1111); this.repaint(); } @@ -173,7 +183,7 @@ } public Color getColorFond() { - return couleurFond; + return null; } private void initSize(Rectangle rec) { @@ -193,15 +203,18 @@ protected void paintWidget() { Rectangle rec = getClientArea(); - rec.width-=1; - rec.height-=1; + rec.width -= 1; + rec.height -= 1; Graphics2D g = getGraphics(); if (frame_ == null) { initSize(rec); if (first_) { first_ = false; - calquePanel_.restaurer(); + if (initZoom_ != null && initZoom_.getDeltaX() > 0 && initZoom_.getDeltaY() > 0) { + calquePanel_.getVueCalque().changeRepere(this, initZoom_); + initZoom_ = null; + } else calquePanel_.restaurer(); } // if (zoom_ != null) { // // image=null; @@ -270,7 +283,7 @@ // EbliWidgetVueCalque.this.getEbliScene().addNode(nodeLegende); // methode qui permet d ajouter une legemde -// calquePanel_.addWidgetLegendeCalque(); + // calquePanel_.addWidgetLegendeCalque(); EbliWidgetVueCalque.this.getEbliScene().refresh(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |