public Composite createStandardComposite ( final Composite parent ) { final Composite client = this.toolkit.createComposite ( parent, SWT.NONE ); this.toolkit.paintBordersFor ( client ); return client; }
public Composite createStandardComposite ( final Composite parent ) { final Composite client = this.toolkit.createComposite ( parent, SWT.NONE ); this.toolkit.paintBordersFor ( client ); return client; }
/** * Creates a Protocol Composite : a Composite composed of a GridLayout with * 3 columns and marginHeight and marginWidth set to 0. * * @param toolkit * the toolkit * @param parent * the parent * @return * a Protocol Composite */ private Composite createProtocolComposite( FormToolkit toolkit, Composite parent ) { Composite protocolComposite = toolkit.createComposite( parent ); GridLayout protocolGridLayout = new GridLayout( 3, false ); protocolGridLayout.marginHeight = protocolGridLayout.marginWidth = 0; toolkit.paintBordersFor( protocolComposite ); protocolComposite.setLayout( protocolGridLayout ); return protocolComposite; }
private void updateSectionClient(Section section, Composite client, FormToolkit toolkit) { hookExpansionGrabbing(section); toolkit.paintBordersFor(client); section.setClient(client); }
private Composite addMacSection(Composite parent, FormToolkit toolkit) { Composite comp = createComposite(parent, toolkit); createLabel(comp, toolkit, PDEUIMessages.LauncherSection_macLabel, 3); fIcons.add(new IconEntry(comp, toolkit, PDEUIMessages.LauncherSection_file, ILauncherInfo.MACOSX_ICON)); toolkit.paintBordersFor(comp); return comp; }
private Composite addLinuxSection(Composite parent, FormToolkit toolkit) { Composite comp = createComposite(parent, toolkit); createLabel(comp, toolkit, PDEUIMessages.LauncherSection_linuxLabel, 3); fIcons.add(new IconEntry(comp, toolkit, PDEUIMessages.LauncherSection_icon, ILauncherInfo.LINUX_ICON)); toolkit.paintBordersFor(comp); return comp; }
@Override protected TreeViewer doCreateTreeViewer(Composite parent, int style) { TreeViewer viewer = super.doCreateTreeViewer(parent, toolkit.getBorderStyle() | style); toolkit.paintBordersFor(viewer.getTree().getParent()); return viewer; }
@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); }
@Override public void createClient(Section section, FormToolkit toolkit) { Composite container = createClientContainer(section, 2, toolkit); createTree(container, toolkit); toolkit.paintBordersFor(container); section.setClient(container); initialize(); createSectionToolbar(section, toolkit); }
@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(); }
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 initialize(IManagedForm form) { super.initialize(form); Composite sectionClient = new2ColumnComposite(this.getSection()); nameText = newLabeledTextField(sectionClient, "Name", "NameTextToolTip", SWT.NULL); versionText = newLabeledTextField(sectionClient, "Version", "VersionTextToolTip", SWT.NULL); vendorText = newLabeledTextField(sectionClient, "Vendor", "VendorTextToolTip", SWT.NULL); // description enter field descriptionText = newDescriptionTextBox(sectionClient, "Enter a description of this component here."); toolkit.paintBordersFor(sectionClient); }
private void createUI(Composite parent) { // Create the element details section createUISectionElementDetails(parent); // Create the client container for the section Composite client = createUISectionContainer(fSectionElementDetails); // Create the info hover control for the body text field and hyperlink createUIInfoHoverControl(client); // Create the body text label createUIHyperlinkBody(client); // Create the body text field createUITextBody(client); // Associate the client with the section fToolkit.paintBordersFor(client); fSectionElementDetails.setClient(client); // Needed for keyboard paste operation to work markDetailsPart(fSectionElementDetails); }
@Override public void initialize(IManagedForm form) { super.initialize(form); Composite sectionClient = new2ColumnComposite(this.getSection()); enableBorders(sectionClient); toolkit.paintBordersFor(sectionClient); tree = newTree(sectionClient); ParameterSection ps = editor.getParameterPage().getParameterSection(); if (null != ps) ps.setSettings(this); tree.addListener(SWT.MouseHover, this); // for Description }
@Override public void createClient(Section section, FormToolkit toolkit) { Composite container = createClientContainer(section, 2, toolkit); createViewerPartControl(container, SWT.MULTI, 2, toolkit); TablePart tablePart = getTablePart(); fViewer = tablePart.getTableViewer(); fViewer.setLabelProvider(PDEPlugin.getDefault().getLabelProvider()); PDEPlugin.getDefault().getLabelProvider().connect(this); fViewer.setContentProvider(ArrayContentProvider.getInstance()); getSchema().addModelChangedListener(this); toolkit.paintBordersFor(container); section.setClient(container); section.setLayoutData(new GridData(GridData.FILL_BOTH)); initialize(); }
@Override public void createClient(Section section, FormToolkit toolkit) { Composite container = createClientContainer(section, 2, toolkit); GridLayout layout = (GridLayout) container.getLayout(); layout.verticalSpacing = 5; createViewerPartControl(container, SWT.SINGLE, 2, toolkit); TablePart tablePart = getTablePart(); fUrlViewer = tablePart.getTableViewer(); fUrlViewer.setContentProvider(new URLContentProvider()); fUrlViewer.setLabelProvider(new URLLabelProvider()); toolkit.paintBordersFor(container); makeActions(); section.setClient(container); initialize(); }
@Override public void initialize(IManagedForm form) { super.initialize(form); sectionClient = new2ColumnComposite(getSection()); tree = newTree(sectionClient); Composite buttonContainer = newButtonContainer(sectionClient); addButton = newPushButton(buttonContainer, S_ADD, "Click here to add a component Sofa binding."); editButton = newPushButton(buttonContainer, S_EDIT, S_EDIT_TIP); removeButton = newPushButton(buttonContainer, S_REMOVE, S_REMOVE_TIP); tree.addListener(SWT.MouseDoubleClick, this); // edit gesture enableBorders(sectionClient); toolkit.paintBordersFor(sectionClient); if (!isAggregate()) getSection().setExpanded(false); }
@Override public void initialize(IManagedForm form) { parmSection = editor.getParameterPage().getParameterSection(); super.initialize(form); sectionClient = newComposite(getSection()); tree = newTree(sectionClient); Composite buttonContainer = new2ColumnComposite(sectionClient); ((GridData) buttonContainer.getLayoutData()).grabExcessVerticalSpace = false; createOverrideButton = newPushButton(buttonContainer, "Create Override", "Overrides allow an aggregate to replace a parameter's value in one or more of its delegates"); createNonSharedOverrideButton = newPushButton(buttonContainer, "Create non-shared Override", "Click here to create a non-shared override for this parameter"); tree.addListener(SWT.MouseDoubleClick, this); // edit gesture tree.addListener(SWT.MouseHover, this); // hover enableBorders(sectionClient); toolkit.paintBordersFor(sectionClient); }
@Override public void createClient(Section section, FormToolkit toolkit) { Composite container = createClientContainer(section, 2, toolkit); TablePart tablePart = getTablePart(); createViewerPartControl(container, SWT.MULTI, 2, toolkit); pointTable = tablePart.getTableViewer(); pointTable.setContentProvider(new TableContentProvider()); pointTable.setLabelProvider(PDEPlugin.getDefault().getLabelProvider()); toolkit.paintBordersFor(container); section.setClient(container); pointTable.setInput(getPage()); selectFirstExtensionPoint(); IBaseModel model = getPage().getModel(); if (model instanceof IModelChangeProvider) ((IModelChangeProvider) model).addModelChangedListener(this); tablePart.setButtonEnabled(0, model.isEditable()); }
private void createLeftSection(Composite parent, FormToolkit toolkit) { Composite container = createContainer(parent, toolkit); fLibraryPart = new PartAdapter(new String[] {PDEUIMessages.BuildEditor_RuntimeInfoSection_addLibrary, null, PDEUIMessages.ManifestEditor_LibrarySection_up, PDEUIMessages.ManifestEditor_LibrarySection_down}); fLibraryPart.createControl(container, SWT.FULL_SELECTION, 2, toolkit); fLibraryViewer = (TableViewer) fLibraryPart.getViewer(); fLibraryViewer.setContentProvider(new LibraryContentProvider()); fLibraryViewer.setLabelProvider(new LibraryLabelProvider()); fLibraryPart.setButtonEnabled(F_UP_UNDEX, false); fLibraryPart.setButtonEnabled(F_DOWN_INDEX, false); fLibraryViewer.setInput(getBuildModel()); toolkit.paintBordersFor(container); MenuManager menuMgr = new MenuManager("#PopupMenu"); //$NON-NLS-1$ menuMgr.setRemoveAllWhenShown(true); menuMgr.addMenuListener(manager -> fillLibraryContextMenu(manager)); fLibraryViewer.getControl().setMenu(menuMgr.createContextMenu(fLibraryViewer.getControl())); }