Java 类org.eclipse.ui.forms.widgets.Section 实例源码

项目:NEXCORE-UML-Modeler    文件:OverviewDocumentSection.java   
/**
 * @see nexcore.tool.uml.ui.core.editor.section.AbstractSection#createClient(org.eclipse.ui.forms.widgets.Section,
 *      org.eclipse.ui.forms.widgets.FormToolkit)
 */
@Override
protected void createClient(Section section, FormToolkit toolkit) {
    section.setText(UMLMessage.LABEL_DOCUMENT_INFORMATION);
    section.setDescription(UMLMessage.MESSAGE_DOCUMENT_OVERVIEW);

    TableWrapData td = new TableWrapData(TableWrapData.FILL, TableWrapData.TOP);
    td.grabHorizontal = true;

    Composite client = toolkit.createComposite(section);
    client.setLayout(new GridLayout(1, false));

    createTextControl(toolkit, client);

    initializeSection();

    section.setClient(client);
}
项目:eZooKeeper    文件:DataModelFormPage.java   
protected Section createTableSection(ScrolledForm form, Composite client, FormToolkit toolkit, String title,
        Image image, int sectionStyle, int tableStyle, String[] columnTitles, int[] columnAlignments) {

    Section section = createSection(form, client, toolkit, title, image, sectionStyle);
    Table table = toolkit.createTable(section, tableStyle);

    for (int i = 0; i < columnTitles.length; i++) {
        TableColumn column = new TableColumn(table, SWT.NONE);
        column.setText(columnTitles[i]);
        column.setAlignment(columnAlignments[i]);
    }

    table.setHeaderVisible(true);
    table.setLinesVisible(true);

    section.setClient(table);

    return section;
}
项目:eZooKeeper    文件:ZooKeeperConnectionModelMainFormPage.java   
@Override
protected final void initFromModelInternal() {

    ZooKeeperConnectionModel model = getModel();
    ZooKeeperConnectionDescriptor descriptor = model.getKey();

    String rootPath = descriptor.getRootPath();
    rootPath = (rootPath != null) ? rootPath : "/";
    _RootPathText.setText(rootPath);

    int sessionTimeout = descriptor.getSessionTimeout();
    _SessionTimeoutText.setText(String.valueOf(sessionTimeout));

    initPropertiesSectionFromModel();

    Section propertiesSection = getPropertiesSection();
    if (propertiesSection != null) {
        propertiesSection.layout(true);
    }
}
项目:eZooKeeper    文件:JmxConnectionModelMainFormPage.java   
@Override
protected final void initFromModelInternal() {

    JmxConnectionModel model = getModel();
    JmxConnectionDescriptor descriptor = model.getKey();

    String jmxServiceUrl = String.valueOf(descriptor.getJmxServiceUrl());
    _ServiceUrlText.setText(jmxServiceUrl);

    String userName = descriptor.getUserName();
    userName = (userName != null) ? userName : "";
    _UserNameText.setText(userName);

    if (userName != null) {
        String password = descriptor.getPassword();
        password = (password != null) ? password : "";
        _PasswordText.setText(password);
    }

    initPropertiesSectionFromModel();

    Section propertiesSection = getPropertiesSection();
    if (propertiesSection != null) {
        propertiesSection.layout(true);
    }
}
项目:eZooKeeper    文件:BaseJmxModelMainFormPage.java   
@Override
protected void initFromModelInternal() {

    initPrimarySectionFromModel();
    initDetailSectionFromModel();
    initInfoSectionFromModel();
    packTable(getInfoTable(), DEFAULT_NAME_VALUE_COLUMN_WIDTHS);
    initDescriptorSectionFromModel();
    packTable(getDescriptorTable(), DEFAULT_NAME_VALUE_COLUMN_WIDTHS);

    // forceLayout();

    Section primarySection = getPrimarySection();
    if (primarySection != null) {
        primarySection.layout(true);
    }
    Section infoSection = getInfoSection();
    if (infoSection != null) {
        infoSection.layout(true);
    }
    Section descriptionSection = getDescriptorSection();
    if (descriptionSection != null) {
        descriptionSection.layout(true);
    }
}
项目:eZooKeeper    文件:MBeanFeatureModeMainFormPage.java   
@Override
protected Section createDetailSection(ScrolledForm form, Composite client, FormToolkit toolkit) {

    Section section = createSection(form, client, toolkit, DETAIL_SECTION_TITLE, JmxActivator
            .getManagedImage(JmxActivator.IMAGE_KEY_OBJECT_JMX_DOC));
    Composite sectionClient = createSectionClient(section, toolkit);

    _JmxDocFormText = toolkit.createFormText(sectionClient, false);
    JmxDocFormText.initFormText(_JmxDocFormText);

    FormData jmxdocFormTextFormData = new FormData();
    jmxdocFormTextFormData.top = new FormAttachment(0, 0);
    jmxdocFormTextFormData.left = new FormAttachment(0, 0);
    _JmxDocFormText.setLayoutData(jmxdocFormTextFormData);

    GridData detailSectionGridData = new GridData(GridData.FILL_HORIZONTAL);
    section.setLayoutData(detailSectionGridData);

    return section;
}
项目:team-explorer-everywhere    文件:TeamExplorerResizeListener.java   
private static int calculateMarginWidth(final Control control) {
    Control c = control;
    int margin = 0;

    while (c != null && !c.isDisposed() && !(c instanceof Form)) {
        final int leftMargin = c.getBounds().x;

        margin += leftMargin;

        // assume there is an equal amount of right margin if not in a
        // section.
        if (!(c.getParent() instanceof Section)) {
            margin += leftMargin;
        }
        c = c.getParent();
    }

    return margin;
}
项目:arduino_sct_tools    文件:GenericFeatureConfigurationSection.java   
/**
 * @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;
}
项目:angular-eclipse    文件:OverviewPage.java   
private void createGeneralInformationSection(Composite parent) {
    FormToolkit toolkit = super.getToolkit();
    Section section = toolkit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR);
    section.setDescription(AngularCLIMessages.AngularCLIEditor_OverviewPage_GeneralInformationSection_desc);
    section.setText(AngularCLIMessages.AngularCLIEditor_OverviewPage_GeneralInformationSection_title);
    TableWrapData data = new TableWrapData(TableWrapData.FILL_GRAB);
    section.setLayoutData(data);

    Composite body = createBody(section);

    // Project name
    createText(body, AngularCLIMessages.AngularCLIEditor_OverviewPage_projectName_label, new JSONPath("project.name"));
    // project version
    createText(body, AngularCLIMessages.AngularCLIEditor_OverviewPage_projectVersion_label, new JSONPath("project.version"));

}
项目:xstreamer    文件:CountDownTimerPage.java   
private void createCountDownSection() {
    Section countDown = toolkit.createSection(form.getBody(), ExpandableComposite.TWISTIE | Section.DESCRIPTION| ExpandableComposite.TITLE_BAR);
    countDown.setText("Count Down Section");
    countDown.setExpanded(true);
    countDown.setDescription("Time left in the match.");
    Composite countDownClient = toolkit.createComposite(countDown);
    GridLayout gridLayout = new GridLayout();
    gridLayout.numColumns = 5;
    gridLayout.makeColumnsEqualWidth = false;
    countDownClient.setLayout(gridLayout);
    hourCountDownLabel = toolkit.createLabel(countDownClient, "00");
    toolkit.createLabel(countDownClient, ":");
    minuteCountDownLabel = toolkit.createLabel(countDownClient, "00");
    toolkit.createLabel(countDownClient, ":");
    secondsCountDownLabel = toolkit.createLabel(countDownClient, "00");
    countDown.setClient(countDownClient);
}
项目:xstreamer    文件:GeneralFormPage.java   
private void createPlayerSection() {
    Section playersSection = toolkit.createSection(form.getBody(), ExpandableComposite.TWISTIE | Section.DESCRIPTION| ExpandableComposite.TITLE_BAR);
    playersSection.setText("Player Section");
    playersSection.setExpanded(true);
    playersSection.setDescription("The players that are playing.");
    Composite playerClient = toolkit.createComposite(playersSection);
    GridLayout playerGridLayout = new GridLayout();
    playerGridLayout.numColumns = 2;
    playerClient.setLayout(playerGridLayout);

    firstPlayerName = createPlayerNameField(playerClient, "Player 1: ");
    secondPlayerName = createPlayerNameField(playerClient, "Player 2: ");

    Button updateButton = toolkit.createButton(playerClient, "Update", SWT.PUSH | SWT.RESIZE);
    GridData updateButtonData = new GridData();
    updateButtonData.horizontalSpan = 2;
    updateButtonData.widthHint = 60;
    updateButtonData.grabExcessHorizontalSpace = true;
    updateButton.setLayoutData(updateButtonData);
    updateButton.addSelectionListener(new PlayerNameUpdateButtonSelectionListener(this));

    playersSection.setClient(playerClient);
}
项目:xstreamer    文件:GeneralFormPage.java   
private void createScoringSection() {
    Section playersSection = toolkit.createSection(form.getBody(), ExpandableComposite.TWISTIE | Section.DESCRIPTION| ExpandableComposite.TITLE_BAR);
    playersSection.setText("Scoreboard Section");
    playersSection.setExpanded(false);
    playersSection.setDescription("Current scores for the game");
    Composite playerClient = toolkit.createComposite(playersSection);
    GridLayout playerGridLayout = new GridLayout();
    playerGridLayout.numColumns = 2;
    playerClient.setLayout(playerGridLayout);

    firstPlayerScore = createPlayerNameField(playerClient, "Player 1: ");
    secondPlayerScore = createPlayerNameField(playerClient, "Player 2: ");

    Button updateButton = toolkit.createButton(playerClient, "Update", SWT.PUSH | SWT.RESIZE);
    GridData updateButtonData = new GridData();
    updateButtonData.horizontalSpan = 2;
    updateButtonData.widthHint = 60;
    updateButtonData.grabExcessHorizontalSpace = true;
    updateButton.setLayoutData(updateButtonData);
    updateButton.addSelectionListener(new PlayerScoreUpdateButtonSelectionListener2(this));

    playersSection.setClient(playerClient);
}
项目:xstreamer    文件:MapsFormPage.java   
private void createMapSection() {
    Section mapSection = toolkit.createSection(form.getBody(),
            ExpandableComposite.TWISTIE | Section.DESCRIPTION | ExpandableComposite.TITLE_BAR);
    mapSection.setText("Skirmish Maps");

    mapSection.setExpanded(true);
    mapSection.setDescription("A list of available skirmish maps.");

    Composite mapComposite = toolkit.createComposite(mapSection);
    GridLayout squadGridLayout = new GridLayout();
    squadGridLayout.numColumns = 3;

    mapComposite.setLayout(squadGridLayout);

    listViewer = new ListViewer(mapComposite, SWT.WRAP | SWT.SINGLE | SWT.BORDER | SWT.V_SCROLL);
    listViewer.add(SkirmishMapsLookup.getInstance().getMaps().toArray());
    listViewer.addSelectionChangedListener(new LoadMapImageSelectionListener());

    GridData mapSize = new GridData(SWT.FILL, SWT.FILL, true, true, 3, 5);
    mapSize.minimumHeight = 300;
    mapSize.heightHint = 300;

    listViewer.getList().setLayoutData(mapSize);
    mapSection.setClient(mapComposite);
}
项目:tlaplus    文件:TraceExplorerComposite.java   
public TraceExplorerComposite(Composite parent, String title, String description, FormToolkit toolkit,
        TLCErrorView errorView)
{
    view = errorView;
    section = FormHelper.createSectionComposite(parent, title, description, toolkit, Section.DESCRIPTION
            | Section.TITLE_BAR | Section.TREE_NODE | Section.EXPANDED, null);
    /*
     * We want the section to take up the excess horizontal space so that it spans the entire
     * error view, but we dont want it to take up the excess vertical space because that
     * allows the sash form containing the trace and the variable viewer to expand into
     * the space left behind when the trace explorer table section is contracted.
     * 
     * This assumes the trace explorer table section is on top of this sash form.
     * I haven't tested to see if it will work when the trace explorer section is on the bottom.
     */
    GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false);
    section.setLayoutData(gd);
    sectionInitialize(toolkit);
    // initially, we don't want the section to be expanded
    // so that the user has more room to look at the trace
    section.setExpanded(false);
}
项目:tlaplus    文件:DataBindingManager.java   
/**
 * enables a section by given id. More precisely, this
 * means setting the enablement state of any child of the
 * section that is a {@link Composite} but not a {@link Section}
 * to enabled.
 */
