首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网络技术 > 网络基础 >

Draw2d 学习札记六 布局管理器 约束(Constraint)

2012-10-07 
Draw2d 学习笔记六 布局管理器 约束(Constraint)关键字:Draw2d、布局管理器、约束(Constraint)?Draw2d中的布

Draw2d 学习笔记六 布局管理器 约束(Constraint)

关键字:Draw2d、布局管理器、约束(Constraint)

?

Draw2d中的布局管理器和约束是一一对应的,也就是说不同的布局管理对应不同的约束。

?

?XYLayoutRectangle

new Rectangle(10,10,-1,-1)

BorderLayoutIntegerBorderLayout.CENTERFlowLayout无?StackLayout无?GridLayout GridData new GridData(10,10)从哪里看出布局管理器和约束的对应关系。XYLayout
public class GridLayout extends AbstractLayout {.......Dimension layout(IFigure container, boolean move, int x, int y, int width,int height, boolean flushCache) {.....GridData data = (GridData) getConstraint(child);.....}
?对于布局管理器的理解,其实就是要抓住一个重点那就是,它是用来管理子figure是如何放置的。

热点排行