Math2mat

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

Go to the documentation of this file.
00001 
00016 package m2m.frontend.dynamicview.commands;
00017 
00018 import m2m.frontend.dynamicview.ThreadRouteConnections;
00019 import m2m.frontend.dynamicview.model.Node;
00020 import m2m.frontend.dynamicview.model.PointConnection;
00021 
00022 import org.eclipse.swt.widgets.Display;
00023 
00024 
00025 public class PointConnectionChangeLayoutCommand extends AbstractLayoutCommand 
00026 {            
00030         private PointConnection model;
00031         
00032         
00036     public void execute() 
00037     {
00038                 // Set the layout of the model
00039         model.setLayout(getLayout());
00040         
00041                 // Route connections
00042         Display.getCurrent().asyncExec(new ThreadRouteConnections());
00043     }
00044       
00045     
00050         public boolean canExecute() 
00051         {
00052         return model.CanSetLayout(getLayout());
00053         }
00054         
00055         
00060         public void setModel(Node model) 
00061         {
00062                 this.model = (PointConnection)model;
00063         }
00064 }
 All Classes Namespaces Files Functions Variables Enumerations