Math2mat

/home/ythoma/docs/math2mat/svn/wp1/framework/m2mGUI/src/m2m/frontend/dynamicview/commands/CreateBendpointCommand.java

Go to the documentation of this file.
00001 
00016 package m2m.frontend.dynamicview.commands;
00017 
00018 import m2m.frontend.dynamicview.model.BendPoint;
00019 
00020 import org.eclipse.draw2d.geometry.Dimension;
00021 
00022 
00023 public class CreateBendpointCommand extends AbstractBendPointCommand
00024 {
00028         private BendPoint bendPoint = new BendPoint();
00032         private Dimension d1, d2;
00033         
00034         
00038         public void execute() 
00039         {
00040                 /* Initialisation of the new bend point */
00041                 bendPoint.setHeight(d1.height, d2.height);
00042                 bendPoint.setWidth(d1.width, d2.width);
00043                 bendPoint.setConnection(getConnection());               
00044                 bendPoint.setIndex(getIndex());
00045                 getConnection().addBendPoint(bendPoint);
00046         }
00047         
00048         
00054         public void setRelativeDimensions(Dimension dim1, Dimension dim2) 
00055         {
00056                 d1 = dim1;
00057                 d2 = dim2;
00058         }
00059 }
 All Classes Namespaces Files Functions Variables Enumerations