From: <de...@us...> - 2008-09-29 21:21:02
|
Revision: 4007 http://fudaa.svn.sourceforge.net/fudaa/?rev=4007&view=rev Author: deniger Date: 2008-09-29 21:20:15 +0000 (Mon, 29 Sep 2008) Log Message: ----------- Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliLookFeel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetControllerInterface.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetCreator.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextEditor.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextLabel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetGroupAction.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetUngroupAction.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/calque/EbliWidgetControllerLegendeCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostActionFusionCalques.java Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetCursorProvider.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliAlignWithMoveStrategyProvider.java Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliLookFeel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliLookFeel.java 2008-09-29 15:43:55 UTC (rev 4006) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliLookFeel.java 2008-09-29 21:20:15 UTC (rev 4007) @@ -11,16 +11,23 @@ private static final Color COLOR_HOVERED = new Color(0x447BCD); private static final Color COLOR_SELECTED = COLOR_HOVERED.brighter(); + /** + * + */ + private static final Border ROUNDED_BORDER = BorderFactory.createRoundedBorder(0, 0, 0, 0, COLOR_SELECTED, + COLOR_HOVERED); + + private static final Border EMPTY_BORDER = BorderFactory.createEmptyBorder(); private static final int MINI_THICKNESS = 8; private static final Border MINI_BORDER_SELECTED = BorderFactory.createRoundedBorder(MINI_THICKNESS, MINI_THICKNESS, MINI_THICKNESS, MINI_THICKNESS, COLOR_SELECTED, COLOR_SELECTED.darker()); private static final Border RESIZE_BORDER = BorderFactory.createResizeBorder(MINI_THICKNESS, COLOR_HOVERED, true); - private static final Border RESIZE_BORDER_SELECTED = BorderFactory.createCompositeBorder(BorderFactory - .createRoundedBorder(0, 0, 0, 0, COLOR_SELECTED, COLOR_HOVERED), RESIZE_BORDER); + private static final Border RESIZE_BORDER_SELECTED = BorderFactory.createCompositeBorder(ROUNDED_BORDER, + RESIZE_BORDER); private static final Border DEFAULT_BORDER = BorderFactory.createEmptyBorder(MINI_THICKNESS); - private static final Border NON_RESIZE_BORDER_SELECTED = BorderFactory.createCompositeBorder(BorderFactory - .createRoundedBorder(0, 0, 0, 0, COLOR_SELECTED, COLOR_HOVERED), DEFAULT_BORDER); + private static final Border NON_RESIZE_BORDER_SELECTED = BorderFactory.createCompositeBorder(ROUNDED_BORDER, + DEFAULT_BORDER); private static final Border NON_RESIZE_BORDER = BorderFactory.createRoundedBorder(MINI_THICKNESS, MINI_THICKNESS, MINI_THICKNESS, MINI_THICKNESS, null, COLOR_SELECTED.darker()); @@ -28,6 +35,12 @@ return getBorder(_state, true); } + public Border getBorderInGroup(ObjectState _state) { + return DEFAULT_BORDER; +// if (_state.isHovered()) { return ROUNDED_BORDER; } +// return EMPTY_BORDER; + } + public Border getBorder(ObjectState _state, boolean resizable) { if (resizable) { if (_state.isHovered()) { Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java 2008-09-29 15:43:55 UTC (rev 4006) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java 2008-09-29 21:20:15 UTC (rev 4007) @@ -7,6 +7,7 @@ import javax.swing.JScrollPane; import javax.swing.ListSelectionModel; +import org.fudaa.ebli.visuallibrary.actions.EbliAlignWithMoveStrategyProvider; import org.fudaa.ebli.visuallibrary.tree.EbliJXTreeTableCellRenderer; import org.jdesktop.swingx.JXTreeTable; import org.jdesktop.swingx.decorator.HighlighterFactory; @@ -14,6 +15,8 @@ import org.netbeans.api.visual.action.WidgetAction; import org.netbeans.api.visual.model.ObjectSceneEventType; import org.netbeans.api.visual.widget.Widget; +import org.netbeans.modules.visual.action.AlignWithMoveStrategyProvider; +import org.netbeans.modules.visual.action.SingleLayerAlignWithWidgetCollector; import com.memoire.bu.BuMenuBar; import com.memoire.bu.BuToolBar; @@ -41,10 +44,12 @@ public EbliSceneController(EbliScene _scene) { scene_ = _scene; + SingleLayerAlignWithWidgetCollector widgetCollector = new SingleLayerAlignWithWidgetCollector(scene_.getVisu(), + false); + EbliAlignWithMoveStrategyProvider sp = new EbliAlignWithMoveStrategyProvider(widgetCollector, scene_ + .getInteractionLayer(), ActionFactory.createDefaultAlignWithMoveDecorator(), false); + alignWithMoveAction = ActionFactory.createMoveAction(sp, sp); - alignWithMoveAction = ActionFactory.createAlignWithMoveAction(scene_.getVisu(), scene_.getInteractionLayer(), - ActionFactory.createDefaultAlignWithMoveDecorator(), false); - alignWithResizeAction = ActionFactory.createAlignWithResizeAction(scene_.getVisu(), scene_.getInteractionLayer(), ActionFactory.createDefaultAlignWithMoveDecorator(), false); @@ -58,6 +63,10 @@ } + public boolean isEditable() { + return false; + } + public void addEditListener(EbliWidgetEditModeListener _l) { listeners_.add(_l); } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java 2008-09-29 15:43:55 UTC (rev 4006) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java 2008-09-29 21:20:15 UTC (rev 4007) @@ -1,6 +1,7 @@ package org.fudaa.ebli.visuallibrary; import java.awt.Color; +import java.awt.Cursor; import java.awt.Font; import java.awt.Point; import java.beans.PropertyChangeListener; @@ -22,6 +23,7 @@ import org.fudaa.ebli.visuallibrary.actions.CommandeUndoRedoGraphicalProperties; import org.fudaa.ebli.visuallibrary.actions.WidgetConfigure; import org.fudaa.ebli.visuallibrary.animation.EbliWidgetAnimatedItem; +import org.netbeans.api.visual.border.Border; import org.netbeans.api.visual.model.ObjectState; import org.netbeans.api.visual.widget.Widget; @@ -101,7 +103,11 @@ // -- creation du controller par defaut --// if (controllerDefaut) controller_ = new EbliWidgetController(this); + } + @Override + protected Cursor getCursorAt(Point _localLocation) { + return EbliWidgetCursorProvider.getCursor(this, _localLocation); } public void addPropertyChangeListener(final String _key, final PropertyChangeListener _l) { @@ -205,13 +211,12 @@ public List<EbliWidgetAnimatedItem> getAnimatedItems() { return null; } - - public EbliWidget getIntern(){ + + public EbliWidget getIntern() { return this; } - - - public boolean isAnimatedItemAlive(String _id){ + + public boolean isAnimatedItemAlive(String _id) { return false; } @@ -252,7 +257,7 @@ } - protected EbliWidget getGroup() { + public EbliWidget getGroup() { Widget parent = getParentWidget(); while (parent != getScene() && parent != null) { if (parent instanceof EbliWidget && ((EbliWidget) parent).isGroup) { return ((EbliWidget) parent); } @@ -360,12 +365,17 @@ } @Override - public void notifyStateChanged(final ObjectState previousState, final ObjectState newState) { + public void notifyStateChanged(final ObjectState _previousState, final ObjectState _newState) { if (!useBorder_) { return; } - setBorder(((EbliLookFeel) getScene().getLookFeel()).getBorder(newState, getController().canResize_)); + EbliLookFeel lookFeel = (EbliLookFeel) getScene().getLookFeel(); + final EbliWidget parent = getGroup(); - if (newState.isHovered() && parent != null) { - parent.setBorder(getBorder()); + if (parent != null) { +// System.err.println("parent not null"+ toString()); + setBorder(lookFeel.getBorderInGroup(_newState)); + parent.setBorder(lookFeel.getBorder(_newState, parent.getController().canResize_)); + } else { + setBorder(lookFeel.getBorder(_newState, getController().canResize_)); } } @@ -390,7 +400,15 @@ public void setController(final EbliWidgetController controller_) { this.controller_ = controller_; + } + /** + * @return le parent direct si de type bordure, sinon this. + */ + public EbliWidget getParentBordure() { + Widget parent = getParentWidget(); + if (parent instanceof EbliWidgetBordureSingle) return (EbliWidget) parent; + return this; } public void setFormeFont(final Font newFont) { Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java 2008-09-29 15:43:55 UTC (rev 4006) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java 2008-09-29 21:20:15 UTC (rev 4007) @@ -34,6 +34,11 @@ public EbliAnimatedInterface getAnimatedInterface() { return getIntern().getAnimatedInterface(); } + + + public EbliWidget getParentBordure(){ + return this; + } @Override public List<EbliWidgetAnimatedItem> getAnimatedItems() { Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java 2008-09-29 15:43:55 UTC (rev 4006) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java 2008-09-29 21:20:15 UTC (rev 4007) @@ -40,6 +40,13 @@ public class EbliWidgetController implements EbliWidgetControllerInterface { /** + * @param _isEditable the isEditable to set + */ + public void setEditable(boolean _isEditable) { + isEditable = _isEditable; + } + + /** * action de la widget recuperable et eventuellement supprimable */ WidgetAction actionMove_; @@ -55,15 +62,22 @@ protected PopupMenuProvider providerPopup_ = null; protected EbliWidget widget_; + + boolean isEditable; public EbliWidgetController(EbliWidget widget_) { this(widget_, true, true, true); - } + + public EbliWidgetController(EbliWidget _widget, boolean _canMove, boolean _canResize) { this(_widget, _canMove, _canResize, true); } + + public boolean isEditable() { + return isEditable; + } public EbliWidgetController(EbliWidget widget_, boolean canMove, boolean canResize, boolean canDuplicate) { @@ -139,14 +153,15 @@ // -- si la widget a une bordure c'est la bordure que l on masque --// - EbliNode n = (EbliNode) widget_.getEbliScene().findObject(widget_); - if (n.getCreator().getBordure() != null) { - n.getCreator().getBordure().setVisible(false); - cmd_.addCmd(new CommandMasquer(n.getCreator().getBordure())); - } else { - widget_.setVisible(false); - cmd_.addCmd(new CommandMasquer(widget_)); - } + // EbliNode n = (EbliNode) widget_.getEbliScene().findObject(widget_); + // if (n.getCreator().getBordure() != null) { + // n.getCreator().getBordure().setVisible(false); + // cmd_.addCmd(new CommandMasquer(n.getCreator().getBordure())); + // } else { + EbliWidget toHide = widget_.getParentBordure(); + toHide.setVisible(false); + cmd_.addCmd(new CommandMasquer(toHide)); + // } widget_.getEbliScene().refresh(); } @@ -394,6 +409,17 @@ } + public void removeActionResize() { + widget_.getActions().removeAction(actionMove_); + canResize_ = false; + } + + public void replaceActionResize() { + if (actionResize_ != null) widget_.getActions().addAction(actionResize_); + canResize_ = true; + + } + public WidgetAction getActionMove() { return actionMove_; } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetControllerInterface.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetControllerInterface.java 2008-09-29 15:43:55 UTC (rev 4006) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetControllerInterface.java 2008-09-29 21:20:15 UTC (rev 4007) @@ -11,16 +11,17 @@ /** * @author deniger - * */ public interface EbliWidgetControllerInterface { - public abstract BuMenuBar getMenubarComponent(); + BuMenuBar getMenubarComponent(); - public abstract JComponent getOverviewComponent(); + JComponent getOverviewComponent(); - public abstract BuToolBar getToolbarComponent(); + BuToolBar getToolbarComponent(); - public abstract JComponent getTracableComponent(); + JComponent getTracableComponent(); + boolean isEditable(); + } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetCreator.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetCreator.java 2008-09-29 15:43:55 UTC (rev 4006) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetCreator.java 2008-09-29 21:20:15 UTC (rev 4007) @@ -15,6 +15,7 @@ */ EbliNode duplicate(EbliNode _nodeAdupliquer); - EbliWidgetWithBordure getBordure(); + //FIXME pas de reference vers la widget creer: un creator peut etre utiliser pour plusieurs widget ! +// EbliWidgetWithBordure getBordure(); } Added: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetCursorProvider.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetCursorProvider.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetCursorProvider.java 2008-09-29 21:20:15 UTC (rev 4007) @@ -0,0 +1,51 @@ +/** + * Licence GPL + * Copyright Genesis + */ +package org.fudaa.ebli.visuallibrary; + +import java.awt.Cursor; +import java.awt.Point; + +import org.netbeans.api.visual.action.ActionFactory; +import org.netbeans.api.visual.action.ResizeControlPointResolver; +import org.netbeans.api.visual.action.ResizeProvider.ControlPoint; +import org.netbeans.api.visual.widget.Widget; + +/** + * @author deniger + */ +public class EbliWidgetCursorProvider { + + private final static ResizeControlPointResolver controlPointResolver = ActionFactory + .createDefaultResizeControlPointResolver(); + + private static ControlPoint getControlPoint(Widget _widget, Point _localLocation) { + return controlPointResolver.resolveControlPoint(_widget, _localLocation); + } + + public static Cursor getCursor(EbliWidget _widget, Point _localLocation) { + if (!_widget.isEnabled() || _widget.getController() == null) + return Cursor.getDefaultCursor(); + if (_widget.getController().canResize_) { + ControlPoint controlPoint = getControlPoint(_widget, _localLocation); + if (controlPoint != null) { + int type = Cursor.SE_RESIZE_CURSOR; + if (controlPoint == ControlPoint.TOP_CENTER) type = Cursor.N_RESIZE_CURSOR; + else if (controlPoint == ControlPoint.TOP_LEFT) type = Cursor.NW_RESIZE_CURSOR; + else if (controlPoint == ControlPoint.TOP_RIGHT) type = Cursor.NE_RESIZE_CURSOR; + else if (controlPoint == ControlPoint.CENTER_LEFT) type = Cursor.W_RESIZE_CURSOR; + else if (controlPoint == ControlPoint.CENTER_RIGHT) type = Cursor.E_RESIZE_CURSOR; + else if (controlPoint == ControlPoint.BOTTOM_CENTER) type = Cursor.S_RESIZE_CURSOR; + else if (controlPoint == ControlPoint.BOTTOM_LEFT) type = Cursor.SW_RESIZE_CURSOR; + return Cursor.getPredefinedCursor(type); + } + } + if (_widget.getController().isEditable() && _widget.getClientArea().contains(_localLocation)) { return Cursor + .getPredefinedCursor(Cursor.TEXT_CURSOR); } + if (_widget.getController().canMove_) return Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR); + return Cursor.getDefaultCursor(); + + } + +} Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextEditor.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextEditor.java 2008-09-29 15:43:55 UTC (rev 4006) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextEditor.java 2008-09-29 21:20:15 UTC (rev 4007) @@ -18,35 +18,35 @@ public class EbliWidgetTextEditor extends EbliWidget implements InplaceEditorProvider<BuPanel> { - - // editeur de texte CtuluHtmlEditorPanel editorPane_ = new CtuluHtmlEditorPanel(); - // ComponentWidget widget; + // ComponentWidget widget; BuPanel conteneur = null; // LabelWidget intern_; ComponentWidget intern_; - + JLabel contenuHTML_ = new JLabel(); - + public EbliWidgetTextEditor(EbliScene scene, CtuluHtmlEditorPanel content) { super(scene, false); editorPane_ = content; intern_ = new ComponentWidget(scene, contenuHTML_); - + contenuHTML_.setText(content.getDocumentText()); // -- ajout en interne du label d affichage --// this.addChild(intern_); - + // -- creation de l action pour editor --// WidgetAction editorAction = ActionFactory.createInplaceEditorAction(this); // -- ajout de l action au widget correspondant --// this.getActions().addAction(editorAction); - - setController(new EbliWidgetControllerMenuOnly(this)); + EbliWidgetControllerMenuOnly controller = new EbliWidgetControllerMenuOnly(this); + controller.setEditable(true); + setController(controller); + } // protected void paintWidget() { @@ -60,54 +60,51 @@ /** * Methode qui redessine l edition de texte proprement. * - * @param text - * de l editeur html + * @param text de l editeur html * @param g */ -// public void decoupeEcriture(String text, Graphics2D g) { -// -// int espaceLignes = 10; -// -// if(text==null || text.length()==0) -// return; -// -// Rectangle rec = getClientArea(); -// int indiceDep=0; -// int espaceAffichable = Math.min((int) (rec.width / 5), text.length()); -// -// for (int i = 0; indiceDep + espaceAffichable < text.length(); i++) { -// g.drawString(text.substring(indiceDep, indiceDep + espaceAffichable), rec.x, rec.y + i * espaceLignes); -// indiceDep = indiceDep + espaceAffichable; -// -// } -// -// -// } - - + // public void decoupeEcriture(String text, Graphics2D g) { + // + // int espaceLignes = 10; + // + // if(text==null || text.length()==0) + // return; + // + // Rectangle rec = getClientArea(); + // int indiceDep=0; + // int espaceAffichable = Math.min((int) (rec.width / 5), text.length()); + // + // for (int i = 0; indiceDep + espaceAffichable < text.length(); i++) { + // g.drawString(text.substring(indiceDep, indiceDep + espaceAffichable), rec.x, rec.y + i * espaceLignes); + // indiceDep = indiceDep + espaceAffichable; + // + // } + // + // + // } + public BuPanel createEditorComponent( org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, Widget widget) { - //--creation du panel ekitcore - if(conteneur==null){ - conteneur=new BuPanel(new BuBorderLayout()); + // --creation du panel ekitcore + if (conteneur == null) { + conteneur = new BuPanel(new BuBorderLayout()); Rectangle rec = getClientArea(); editorPane_.setSize(rec.width, rec.height); - editorPane_.setPreferredSize(new Dimension(rec.width, rec.height)); + editorPane_.setPreferredSize(new Dimension(rec.width, rec.height)); conteneur.setPreferredSize(new Dimension(rec.width, rec.height)); conteneur.setMaximumSize(new Dimension(rec.width, rec.height)); conteneur.setMinimumSize(new Dimension(rec.width, rec.height)); conteneur.add(editorPane_, BuBorderLayout.CENTER); conteneur.add(editorPane_.getToolBar(true), BuBorderLayout.NORTH); conteneur.add(editorPane_.getMenuBar()); - + } // -- on masque l affichage du widgetcomponent --// contenuHTML_.setText(""); return conteneur; - } public EnumSet<org.netbeans.api.visual.action.InplaceEditorProvider.ExpansionDirection> getExpansionDirections( @@ -123,20 +120,19 @@ public void notifyClosing(org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, Widget widget, BuPanel editor, boolean commit) { - + // -- mise a jour de intern avec le contenu du ekitcore --// - + contenuHTML_.setText(editorPane_.getDocumentText()); intern_.repaint(); intern_.revalidate(); this.repaint(); getEbliScene().refresh(); // intern_.setLabel(label.getText()); - + } public void notifyOpened(org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, - Widget widget, BuPanel editor) { - } + Widget widget, BuPanel editor) {} } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextLabel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextLabel.java 2008-09-29 15:43:55 UTC (rev 4006) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextLabel.java 2008-09-29 21:20:15 UTC (rev 4007) @@ -14,67 +14,64 @@ /** * Legende Widget qui permet de construire des rectangles avec du texte * - * @author Adrien Hadoux - * TODO a generaliser avec autre chose qu'un LabelWidget + * @author Adrien Hadoux TODO a generaliser avec autre chose qu'un LabelWidget */ -public class EbliWidgetTextLabel extends EbliWidget implements - TextFieldInplaceEditor { +public class EbliWidgetTextLabel extends EbliWidget implements TextFieldInplaceEditor { - LabelWidget intern; - Insets inGaps_; - int largeurBorder = 15; - int espaceInterieur = 5; + LabelWidget intern; + Insets inGaps_; + int largeurBorder = 15; + int espaceInterieur = 5; - - public Font fontForme; - - /** - * @param _scene - */ - public EbliWidgetTextLabel(EbliScene _scene, String label) { - super(_scene, false); + public Font fontForme; + + /** + * @param _scene + */ + public EbliWidgetTextLabel(EbliScene _scene, String label) { + super(_scene, false); // inGaps_ = new Insets(largeurBorder + espaceInterieur, largeurBorder // + espaceInterieur, largeurBorder + espaceInterieur, // largeurBorder + espaceInterieur); - // Ce layout permet de placer le texte - - // setLayout(new OverlayLayoutGap(inGaps_)); - - intern = new LabelWidget(_scene); - intern.setVerticalAlignment(VerticalAlignment.CENTER); - intern.setAlignment(Alignment.CENTER); - intern.setFont(getFormeFont()); - - intern.setLabel(label); - - //-- layout du texte --// - addChild(intern); + // Ce layout permet de placer le texte - // -- ajouter l option de remplacer le text dans le label --// + // setLayout(new OverlayLayoutGap(inGaps_)); - // -- creation de l action --// - WidgetAction editorAction = ActionFactory - .createInplaceEditorAction(this); + intern = new LabelWidget(_scene); + intern.setVerticalAlignment(VerticalAlignment.CENTER); + intern.setAlignment(Alignment.CENTER); + intern.setFont(getFormeFont()); - - - // -- ajout de l action au label correspondant --// + intern.setLabel(label); + + // -- layout du texte --// + addChild(intern); + + // -- ajouter l option de remplacer le text dans le label --// + + // -- creation de l action --// + WidgetAction editorAction = ActionFactory.createInplaceEditorAction(this); + + // -- ajout de l action au label correspondant --// this.getActions().addAction(editorAction); - // intern.getActions().addAction(ActionFactory.createResizeAction()); + // intern.getActions().addAction(ActionFactory.createResizeAction()); - // setEnabled(false); + // setEnabled(false); // -- ajout du controller special sans actions, juste le menu --/ - setController(new EbliWidgetControllerMenuOnly(this)); - } + EbliWidgetControllerMenuOnly controller = new EbliWidgetControllerMenuOnly(this); + controller.setEditable(true); + setController(controller); - public void majLabel(String label) { - // intern.setForeground(); - intern.setLabel(label); - revalidate(); - } + } + public void majLabel(String label) { + // intern.setForeground(); + intern.setLabel(label); + revalidate(); + } + // @Override // protected Rectangle calculateClientArea() { // // Rectangle res = intern.getPreferredBounds(); @@ -83,42 +80,33 @@ // // + res.width, 2 * (largeurBorder + espaceInterieur) + res.height); // } - protected void paintWidget() { - - // -- mise a jour de la fonte que si il y a eu une modification --// - if (intern.getFont() != getFormeFont()) - intern.setFont(getFormeFont()); + protected void paintWidget() { - if (intern.getForeground() != getColorContour()) - intern.setForeground(getColorContour()); + // -- mise a jour de la fonte que si il y a eu une modification --// + if (intern.getFont() != getFormeFont()) intern.setFont(getFormeFont()); - - - - - - } + if (intern.getForeground() != getColorContour()) intern.setForeground(getColorContour()); - public String getText(Widget widget) { - - + } + + public String getText(Widget widget) { + return this.intern.getLabel(); - } + } - public boolean isEnabled(Widget widget) { - // TODO Auto-generated method stub - return true; - } + public boolean isEnabled(Widget widget) { + // TODO Auto-generated method stub + return true; + } - public void setText(Widget widget, String text) { - + public void setText(Widget widget, String text) { + this.intern.setLabel(text); revalidate(); - } - - - public boolean canRotate() { + } + + public boolean canRotate() { return false; } @@ -137,12 +125,5 @@ public boolean canFont() { return true; } - - - - - - - } \ No newline at end of file Added: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliAlignWithMoveStrategyProvider.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliAlignWithMoveStrategyProvider.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliAlignWithMoveStrategyProvider.java 2008-09-29 21:20:15 UTC (rev 4007) @@ -0,0 +1,101 @@ +/** + * Licence GPL + * Copyright Genesis + */ +package org.fudaa.ebli.visuallibrary.actions; + +import java.awt.Point; + +import org.fudaa.ebli.visuallibrary.EbliWidget; +import org.netbeans.api.visual.action.AlignWithMoveDecorator; +import org.netbeans.api.visual.action.AlignWithWidgetCollector; +import org.netbeans.api.visual.action.MoveProvider; +import org.netbeans.api.visual.action.MoveStrategy; +import org.netbeans.api.visual.widget.LayerWidget; +import org.netbeans.api.visual.widget.Widget; +import org.netbeans.modules.visual.action.AlignWithMoveStrategyProvider; + +/** + * @author deniger + */ +public class EbliAlignWithMoveStrategyProvider implements MoveStrategy, MoveProvider { + + final AlignWithMoveStrategyProvider alignProvider_; + + public EbliAlignWithMoveStrategyProvider(AlignWithWidgetCollector collector, LayerWidget interractionLayer, + AlignWithMoveDecorator decorator, boolean outerBounds) { + alignProvider_ = new AlignWithMoveStrategyProvider(collector, interractionLayer, decorator, outerBounds); + } + + /** + * @param _widget + * @return + * @see org.netbeans.modules.visual.action.AlignWithMoveStrategyProvider#getOriginalLocation(org.netbeans.api.visual.widget.Widget) + */ + public Point getOriginalLocation(Widget _widget) { + return getWidgetToMove(_widget).getPreferredLocation(); + } + + /** + * @see org.netbeans.modules.visual.action.AlignWithSupport#hide() + */ + public void hide() { + alignProvider_.hide(); + } + + /** + * @param _widget + * @param _originalLocation + * @param _suggestedLocation + * @return + * @see org.netbeans.modules.visual.action.AlignWithMoveStrategyProvider#locationSuggested(org.netbeans.api.visual.widget.Widget, + * java.awt.Point, java.awt.Point) + */ + public Point locationSuggested(Widget _widget, Point _originalLocation, Point _suggestedLocation) { + return alignProvider_.locationSuggested(getWidgetToMove(_widget), _originalLocation, _suggestedLocation); + } + + /** + * @param _widget + * @see org.netbeans.modules.visual.action.AlignWithMoveStrategyProvider#movementFinished(org.netbeans.api.visual.widget.Widget) + */ + public void movementFinished(Widget _widget) { + alignProvider_.movementFinished(getWidgetToMove(_widget)); + } + + /** + * @param _widget + * @see org.netbeans.modules.visual.action.AlignWithMoveStrategyProvider#movementStarted(org.netbeans.api.visual.widget.Widget) + */ + public void movementStarted(Widget _widget) { + alignProvider_.movementStarted(getWidgetToMove(_widget)); + } + + /** + * @param _widget + * @param _location + * @see org.netbeans.modules.visual.action.AlignWithMoveStrategyProvider#setNewLocation(org.netbeans.api.visual.widget.Widget, + * java.awt.Point) + */ + public void setNewLocation(Widget _widget, Point _location) { + getWidgetToMove(_widget).setPreferredLocation(_location); + } + + /** + * @see org.netbeans.modules.visual.action.AlignWithSupport#show() + */ + public void show() { + alignProvider_.show(); + } + + /** + * @param widget + */ + public static EbliWidget getWidgetToMove(Widget widget) { + EbliWidget w = (EbliWidget) widget; + EbliWidget group = w.getGroup(); + if (group != null) { return group; } + return w; + } + +} Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetGroupAction.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetGroupAction.java 2008-09-29 15:43:55 UTC (rev 4006) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetGroupAction.java 2008-09-29 21:20:15 UTC (rev 4007) @@ -27,6 +27,8 @@ import org.fudaa.ebli.visuallibrary.layout.GroupLayout; import org.netbeans.api.visual.widget.Widget; +import com.memoire.bu.BuInsets; + /** * @author deniger */ @@ -73,7 +75,7 @@ } int w = max.x - min.x; int h = max.y - min.y; - Insets b = parent.getBorder().getInsets(); + Insets b = BuInsets.INSETS0000;//parent.getBorder().getInsets(); // System.err.println(b); Rectangle bounds = new Rectangle(-b.left, -b.top, w + b.left + b.right, h + b.top + b.bottom); @@ -86,7 +88,7 @@ Rectangle widgetBounds = findWidget.getBounds(); Rectangle rec = findWidget.convertLocalToScene(widgetBounds); EbliWidget ew = (EbliWidget) findWidget; - ew.getController().removeActionResizeAndMove(); + ew.getController().removeActionResize(); // scene_.removeNode((EbliNode) object); findWidget.removeFromParent(); int dx = rec.x - min.x; Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetUngroupAction.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetUngroupAction.java 2008-09-29 15:43:55 UTC (rev 4006) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetUngroupAction.java 2008-09-29 21:20:15 UTC (rev 4007) @@ -44,7 +44,7 @@ // Set cs = new HashSet(); // for (final Iterator iterator = selectedObjects.iterator(); iterator.hasNext();) { EbliWidget w = (EbliWidget) _scene.findWidget(_n); - if (!w.isGroup()) return; + if (w==null || !w.isGroup()) return; List<Widget> children = new ArrayList<Widget>(w.getChildren()); for (Widget widget : children) { Point p = widget.getLocation(); @@ -59,7 +59,7 @@ _n.setPreferedSize(widget.getPreferredSize()); // widget.setPreferredLocation(toScene); _scene.addNode(n).setPreferredLocation(toScene); - n.getWidget().getController().replaceActionResizeAndMove(); + n.getWidget().getController().replaceActionResize(); } _scene.removeNode(_n); // } 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-29 15:43:55 UTC (rev 4006) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2008-09-29 21:20:15 UTC (rev 4007) @@ -25,7 +25,6 @@ import org.fudaa.ebli.calque.action.EbliCalqueActionTimeChooser; import org.fudaa.ebli.commun.EbliActionInterface; import org.fudaa.ebli.commun.EbliActionPaletteAbstract; -import org.fudaa.ebli.commun.EbliActionSimple; import org.fudaa.ebli.commun.EbliComponentFactory; import org.fudaa.ebli.commun.EbliLib; import org.fudaa.ebli.controle.BSelecteurListComboBox; @@ -65,7 +64,7 @@ BuMenuBar menuCalque_; JComponent panelTreeCalque_; - public boolean alreadyCreate_; + BuToolBar toolbarCalque_; EbliWidgetVueCalque widgetCalque_; @@ -80,6 +79,14 @@ } + /** + * + */ + public boolean isEditable() { + return true; + + } + public void addActionSpecifiques() { editorAction_ = new EbliActionEditorOneClick<BuPanel>(widgetCalque_); @@ -113,8 +120,6 @@ @Override public void postActionDuplication(final EbliNode node, final EbliNode duplique) { - - // -- il faut verifier que les le node a bien une legende sinon on n ajoute // pas de legende pour le dupliqu\xE9 --// EbliWidgetControllerCalque controllerDuDuplique = null; @@ -127,11 +132,11 @@ controllerDuDuplique.setDescription(getDescription()); - // -- construction des actions sans passer par la frame fille --// + // -- construction des actions sans passer par la frame fille --// controllerDuDuplique.widgetCalque_.calquePanel_.getController().buildActions(); - + } - + public boolean hasLegende() { return widget_.getEbliScene().isObject(getNodeLegende()); } @@ -207,30 +212,31 @@ public void actionPerformed(final ActionEvent e) { // -- si la widget a une bordure c'est la bordure que l on masque --// - EbliWidget widgetUndo1 = null; - EbliWidget widgetUndo2 = null; + EbliWidget widgetUndo1 = widget_.getParentBordure(); + EbliWidget widgetUndo2 = widgetCalque_.nodeLegende.getWidget().getParentBordure(); - final EbliNode n = (EbliNode) widget_.getEbliScene().findObject(widget_); - if (n.getCreator().getBordure() != null) { - // -- on masque le calque --// - n.getCreator().getBordure().setVisible(false); + // final EbliNode n = (EbliNode) widget_.getEbliScene().findObject(widget_); + // if (n.getCreator().getBordure() != null) { + // // -- on masque le calque --// + // n.getCreator().getBordure().setVisible(false); + // + // widgetUndo1 = n.getCreator().getBordure(); + // + // } else { + // + widgetUndo1.setVisible(false); + // widgetUndo1 = widget_; - widgetUndo1 = n.getCreator().getBordure(); + // } - } else { - widget_.setVisible(false); - widgetUndo1 = widget_; - - } - // -- on masque sa legende associee --// - if (widgetCalque_.nodeLegende.getCreator().getBordure() != null) { - widgetCalque_.nodeLegende.getCreator().getBordure().setVisible(false); - widgetUndo2 = widgetCalque_.nodeLegende.getCreator().getBordure(); - } else { - widgetCalque_.nodeLegende.getWidget().setVisible(false); - widgetUndo2 = widgetCalque_.nodeLegende.getWidget(); - } + // if (widgetCalque_.nodeLegende.getCreator().getBordure() != null) { + // widgetCalque_.nodeLegende.getCreator().getBordure().setVisible(false); + // widgetUndo2 = widgetCalque_.nodeLegende.getCreator().getBordure(); + // } else { + // widgetCalque_.nodeLegende.getWidget().setVisible(false); + widgetUndo2.setVisible(false); + // } // -- creation des comamndes undo/redo pour le masquage --// final ArrayList<EbliWidget> listeWidget = new ArrayList<EbliWidget>(); @@ -282,7 +288,7 @@ editorAction_.openEditor(widgetCalque_); } - + public void ouvrirEditeur() { editorAction_.openEditor(widgetCalque_); } @@ -290,7 +296,6 @@ public void fermerEditeur() { editorAction_.closeEditor(true); } - public ZEbliCalquesPanel getVisuPanel() { return widgetCalque_.calquePanel_; @@ -340,7 +345,7 @@ // info.setAvailable(true); // JComponent jc = info; final Collection<EbliActionPaletteAbstract> acts = getVisuPanel().getController().getTabPaletteAction(); - + if (!CtuluLibArray.isEmpty(acts)) { final BuTabbedPane tb = new BuTabbedPane(); for (final EbliActionPaletteAbstract pals : acts) { @@ -367,8 +372,6 @@ return panelTreeCalque_; } - - /** * Obtient la toolbar specifique au calque * Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerLegendeCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerLegendeCalque.java 2008-09-29 15:43:55 UTC (rev 4006) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerLegendeCalque.java 2008-09-29 21:20:15 UTC (rev 4007) @@ -15,27 +15,28 @@ * controller specifique aux legendes. gere * * @author genesis - * */ public class EbliWidgetControllerLegendeCalque extends EbliWidgetControllerMenuOnly { - public EbliWidgetControllerLegendeCalque(EbliWidget widget_) { + public EbliWidgetControllerLegendeCalque(final EbliWidget widget_) { super(widget_); } - protected void buildPopupMenu(JPopupMenu _menu) { + @Override + protected void buildPopupMenu(final JPopupMenu _menu) { constructPopupMenuSpecifique(_menu); // -- creation du menu commun a tous les widgets constructPopupMenuBase(_menu); } - private void constructPopupMenuSpecifique(JPopupMenu _popup) { - JMenuItem menuItem = new JMenuItem(EbliResource.EBLI.getString("Editer la l\xE9gende")); + private void constructPopupMenuSpecifique(final JPopupMenu _popup) { + + final JMenuItem menuItem = new JMenuItem(EbliResource.EBLI.getString("Editer la l\xE9gende")); _popup.add(menuItem, 0); menuItem.setIcon(CtuluResource.CTULU.getIcon("crystal_editer")); menuItem.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { + public void actionPerformed(final ActionEvent e) { MenuEditer(); @@ -43,16 +44,18 @@ }); } + @Override + public boolean isEditable() { + return true; + } - - /** * Mise au premier plan de la widget et edition. Sert beaucoup pour la fusion */ public void MenuEditer() { - // -- executer l action d edition --// + // -- executer l action d edition --// ((EbliWidgetCalqueLegende) getWidget()).editorAction_.openEditor(getWidget()); } - + } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2008-09-29 15:43:55 UTC (rev 4006) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2008-09-29 21:20:15 UTC (rev 4007) @@ -75,7 +75,12 @@ addActionSpecifiques(); } + + public boolean isEditable() { + return true; + } + public void addActionSpecifiques() { editorAction_ = new EbliActionEditorOneClick<BuPanel>((EbliWidgetGraphe) widget_); // -- ajout de l action au widget correspondant --// @@ -159,30 +164,31 @@ public void actionPerformed(ActionEvent e) { // -- si la widget a une bordure c'est la bordure que l on masque --// - EbliWidget widgetUndo1 = null; - EbliWidget widgetUndo2 = null; + EbliWidget widgetUndo1 = widget_.getParentBordure(); + EbliWidget widgetUndo2 = widgetGraphe_.getNodeLegende().getWidget().getParentBordure(); - EbliNode n = (EbliNode) widget_.getEbliScene().findObject(widget_); - if (n.getCreator().getBordure() != null) { - // -- on masque le calque --// - n.getCreator().getBordure().setVisible(false); + // EbliNode n = (EbliNode) widget_.getEbliScene().findObject(widget_); + // if (n.getCreator().getBordure() != null) { + // // -- on masque le calque --// + // n.getCreator().getBordure().setVisible(false); + // + // widgetUndo1 = n.getCreator().getBordure(); + // + // } else { + widgetUndo1.setVisible(false); + // widgetUndo1 = widget_; - widgetUndo1 = n.getCreator().getBordure(); + // } - } else { - widget_.setVisible(false); - widgetUndo1 = widget_; - - } - // -- on masque sa legende associee --// - if (widgetGraphe_.getNodeLegende().getCreator().getBordure() != null) { - widgetGraphe_.getNodeLegende().getCreator().getBordure().setVisible(false); - widgetUndo2 = widgetGraphe_.getNodeLegende().getCreator().getBordure(); - } else { - widgetGraphe_.getNodeLegende().getWidget().setVisible(false); - widgetUndo2 = widgetGraphe_.getNodeLegende().getWidget(); - } + // if (widgetGraphe_.getNodeLegende().getCreator().getBordure() != null) { + // widgetGraphe_.getNodeLegende().getCreator().getBordure().setVisible(false); + // widgetUndo2 = widgetGraphe_.getNodeLegende().getCreator().getBordure(); + // } else { + // widgetGraphe_.getNodeLegende().getWidget().setVisible(false); + // + widgetUndo2.setVisible(false); + // } // -- creation des comamndes undo/redo pour le masquage --// ArrayList<EbliWidget> listeWidget = new ArrayList<EbliWidget>(); @@ -345,8 +351,7 @@ // paneGlobal.setTopComponent(getGraphePanel().getInfoPanel()); // paneGlobal.setBottomComponent(new JScrollPane(tree)); - panelTreeGraphe_ = new JScrollPane(tree); - ;// paneGlobal; + panelTreeGraphe_ = new JScrollPane(tree);;// paneGlobal; } return panelTreeGraphe_; Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostActionFusionCalques.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostActionFusionCalques.java 2008-09-29 15:43:55 UTC (rev 4006) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostActionFusionCalques.java 2008-09-29 21:20:15 UTC (rev 4007) @@ -222,7 +222,7 @@ getScene().getCmdMng().addCmd(new CtuluCommand() { public void undo() { - + // -- degroupe et desynchronise le tout --// EbliWidgetUngroupAction.degroupObjectsFromFusion(getScene(), fusion); } @@ -246,10 +246,10 @@ // -- il faut des gaps suffisants pour deplacer la widget et avoir le menu // du groupe --// - Insets insetLayout = new Insets(30, 30, 30, 30); + // Insets insetLayout = new Insets(30, 30, 30, 30); // parent.setLayout(new OverlayLayout()); - parent.setLayout(new OverlayLayoutGap(insetLayout)); + parent.setLayout(new OverlayLayoutGap(new Insets(0, 0, 0, 0))); Point min = new Point(Integer.MAX_VALUE, Integer.MAX_VALUE); Point max = new Point(-Integer.MAX_VALUE, -Integer.MAX_VALUE); @@ -271,8 +271,8 @@ // int h = max.y - min.y; // Insets b = parent.getBorder().getInsets(); - sizeMax.width += 2 * insetLayout.left; - sizeMax.height += 2 * insetLayout.bottom; + // sizeMax.width += 2 * insetLayout.left; + // sizeMax.height += 2 * insetLayout.bottom; parent.setPreferredBounds(sizeMax); parent.setPreferredSize(new Dimension(sizeMax.width, sizeMax.height)); @@ -290,7 +290,7 @@ } else if (vue.getViewBoite() != null) { boite.ajuste(vue.getViewBoite()); } - ew.getController().removeActionResizeAndMove(); + ew.getController().removeActionResize(); findWidget.removeFromParent(); // int dx = rec.x - min.x; @@ -316,11 +316,10 @@ node.setTitle(EbliLib.getS("Fusion calquess")); node.setCreator(creator); parent.setController(new EbliWidgetControllerForGroup(parent, true)); - - //-- synchronisation des sondes des fusions --// + + // -- synchronisation des sondes des fusions --// parent.synchroniseSondeFusion(); - - + scene_.addNode(node); if (pn != null && boite != null) { pn.getVueCalque().changeRepere(pn, boite, 0, 0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |