From: <de...@us...> - 2008-09-03 20:17:52
|
Revision: 3882 http://fudaa.svn.sourceforge.net/fudaa/?rev=3882&view=rev Author: deniger Date: 2008-09-03 20:17:44 +0000 (Wed, 03 Sep 2008) Log Message: ----------- Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/CalqueLegendeWidgetAdapter.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorGraphe.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java branches/Prepro-0.92-SNAPSHOT/ebli/test/org/fudaa/ebli/all/TestGraphe2.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjet.java Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/CalqueLegendeWidgetAdapter.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/CalqueLegendeWidgetAdapter.java 2008-09-03 20:15:27 UTC (rev 3881) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/CalqueLegendeWidgetAdapter.java 2008-09-03 20:17:44 UTC (rev 3882) @@ -204,7 +204,6 @@ public static void reconstructWidget(EbliWidgetCalqueLegende widgetLegende_, BCalqueLegendePanel _calqueLegende, EbliScene _scene/* , BArbreCalqueModel model */) { - // -- on retire de la bordure la widget fille --// EbliWidgetBordure parent = (EbliWidgetBordure) widgetLegende_.getParentWidget(); widgetLegende_ = (EbliWidgetCalqueLegende) createLegendeWidget(widgetLegende_, _calqueLegende, _scene); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2008-09-03 20:15:27 UTC (rev 3881) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2008-09-03 20:17:44 UTC (rev 3882) @@ -307,7 +307,7 @@ /** * affiche le label des coordonnees */ - public JComponent gettracableComponent() { + public JComponent geTtracableComponent() { if (labelTrace_ == null) { labelTrace_ = getCalque().getLabelSuiviSouris(); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorGraphe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorGraphe.java 2008-09-03 20:15:27 UTC (rev 3881) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorGraphe.java 2008-09-03 20:17:44 UTC (rev 3882) @@ -16,26 +16,25 @@ * interface qui permet de creer un widget * * @author Adrien Hadoux - * */ public class EbliWidgetCreatorGraphe implements EbliWidgetCreator { EGFillePanel pn_; - ZEbliCalquesPanel CalquepanelProvenance; - - public ZEbliCalquesPanel getCalquepanelProvenance() { - return CalquepanelProvenance; - } + // ZEbliCalquesPanel CalquepanelProvenance; + // + // public ZEbliCalquesPanel getCalquepanelProvenance() { + // return CalquepanelProvenance; + // } + // + // public void setCalquepanelProvenance(ZEbliCalquesPanel _calquepanelProvenance) { + // CalquepanelProvenance = _calquepanelProvenance; + // } - public void setCalquepanelProvenance(ZEbliCalquesPanel _calquepanelProvenance) { - CalquepanelProvenance = _calquepanelProvenance; - } - public EGGraphe getGraphe() { return pn_.getGraphe(); } - + public EGFillePanel getGraphePanel() { return pn_; } @@ -47,17 +46,16 @@ // EbliWidgetGraphe res; EbliWidgetBordure res; - - public EbliWidgetCreatorGraphe(EGGraphe _g, ZEbliCalquesPanel _calquepanelProvenance) { - this(new EGFillePanel(_g), _calquepanelProvenance); - - + + public EbliWidgetCreatorGraphe(EGGraphe _g) { + this(new EGFillePanel(_g)); + } - public EbliWidgetCreatorGraphe(EGFillePanel _pn, ZEbliCalquesPanel _calquepanelProvenance) { + public EbliWidgetCreatorGraphe(EGFillePanel _pn) { super(); this.pn_ = _pn; - CalquepanelProvenance = _calquepanelProvenance; + // CalquepanelProvenance = _calquepanelProvenance; } public EbliWidget create(EbliScene _scene) { @@ -78,13 +76,12 @@ // TODO Auto-generated method stub return res; } - - + public EbliNode duplicate(EbliNode _nodeAdupliquer) { EbliNode duplique = new EbliNodeDefault(); - duplique.setCreator(new EbliWidgetCreatorGraphe(getGraphe().duplicate(), CalquepanelProvenance)); + duplique.setCreator(new EbliWidgetCreatorGraphe(getGraphe().duplicate())); duplique.setTitle(_nodeAdupliquer.getTitle()); // recopie des tailles @@ -100,7 +97,5 @@ public EbliWidgetBordure getBordure() { return res; } - - } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java 2008-09-03 20:15:27 UTC (rev 3881) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java 2008-09-03 20:17:44 UTC (rev 3882) @@ -17,6 +17,7 @@ import javax.swing.JComponent; import javax.swing.SwingUtilities; +import org.fudaa.ctulu.gui.CtuluLibSwing; import org.fudaa.ctulu.image.CtuluLibImage; import org.fudaa.ebli.courbe.EGAxe; import org.fudaa.ebli.courbe.EGFillePanel; @@ -53,9 +54,9 @@ } public void setNodeLegende(EbliNodeDefault node) { - nodeLegende = node; + nodeLegende = node; } - + public Color couleurContour = Color.black; public Color couleurFond = Color.white; @@ -72,12 +73,10 @@ super(scene); panelGraphe_ = _pn; panelGraphe_.setBorder(null); - // panelGraphe_.remove(CtuluLibSwing.findChildByName(panelGraphe_, - // "lbTools")); - - + panelGraphe_.remove(CtuluLibSwing.findChildByName(panelGraphe_, "lbTools")); + panelGraphe_.getGraphe().getModel().addModelListener(this); - + // --ajout du controller specifique au graphe --// this.setController_(new EbliWidgetControllerGraphe(this, nodeLegende)); @@ -93,7 +92,7 @@ protected void paintWidget() { Rectangle rec = getClientArea(); Graphics2D g = getGraphics(); -// g.translate(rec.x, rec.y); + // g.translate(rec.x, rec.y); if (frame_ == null) { getGraphe().setSize(rec.width - 1, rec.height - 1); @@ -106,17 +105,15 @@ FuLog.debug("EWI: recreate image"); Map params = new HashMap(); CtuluLibImage.setCompatibleImageAsked(params); - - image = getGraphe().produceImage(rec.width-1, rec.height-1, params); + image = getGraphe().produceImage(rec.width - 1, rec.height - 1, params); + } - g.drawImage(image, rec.x, rec.y, rec.width-1, rec.height-1, null); + g.drawImage(image, rec.x, rec.y, rec.width - 1, rec.height - 1, null); -// g.translate(-rec.x, -rec.y); + // g.translate(-rec.x, -rec.y); } - - public BuPanel createEditorComponent( org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, Widget widget) { @@ -194,9 +191,9 @@ public Rectangle getInitialEditorComponentBounds( org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, Widget widget, BuPanel editor, Rectangle viewBounds) { - Rectangle rec= convertLocalToScene(getClientArea()); - rec.width-=1; - rec.height-=1; + Rectangle rec = convertLocalToScene(getClientArea()); + rec.width -= 1; + rec.height -= 1; return rec; } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/test/org/fudaa/ebli/all/TestGraphe2.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/test/org/fudaa/ebli/all/TestGraphe2.java 2008-09-03 20:15:27 UTC (rev 3881) +++ branches/Prepro-0.92-SNAPSHOT/ebli/test/org/fudaa/ebli/all/TestGraphe2.java 2008-09-03 20:17:44 UTC (rev 3882) @@ -181,7 +181,7 @@ // -- creation d un noeud Graphe --// final EbliNodeDefault nodeG = new EbliNodeDefault(); - nodeG.setCreator(new EbliWidgetCreatorGraphe(g, null)); + nodeG.setCreator(new EbliWidgetCreatorGraphe(g)); nodeG.setTitle("Graphe"); nodeG.setPreferedSize(new Dimension(200, 250)); nodeG.setPreferedLocation(new Point(12, 420)); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java 2008-09-03 20:15:27 UTC (rev 3881) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java 2008-09-03 20:17:44 UTC (rev 3882) @@ -204,7 +204,7 @@ right.add(conteneurTree_, BorderLayout.CENTER); - conteneurTree_.add(controller_.getComboMultiScenes(), BorderLayout.NORTH); + if (controller_ != null) { Set<EbliNode> noeudContenus = (Set<EbliNode>) controller_.getSceneCourante().getObjects(); @@ -497,7 +497,7 @@ /** * Met a jour le tree a droite si ni un graphe ni un calque n est selectionn\xE9. */ - public synchronized void changeTreeScene() { + private synchronized void changeTreeScene() { conteneurTree_.remove(panelTreeModifiable_); panelTreeModifiable_ = new JScrollPane(getScene().getController().getOverviewComponent()); @@ -518,7 +518,7 @@ * * @param _calque */ - private synchronized void changeToolbar(EbliWidgetController _controller) { + private void changeToolbar(EbliWidgetController _controller) { // nettoyage de la toolbar this.remove(toolBarModifiable_); @@ -546,7 +546,7 @@ * @param _controller * @param creator */ - private synchronized void changeToolbarSpecifiqueGraphe(EbliWidgetController _controller, + private void changeToolbarSpecifiqueGraphe(EbliWidgetController _controller, EbliWidgetCreatorGraphe creator) { // -- change la toolbar avec els actions generiques du controller --// @@ -556,9 +556,9 @@ // -- ajout des actions tr --// ArrayList<EbliActionSimple> listeActions = new ArrayList<EbliActionSimple>(); EGFillePanel _graphe = creator.getGraphePanel(); - TrPostVisuPanel _calque = (TrPostVisuPanel) creator.getCalquepanelProvenance(); - - listeActions.add(new TrPostCourbeAddPointsAction(projet_.impl_, _graphe.getGraphe(), _calque)); +// TrPostVisuPanel _calque = (TrPostVisuPanel) creator.getCalquepanelProvenance(); + //TODO trop dangereux... +// listeActions.add(new TrPostCourbeAddPointsAction(projet_.impl_, _graphe.getGraphe(), _calque)); listeActions.add(new TrPostCourbeAddVariableAction(projet_.impl_, _graphe.getGraphe())); _controller.addFonctionsSpecific(listeActions); } @@ -567,6 +567,7 @@ this.revalidate(); } + private void changeToolbarScene() { public synchronized void changeToolbarScene() { // nettoyage de la toolbar this.remove(toolBarModifiable_); @@ -594,16 +595,16 @@ * * @param _controller */ - private synchronized void changeSouth(EbliWidgetController _controller) { + private void changeSouth(EbliWidgetController _controller) { this.remove(this.panelSouthSuiviSouris_); - this.panelSouthSuiviSouris_ = _controller.gettracableComponent(); + this.panelSouthSuiviSouris_ = _controller.geTtracableComponent(); this.add(panelSouthSuiviSouris_, BorderLayout.SOUTH); panelSouthSuiviSouris_.revalidate(); this.revalidate(); } - private synchronized void changeSouth() { + private void changeSouth() { this.remove(this.panelSouthSuiviSouris_); this.panelSouthSuiviSouris_ = new JLabel(); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjet.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjet.java 2008-09-03 20:15:27 UTC (rev 3881) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjet.java 2008-09-03 20:17:44 UTC (rev 3882) @@ -920,7 +920,7 @@ private void addEbliNode(final EGFillePanel pn, TrPostVisuPanel calque) { final EbliNodeDefault nodeG = new EbliNodeDefault(); - nodeG.setCreator(new EbliWidgetCreatorGraphe(pn, calque)); + nodeG.setCreator(new EbliWidgetCreatorGraphe(pn)); nodeG.setTitle("Graphe " + idxFilleG_++); nodeG.setPreferedSize(new Dimension(600, 400)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |