简体   繁体   English

将MiG布局移植到代号上一种合适的方法是适合边距?

[英]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. MiG布局是为只有插图的Swing / AWT设计的,我现在将其移植到Codename One ,后者对每个组件都具有更传统的填充/边距。 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? 我假设这与边距有关,我认为应该与Insets相等,但是我不确定它们应放在哪里或为什么行之间没有间距?

The full source code of the MiG layout port to Codename One is in our SVN tree which you can view online here . MiG布局端口到Codename One的完整源代码在我们的SVN树中,您可以在此处在线查看

Insets are gaps around the borders of the container. 插图是容器边界周围的间隙。 MigLayout has ins constraint for this. MigLayout具有ins约束。

The spaces between the components are controlled by the gap constraint. 组件之间的空间由gap约束控制。 MigLayout has some initial gaps between components which are calculated specifically for the current platform. MigLayout在组件之间有一些初始间隙,这些间隙是为当前平台专门计算的。

So I assume it is a bug that is related to the port, not to the MigLayout manager. 因此,我认为这是与端口有关的错误,而不是与MigLayout管理器有关。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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