public void enableSection(String id, boolean enabled)
{
    SectionPart part = sectionParts.get(id);
    if (part == null)
    {
        throw new IllegalArgumentException("No section for id");
    }
    Section section = part.getSection();
    Control[] children = section.getChildren();
    for (int i = 0; i < children.length; i++)
    {

        if (children[i] instanceof Composite)
        {
            enableSectionComposite((Composite) children[i], enabled);
        }
    }
}
项目:typescript.java    文件:OverviewPage.java   
private void createGeneralInformationSection(Composite parent) {
    FormToolkit toolkit = super.getToolkit();
    Section section = toolkit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR);
    section.setDescription(TsconfigEditorMessages.OverviewPage_GeneralInformationSection_desc);
    section.setText(TsconfigEditorMessages.OverviewPage_GeneralInformationSection_title);
    TableWrapData data = new TableWrapData(TableWrapData.FILL_GRAB);
    section.setLayoutData(data);

    Composite body = createBody(section);

    // Target/Module
    createCombo(body, TsconfigEditorMessages.OverviewPage_target_label, new JSONPath("compilerOptions.target"),
            TsconfigJson.getAvailableTargets(), TsconfigJson.getDefaultTarget());
    createCombo(body, TsconfigEditorMessages.OverviewPage_module_label, new JSONPath("compilerOptions.module"),
            TsconfigJson.getAvailableModules());
    createCombo(body, TsconfigEditorMessages.OverviewPage_moduleResolution_label,
            new JSONPath("compilerOptions.moduleResolution"), TsconfigJson.getAvailableModuleResolutions(),
            TsconfigJson.getDefaultModuleResolution());
    // Others....
    createCheckbox(body, TsconfigEditorMessages.OverviewPage_experimentalDecorators_label,
            new JSONPath("compilerOptions.experimentalDecorators"));

}
项目:typescript.java    文件:OutputPage.java   
private void createDebuggingSection(Composite parent) {
    FormToolkit toolkit = super.getToolkit();
    Section section = toolkit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR);
    section.setDescription(TsconfigEditorMessages.OutputPage_DebuggingSection_desc);
    section.setText(TsconfigEditorMessages.OutputPage_DebuggingSection_title);
    TableWrapData data = new TableWrapData(TableWrapData.FILL_GRAB);
    section.setLayoutData(data);
    Composite body = createBody(section);

    createCheckbox(body, TsconfigEditorMessages.OutputPage_sourceMap_label,
            new JSONPath("compilerOptions.sourceMap"));
    createTextAndBrowseButton(body, TsconfigEditorMessages.OutputPage_sourceRoot_label,
            new JSONPath("compilerOptions.sourceRoot"), false);
    createTextAndBrowseButton(body, TsconfigEditorMessages.OutputPage_mapRoot_label,
            new JSONPath("compilerOptions.mapRoot"), false);
    createCheckbox(body, TsconfigEditorMessages.OutputPage_inlineSourceMap_label,
            new JSONPath("compilerOptions.inlineSourceMap"));
    createCheckbox(body, TsconfigEditorMessages.OutputPage_inlineSources_label,
            new JSONPath("compilerOptions.inlineSources"));
}
项目:typescript.java    文件:OutputPage.java   
private void createReportingSection(Composite parent) {
    FormToolkit toolkit = super.getToolkit();
    Section section = toolkit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR);
    section.setDescription(TsconfigEditorMessages.OutputPage_ReportingSection_desc);
    section.setText(TsconfigEditorMessages.OutputPage_ReportingSection_title);
    TableWrapData data = new TableWrapData(TableWrapData.FILL_GRAB);
    section.setLayoutData(data);

    Composite body = createBody(section);

    createCheckbox(body, TsconfigEditorMessages.OutputPage_diagnostics_label,
            new JSONPath("compilerOptions.diagnostics"));
    createCheckbox(body, TsconfigEditorMessages.OutputPage_pretty_label, new JSONPath("compilerOptions.pretty"));
    createCheckbox(body, TsconfigEditorMessages.OutputPage_traceResolution_label,
            new JSONPath("compilerOptions.traceResolution"));
    createCheckbox(body, TsconfigEditorMessages.OutputPage_listEmittedFiles_label,
            new JSONPath("compilerOptions.listEmittedFiles"));
}
项目:typescript.java    文件:FilesPage.java   
private void createScopeSection(Composite parent) {
    FormToolkit toolkit = super.getToolkit();
    Section section = toolkit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR);
    section.setDescription(TsconfigEditorMessages.FilesPage_ScopeSection_desc);
    section.setText(TsconfigEditorMessages.FilesPage_ScopeSection_title);
    TableWrapData data = new TableWrapData(TableWrapData.FILL_GRAB);
    section.setLayoutData(data);

    Composite client = toolkit.createComposite(section);
    section.setClient(client);
    GridLayout layout = new GridLayout();
    layout.numColumns = 1;
    layout.marginWidth = 2;
    layout.marginHeight = 2;
    client.setLayout(layout);

    Table table = toolkit.createTable(client, SWT.NONE);
    GridData gd = new GridData(GridData.FILL_BOTH);
    gd.heightHint = 200;
    gd.widthHint = 100;
    table.setLayoutData(gd);
}
项目:cft    文件:SpringInsightSection.java   
public void createSection(Composite parent) {

        // Don't create section if CF server is not the Pivotal CF server
        if (!CloudFoundryURLNavigation.canEnableCloudFoundryNavigation(getCloudFoundryServer())) {
            return;
        }
        super.createSection(parent);

        FormToolkit toolkit = getFormToolkit(parent.getDisplay());

        Section section = toolkit.createSection(parent, ExpandableComposite.TWISTIE | ExpandableComposite.TITLE_BAR);
        section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
        section.setText(Messages.SpringInsightSection_TEXT_SPRING_INSIGHT);
        section.setExpanded(false);

        Composite composite = toolkit.createComposite(section);
        section.setClient(composite);

        GridLayoutFactory.fillDefaults().numColumns(1).margins(10, 5).applyTo(composite);
        GridDataFactory.fillDefaults().grab(true, false).applyTo(composite);

        new GoToSpringLinkWidget(composite, toolkit).createControl();

    }
