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); }
/** * @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(); }
/** * @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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 섹션 컴포짓 생성 * * 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); }
/** * 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; }
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; }
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); }
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)); }
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)); }
/** * 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(); } }); }
@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); }
/** * * @param parent The composite to place the list into * @param setShowActiveKons JournalView wants to display all Kons, KG Iatrix wants to suppress the actKons */ public KonsListDisplay(Composite parent, boolean setShowActiveKons){ super(parent, SWT.BORDER); dontShowActiveKons = setShowActiveKons; setLayout(new FillLayout()); toolkit = new FormToolkit(getDisplay()); form = toolkit.createScrolledForm(this); formBody = form.getBody(); formBody.setLayout(new TableWrapLayout()); konsListComposite = new KonsListComposite(formBody, toolkit, dontShowActiveKons); konsListComposite.setLayoutData(SWTHelper.getFillTableWrapData(1, true, 1, false)); dataLoader = new KonsLoader(actPat); dataLoader.addJobChangeListener(this); }
/** * @see org.yakindu.sct.editor.sgen.extensions.IFeatureConfigurationSection#createSection(org.eclipse.ui.forms.widgets.FormToolkit, * org.eclipse.swt.widgets.Composite) */ @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); final FeatureParameter parameter = SGenModelUtil.getFeatureParameter(getFeatureType(), "licenseText"); //$NON-NLS-1$ final Label label = toolkit.createLabel(composite, convertCamelCaseName(parameter.getName(), !parameter.isOptional()) + ':'); label.setLayoutData(new TableWrapData(TableWrapData.FILL, TableWrapData.FILL)); this.licenseText = toolkit.createText(composite, "", SWT.SINGLE | SWT.MULTI | SWT.WRAP | SWT.BORDER); //$NON-NLS-1$ final TableWrapData layoutData = new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.FILL); layoutData.heightHint = 5 * this.licenseText.getLineHeight(); this.licenseText.setLayoutData(layoutData); this.licenseText.addFocusListener(this); this.licenseText.setData(parameter); this.section.setClient(composite); return this.section; }
/** * Constructs a section and returns a section client composite * * the section layout is TableWrapLayout * * * @param parent parent container for the section * @param title title of the section * @param description description of the section * @param toolkit toolkit to create the composite * @param sectionFlags parameters of the section * @param expansionListener * @return a section client (the content container of the section) */ public static Section createSectionComposite(Composite parent, String title, String description, FormToolkit toolkit, int sectionFlags, IExpansionListener expansionListener) { Section section = toolkit.createSection(parent, sectionFlags); TableWrapData td = new TableWrapData(TableWrapData.FILL_GRAB); td.grabHorizontal = true; section.setLayoutData(td); section.setText(title); section.setDescription(description); if (expansionListener != null) { section.addExpansionListener(expansionListener); } // create section client Composite sectionClient = toolkit.createComposite(section); TableWrapLayout layout = new TableWrapLayout(); layout.numColumns = 1; sectionClient.setLayout(layout); section.setClient(sectionClient); // draw flat borders toolkit.paintBordersFor(sectionClient); return section; }
/** * 섹션 컴포짓 생성 * * 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); createDetailsProfileSection(body); createDetailsModelLibrarySection(body); }
/** * 섹션 컴포짓 생성 * * 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); createFragmentSection(body); createDiagramSection(body); }
public static TableWrapLayout createTableWrapLayout(int nColumns) { final TableWrapLayout cContentsLayout = new TableWrapLayout(); cContentsLayout.numColumns = nColumns; cContentsLayout.horizontalSpacing = 5; cContentsLayout.verticalSpacing = 3; return cContentsLayout; }
public static Composite createHeaders(AutomationBlock automationBlock, IDetailsPage page, FormToolkit toolkit, Composite parent, String sectionText, String sectionDescription) { TableWrapLayout twlayout = new TableWrapLayout(); twlayout.topMargin = 5; twlayout.leftMargin = 5; twlayout.rightMargin = 2; twlayout.bottomMargin = 2; parent.setLayout(twlayout); Section section = toolkit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR); TableWrapData td = new TableWrapData(TableWrapData.FILL, TableWrapData.TOP); td.grabHorizontal = true; section.setLayoutData(td); section.marginWidth = 10; section.setText(sectionText); section.setDescription(sectionDescription); automationBlock.addPageSection(page, section); Composite client = toolkit.createComposite(section); GridLayout layout = new GridLayout(); layout.numColumns = 2; layout.marginWidth = 5; layout.marginHeight = 10; client.setLayout(layout); client.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); toolkit.paintBordersFor(client); section.setClient(client); return client; }
@Override protected Composite getTitleComposite() { Composite titleComposite = new Composite(mainComposite, SWT.NONE); TableWrapLayout layout = new TableWrapLayout(); layout.numColumns = 2; titleComposite.setLayout(layout); titleComposite.setBackground(shell.getBackground()); ViolationTracker violationTracker = this.getViolationTracker(); Violation violation = violationTracker.getViolation(); Image image = this.getImage(violationTracker); Label titleCompositeImageLabel = new Label(titleComposite, SWT.NONE); titleCompositeImageLabel.setBackground(shell.getBackground()); titleCompositeImageLabel.setImage(image); Label titleCompositeTextLabel = new Label(titleComposite, SWT.WRAP); TableWrapData layoutData = new TableWrapData(TableWrapData.FILL); layoutData.maxWidth = TOOLTIP_WIDTH; titleCompositeTextLabel.setLayoutData(layoutData); titleCompositeTextLabel.setForeground(ColorConstants.blue); titleCompositeTextLabel.setBackground(shell.getBackground()); titleCompositeTextLabel.setText(violation.getName() + ": " + violation.getDescription()); titleCompositeTextLabel.setFont(FontUtils.getSystemBoldFont()); return titleComposite; }
protected Composite getMainComposite() { if(this.mainComposite != null) return this.mainComposite; mainComposite = new Composite(shell, SWT.NONE); mainComposite.addMouseTrackListener(new MouseTrackAdapter() { @Override public void mouseExit(MouseEvent e) { // mouse leaves the tooltip, dispose the tooltip if (!mainComposite.getBounds().intersects(e.x, e.y, 1, 1)) { shell.setVisible(false); } // check if parent should be disposed if (groupScaleTimelineMarkerTooltip != null && !groupScaleTimelineMarkerTooltip.shell.isDisposed() && !shell.isVisible()) { Point point = new Point(e.x, e.y); point = shell.toDisplay(point); point = groupScaleTimelineMarkerTooltip.getMainComposite().toControl(point); Rectangle bounds = groupScaleTimelineMarkerTooltip.getMainComposite().getBounds(); if (!bounds.intersects(point.x, point.y, 1, 1)) { // child tooltip disposed and mouse no longer over tooltip groupScaleTimelineMarkerTooltip.shell.dispose(); } } if (!shell.isDisposed() && !shell.isVisible()) { shell.dispose(); } } }); mainComposite.setBackground(shell.getBackground()); mainComposite.setLayout(new TableWrapLayout()); return mainComposite; }
private void createBody(Composite parent) { if (useDebuggingColors) parent.setBackground(ColorConstants.cyan); parent.setLayout(new TableWrapLayout()); headerComposite = buildHeader(parent); headerComposite.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB)); addCompositeSeparator(parent); constraintsComposite = buildConstraintsComposite(parent); constraintsComposite.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB)); }
/** * Returns a composite displaying constraint information for the selected node * @param parent the parent composite * @return a composite displaying constraint information for the selected node */ private Composite buildConstraintsComposite(Composite parent) { Composite composite = toolkit.createComposite(parent); TableWrapLayout layout = new TableWrapLayout(); layout.numColumns = 3; composite.setLayout(layout); return composite; }
private void checkControl(IFormPart emfDetailFormPart, Layout layout, Control control, Object input) { Object layoutData = control.getLayoutData(); if (layoutData != null) { String mismatch = null; if ((layout instanceof ColumnLayout) && !(layoutData instanceof ColumnLayoutData)) { mismatch = "ColumnLayout is incompatible with " + layoutData; } if ((layout instanceof GridLayout) && !(layoutData instanceof GridData)) { mismatch = "GridLayout is incompatible with " + layoutData; } if ((layout instanceof TableWrapLayout) && !(layoutData instanceof TableWrapData)) { mismatch = "TableWrapLayout is incompatible with " + layoutData; } if (mismatch != null) { StringBuilder message = new StringBuilder(mismatch); message.append('\n'); message.append("clearing invalid layout data on control " + control + " in form part: " + emfDetailFormPart); message.append('\n'); message.append("the input was: " + input); LogUtil.error(message); control.setLayoutData(null); } } if (control instanceof Composite) { Composite composite = (Composite) control; Control[] children = composite.getChildren(); for (Control child : children) { checkControl(emfDetailFormPart, composite.getLayout(), child, input); } } }
/** * Called by container in order to build gui. * * @param parent container */ public void createContent(Composite parent) { tabFolder = new TabFolder(parent, SWT.NONE); tabFolder.setBackground(parent.getBackground()); tabFolder.setLayout(new TableWrapLayout()); for (ConflictOption option : options) { createTab(tabFolder, option); } }
public static TableWrapLayout createFormTableWrapLayout(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 = true; layout.numColumns = numColumns; return layout; }
public static TableWrapLayout createFormPaneTableWrapLayout(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.numColumns = numColumns; return layout; }
protected void createClient(Section section, FormToolkit toolkit) { section.setText("General Information"); //$NON-NLS-1$ String desc = "This section describe the general information about 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); // IvyFileEditorInput editorInput = (IvyFileEditorInput) page.getEditorInput(); // PresentationModel moduleModel = editorInput.getPresentationModel(); // PresentationModel revisionModel = new PresentationModel(moduleModel.getModel("resolvedModuleRevisionId")); // PresentationModel moduleIdModel = new PresentationModel(moduleModel.getModel("moduleId")); toolkit.createLabel(client, "Organisation"); Text org = toolkit.createText(client, ""); org.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB)); // SWTBindings.bind(org, moduleIdModel.getModel("organisation"), true); toolkit.createLabel(client, "Module"); Text mod = toolkit.createText(client, ""); mod.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB)); // SWTBindings.bind(org, moduleIdModel.getModel("name"), true); toolkit.createLabel(client, "Status"); Text status = toolkit.createText(client, ""); status.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB)); // SWTBindings.bind(org, moduleModel.getModel("status"), true); toolkit.paintBordersFor(client); section.setClient(client); TableWrapData td = new TableWrapData(TableWrapData.FILL_GRAB); td.colspan = NUM_COLUMNS; section.setLayoutData(td); }
public static TableWrapLayout createFormTableWrapLayout( final boolean makeColumnsEqualWidth, final 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; }
public static TableWrapLayout createFormPaneTableWrapLayout( final boolean makeColumnsEqualWidth, final 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; }
public static TableWrapLayout createClearTableWrapLayout( final boolean makeColumnsEqualWidth, final 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; }
public static TableWrapLayout createSectionClientTableWrapLayout( final boolean makeColumnsEqualWidth, final 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; }
/** * Constructor wrapper for TableWrapLayout, so that parameters are identical to * GridLayout(numColumns, makeColumnsEqualWidth) */ public static TableWrapLayout createTableWrapLayout(final int numColumns, final boolean makeColumnsEqualWidth){ TableWrapLayout layout = new TableWrapLayout(); layout.numColumns = numColumns; layout.makeColumnsEqualWidth = makeColumnsEqualWidth; return layout; }
public Composite createDisplay(Composite parent, IViewSite site){ form = UiDesk.getToolkit().createForm(parent); TableWrapLayout twl = new TableWrapLayout(); form.getBody().setLayout(twl); tblPls = new LabeledInputField.AutoForm(form.getBody(), data); TableWrapData twd = new TableWrapData(TableWrapData.FILL_GRAB); twd.grabHorizontal = true; tblPls.setLayoutData(twd); TableWrapData twd2 = new TableWrapData(TableWrapData.FILL_GRAB); tComment = UiDesk.getToolkit().createText(form.getBody(), StringTool.leer, SWT.BORDER); tComment.setLayoutData(twd2); return form.getBody(); }
private void createContent() { toolkit.adapt(this); TableWrapLayout layout = createLayout(); setLayout(layout); // order of the method calls is important (fills from left to right) createAddButton(); createTextField(); addDropToText(); createRemoveButton(); }