当前位置: 首页>>代码示例>>Java>>正文


Java Section类代码示例

本文整理汇总了Java中org.eclipse.ui.forms.widgets.Section的典型用法代码示例。如果您正苦于以下问题:Java Section类的具体用法?Java Section怎么用?Java Section使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Section类属于org.eclipse.ui.forms.widgets包,在下文中一共展示了Section类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createClient

import org.eclipse.ui.forms.widgets.Section; //导入依赖的package包/类
/**
 * @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);
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:22,代码来源:OverviewDocumentSection.java

示例2: createTableSection

import org.eclipse.ui.forms.widgets.Section; //导入依赖的package包/类
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;
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:20,代码来源:DataModelFormPage.java

示例3: initFromModelInternal

import org.eclipse.ui.forms.widgets.Section; //导入依赖的package包/类
@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);
    }
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:21,代码来源:ZooKeeperConnectionModelMainFormPage.java

示例4: initFromModelInternal

import org.eclipse.ui.forms.widgets.Section; //导入依赖的package包/类
@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);
    }
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:27,代码来源:JmxConnectionModelMainFormPage.java

示例5: initFromModelInternal

import org.eclipse.ui.forms.widgets.Section; //导入依赖的package包/类
@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);
    }
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:26,代码来源:BaseJmxModelMainFormPage.java

示例6: createDetailSection

import org.eclipse.ui.forms.widgets.Section; //导入依赖的package包/类
@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;
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:21,代码来源:MBeanFeatureModeMainFormPage.java

示例7: calculateMarginWidth

import org.eclipse.ui.forms.widgets.Section; //导入依赖的package包/类
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;
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:20,代码来源:TeamExplorerResizeListener.java

示例8: createSection

import org.eclipse.ui.forms.widgets.Section; //导入依赖的package包/类
/**
 * @see org.yakindu.sct.editor.sgen.extensions.IFeatureConfigurationSection#getSection()
 */
@Override
public Section createSection(final FormToolkit toolkit, final Composite parent) {
	this.section = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE);
	this.section.setText(convertCamelCaseName(getFeatureType().getName(), !getFeatureType().isOptional()));
	this.section.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.FILL_GRAB));

	final Composite composite = toolkit.createComposite(this.section);
	final TableWrapLayout layout = new TableWrapLayout();
	layout.numColumns = 2;
	composite.setLayout(layout);

	for (final FeatureParameter parameter : getFeatureType().getParameters()) {
		final Control control = createParameterControl(toolkit, composite, parameter);
		this.controls.put(parameter, control);
	}

	this.section.setClient(composite);

	return this.section;
}
 
开发者ID:wendehals,项目名称:arduino_sct_tools,代码行数:24,代码来源:GenericFeatureConfigurationSection.java

示例9: createGeneralInformationSection

import org.eclipse.ui.forms.widgets.Section; //导入依赖的package包/类
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"));

}
 
开发者ID:angelozerr,项目名称:angular-eclipse,代码行数:17,代码来源:OverviewPage.java

示例10: createCountDownSection

import org.eclipse.ui.forms.widgets.Section; //导入依赖的package包/类
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);
}
 
开发者ID:NineWorlds,项目名称:xstreamer,代码行数:18,代码来源:CountDownTimerPage.java

示例11: createPlayerSection

import org.eclipse.ui.forms.widgets.Section; //导入依赖的package包/类
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);
}
 
开发者ID:NineWorlds,项目名称:xstreamer,代码行数:24,代码来源:GeneralFormPage.java

示例12: createScoringSection

import org.eclipse.ui.forms.widgets.Section; //导入依赖的package包/类
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);
}
 
开发者ID:NineWorlds,项目名称:xstreamer,代码行数:24,代码来源:GeneralFormPage.java

示例13: createMapSection

import org.eclipse.ui.forms.widgets.Section; //导入依赖的package包/类
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);
}
 
开发者ID:NineWorlds,项目名称:xstreamer,代码行数:26,代码来源:MapsFormPage.java

示例14: TraceExplorerComposite

import org.eclipse.ui.forms.widgets.Section; //导入依赖的package包/类
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);
}
 
开发者ID:tlaplus,项目名称:tlaplus,代码行数:23,代码来源:TraceExplorerComposite.java

示例15: enableSection

import org.eclipse.ui.forms.widgets.Section; //导入依赖的package包/类
/**
 * 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);
        }
    }
}
 
开发者ID:tlaplus,项目名称:tlaplus,代码行数:25,代码来源:DataBindingManager.java


注:本文中的org.eclipse.ui.forms.widgets.Section类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。