项目:NEXCORE-UML-Modeler    文件:OverviewModelDetailSection.java   
/**
 * @see nexcore.tool.uml.ui.core.editor.section.AbstractSection#createClient(org.eclipse.ui.forms.widgets.Section,
 *      org.eclipse.ui.forms.widgets.FormToolkit)
 */
@Override
protected void createClient(Section section, FormToolkit toolkit) {
    initializeSection();

    section.setText(UMLMessage.LABEL_MODEL_DETAIL_INFORMATION);
    section.setDescription(UMLMessage.MESSAGE_MODEL_DETAIL_INFORMATION_OVERVIEW);

    Composite composite = toolkit.createComposite(section);
    composite.setLayout(new GridLayout(2, true));

    gridData = new GridData(GridData.FILL_HORIZONTAL);
    composite.setLayoutData(gridData);

    createModelTypeComboComposite(toolkit, composite);

    setValueToWidget();

    section.setClient(composite);
}
项目:NEXCORE-UML-Modeler    文件:DetailsModelLibrarySection.java   
/**
 * @see nexcore.tool.uml.ui.core.editor.section.AbstractSection#createClient(org.eclipse.ui.forms.widgets.Section,
 *      org.eclipse.ui.forms.widgets.FormToolkit)
 */
@Override
protected void createClient(Section section, FormToolkit toolkit) {
    section.setText(UMLMessage.LABEL_MODEL_LIBRARY);
    section.setDescription(UMLMessage.MESSAGE_MODEL_LIBRARY_OVERVIEW);

    TableWrapData td = new TableWrapData(TableWrapData.FILL, TableWrapData.TOP);
    td.grabHorizontal = true;

    Composite client = toolkit.createComposite(section);
    FillLayout layout = new FillLayout(SWT.VERTICAL);
    layout.marginWidth = toolkit.getBorderStyle() != SWT.NULL ? 0 : 2;
    client.setLayout(layout);

    Composite composite = toolkit.createComposite(client);
    GridLayout compositeLayout = new GridLayout();
    compositeLayout.numColumns = 2;
    composite.setLayout(compositeLayout);

    initializeSection();

    createLibraryControl(toolkit, composite);

    section.setClient(client);
}
项目:NEXCORE-UML-Modeler    文件:FragmentSection.java   
/**
 * @see nexcore.tool.uml.ui.core.editor.section.AbstractSection#createClient(org.eclipse.ui.forms.widgets.Section,
 *      org.eclipse.ui.forms.widgets.FormToolkit)
 */
