當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。