本文整理汇总了Java中org.eclipse.swt.custom.ViewForm.setLayout方法的典型用法代码示例。如果您正苦于以下问题:Java ViewForm.setLayout方法的具体用法?Java ViewForm.setLayout怎么用?Java ViewForm.setLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.swt.custom.ViewForm
的用法示例。
在下文中一共展示了ViewForm.setLayout方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createViewform
import org.eclipse.swt.custom.ViewForm; //导入方法依赖的package包/类
/**
* Creates a {@link ViewForm}
*
* @param parent
* @param style
* @param cols
* @param span
* @param fill
* @param marginwidth
* @param marginheight
* @return a new {@link ViewForm}
*/
public static ViewForm createViewform(Composite parent, int style, int cols, int span, int fill, int marginwidth,
int marginheight) {
ViewForm form = new ViewForm(parent, style);
form.setFont(parent.getFont());
GridLayout layout = new GridLayout(cols, false);
layout.marginWidth = marginwidth;
layout.marginHeight = marginheight;
form.setLayout(layout);
GridData gd = new GridData(fill);
gd.horizontalSpan = span;
form.setLayoutData(gd);
return form;
}
示例2: createViewform
import org.eclipse.swt.custom.ViewForm; //导入方法依赖的package包/类
/**
* Creates a {@link ViewForm}
* @param parent
* @param style
* @param cols
* @param span
* @param fill
* @param marginwidth
* @param marginheight
* @return a new {@link ViewForm}
* @since 3.6
*/
public static ViewForm createViewform(Composite parent, int style, int cols, int span, int fill, int marginwidth, int marginheight) {
ViewForm form = new ViewForm(parent, style);
form.setFont(parent.getFont());
GridLayout layout = new GridLayout(cols, false);
layout.marginWidth = marginwidth;
layout.marginHeight = marginheight;
form.setLayout(layout);
GridData gd = new GridData(fill);
gd.horizontalSpan = span;
form.setLayoutData(gd);
return form;
}