@Override
protected void createClient(Section section, FormToolkit toolkit) {

    section.setText(UMLMessage.LABEL_FRAGMENTED_PACKAGE_LIST);//"단편화된 패키지 목록");
    section.setDescription(UMLMessage.MESSAGE_FRAGMENTED_PACKAGE_LIST);//"이 섹션에서는 이 모델에 존재하는 단편화된 패키지 리스트와 파일위치를 나열합니다.");

    Composite client = toolkit.createComposite(section);
    FillLayout layout = new FillLayout(SWT.VERTICAL);
    layout.marginWidth = toolkit.getBorderStyle() != SWT.NULL ? 0 : 2;
    client.setLayout(layout);

    Composite composite = toolkit.createComposite(client);
    GridLayout compositeLayout = new GridLayout();
    compositeLayout.numColumns = 2;
    composite.setLayout(compositeLayout);

    initializeSection();

    createFragmentControl(toolkit, composite);

    section.setClient(client);
}
项目:NEXCORE-UML-Modeler    文件:DetailsProfileSection.java   
/**
 * @see nexcore.tool.uml.ui.core.editor.section.AbstractSection#createClient(org.eclipse.ui.forms.widgets.Section,
 *      org.eclipse.ui.forms.widgets.FormToolkit)
 */
@Override
protected void createClient(Section section, FormToolkit toolkit) {
    section.setText(UMLMessage.LABEL_UMLPROFILE_LIST);
    section.setDescription(UMLMessage.MESSAGE_PROFILE_LIST);

    Composite client = toolkit.createComposite(section);
    FillLayout layout = new FillLayout(SWT.VERTICAL);
    layout.marginWidth = toolkit.getBorderStyle() != SWT.NULL ? 0 : 2;
    client.setLayout(layout);

    Composite composite = toolkit.createComposite(client);
    GridLayout compositeLayout = new GridLayout();
    compositeLayout.numColumns = 2;
    composite.setLayout(compositeLayout);

    initializeSection();

    createProfileControl(toolkit, composite);

    section.setClient(client);
}
项目:NEXCORE-UML-Modeler    文件:DiagramSection.java   
/**
 * @see nexcore.tool.uml.ui.core.editor.section.AbstractSection#createClient(org.eclipse.ui.forms.widgets.Section,
 *      org.eclipse.ui.forms.widgets.FormToolkit)
 */
