private Section createStaticSection(Composite parent, FormToolkit toolkit) { Section section = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR); section.clientVerticalSpacing = FormLayoutFactory.SECTION_HEADER_VERTICAL_SPACING; section.setLayout(FormLayoutFactory.createClearGridLayout(false, 1)); GridData data = new GridData(GridData.FILL_HORIZONTAL); section.setLayoutData(data); // toolkit.createCompositeSeparator(section); return section; }
/** * Default constructor. * * @param parent * Composite to create on. * @param toolkit * {@link FormToolkit} * @param heading * Name of the table that will be displayed as header. * @param columns * Number of columns in the information area. Note that this number should not * include the column used for row title. */ public DetailsTable(Composite parent, FormToolkit toolkit, String heading, int columns) { super(parent, toolkit, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED); this.columns = columns; this.toolkit = toolkit; getSection().setLayout(new TableWrapLayout()); createHeading(heading); copyStringBuilder.append(heading); copyStringBuilder.append('\n'); this.gc = new GC(parent); initTable(); }
private void configureUISection() { fSection.setLayout(FormLayoutFactory.createClearGridLayout(false, 1)); GridData data = new GridData(GridData.FILL_HORIZONTAL); fSection.setLayoutData(data); fSection.setText(PDEUIMessages.SplashProgressSection_progressName); fSection.setDescription(PDEUIMessages.SplashProgressSection_progressSectionDesc); }
private Section createSection(Composite parent, FormToolkit toolkit, String title) { Section section = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR); section.clientVerticalSpacing = FormLayoutFactory.SECTION_HEADER_VERTICAL_SPACING; section.setText(title); section.setLayout(FormLayoutFactory.createClearTableWrapLayout(false, 1)); section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING)); return section; }
protected final Section createStaticSection(FormToolkit toolkit, Composite parent, String text) { Section section = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR); section.clientVerticalSpacing = FormLayoutFactory.SECTION_HEADER_VERTICAL_SPACING; section.setText(text); section.setLayout(FormLayoutFactory.createClearTableWrapLayout(false, 1)); TableWrapData data = new TableWrapData(TableWrapData.FILL_GRAB); section.setLayoutData(data); return section; }
@Override protected void createMasterPart(final IManagedForm managedForm, Composite parent) { Composite container = managedForm.getToolkit().createComposite(parent); container.setLayout(FormLayoutFactory.createMasterGridLayout(false, 1)); container.setLayoutData(new GridData(GridData.FILL_BOTH)); fSection = createMasterSection(managedForm, container); managedForm.addPart(fSection); Section section = fSection.getSection(); section.setLayout(FormLayoutFactory.createClearGridLayout(false, 1)); section.setLayoutData(new GridData(GridData.FILL_BOTH)); }
/** * Creates a new section with grid layout * * @param parent Parent of the new section * @param toolkit Toolkit for the new section * @param text Title for the new section * @param description New section description * @param style Style of the new section * @return the new section */ public static Section createUISection(Composite parent, FormToolkit toolkit, String text, String description, int style) { Section section = toolkit.createSection(parent, style); section.clientVerticalSpacing = FormLayoutFactory.SECTION_HEADER_VERTICAL_SPACING; section.setLayout(FormLayoutFactory.createClearGridLayout(false, 1)); section.setText(text); section.setDescription(description); GridData data = new GridData(GridData.FILL_VERTICAL); section.setLayoutData(data); return section; }
Section section = getManagedForm().getToolkit().createSection(parent, style); section.clientVerticalSpacing = FormLayoutFactory.SECTION_HEADER_VERTICAL_SPACING; section.setLayout(FormLayoutFactory.createClearGridLayout(false, 1)); section.setText(text); section.setDescription(description); GridData data = new GridData(GridData.FILL_HORIZONTAL); section.setLayoutData(data); return section; } public Composite createUISectionContainer(Composite parent, int columns) {
@Override public void createClient(Section section, FormToolkit toolkit) { Composite container = toolkit.createComposite(section); container.setLayout(FormLayoutFactory.createSectionClientGridLayout(false, 2)); createLeftSection(container, toolkit); createRightSection(container, toolkit); toolkit.paintBordersFor(container); section.setLayout(FormLayoutFactory.createClearGridLayout(false, 1)); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.horizontalSpan = 2; section.setLayoutData(data); section.setClient(container); }
/** * {@inheritDoc} */ @Override public void createPartControl(Composite parent, Set<PreferenceId> preferenceSet, InputDefinition inputDefinition, IToolBarManager toolBarManager) { section = toolkit.createSection(parent, ExpandableComposite.NO_TITLE); section.setText("Preferences"); section.setLayout(new GridLayout(1, false)); section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); section.setVisible(false); Composite innerComposite = toolkit.createComposite(section); innerComposite.setLayout(new GridLayout(1, false)); innerComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); // only add buttons and some controls if the set is not empty if ((null != preferenceSet) && !preferenceSet.isEmpty()) { if (null != toolBarManager) { createButtons(preferenceSet, toolBarManager, inputDefinition); } createPreferenceControls(innerComposite, preferenceSet, inputDefinition); } section.setClient(innerComposite); section.setExpanded(false); }
@Override public void createClient(Section section, FormToolkit toolkit) { fModel = (ISiteModel) getPage().getModel(); fModel.addModelChangedListener(this); section.setLayout(FormLayoutFactory.createClearGridLayout(false, 1)); Composite container = toolkit.createComposite(section); container.setLayout(FormLayoutFactory.createSectionClientGridLayout(false, 2)); container.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); GridData data = new GridData(GridData.FILL_BOTH); section.setLayoutData(data); createTable(container, toolkit); createTableViewer(); createButtons(container, toolkit); toolkit.paintBordersFor(container); section.setClient(container); initialize(); }
private void createUISectionElementDetails(Composite parent) { int section_style = Section.DESCRIPTION | ExpandableComposite.TITLE_BAR; fSectionElementDetails = fToolkit.createSection(parent, section_style); fSectionElementDetails.clientVerticalSpacing = FormLayoutFactory.SECTION_HEADER_VERTICAL_SPACING; fSectionElementDetails.setText(PDEUIMessages.ExtensionElementDetails_title); String description = PDEUIMessages.ExtensionElementBodyTextDetails_sectionDescElementGeneral; if (fSchemaElement != null && fSchemaElement.isDeprecated()) { description += "\n\n"; //$NON-NLS-1$ description += NLS.bind(PDEUIMessages.ElementIsDeprecated, fSchemaElement.getName()); } fSectionElementDetails.setDescription(description); fSectionElementDetails.setLayout(FormLayoutFactory.createClearGridLayout(false, 1)); int layout_style = GridData.FILL_HORIZONTAL; GridData data = new GridData(layout_style); fSectionElementDetails.setLayoutData(data); // Align the master and details section headers (misalignment caused // by section toolbar icons) getPage().alignSectionHeaders(getMasterSection().getSection(), fSectionElementDetails); }
public void createContents(Composite parent) { FormToolkit toolkit = getManagedForm().getToolkit(); fSection = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR); fSection.clientVerticalSpacing = FormLayoutFactory.SECTION_HEADER_VERTICAL_SPACING; fSection.setLayout(FormLayoutFactory.createClearGridLayout(false, 1)); GridData gd = new GridData(GridData.FILL_HORIZONTAL); fSection.setLayoutData(gd); Composite client = toolkit.createComposite(fSection); client.setLayout(FormLayoutFactory.createSectionClientGridLayout(false, 1)); fDtdText = toolkit.createText(client, "", SWT.WRAP | SWT.V_SCROLL | SWT.MULTI);//$NON-NLS-1$ gd = new GridData(GridData.FILL_HORIZONTAL); gd.heightHint = 60; fDtdText.setLayoutData(gd); fDtdText.setEditable(false); // remove pop-up menu fDtdText.setMenu(new Menu(client)); toolkit.paintBordersFor(client); fSection.setClient(client); fSection.setText(PDEUIMessages.SchemaDtdDetailsSection_title); }
@Override public void createClient(Section section, FormToolkit toolkit) { Composite container = createClientContainer(section, 2, toolkit); createViewerPartControl(container, SWT.MULTI | SWT.FULL_SELECTION, 2, toolkit); EditableTablePart tablePart = getTablePart(); tablePart.setEditable(true); fTableViewer = tablePart.getTableViewer(); fTableViewer.setContentProvider(new TableContentProvider()); fTableViewer.setLabelProvider(new TableLabelProvider()); fTableViewer.setInput(getBuildModel()); toolkit.paintBordersFor(container); enableSection(true); section.setLayout(FormLayoutFactory.createClearGridLayout(false, 1)); GridData data = new GridData(GridData.FILL_HORIZONTAL); section.setLayoutData(data); data.horizontalSpan = 2; section.setClient(container); }
@Override public void createClient(Section section, FormToolkit toolkit) { section.setLayout(FormLayoutFactory.createClearGridLayout(false, 1)); GridData data = new GridData(GridData.FILL_BOTH); section.setLayoutData(data); Composite container = createClientContainer(section, 2, toolkit); createViewerPartControl(container, SWT.MULTI, 2, toolkit); TablePart tablePart = getTablePart(); fPluginViewer = tablePart.getTableViewer(); fPluginViewer.setContentProvider(new PluginContentProvider()); fPluginViewer.setLabelProvider(PDEPlugin.getDefault().getLabelProvider()); fPluginViewer.setComparator(ListUtil.NAME_COMPARATOR); toolkit.paintBordersFor(container); makeActions(); section.setClient(container); initialize(); createSectionToolbar(section, toolkit); }
@Override public void createClient(Section section, FormToolkit toolkit) { section.setLayout(FormLayoutFactory.createClearGridLayout(false, 1)); GridData data = new GridData(GridData.FILL_BOTH); section.setLayoutData(data); Composite container = createClientContainer(section, 2, toolkit); createViewerPartControl(container, SWT.MULTI, 2, toolkit); TablePart tablePart = getTablePart(); fIncludesViewer = tablePart.getTableViewer(); fIncludesViewer.setContentProvider(new IncludedFeaturesContentProvider()); fIncludesViewer.setLabelProvider(PDEPlugin.getDefault().getLabelProvider()); fIncludesViewer.setComparator(ListUtil.NAME_COMPARATOR); toolkit.paintBordersFor(container); makeActions(); section.setClient(container); initialize(); createSectionToolbar(section, toolkit); }
@Override public void createClient(Section section, FormToolkit toolkit) { Composite container = createClientContainer(section, 2, toolkit); createViewerPartControl(container, SWT.MULTI, 2, toolkit); TablePart tablePart = getTablePart(); fImportViewer = tablePart.getTableViewer(); fImportViewer.setContentProvider(new ImportContentProvider()); fImportViewer.setLabelProvider(PDEPlugin.getDefault().getLabelProvider()); toolkit.paintBordersFor(container); makeActions(); section.setClient(container); GridData gd = new GridData(GridData.FILL_BOTH); gd.minimumWidth = 250; gd.grabExcessVerticalSpace = true; section.setLayout(FormLayoutFactory.createClearGridLayout(false, 1)); section.setLayoutData(gd); section.setText(PDEUIMessages.RequiresSection_title); createSectionToolbar(section, toolkit); initialize(); }
@Override protected void createClient(Section section, FormToolkit toolkit) { section.setText(PDEUIMessages.GeneralInfoSection_title); section.setDescription(PDEUIMessages.GeneralInfoSection_desc); section.setLayout(FormLayoutFactory.createClearTableWrapLayout(false, 1)); TableWrapData data = new TableWrapData(TableWrapData.FILL_GRAB); data.colspan = 2; section.setLayoutData(data); Composite client = toolkit.createComposite(section); client.setLayout(FormLayoutFactory.createSectionClientGridLayout(false, NUM_COLUMNS)); IActionBars actionBars = getPage().getPDEEditor().getEditorSite().getActionBars(); // general section createIdEntry(client, toolkit, actionBars); createVersionEntry(client, toolkit, actionBars); createNameEntry(client, toolkit, actionBars); createLaunchersOption(client, toolkit); toolkit.paintBordersFor(client); section.setClient(client); getModel().addModelChangedListener(this); }
@Override protected void createClient(Section section, FormToolkit toolkit) { section.setText(PDEUIMessages.ProductInfoSection_title); section.setDescription(PDEUIMessages.ProductInfoSection_desc); section.setLayout(FormLayoutFactory.createClearTableWrapLayout(false, 1)); TableWrapData data = new TableWrapData(TableWrapData.FILL_GRAB); data.colspan = 2; section.setLayoutData(data); Composite client = toolkit.createComposite(section); client.setLayout(FormLayoutFactory.createSectionClientGridLayout(false, NUM_COLUMNS)); IActionBars actionBars = getPage().getPDEEditor().getEditorSite().getActionBars(); // product section createProductEntry(client, toolkit, actionBars); createApplicationEntry(client, toolkit, actionBars); createConfigurationOption(client, toolkit); toolkit.paintBordersFor(client); section.setClient(client); getModel().addModelChangedListener(this); PDECore.getDefault().getExtensionsRegistry().addListener(this); PDECore.getDefault().getModelManager().addStateDeltaListener(this); }
@Override public void createClient(Section section, FormToolkit toolkit) { section.setText(PDEUIMessages.ManifestEditor_LibrarySection_title); section.setDescription(getSectionDescription()); Composite container = createClientContainer(section, 2, toolkit); EditableTablePart tablePart = getTablePart(); tablePart.setEditable(isEditable()); createViewerPartControl(container, SWT.MULTI, 2, toolkit); fLibraryTable = tablePart.getTableViewer(); fLibraryTable.setContentProvider(new TableContentProvider()); fLibraryTable.setLabelProvider(PDEPlugin.getDefault().getLabelProvider()); toolkit.paintBordersFor(container); makeActions(); updateButtons(); section.setLayout(FormLayoutFactory.createClearGridLayout(false, 1)); section.setLayoutData(new GridData(GridData.FILL_BOTH)); section.setClient(container); IPluginModelBase model = getModel(); fLibraryTable.setInput(model.getPluginBase()); model.addModelChangedListener(this); }