Math2mat

/home/ythoma/docs/math2mat/svn/wp1/framework/m2mGUI/src/m2m/frontend/dynamicview/figure/LoopPropertyFigure.java

Go to the documentation of this file.
00001 
00015 package m2m.frontend.dynamicview.figure;
00016 
00017 import m2m.frontend.dynamicview.model.*;
00018 
00019 import org.eclipse.draw2d.ColorConstants;
00020 import org.eclipse.draw2d.Figure;
00021 import org.eclipse.draw2d.Label;
00022 import org.eclipse.draw2d.ToolbarLayout;
00023 import org.eclipse.draw2d.XYLayout;
00024 import org.eclipse.draw2d.geometry.Rectangle;
00025 
00026 
00027 public class LoopPropertyFigure extends Figure
00028 {
00032     private XYLayout layout;
00036     private Label labelName = new Label();
00037     
00038     
00042     public LoopPropertyFigure() 
00043     {
00044         /* Set the type of layout */
00045         layout = new XYLayout();
00046         setLayoutManager(layout);
00047         
00048         /* Initialisation of the label */
00049         labelName.setForegroundColor(ColorConstants.black);
00050         add(labelName, ToolbarLayout.VERTICAL); 
00051         setConstraint(labelName, new Rectangle(0, 0, -1, -1));
00052         labelName.setText("Unknown");
00053         
00054         /* Initialisation of the figure */
00055         setOpaque(true);     
00056         setBackgroundColor(ColorConstants.menuBackground);
00057         setForegroundColor(ColorConstants.menuForeground);
00058     }
00059     
00060     
00065     public void setProperty(GraphicLoop graphicloop)
00066     {
00067         labelName.setText("Name : " + graphicloop.getName());
00068     }
00069 }
00070 
 All Classes Namespaces Files Functions Variables Enumerations