@Override
protected void createClient(Section section, FormToolkit toolkit) {
    section.setText(UMLMessage.LABEL_DIAGRAM_LIST);//"다이어그램 목록");
    section.setDescription(UMLMessage.MESSAGE_DIAGRAM_LIST);//"이 섹션은 이 모델에 존재하는 다이어그램을 나열합니다.");

    Composite client = toolkit.createComposite(section);
    FillLayout layout = new FillLayout(SWT.VERTICAL);
    layout.marginWidth = toolkit.getBorderStyle() != SWT.NULL ? 0 : 2;
    client.setLayout(layout);

    Composite composite = toolkit.createComposite(client);
    GridLayout compositeLayout = new GridLayout();
    compositeLayout.numColumns = 2;
    composite.setLayout(compositeLayout);

    initializeSection();

    createDiagramControl(toolkit, composite);

    section.setClient(client);
}
项目:NEXCORE-UML-Modeler    文件:OverviewProjectInformationSection.java   
/**
 * @see nexcore.tool.uml.ui.core.editor.section.AbstractSection#createClient(org.eclipse.ui.forms.widgets.Section,
 *      org.eclipse.ui.forms.widgets.FormToolkit)
 */
@Override
protected void createClient(Section section, FormToolkit toolkit) {
    // initProjectPhaseItems();
    section.setText(UMLMessage.LABEL_RELATED_RM_PROJECT_INFORMATION);
    section.setDescription(UMLMessage.MESSAGE_PROJECT_INFORMATION_OVERVIEW);

    createToolBarButton(section);

    Composite composite = toolkit.createComposite(section);
    composite.setLayout(new GridLayout(2, false));
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    createProjectIdControl(toolkit, composite);
    createProjectNameControl(toolkit, composite);
    // createProjectPhase(toolkit, composite);

    setValueToWidget();
    section.setClient(composite);
}
项目:dockerfoundry    文件:ApplicationMasterPart.java   
public ApplicationMasterPart(DockerFoundryApplicationsEditorPage editorPage, IManagedForm managedForm,
            Composite parent, DockerFoundryServer cloudServer) {
        super(parent, managedForm.getToolkit(), Section.TITLE_BAR | Section.DESCRIPTION);
        this.editorPage = editorPage;
        this.cloudServer = cloudServer;
        this.toolkit = managedForm.getToolkit();
//      this.provideServices = CloudFoundryBrandingExtensionPoint.getProvideServices(editorPage.getServer()
//              .getServerType().getId());

        String linksAsString = this.cloudServer.getDockerContainerLinks();
        if(linksAsString != null && linksAsString.length() >0){
            StringTokenizer st = new StringTokenizer(linksAsString, ",");
            if(st != null){
                while (st.hasMoreTokens()) {
                    String token = st.nextToken();
                    String[] s = token.split(":");
                    DockerApplicationService service = new DockerApplicationService();
                    service.setName(s[0]);
                    service.setLinkName(s[1]);
                    services.add(service);
                }
            }
        }
    }
项目:eclox    文件:Part.java   
/**
 * Contructor
 *
 * @param   parent      the parent control
 * @param   tk          the toolit used to create controls
 * @param   title       the title of the part
 * @param   doxyfile    the doxyfile being edited
 */
