本文整理匯總了Java中org.eclipse.ui.forms.widgets.Section.setText方法的典型用法代碼示例。如果您正苦於以下問題:Java Section.setText方法的具體用法?Java Section.setText怎麽用?Java Section.setText使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.ui.forms.widgets.Section
的用法示例。
在下文中一共展示了Section.setText方法的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);
}
示例2: 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"));
}
示例3: 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);
}
示例4: 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);
}
示例5: 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);
}
示例6: 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);
}
示例7: createSection
import org.eclipse.ui.forms.widgets.Section; //導入方法依賴的package包/類
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();
}
示例8: 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_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);
}
示例9: 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_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);
}
示例10: createSection
import org.eclipse.ui.forms.widgets.Section; //導入方法依賴的package包/類
/**
* 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;
}
示例11: createPartControl
import org.eclipse.ui.forms.widgets.Section; //導入方法依賴的package包/類
/**
* Create contents of the editor part.
* @param parent
*/
@Override
public void createPartControl(Composite parent) {
FormToolkit toolkit = new FormToolkit(parent.getDisplay());
ScrolledForm form = toolkit.createScrolledForm(parent);
form.setText("Analyser");
form.getBody().setLayout(new FillLayout(SWT.HORIZONTAL));
// Creating the Screen
Section section = toolkit.createSection(form.getBody(), Section.DESCRIPTION
| Section.TITLE_BAR);
section.setText("Section 1 for demonstration"); //$NON-NLS-1$
section.setDescription("This demonstrates the usage of section");
// Composite for storing the data
Composite client = toolkit.createComposite(section, SWT.WRAP);
toolkit.paintBordersFor(client);
section.setClient(client);
// Lets make a layout for the first section of the screen
GridLayout layout = new GridLayout();
layout.numColumns = 1;
layout.marginWidth = 2;
layout.marginHeight = 2;
}
示例12: createSection
import org.eclipse.ui.forms.widgets.Section; //導入方法依賴的package包/類
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;
}
示例13: createPartControl
import org.eclipse.ui.forms.widgets.Section; //導入方法依賴的package包/類
/**
* Create contents of the editor part.
* @param parent
*/
@Override
public void createPartControl(Composite parent) {
FormToolkit toolkit = new FormToolkit(parent.getDisplay());
ScrolledForm form = toolkit.createScrolledForm(parent);
form.setText("Spotter");
form.getBody().setLayout(new FillLayout(SWT.HORIZONTAL));
// Creating the Screen
Section section = toolkit.createSection(form.getBody(), Section.DESCRIPTION
| Section.TITLE_BAR);
section.setText("Section 1 for demonstration"); //$NON-NLS-1$
section.setDescription("This demonstrates the usage of section");
// Composite for storing the data
Composite client = toolkit.createComposite(section, SWT.WRAP);
toolkit.paintBordersFor(client);
section.setClient(client);
// Lets make a layout for the first section of the screen
GridLayout layout = new GridLayout();
layout.numColumns = 1;
layout.marginWidth = 2;
layout.marginHeight = 2;
}
示例14: createGeneralInformation
import org.eclipse.ui.forms.widgets.Section; //導入方法依賴的package包/類
protected void createGeneralInformation() {
Section generalInformation = toolkit.createSection(form.getBody(), ExpandableComposite.TITLE_BAR | Section.DESCRIPTION);
generalInformation.setText(EditorMessages.getString("ApexMetadataFormPage.GeneralInformationSection")); //$NON-NLS-1$
generalInformation.setDescription(EditorMessages
.getString("ApexMetadataFormPage.GeneralInformationSection.Description")); //$NON-NLS-1$
Composite sectionClient = toolkit.createComposite(generalInformation);
sectionClient.setLayout(new GridLayout(2, false));
// Label
labelText = new TextFieldWidget(toolkit, "Label", "");
labelText.addTo(sectionClient);
// Description
descriptionText = new TextFieldWidget(toolkit, "Description", "");
descriptionText.addTo(sectionClient);
// Api Version
apiText = new TextFieldWidget(toolkit, EditorMessages.getString("ApexMetadataFormPage.APIVersionLabel"), "0.0"); //$NON-NLS-1$ //$NON-NLS-2$
apiText.addTo(sectionClient);
generalInformation.setClient(sectionClient);
}
示例15: createClient
import org.eclipse.ui.forms.widgets.Section; //導入方法依賴的package包/類
protected void createClient(Section section, FormToolkit toolkit) {
section.setText("Configurations"); //$NON-NLS-1$
String desc = "This section describe the configurations defined in your project";
section.setDescription(desc);
Composite client = toolkit.createComposite(section);
TableWrapLayout layout = new TableWrapLayout();
layout.rightMargin = toolkit.getBorderStyle() != SWT.NULL ? 0 : 2;
layout.leftMargin = layout.rightMargin;
layout.numColumns = NUM_COLUMNS;
client.setLayout(layout);
toolkit.paintBordersFor(client);
section.setClient(client);
TableWrapData td = new TableWrapData(TableWrapData.FILL_GRAB);
td.colspan = 2;
section.setLayoutData(td);
}