`
yutianapple
  • 浏览: 33220 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
文章分类
社区版块
存档分类
最新评论
文章列表
for (int a = z + 1; a <= 16; a++) { if (((ChipTrough) map.get(a)).isSaveCome()) { x = ((ChipTrough) map.get(a)).getXy().getX(); y = ((ChipTrough) map.get(a)).getXy().getY(); // 芯片 node = new Chip(outputRole, inputRole, null, null, bd); chipLabel = ...
public static void main(String args[]) { chipName = "SD5880 0"; outputName = "1"; inputName = "0"; point = new PointXY(x, y); map = new HashMap(); Shell shell = new Shell(); shell.setBackground(ColorConstants.darkGray); shell.setSize(900, 600); shell.o ...
package Draw2D_1; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Set; import java.util.concurrent.Future; import org.eclipse.draw2d.ActionEvent; import org.eclipse.draw2d.ActionListener; import org.eclipse.draw2d.Button; import org.eclipse.draw2d.Chopbox ...
package Draw2D_1; import org.eclipse.draw2d.AbstractRouter; import org.eclipse.draw2d.Connection; import org.eclipse.draw2d.geometry.Point; import org.eclipse.draw2d.geometry.PointList; public class ChipConnectionRouter extends AbstractRouter{ static Point A_POINT; public ChipConnectionRouter(Chi ...
package Draw2D_1; import org.eclipse.draw2d.Button; /** * * 芯片槽 * <功能详细描述> * * @author  zKF26792 * @version  [版本号, 2010-4-27] * @see  [相关类/方法] * @since  [产品/模块版本] */ public class ChipTrough extends Button {     private int cid;     private boolean saveCome;     private PointXY xy; ...
package Draw2D_1; import org.eclipse.draw2d.Label; public class ChipFont extends Label {     private String name;     private int fid;     private Chip chip;     public ChipFont(String name,Chip chip){         super.setText(name);         this.chip = chip;     }         public int getFid()     { ...
package Draw2D_1; import org.eclipse.draw2d.RectangleFigure; /** * * 创建图形 * <功能详细描述> * * @author  zKF26792 * @version  [版本号, 2010-4-21] * @see  [相关类/方法] * @since  [产品/模块版本] */ public class Chip extends RectangleFigure {     private Role output;     private Role input;     private R ...
GEF的连接线的样式算法
Draw2d设置Connection走线Draw2d设置Connection走线Draw2d设置Connection走线
connection连线样式走线方式connection连线样式走线方式
GEF经典例子!!!连接线的

eee

    Button b1 = new Button("增加芯片");         b1.addActionListener(new ActionListener()         {             public void actionPerformed(ActionEvent event)             {                 RectangleFigure node3 = new RectangleFigure();                 node3.setBackgroundColor(ColorConstants.bla ...
  /**          * 鼠标移动          */         public void mouseDragged(MouseEvent e)         {                         Point p = e.getLocation();             System.out.println(p + " 00鼠标移动00");                         Dimension delta = p.getDifference(last);                         last = p ...

sss

    // 添加连线的Locator         conn.add(label, new MidpointLocator(conn, 0));         // 在底层Figure中添加子Figure         panel.add(node1);         panel.add(node2);         panel.add(conn);         panel.add(b1);         // 添加node1拖动的监听器                 new Dragger(node1);         // 添加node2拖动的监听器         ...
// 创建一个连线的实例         PolylineConnection conn = new PolylineConnection();         conn.setConnectionRouter(new ManhattanConnectionRouter());         conn.setLineStyle(SWT.LINE_SOLID);         conn.setForegroundColor(ColorConstants.yellow);  //设置线的颜色   //        conn.setLineStyle(SWT.LINE_DOT);//设置虚 ...
Global site tag (gtag.js) - Google Analytics