public Part(Composite parent, FormToolkit tk, String title, Doxyfile doxyfile) {
    super(parent, tk, Section.TITLE_BAR/*|Section.EXPANDED|Section.TWISTIE*/ );

    this.doxyfile = doxyfile;

    // Initializes the section and its client component.
    Section section = getSection();
    GridLayout layout = new GridLayout();

    toolkit = tk;
    content = toolkit.createComposite(section);
    layout.numColumns = 2;
    layout.marginTop = 0;
    layout.marginRight = 0;
    layout.marginBottom = 0;
    layout.marginLeft = 0;
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    layout.verticalSpacing = 2;
    content.setLayout(layout);
    section.setText(title);
    section.setClient(content);
}
项目:PDFReporter-Studio    文件:JavaExpressionEditorComposite.java   
private void createBackCompatibilitySection() {
    Section backCompatibilitySection = new Section(this, ExpandableComposite.TREE_NODE);
    GridData backCompSectionGD = new GridData(SWT.FILL,SWT.FILL,true,false);
    backCompSectionGD.verticalIndent=10;
    backCompatibilitySection.setLayoutData(backCompSectionGD);
    backCompatibilitySection.setLayout(new FillLayout());
    backCompatibilitySection.setText(Messages.JavaExpressionEditorComposite_BackCompatibilitySection);
    Composite composite = new Composite(backCompatibilitySection, SWT.NONE);
    composite.setLayout(new GridLayout(2, false));
    Label lbl1 = new Label(composite, SWT.NONE);
    lbl1.setText(Messages.JavaExpressionEditorComposite_ValueClassMessage); 
    GridData gd = new GridData(GridData.FILL_HORIZONTAL);
    gd.horizontalSpan = 2;
    lbl1.setLayoutData(gd);

    valueType = new ClassType(composite, Messages.JavaExpressionEditorComposite_ClassTypeDialogTitle);
    valueType.addListener(new ModifyListener() {

        public void modifyText(ModifyEvent e) {
            valueClassName = valueType.getClassType();
        }
    });
    backCompatibilitySection.setClient(composite);
}
项目:mytourbook    文件:DialogQuickEdit.java   
/**
     * @param parent
     * @param title
     * @param isGrabVertical
     * @return
     */
    private Composite createSection(final Composite parent, final String title, final boolean isGrabVertical) {

        final Section section = _tk.createSection(parent, //
        //Section.TWISTIE |
//              Section.SHORT_TITLE_BAR
                Section.TITLE_BAR
        // | Section.DESCRIPTION
        // | Section.EXPANDED
        );

        section.setText(title);
        GridDataFactory.fillDefaults().grab(true, isGrabVertical).applyTo(section);

        final Composite sectionContainer = _tk.createComposite(section);
        section.setClient(sectionContainer);

//      section.addExpansionListener(new ExpansionAdapter() {
//          @Override
//          public void expansionStateChanged(final ExpansionEvent e) {
//              form.reflow(false);
//          }
//      });

        return sectionContainer;
    }
项目:OpenSPIFe    文件:DetailFormToolkit.java   
/**
 * Adds a standardized section to the form part. This is intended to give a unified look and feel to the forms parts.
 * 
 * @param parent
 *            component to contribute to
 * @param text
 *            title of the section
 * @param icon
 *            image to set in the section
 * @return Section object
 */
public static Section createSection(FormToolkit toolkit, Composite parent, String text, Image icon, int style) {
    style = style | (text == null ? ExpandableComposite.NO_TITLE : ExpandableComposite.TITLE_BAR);
    Section section = toolkit.createSection(parent, style);
    if (icon != null) {
        Label label = toolkit.createLabel(section, "");
        label.setImage(icon);
        section.setTextClient(label);
    }
    GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, false);
    layoutData.horizontalSpan = 2;
    layoutData.verticalIndent = 6;
    section.setLayoutData(layoutData);
    if (text != null) {
        section.setText(text);
    }
    return section;
}
项目:OpenSPIFe    文件:DetailFormToolkit.java   
public static Composite createSubSection(FormToolkit toolkit, Composite parent, EObject eObject, boolean hasLabel) {
    Composite subSection = null;
    IItemLabelProvider labelProvider = EMFUtils.adapt(eObject, IItemLabelProvider.class);
    if (labelProvider != null) {
        String text = labelProvider.getText(eObject);
        Image image = null;
        Object imageURL = labelProvider.getImage(eObject);
        if (imageURL != null) {
            try {
                image = ExtendedImageRegistry.getInstance().getImage(imageURL);
            } catch (Exception e) {
                Logger.getLogger(DetailFormToolkit.class).error("failed to get image", e);
            }
        }
        Section section = createSection(toolkit, parent, text, image);
        subSection = toolkit.createComposite(section);
        GridLayout layout = new GridLayout((hasLabel) ? 2 : 1, false);
        layout.verticalSpacing = 2;
        layout.horizontalSpacing = 10;
        subSection.setLayout(layout);
        section.setClient(subSection);
    }
    return subSection;
}
项目:OpenSPIFe    文件:EMFDetailFormPart.java   
public static Section createCategorySection(FormToolkit toolkit, Composite parent, String category, Image icon, boolean hasTwistie) {
    if (EMFDetailUtils.isCategoryHeaderHidden(category)) {
        category = null;
    }
    Section categorySection = DetailFormToolkit.createSection(toolkit, parent, category, icon, hasTwistie);
    categorySection.clientVerticalSpacing = 0;
    if ((parent.getLayout() instanceof RowLayout) || (parent.getLayout() instanceof ColumnLayout)) {
        categorySection.setLayoutData(null);
    }
    Composite categorySubSection = toolkit.createComposite(categorySection);
    GridLayout layout = new GridLayout(2, false);
    layout.marginHeight = 3;
    layout.verticalSpacing = 2;
    layout.horizontalSpacing = 10;
    categorySubSection.setLayout(layout);
    categorySection.setClient(categorySubSection);
    return categorySection;
}
项目:EASyProducer    文件:ConfigurationPage.java   
/**
 * Sole constructor for this class.
 * @param plp The {@link ProductLineProject} edited in this editor page.
 * @param parent The parent, holding this editor page
 */
public ConfigurationPage(ProductLineProject plp, Composite parent) {
    super(plp, "Product Configuration Editor", parent);
    GridData data = new GridData();
    data.heightHint = 600;
    setData(data);

    //Create Menus
    configHeaderMenu = new ConfigurationHeaderMenu(getContentPane(), plp, this);
    Composite filterSection = createSection("Filtering Options",
        "Filters are enabled/disabled by entering criteria",
        Section.TITLE_BAR | Section.TWISTIE | Section.DESCRIPTION, GridData.FILL_HORIZONTAL);
    GridLayout filterLayout = new GridLayout();
    filterLayout.numColumns = 6;
    filterLayout.marginWidth = 2;
    filterLayout.marginHeight = 2;
    filterSection.setLayout(filterLayout);
    filterMenu = new FilterMenu(filterSection, plp);

    //Create TreeTable
    configEditor = new ConfigurationTableEditor(plp.getConfiguration(), this);

    // Set IGUIContainer
    configHeaderMenu.setGUIConfiguration(configEditor);
    filterMenu.setGUIConfiguration(configEditor);
}
项目:EASyProducer    文件:ProjectConfigurationPage.java   
/**
 * Sole constructor for this class.
 * 
 * @param plp The ProductLineProject which will be edited
 * @param parent the parent control
 */
