简体   繁体   中英

Porting MiG Layout To Codename One what's the right way to fit in margin?

MiG layout was designed for Swing/AWT which only have insets, I'm now porting it to Codename One which has more traditional padding/margin for every component. The port itself went smoothly however spacing between components isn't working quite as I would expect:

在此处输入图片说明

I'm assuming this is related to margin's which I think should be the equivalent of Insets but I'm not sure where they should fit in or why there is no spacing between the rows?

The full source code of the MiG layout port to Codename One is in our SVN tree which you can view online here .

Insets are gaps around the borders of the container. MigLayout has ins constraint for this.

The spaces between the components are controlled by the gap constraint. MigLayout has some initial gaps between components which are calculated specifically for the current platform.

So I assume it is a bug that is related to the port, not to the MigLayout manager.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM