本文整理汇总了Java中org.eclipse.ui.forms.widgets.ExpandableComposite.setText方法的典型用法代码示例。如果您正苦于以下问题:Java ExpandableComposite.setText方法的具体用法?Java ExpandableComposite.setText怎么用?Java ExpandableComposite.setText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.ui.forms.widgets.ExpandableComposite
的用法示例。
在下文中一共展示了ExpandableComposite.setText方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initAdditionalParametersUi
import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
private void initAdditionalParametersUi() {
ExpandableComposite exp = new ExpandableComposite(this, ExpandableComposite.COMPACT);
exp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
additonalParameters = new Text(exp, SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
additonalParameters.setLayoutData(new GridData(GridData.FILL_BOTH));
additonalParameters.setToolTipText("Advanced parameters for Text2Image - use key=value format in each line!");
// advancedParameters.setText("hyphen=null\n");
// advancedPropertiesTable = buildPropertyTable(exp, true);
exp.setClient(additonalParameters);
exp.setText("Additional Parameters");
// Fonts.setBoldFont(exp);
exp.setExpanded(true);
exp.addExpansionListener(new ExpansionAdapter() {
public void expansionStateChanged(ExpansionEvent e) {
layout();
}
});
}
示例2: initRecogTools
import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
private void initRecogTools() {
ExpandableComposite exp = new ExpandableComposite(this, ExpandableComposite.COMPACT);
exp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
trComp = new TextRecognitionComposite(exp, 0);
trComp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1));
exp.setClient(trComp);
exp.setText("Text Recognition");
Fonts.setBoldFont(exp);
exp.setExpanded(true);
exp.addExpansionListener(new ExpansionAdapter() {
public void expansionStateChanged(ExpansionEvent e) {
layout();
}
});
}
示例3: createStyleSection
import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
protected ExpandableComposite createStyleSection(Composite parent, String label, int nColumns) {
ExpandableComposite excomposite = new ExpandableComposite(parent, SWT.NONE,
ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT);
excomposite.setText(label);
excomposite.setExpanded(false);
excomposite.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
excomposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, nColumns, 1));
excomposite.addExpansionListener(new ExpansionAdapter() {
public void expansionStateChanged(ExpansionEvent e) {
expandedStateChanged((ExpandableComposite) e.getSource());
}
});
fExpandedComposites.add(excomposite);
makeScrollableCompositeAware(excomposite);
return excomposite;
}
示例4: createStyleSection
import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
protected ExpandableComposite createStyleSection(Composite parent, String label, int nColumns) {
ExpandableComposite excomposite = new ExpandableComposite(parent, SWT.NONE, ExpandableComposite.TWISTIE
| ExpandableComposite.CLIENT_INDENT);
excomposite.setText(label);
excomposite.setExpanded(false);
excomposite.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
excomposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, nColumns, 1));
excomposite.addExpansionListener(new ExpansionAdapter() {
@Override
public void expansionStateChanged(ExpansionEvent e) {
expandedStateChanged((ExpandableComposite) e.getSource());
}
});
expandedComposites.add(excomposite);
makeScrollableCompositeAware(excomposite);
return excomposite;
}
示例5: createProblemCategory
import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
private Composite createProblemCategory(Composite parent, String label) {
// Expandable panel for each category of problems
ExpandableComposite expandPanel = new ExpandableComposite(parent, SWT.NONE,
ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT);
expandPanel.setText(label);
expandPanel.setExpanded(false);
expandPanel.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
expandPanel.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
expandPanel.addExpansionListener(new ExpansionAdapter() {
@Override
public void expansionStateChanged(ExpansionEvent e) {
topPanel.layout(true, true);
scrollPanel.setMinSize(topPanel.computeSize(SWT.DEFAULT, SWT.DEFAULT));
}
});
// Create panel to store the actual problems
Composite categoryPanel = new Composite(expandPanel, SWT.NONE);
categoryPanel.setLayout(new GridLayout(2, false));
expandPanel.setClient(categoryPanel);
return categoryPanel;
}
示例6: createDiffViewer
import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
/**
* Creates an individual diff viewer in the given composite.
*/
private void createDiffViewer(final FormToolkit toolkit, Composite composite,
final TaskAttribute diffTaskAttribute) {
int style = ExpandableComposite.TREE_NODE | ExpandableComposite.LEFT_TEXT_CLIENT_ALIGNMENT
| ExpandableComposite.COMPACT;
ExpandableComposite diffComposite = toolkit.createExpandableComposite(composite, style);
diffComposite.clientVerticalSpacing = 0;
diffComposite.setLayout(new GridLayout());
diffComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
diffComposite.setTitleBarForeground(toolkit.getColors().getColor(IFormColors.TITLE));
diffComposite.setText(calculateDiffChangeHeader(diffTaskAttribute));
final Composite diffViewerComposite = toolkit.createComposite(diffComposite);
diffComposite.setClient(diffViewerComposite);
diffViewerComposite.setLayout(
new FillWidthLayout(EditorUtil.getLayoutAdvisor(getTaskEditorPage()), 15, 0, 0, 3));
diffComposite.addExpansionListener(new ExpansionAdapter() {
@Override
public void expansionStateChanged(ExpansionEvent event) {
expandCollapseDiff(toolkit, diffViewerComposite, diffTaskAttribute, event.getState());
}
});
GridDataFactory.fillDefaults().grab(true, false).applyTo(diffComposite);
}
示例7: createStyleSection
import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
protected ExpandableComposite createStyleSection(Composite parent, String label, int nColumns, Key key) {
ExpandableComposite excomposite= new ExpandableComposite(parent, SWT.NONE, ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT);
excomposite.setText(label);
if (key != null) {
excomposite.setData(key);
}
excomposite.setExpanded(false);
excomposite.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
excomposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, nColumns, 1));
excomposite.addExpansionListener(new ExpansionAdapter() {
@Override
public void expansionStateChanged(ExpansionEvent e) {
expandedStateChanged((ExpandableComposite) e.getSource());
}
});
fExpandableComposites.add(excomposite);
makeScrollableCompositeAware(excomposite);
return excomposite;
}
示例8: createSecondSection
import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
private void createSecondSection( ScrolledForm form, FormToolkit toolkit) {
ExpandableComposite ec = toolkit.createExpandableComposite(form.getBody(),
ExpandableComposite.TREE_NODE|
ExpandableComposite.CLIENT_INDENT);
ec.setText("Expandable Composite title");
String ctext = "We will now create a somewhat long text so that "+
"we can use it as content for the expandable composite. "+
"Expandable composite is used to hide or show the text using the " +
"toggle control";
Label client = toolkit.createLabel(ec, ctext, SWT.WRAP);
ec.setClient(client);
TableWrapData td = new TableWrapData();
td.colspan = 2;
ec.setLayoutData(td);
ec.addExpansionListener(new ExpansionAdapter() {
@Override
public void expansionStateChanged(ExpansionEvent e) {
form.reflow(true);
}
});
}
示例9: createExpandableComposite
import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
private void createExpandableComposite() {
expandableComposite = new ExpandableComposite(this, SWT.NONE, ExpandableComposite.TWISTIE);
FontUtil.convertFontToBold(expandableComposite);
expandableComposite.setText(Messages.getString("settings.advanced"));
expandableComposite.setExpanded(false);
GridData gridData = new GridData(SWT.FILL, SWT.CENTER, true, false);
gridData.horizontalSpan = 2;
expandableComposite.setLayoutData(gridData);
formToolkit.adapt(expandableComposite, true, true);
}
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:12,代码来源:AppEngineDeployPreferencesPanel.java
示例10: optionsTypeSection
import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
private ExpandableComposite optionsTypeSection(PipelineLaunchConfiguration launchConfiguration,
String optionsTypeName, Collection<String> optionsTypeProperties,
Map<String, Optional<String>> optionsDescriptions, int style) {
ExpandableComposite expandable = formToolkit.createSection(form.getBody(), style);
expandable.setLayout(new GridLayout());
expandable.setBackground(parent.getBackground());
expandable.setForeground(parent.getForeground());
expandable.setText(optionsTypeName);
expandable.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
LabeledTextMapComponent typeArgs = new LabeledTextMapComponent(formToolkit, expandable,
new GridData(SWT.FILL, SWT.CENTER, true, false), argumentSeparator);
for (ModifyListener modifyListener : modifyListeners) {
typeArgs.addModifyListener(modifyListener);
}
for (IExpansionListener expandListener : expansionListeners) {
expandable.addExpansionListener(expandListener);
}
for (String property : optionsTypeProperties) {
typeArgs.addLabeledText(property, optionsDescriptions.get(property));
}
optionsComponents.put(expandable, typeArgs);
expandable.setClient(typeArgs.getControl());
typeArgs.setTextValuesForExistingLabels(launchConfiguration.getArgumentValues());
return expandable;
}
示例11: initWerGroup
import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
private void initWerGroup() {
ExpandableComposite werExp = new ExpandableComposite(this, ExpandableComposite.COMPACT);
Composite werGroup = new Composite(werExp, SWT.SHADOW_ETCHED_IN);
werGroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
// metadatagroup.setText("Document metadata");
werGroup.setLayout(new GridLayout(2, false));
Label refLabel = new Label(werGroup, 0);
refLabel.setText("Reference:");
refVersionCombo = new Combo(werGroup, SWT.READ_ONLY);
Label hypLabel = new Label(werGroup, 0);
hypLabel.setText("Hypothesis:");
hypVersionCombo = new Combo(werGroup, SWT.READ_ONLY);
Label emptyLabel = new Label(werGroup,0);
computeWerBtn = new Button(werGroup, SWT.PUSH);
computeWerBtn.setText("Compare");
computeWerBtn.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1));
computeWerBtn.setToolTipText("Compares the two selected transcripts and computes word error rate and character error rate.");
computeWerBtn.pack();
werExp.setClient(werGroup);
werExp.setText("Compute WER");
werExp.setExpanded(true);
werExp.addExpansionListener(new ExpansionAdapter() {
public void expansionStateChanged(ExpansionEvent e) {
layout();
}
});
}
示例12: postInitExpandable
import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
private void postInitExpandable(ExpandableComposite exp, Composite c, String title) {
exp.setClient(c);
exp.setText("OCR");
exp.setExpanded(true);
exp.addExpansionListener(new ExpansionAdapter() {
public void expansionStateChanged(ExpansionEvent e) {
layout();
}
});
}
示例13: configExpandable
import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
private void configExpandable(ExpandableComposite exp, Composite client, String text, final Composite container, boolean expand) {
exp.setClient(client);
exp.setText(text);
exp.addExpansionListener(new ExpansionAdapter() {
public void expansionStateChanged(ExpansionEvent e) {
container.layout();
}
});
exp.setExpanded(expand);
}
示例14: initOtherTools
import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
private void initOtherTools() {
ExpandableComposite exp = new ExpandableComposite(this, ExpandableComposite.COMPACT);
exp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Composite c = new Composite(exp, SWT.SHADOW_ETCHED_IN);
c.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
c.setLayout(new GridLayout(1, true));
otherToolsPagesSelector = new CurrentTranscriptOrCurrentDocPagesSelector(c, SWT.NONE, true);
otherToolsPagesSelector.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
polygon2baselinesBtn = new Button(c, SWT.PUSH);
polygon2baselinesBtn.setText("Add Baselines to Polygons");
polygon2baselinesBtn.setToolTipText("Creates baselines for all surrounding polygons - warning: existing baselines will be lost (text is retained however!)");
polygon2baselinesBtn.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
baseline2PolygonBtn = new Button(c, SWT.PUSH);
baseline2PolygonBtn.setText("Add Polygons to Baselines");
baseline2PolygonBtn.setToolTipText("Creates polygons for all baselines - warning: existing polygons will be lost (text is retained however!)");
baseline2PolygonBtn.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
exp.setClient(c);
new Label(c, SWT.NONE);
exp.setText("Other Tools");
Fonts.setBoldFont(exp);
exp.setExpanded(true);
exp.addExpansionListener(new ExpansionAdapter() {
public void expansionStateChanged(ExpansionEvent e) {
layout();
}
});
}
示例15: initWerGroup
import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
private void initWerGroup() {
werExp = new ExpandableComposite(this, ExpandableComposite.COMPACT);
werExp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
werGroup = new Composite(werExp, SWT.SHADOW_ETCHED_IN);
werGroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
// metadatagroup.setText("Document metadata");
werGroup.setLayout(new GridLayout(2, false));
refVersionChooser = new TranscriptVersionChooser("Reference:\n(Correct Text) ", werGroup, 0);
refVersionChooser.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
hypVersionChooser = new TranscriptVersionChooser("Hypothesis:\n(HTR Text) ", werGroup, 0);
hypVersionChooser.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
Label emptyLabel = new Label(werGroup,0);
computeWerBtn = new Button(werGroup, SWT.PUSH);
computeWerBtn.setText("Compare");
computeWerBtn.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, true, 2, 1));
computeWerBtn.setToolTipText("Compares the two selected transcripts and computes word error rate and character error rate.");
// computeWerBtn.pack();
compareVersionsBtn = new Button(werGroup, SWT.PUSH);
compareVersionsBtn.setText("Compare Versions in Textfile");
compareVersionsBtn.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, true, 2, 1));
compareVersionsBtn.setToolTipText("Shows the difference of the two selected versions");
werExp.setClient(werGroup);
werExp.setText("Compute Accuracy");
Fonts.setBoldFont(werExp);
werExp.setExpanded(true);
werExp.addExpansionListener(new ExpansionAdapter() {
public void expansionStateChanged(ExpansionEvent e) {
layout();
}
});
}