public ProjectConfigurationPage(ProductLineProject plp, Composite parent) {
    super(plp, EditorConstants.PROJECT_SETTINGS_PAGE, parent);
    plHeaderMenu = new ProductLineHeaderMenu(getContentPane(), plp, this);

    // The section will be folded
    Composite pnlAdvanced = createSection("Advanced Settings", "Advanced projects settings for this project"
        + " (will not be inherited to further product line members).",
        Section.TITLE_BAR | Section.TWISTIE | Section.DESCRIPTION, GridData.FILL_HORIZONTAL);
    GridLayout layout = new GridLayout();
    layout.numColumns = 2;
    pnlAdvanced.setLayout(layout);

    Composite pnlModelSelection = createSection("Model Selection", "Model settings for this project.", 
        GridData.FILL_HORIZONTAL);
    layout = new GridLayout();
    layout.numColumns = 3;
    pnlModelSelection.setLayout(layout);

    modelSelection = new ModelCombobox(pnlModelSelection, this.getProductLineProject(), this);

    reasonerSettings = new ReasonerSettings(pnlAdvanced, plp.getReasonerConfig(), this);

    // Specification whether debug information should be saved
    new EASyDebugInformationButton(pnlAdvanced, plp, this);
}
项目:XPagesExtensionLibrary    文件:XSPEditorUtil.java   
static public Section createSection(FormToolkit toolkit, Composite parent, String title, int hSpan, int vSpan) {

        Section section = toolkit.createSection(parent, Section.SHORT_TITLE_BAR);
        GridData osectionGridData = new GridData(SWT.FILL, SWT.BEGINNING, false, false);
        osectionGridData.horizontalSpan = hSpan;
        osectionGridData.verticalSpan = vSpan;
        osectionGridData.horizontalIndent = 5;
        section.setLayoutData(osectionGridData);
        section.setText(title);

        GridLayout osectionGL = new GridLayout(1, true);
        osectionGL.marginHeight = 0;
        osectionGL.marginWidth = 0;
        section.setLayout(osectionGL);

        return section;
    }
