Math2mat
|
00001 00015 package m2m.frontend.dynamicview.figure; 00016 00017 import org.eclipse.draw2d.ColorConstants; 00018 import org.eclipse.draw2d.Figure; 00019 import org.eclipse.draw2d.LineBorder; 00020 import org.eclipse.draw2d.XYLayout; 00021 import org.eclipse.draw2d.geometry.Rectangle; 00022 00023 public class InternPointConnectionFigure extends Figure 00024 { 00028 public static final int WIDTH = 5; 00029 public static final int HEIGHT = 5; 00030 00031 00035 private XYLayout layout; 00036 00037 00041 public InternPointConnectionFigure() 00042 { 00043 /* Set the type of layout */ 00044 layout = new XYLayout(); 00045 setLayoutManager(layout); 00046 00047 /* Initialisation of the figure */ 00048 setOpaque(true); 00049 setBackgroundColor(ColorConstants.blue); 00050 setForegroundColor(ColorConstants.black); 00051 setBorder(new LineBorder(1)); 00052 } 00053 00054 00059 public void setLayout(Rectangle rect) 00060 { 00061 getParent().setConstraint(this, rect); 00062 } 00063 }