本文整理汇总了Java中org.eclipse.ui.forms.widgets.TableWrapLayout类的典型用法代码示例。如果您正苦于以下问题:Java TableWrapLayout类的具体用法?Java TableWrapLayout怎么用?Java TableWrapLayout使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TableWrapLayout类属于org.eclipse.ui.forms.widgets包,在下文中一共展示了TableWrapLayout类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createControl
import org.eclipse.ui.forms.widgets.TableWrapLayout; //导入依赖的package包/类
public void createControl(Composite parent) {
toolkit = new FormToolkit(parent.getDisplay());
toolkit.setBackground(parent.getBackground());
form = toolkit.createScrolledForm(parent);
mform = new ManagedForm(toolkit, form);
mform.getForm().setDelayedReflow(false);
outerContainer = mform.getForm().getBody();
TableWrapLayout layout = new TableWrapLayout();
layout.numColumns = 1;
outerContainer.setLayout(layout);
refreshPage(false, false);
setControl(form);
}
示例2: createFormContent
import org.eclipse.ui.forms.widgets.TableWrapLayout; //导入依赖的package包/类
/**
* @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
*/
@Override
protected void createFormContent(final IManagedForm managedForm) {
final FormToolkit toolkit = managedForm.getToolkit();
final ScrolledForm scrolledForm = managedForm.getForm();
scrolledForm.setText(Messages.GeneratorEntryFormPage_formPageHeaderPrefix + getStatechartName());
final Form form = scrolledForm.getForm();
toolkit.decorateFormHeading(form);
final IToolBarManager toolBarManager = form.getToolBarManager();
toolBarManager.add(createGenerateAction());
form.updateToolBar();
final Composite body = scrolledForm.getBody();
body.setLayout(new TableWrapLayout());
createSections(toolkit, body);
startListeningToModelChanges();
}
示例3: createSection
import org.eclipse.ui.forms.widgets.TableWrapLayout; //导入依赖的package包/类
/**
* @see org.yakindu.sct.editor.sgen.extensions.IFeatureConfigurationSection#getSection()
*/
@Override
public Section createSection(final FormToolkit toolkit, final Composite parent) {
this.section = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE);
this.section.setText(convertCamelCaseName(getFeatureType().getName(), !getFeatureType().isOptional()));
this.section.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.FILL_GRAB));
final Composite composite = toolkit.createComposite(this.section);
final TableWrapLayout layout = new TableWrapLayout();
layout.numColumns = 2;
composite.setLayout(layout);
for (final FeatureParameter parameter : getFeatureType().getParameters()) {
final Control control = createParameterControl(toolkit, composite, parameter);
this.controls.put(parameter, control);
}
this.section.setClient(composite);
return this.section;
}
示例4: createFormTableWrapLayout
import org.eclipse.ui.forms.widgets.TableWrapLayout; //导入依赖的package包/类
/**
* Create TableWrapLayout for the whole page
* @param makeColumnsEqualWidth
* @param numColumns
* @return
*/
public static TableWrapLayout createFormTableWrapLayout(boolean makeColumnsEqualWidth, int numColumns)
{
TableWrapLayout layout = new TableWrapLayout();
layout.topMargin = FORM_BODY_MARGIN_TOP;
layout.bottomMargin = FORM_BODY_MARGIN_BOTTOM;
layout.leftMargin = FORM_BODY_MARGIN_LEFT;
layout.rightMargin = FORM_BODY_MARGIN_RIGHT;
layout.horizontalSpacing = FORM_BODY_HORIZONTAL_SPACING;
layout.verticalSpacing = FORM_BODY_VERTICAL_SPACING;
layout.makeColumnsEqualWidth = makeColumnsEqualWidth;
layout.numColumns = numColumns;
return layout;
}
示例5: createFormTableWrapLayout
import org.eclipse.ui.forms.widgets.TableWrapLayout; //导入依赖的package包/类
/**
* For form bodies.
*
* @param makeColumnsEqualWidth
* @param numColumns
* @return
*/
public static TableWrapLayout createFormTableWrapLayout(boolean makeColumnsEqualWidth, int numColumns) {
TableWrapLayout layout = new TableWrapLayout();
layout.topMargin = FORM_BODY_MARGIN_TOP;
layout.bottomMargin = FORM_BODY_MARGIN_BOTTOM;
layout.leftMargin = FORM_BODY_MARGIN_LEFT;
layout.rightMargin = FORM_BODY_MARGIN_RIGHT;
layout.horizontalSpacing = FORM_BODY_HORIZONTAL_SPACING;
layout.verticalSpacing = FORM_BODY_VERTICAL_SPACING;
layout.makeColumnsEqualWidth = makeColumnsEqualWidth;
layout.numColumns = numColumns;
return layout;
}
示例6: createFormPaneTableWrapLayout
import org.eclipse.ui.forms.widgets.TableWrapLayout; //导入依赖的package包/类
/**
* For composites used to group sections in left and right panes.
*
* @param makeColumnsEqualWidth
* @param numColumns
* @return
*/
public static TableWrapLayout createFormPaneTableWrapLayout(boolean makeColumnsEqualWidth, int numColumns) {
TableWrapLayout layout = new TableWrapLayout();
layout.topMargin = FORM_PANE_MARGIN_TOP;
layout.bottomMargin = FORM_PANE_MARGIN_BOTTOM;
layout.leftMargin = FORM_PANE_MARGIN_LEFT;
layout.rightMargin = FORM_PANE_MARGIN_RIGHT;
layout.horizontalSpacing = FORM_PANE_HORIZONTAL_SPACING;
layout.verticalSpacing = FORM_PANE_VERTICAL_SPACING;
layout.makeColumnsEqualWidth = makeColumnsEqualWidth;
layout.numColumns = numColumns;
return layout;
}
示例7: createSectionClientTableWrapLayout
import org.eclipse.ui.forms.widgets.TableWrapLayout; //导入依赖的package包/类
/**
* For composites set as section clients. For composites containg form text.
*
* @param makeColumnsEqualWidth
* @param numColumns
* @return
*/
public static TableWrapLayout createSectionClientTableWrapLayout(boolean makeColumnsEqualWidth, int numColumns) {
TableWrapLayout layout = new TableWrapLayout();
layout.topMargin = SECTION_CLIENT_MARGIN_TOP;
layout.bottomMargin = SECTION_CLIENT_MARGIN_BOTTOM;
layout.leftMargin = SECTION_CLIENT_MARGIN_LEFT;
layout.rightMargin = SECTION_CLIENT_MARGIN_RIGHT;
layout.horizontalSpacing = SECTION_CLIENT_HORIZONTAL_SPACING;
layout.verticalSpacing = SECTION_CLIENT_VERTICAL_SPACING;
layout.makeColumnsEqualWidth = makeColumnsEqualWidth;
layout.numColumns = numColumns;
return layout;
}
示例8: createSectionComposite
import org.eclipse.ui.forms.widgets.TableWrapLayout; //导入依赖的package包/类
/**
* 섹션 컴포짓 생성
*
* void
*/
private void createSectionComposite() {
Composite body = managedForm.getForm().getBody();
TableWrapLayout layout = new TableWrapLayout();
layout.topMargin = 10;
layout.bottomMargin = 10;
layout.leftMargin = 10;
layout.rightMargin = 10;
layout.verticalSpacing = 10;
layout.horizontalSpacing = 10;
body.setLayout(layout);
createOverviewGeneralSection(body);
// createOverviewModelDetailSection(body);
// createProjectInformationSection(body);
createOverviewDocumentSection(body);
generalSection.setEnabled(false);
}
示例9: createTooltipShell
import org.eclipse.ui.forms.widgets.TableWrapLayout; //导入依赖的package包/类
/**
* Main entry point to create a complete tooltip shell for the element, on the parent.
*
* @param parent
* @param element
* @return
*/
public static Shell createTooltipShell(Control parent, Object object) {
EPlanElement element = (EPlanElement)object;
Shell shell = new Shell(parent.getShell(), SWT.ON_TOP | SWT.NO_FOCUS | SWT.TOOL);
Display display = parent.getDisplay();
shell.setBackground(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
shell.setLayout(new FillLayout());
Composite mainComposite = new Composite(shell, SWT.NONE);
mainComposite.setBackground(shell.getBackground());
mainComposite.setLayout(new TableWrapLayout());
createTitleComposite(element, mainComposite);
createTitleBodySeparatorLabel(mainComposite);
findMarkersAndCreateMarkerComposite(element, mainComposite);
createBodyComposite(element, mainComposite);
return shell;
}
示例10: createClearTableWrapLayout
import org.eclipse.ui.forms.widgets.TableWrapLayout; //导入依赖的package包/类
public static TableWrapLayout createClearTableWrapLayout(
boolean makeColumnsEqualWidth, int numColumns) {
TableWrapLayout layout = new TableWrapLayout();
layout.topMargin = CLEAR_MARGIN_TOP;
layout.bottomMargin = CLEAR_MARGIN_BOTTOM;
layout.leftMargin = CLEAR_MARGIN_LEFT;
layout.rightMargin = CLEAR_MARGIN_RIGHT;
layout.horizontalSpacing = CLEAR_HORIZONTAL_SPACING;
layout.verticalSpacing = CLEAR_VERTICAL_SPACING;
layout.makeColumnsEqualWidth = makeColumnsEqualWidth;
layout.numColumns = numColumns;
return layout;
}
示例11: createClient
import org.eclipse.ui.forms.widgets.TableWrapLayout; //导入依赖的package包/类
protected void createClient(Section section, FormToolkit toolkit) {
section.setText("Configurations"); //$NON-NLS-1$
String desc = "This section describe the configurations defined in your project";
section.setDescription(desc);
Composite client = toolkit.createComposite(section);
TableWrapLayout layout = new TableWrapLayout();
layout.rightMargin = toolkit.getBorderStyle() != SWT.NULL ? 0 : 2;
layout.leftMargin = layout.rightMargin;
layout.numColumns = NUM_COLUMNS;
client.setLayout(layout);
toolkit.paintBordersFor(client);
section.setClient(client);
TableWrapData td = new TableWrapData(TableWrapData.FILL_GRAB);
td.colspan = 2;
section.setLayoutData(td);
}
示例12: fillBody
import org.eclipse.ui.forms.widgets.TableWrapLayout; //导入依赖的package包/类
private void fillBody(IManagedForm managedForm) {
Composite body = managedForm.getForm().getBody();
TableWrapLayout layout = new TableWrapLayout();
//CheckStyle:MagicNumber| OFF
layout.bottomMargin = 10;
layout.topMargin = 5;
layout.leftMargin = 10;
layout.rightMargin = 10;
layout.numColumns = 2;
layout.makeColumnsEqualWidth = true;
layout.verticalSpacing = 30;
layout.horizontalSpacing = 10;
//CheckStyle:MagicNumber| ON
body.setLayout(layout);
// sections
managedForm.addPart(new IvyInfoSection(this, body, ExpandableComposite.TWISTIE, true));
managedForm.addPart(new IvyConfSection(this, body, ExpandableComposite.TWISTIE, true));
}
示例13: createFormContent
import org.eclipse.ui.forms.widgets.TableWrapLayout; //导入依赖的package包/类
protected void createFormContent(IManagedForm managedForm) {
// 通过managedForm对象获得表单工具对象
toolkit = managedForm.getToolkit();
// 通过managedForm对象获得ScrolledForm可滚动的表单对象
ScrolledForm form = managedForm.getForm();
// 设置表单文本
form.setText("这是第一页,Hello, Eclipse 表单");
// 创建表格布局
TableWrapLayout layout = new TableWrapLayout();
layout.numColumns = 1;// 表格的列数
layout.bottomMargin = 0;// 下补白
layout.topMargin = 0;// 上补白
layout.leftMargin = 0;// 左补白
layout.rightMargin = 0;// 右补白
form.getBody().setLayout(layout);// 设置表格的布局
form.getBody().setBackground(
form.getBody().getDisplay()
.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
}
示例14: NodeInfoViewer
import org.eclipse.ui.forms.widgets.TableWrapLayout; //导入依赖的package包/类
/**
* Constructor.
*/
public NodeInfoViewer(Composite parent, int style) {
super(parent, style);
this.setLayout(new FillLayout());
this.toolkit = new FormToolkit(Utilities.getDisplay());
this.global = this.toolkit.createScrolledForm(this);
TableWrapLayout layout = new TableWrapLayout();
layout.numColumns = 2;
this.global.getBody().setLayout(layout);
/* For disposing the toolkit. */
this.addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent e) {
toolkit.dispose();
}
});
/* For the wheel event. */
this.global.addListener(SWT.Activate, new Listener() {
public void handleEvent(Event event) {
global.setFocus();
}
});
}
示例15: createPartControl
import org.eclipse.ui.forms.widgets.TableWrapLayout; //导入依赖的package包/类
@Override
public void createPartControl(Composite parent){
parent.setLayout(new FillLayout());
form = tk.createScrolledForm(parent);
TableWrapLayout twl = new TableWrapLayout();
form.getBody().setLayout(twl);
tblArtikel =
new LabeledInputField.AutoForm(form.getBody(), getFieldDefs(parent.getShell()));
TableWrapData twd = new TableWrapData(TableWrapData.FILL_GRAB);
twd.grabHorizontal = true;
tblArtikel.setLayoutData(twd);
GlobalEventDispatcher.addActivationListener(this, this);
}