项目:XPagesExtensionLibrary    文件:XSPGenPage.java   
private void createBrowserOptions(Composite parent) {
    Section rtSection = XSPEditorUtil.createSection(toolkit, parent, "Rich Text Options", 1, 1); // $NLX-XSPGenPage.RichTextOptions-1$
    Composite rtDCP = XSPEditorUtil.createSectionChild(rtSection, 2);
    rtDCP.setLayoutData(new GridData(SWT.BEGINNING, SWT.FILL, false, false, 1, 1));
    Label lfLabel = XSPEditorUtil.createLabel(rtDCP, "Save links in:", 1); // $NLX-XSPGenPage.Savelinksin-1$
    lfLabel.setToolTipText("Defines how links should be saved in a Domino document"); // $NLX-XSPGenPage.DefineshowlinksshouldbesavedinaDo-1$
    Composite buttonHolder = new Composite(rtDCP, SWT.NONE);
    buttonHolder.setBackground(getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
    GridLayout gl = SWTLayoutUtils.createLayoutNoMarginDefaultSpacing(2);
    buttonHolder.setLayout(gl);
    buttonHolder.setLayoutData(new GridData(SWT.BEGINNING, SWT.FILL, false, false, 1, 1));
    XSPEditorUtil.createRadio(buttonHolder, LINK_SAVE_PROP, "Notes format", XSP_SAVE_USE_NOTES, "notesLinks", 1); //  $NON-NLS-2$ $NLX-XSPGenPage.Notesformat-1$
    XSPEditorUtil.createRadio(buttonHolder, LINK_SAVE_PROP, "Web format", XSP_SAVE_USE_WEB, "webLinks", 1); //  $NON-NLS-2$ $NLX-XSPGenPage.Webformat-1$

    rtSection.setClient(rtDCP);   
}
项目:XPagesExtensionLibrary    文件:ManifestHybridEditorPage.java   
private void createDaArea(Composite parent) {
    Section section = XSPEditorUtil.createSection(_toolkit, parent, "Directory Assistance", 1, 1); // $NLX-ManifestHybridEditorPage.DirectoryAssistance-1$
    Composite container = XSPEditorUtil.createSectionChild(section, 2);

    _daEnabledCheckbox = XSPEditorUtil.createCheckboxTF(container, "Enable directory assistance for authentication", "appDaEnabled", 2);  // $NON-NLS-2$ $NLX-ManifestHybridEditorPage.Enabledirectoryassistanceforauthe-1$ 
    _daEnabledCheckbox.setToolTipText(StringUtil.format("Enable to allow the runtime application server to use a Domino user directory on the remote server as follows:{0}to authenticate Internet users against the credentials in the directory,{0}to resolve users during NAMELookup calls,{0}to resolve members of groups when authorizing database access.", "\n")); // $NON-NLS-2$ $NLX-ManifestHybridEditorPage.Enabletoallowtheruntimeapplicatio-1$ 
    _daEnabledCheckbox.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent arg0) {
            refreshDaControlState();
        }
    });

    _domainNameLabel = XSPEditorUtil.createLabel(container, "Domain name:", 1); // $NLX-ManifestHybridEditorPage.Domainname-1$
    _domainNameLabel.setToolTipText("The domain name of a Domino directory on the remote server"); // $NLX-ManifestHybridEditorPage.ThedomainnameofaDominodirectoryon-1$
    _domainNameText = XSPEditorUtil.createText(container, "appDaDomain", 1, 0, 40); // $NON-NLS-1$

    _dominoDirLabel = XSPEditorUtil.createLabel(container, "Domino directory:", 1); // $NLX-ManifestHybridEditorPage.Dominodirectory-1$
    _dominoDirLabel.setToolTipText("The file name of a Domino directory on the remote server"); // $NLX-ManifestHybridEditorPage.ThefilenameofaDominodirectoryonth-1$
    _dominoDirText = XSPEditorUtil.createText(container, "appDaAddressBook", 1, 0, 1); // $NON-NLS-1$

    section.setClient(container);        
}
项目:XPagesExtensionLibrary    文件:ManifestEnvEditorPage.java   
private void createDebugArea(Composite parent) {
    Section section = XSPEditorUtil.createSection(_toolkit, parent, "Debug Environment Variables", 1, 1); // $NLX-ManifestEnvEditorPage.DebugEnvironmentVariables-1$
    Composite container = XSPEditorUtil.createSectionChild(section, 3);

    Button btn = XSPEditorUtil.createCheckboxTF(container, "Include XPages Toolbox", "appIncludeXPagesToolbox", 3); // $NON-NLS-2$ $NLX-ManifestEnvEditorPage.IncludeXPagesToolbox-1$
    btn.setToolTipText("APP_INCLUDE_XPAGES_TOOLBOX\nWhen enabled, the XPages Toolbox will be pushed along with your application to facilitate debugging.\nDisabled by default.");  // $NLX-ManifestEnvEditorPage.APP_INCLUDE_XPAGES_TOOLBOXnWhenen-1$

    btn = XSPEditorUtil.createCheckboxTF(container, "Verbose staging", "appVerboseStaging", 3); // $NON-NLS-2$ $NLX-ManifestEnvEditorPage.Verbosestaging-1$
    btn.setToolTipText("APP_VERBOSE_STAGING\nWhen enabled, the command-line interface (CLI) will show full logging details when staging your application.\nDisabled by default."); // $NLX-ManifestEnvEditorPage.APP_VERBOSE_STAGINGnWhenenabledth-1$

    btn = XSPEditorUtil.createCheckboxTF(container, "Debug staging", "appDebugStaging", 3); // $NON-NLS-2$ $NLX-ManifestEnvEditorPage.Debugstaging-1$ 
    btn.setToolTipText("APP_DEBUG_STAGING\nWhen enabled, detailed debug information generated during application staging will be collected into\nthe console log file in the IBM_TECHNICAL_SUPPORT directory.\nDisabled by default."); // $NLX-ManifestEnvEditorPage.APP_DEBUG_STAGINGnWhenenableddeta-1$

    btn = XSPEditorUtil.createCheckboxTF(container, "Debug threads", "appDebugThreads", 3); // $NON-NLS-2$ $NLX-ManifestEnvEditorPage.Debugthreads-1$ 
    btn.setToolTipText("APP_DEBUG_THREADS\nWhen enabled, detailed thread request and response information will be collected into separate thread\nlog files in the IBM_TECHNICAL_SUPPORT directory.\nDisabled by default."); // $NLX-ManifestEnvEditorPage.APP_DEBUG_THREADSnWhenenableddeta-1$

    btn = XSPEditorUtil.createCheckboxTF(container, "Debug directory assistance", "appDebugDa", 3); // $NON-NLS-2$ $NLX-ManifestEnvEditorPage.Debugdirectoryassistance-1$ 
    btn.setToolTipText("APP_DEBUG_DIRECTORY_ASSISTANCE\nWhen enabled, detailed directory assistance debug information will be collected into\nthe console log file in the IBM_TECHNICAL_SUPPORT directory.\nDisabled by default."); // $NLX-ManifestEnvEditorPage.APP_DEBUG_DIRECTORY_ASSISTANCEnWh-1$

    btn = XSPEditorUtil.createCheckboxTF(container, "Debug name lookup", "appDebugNameLookup", 3); // $NON-NLS-2$ $NLX-ManifestEnvEditorPage.Debugnamelookup-1$ 
    btn.setToolTipText("APP_DEBUG_NAMELOOKUP\nWhen enabled, detailed name lookup information will be collected into the console log file in\nthe IBM_TECHNICAL_SUPPORT directory.\nDisabled by default."); // $NLX-ManifestEnvEditorPage.APP_DEBUG_NAMELOOKUPnWhenenabledd-1$

    section.setClient(container);        
}
项目:thym    文件:EssentialsPage.java   
private void createPluginsSection(Composite parent) {
    Section sctnPlugins = createSection(parent, "Plug-ins");
    sctnPlugins.setLayout(FormUtils.createClearTableWrapLayout(false, 1));
    TableWrapData data = new TableWrapData(TableWrapData.FILL_GRAB);
    sctnPlugins.setLayoutData(data);

    FormText text = formToolkit.createFormText(sctnPlugins, true);
    ImageDescriptor idesc = HybridUI.getImageDescriptor(HybridUI.PLUGIN_ID, "/icons/etool16/cordovaplug_wiz.png");
    text.setImage("plugin", idesc.createImage());

    text.setText(PLUGINS_SECTION_CONTENT, true, false);

    sctnPlugins.setClient(text);
    text.addHyperlinkListener(this);

}