本文整理匯總了Java中org.eclipse.swt.custom.CTabItem.setControl方法的典型用法代碼示例。如果您正苦於以下問題:Java CTabItem.setControl方法的具體用法?Java CTabItem.setControl怎麽用?Java CTabItem.setControl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.swt.custom.CTabItem
的用法示例。
在下文中一共展示了CTabItem.setControl方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createTabFolder
import org.eclipse.swt.custom.CTabItem; //導入方法依賴的package包/類
private void createTabFolder ( final Composite parent )
{
this.tabFolder = new CTabFolder ( parent, SWT.TOP );
this.tabFolder.setLayoutData ( new GridData ( GridData.FILL, GridData.FILL, true, true ) );
for ( final GeneratorPageInformation page : this.pages )
{
final CTabItem tabItem = new CTabItem ( this.tabFolder, SWT.NONE );
final Composite tabComposite = new Composite ( this.tabFolder, SWT.NONE );
tabComposite.setLayout ( new FillLayout () );
page.getGeneratorPage ().createPage ( tabComposite );
tabItem.setText ( page.getLabel () );
tabItem.setControl ( tabComposite );
page.getGeneratorPage ().setTarget ( this );
}
this.tabFolder.setSelection ( 0 );
}
示例2: DiskInfoTab
import org.eclipse.swt.custom.CTabItem; //導入方法依賴的package包/類
/**
* Create the DISK INFO tab.
*/
public DiskInfoTab(CTabFolder tabFolder, FormattedDisk[] disks) {
this.formattedDisks = disks;
CTabItem ctabitem = new CTabItem(tabFolder, SWT.NULL);
ctabitem.setText(textBundle.get("DiskInfoTab.Title")); //$NON-NLS-1$
tabFolder.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
getInfoTable().removeAll();
buildDiskInfoTable(getFormattedDisk(0)); // FIXME!
}
});
ScrolledComposite scrolledComposite = new ScrolledComposite(
tabFolder, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
scrolledComposite.setExpandHorizontal(true);
scrolledComposite.setExpandVertical(true);
ctabitem.setControl(scrolledComposite);
composite = new Composite(scrolledComposite, SWT.NONE);
createDiskInfoTable();
if (disks.length > 1) {
RowLayout layout = new RowLayout(SWT.VERTICAL);
layout.wrap = false;
composite.setLayout(layout);
for (int i=0; i<disks.length; i++) {
Label label = new Label(composite, SWT.NULL);
label.setText(disks[i].getDiskName());
buildDiskInfoTable(disks[i]);
}
} else {
composite.setLayout(new FillLayout());
buildDiskInfoTable(disks[0]);
}
composite.pack();
scrolledComposite.setContent(composite);
scrolledComposite.setMinSize(
composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
}
示例3: addNewNoteTab
import org.eclipse.swt.custom.CTabItem; //導入方法依賴的package包/類
/**
* Adds a new note to the view.
*
* @param title
* @param text
* @param style
* @param editable
* @param noteBullets
*/
private void addNewNoteTab(String title, String text, String style, boolean editable, String bullets) {
CTabItem tab = new CTabItem(tabFolder, SWT.NONE);
tab.setText(title);
// Add listener to clean up corresponding note when disposing the tab.
tab.addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent event) {
CTabItem itemToDispose = (CTabItem) event.getSource();
((Note) itemToDispose.getControl()).dispose();
}
});
Note note = new Note(tabFolder, text, editable);
// Style can be null if new note.
if (style != null && !style.isEmpty()) {
note.deserialiseStyle(style);
}
// Bullets can be null if new note or upgrading from old plugin version.
if (bullets != null && !bullets.isEmpty()) {
note.deserialiseBullets(bullets);
}
tab.setControl(note);
}
示例4: LayoutGeneral
import org.eclipse.swt.custom.CTabItem; //導入方法依賴的package包/類
/**
* Creates the Complete General Tab
* @param parent The Parent Folder
* @param meta The Meta Include for this Project
* @param props The PropsUI from the Kettle Project
* @param fieldNames The FieldNames from the Previous Step
*/
public LayoutGeneral(final CTabFolder parent, ARXPluginMeta meta, final PropsUI props, String[] fieldNames) {
this.meta = meta;
this.props = props;
this.fieldNames = fieldNames;
composites = new LayoutCompositeInterface[2];
CTabItem tabGeneral = new CTabItem(parent, SWT.NONE);
tabGeneral.setText(Resources.getMessage("General.2"));
ScrolledComposite scroller = new ScrolledComposite(parent, SWT.V_SCROLL | SWT.H_SCROLL);
this.build(scroller);
tabGeneral.setControl(scroller);
{
}
}
示例5: createKwTab
import org.eclipse.swt.custom.CTabItem; //導入方法依賴的package包/類
private void createKwTab(TrpKeyWord k) {
CTabItem item = new CTabItem(folder, SWT.NONE);
item.setText("\"" + k.getKeyWord() + "\" (" + k.getHits().size() + " hits)");
Composite c = new Composite(folder, SWT.NONE);
c.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
c.setLayout(new GridLayout(1, false));
KwsHitTableWidget hitTableWidget = new KwsHitTableWidget(c, SWT.BORDER, icons);
hitTableWidget.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
hitTableWidget.getTableViewer().setInput(k.getHits());
tvList.add(hitTableWidget.getTableViewer());
addHoverListeners(hitTableWidget.getTableViewer().getTable());
item.setControl(c);
addDoubleClickListener(hitTableWidget.getTableViewer());
}
示例6: createByUser
import org.eclipse.swt.custom.CTabItem; //導入方法依賴的package包/類
private void createByUser(CTabFolder tabFolder) {
CTabItem bptab = new CTabItem(tabFolder, SWT.NONE);
bptab.setText(Messages.PermissionPage_5);
scUser = new ScrolledComposite(tabFolder, SWT.H_SCROLL | SWT.V_SCROLL);
scUser.setLayoutData(new GridData(GridData.FILL_BOTH));
cmpUser = new Composite(scUser, SWT.NONE);
cmpUser.setLayout(new GridLayout(2, true));
scUser.setContent(cmpUser);
// Set the minimum size
scUser.setMinSize(cmpUser.computeSize(SWT.DEFAULT, SWT.DEFAULT).x, cmpUser.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
// Expand both horizontally and vertically
scUser.setExpandHorizontal(true);
scUser.setExpandVertical(true);
bptab.setControl(scUser);
}
示例7: createDialogArea
import org.eclipse.swt.custom.CTabItem; //導入方法依賴的package包/類
@Override
protected Control createDialogArea(Composite parent) {
Composite container = (Composite) super.createDialogArea(parent);
container.setLayout(new FillLayout());
CTabFolder folder = new CTabFolder(parent, SWT.BORDER);
for (SimulationTimeSeries serie : result.getCollectedData()) {
CTabItem item = new CTabItem(folder, SWT.CLOSE);
item.setText(serie.getName());
Composite composite = new Composite(folder, SWT.NONE);
composite.setLayout(new FillLayout());
TableViewer resultViewer = new TableViewer(composite, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
resultViewer.setContentProvider(ArrayContentProvider.getInstance());
resultViewer.setInput(new LinkedList<>());
item.setControl(composite);
}
return container;
}
示例8: createTabPageHB
import org.eclipse.swt.custom.CTabItem; //導入方法依賴的package包/類
private void createTabPageHB(CTabFolder tabFolder) {
CTabItem ptab = new CTabItem(tabFolder, SWT.NONE);
ptab.setText(Messages.HTMLExporterPreferencePage_28);
Composite sc = new Composite(tabFolder, SWT.NONE);
sc.setLayout(new GridLayout());
TextFieldEditor se = new TextFieldEditor(HtmlExporterConfiguration.PROPERTY_HTML_HEADER,
Messages.HTMLExporterPreferencePage_29, sc);
se.getTextControl(sc).setLayoutData(new GridData(GridData.FILL_BOTH));
addField(se);
TextFieldEditor scf = new TextFieldEditor(HtmlExporterConfiguration.PROPERTY_HTML_FOOTER,
Messages.HTMLExporterPreferencePage_30, sc);
scf.getTextControl(sc).setLayoutData(new GridData(GridData.FILL_BOTH));
addField(scf);
ptab.setControl(sc);
}
示例9: createJExcelAPI
import org.eclipse.swt.custom.CTabItem; //導入方法依賴的package包/類
private void createJExcelAPI(CTabFolder tabFolder) {
CTabItem ptab = new CTabItem(tabFolder, SWT.NONE);
ptab.setText(Messages.ExcelExporterPreferencePage_60);
ScrolledComposite scompo = new ScrolledComposite(tabFolder, SWT.V_SCROLL | SWT.H_SCROLL);
scompo.setExpandHorizontal(true);
scompo.setExpandVertical(true);
Composite sc = new Composite(scompo, SWT.NONE);
sc.setLayout(new GridLayout(3, false));
BooleanFieldEditor bf = new BooleanFieldEditor(XlsExporterConfiguration.PROPERTY_CREATE_CUSTOM_PALETTE,
Messages.ExcelExporterPreferencePage_61, sc);
addField(bf);
HelpSystem.setHelp(bf.getDescriptionControl(sc), StudioPreferencePage.REFERENCE_PREFIX + bf.getPreferenceName());
addField(new BooleanFieldEditor(JxlExporterConfiguration.PROPERTY_USE_TEMP_FILE,
Messages.ExcelExporterPreferencePage_62, sc));
addField(new BooleanFieldEditor(JxlReportConfiguration.PROPERTY_COMPLEX_FORMAT,
Messages.ExcelExporterPreferencePage_63, sc));
scompo.setMinSize(sc.getSize());
scompo.setContent(sc);
ptab.setControl(scompo);
}
示例10: createByRole
import org.eclipse.swt.custom.CTabItem; //導入方法依賴的package包/類
private void createByRole(CTabFolder tabFolder) {
CTabItem bptab = new CTabItem(tabFolder, SWT.NONE);
bptab.setText(Messages.PermissionPage_6);
scRole = new ScrolledComposite(tabFolder, SWT.H_SCROLL | SWT.V_SCROLL);
scRole.setLayoutData(new GridData(GridData.FILL_BOTH));
cmpRole = new Composite(scRole, SWT.NONE);
cmpRole.setLayout(new GridLayout(2, true));
scRole.setContent(cmpRole);
// Set the minimum size
scRole.setMinSize(cmpRole.computeSize(SWT.DEFAULT, SWT.DEFAULT).x, cmpRole.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
// Expand both horizontally and vertically
scRole.setExpandHorizontal(true);
scRole.setExpandVertical(true);
bptab.setControl(scRole);
}
示例11: createJExcelAPI
import org.eclipse.swt.custom.CTabItem; //導入方法依賴的package包/類
private void createJExcelAPI(CTabFolder tabFolder) {
CTabItem ptab = new CTabItem(tabFolder, SWT.NONE);
ptab.setText(Messages.ExcelExporterPreferencePage_60);
ScrolledComposite scompo = new ScrolledComposite(tabFolder, SWT.V_SCROLL | SWT.H_SCROLL);
scompo.setExpandHorizontal(true);
scompo.setExpandVertical(true);
Composite sc = new Composite(scompo, SWT.NONE);
sc.setLayout(new GridLayout(3, false));
BooleanFieldEditor bf = new BooleanFieldEditor(XlsExporterConfiguration.PROPERTY_CREATE_CUSTOM_PALETTE,
Messages.ExcelExporterPreferencePage_61, sc);
addField(bf);
HelpSystem.setHelp(bf.getDescriptionControl(sc), StudioPreferencePage.REFERENCE_PREFIX + bf.getPreferenceName());
addField(new BooleanFieldEditor(NSF_EXPORT_XLS_USE_TMP_FILE, Messages.ExcelExporterPreferencePage_62, sc));
addField(new BooleanFieldEditor(NSF_EXPORT_XLS_CELL_COMPLEX_FORMAT, Messages.ExcelExporterPreferencePage_63, sc));
scompo.setMinSize(sc.getSize());
scompo.setContent(sc);
ptab.setControl(scompo);
}
示例12: createBParam
import org.eclipse.swt.custom.CTabItem; //導入方法依賴的package包/類
private void createBParam(FormToolkit toolkit, CTabFolder tabFolder) {
CTabItem bptab = new CTabItem(tabFolder, SWT.NONE);
bptab.setText(Messages.ParametersDialog_built_in_parameters);
ScrolledComposite scompo = new ScrolledComposite(tabFolder, SWT.V_SCROLL | SWT.H_SCROLL);
scompo.setExpandHorizontal(true);
scompo.setExpandVertical(true);
Composite sectionClient = toolkit.createComposite(scompo);
sectionClient.setLayout(new GridLayout(2, false));
for (JRParameter p : prompts)
if (!p.isForPrompting() || p.isSystemDefined())
createInput(toolkit, sectionClient, (JRDesignParameter) p);
sectionClient.pack();
scompo.setMinSize(sectionClient.getSize());
scompo.setContent(sectionClient);
bptab.setControl(scompo);
}
示例13: createTabMetadata
import org.eclipse.swt.custom.CTabItem; //導入方法依賴的package包/類
private void createTabMetadata(CTabFolder tabFolder) {
CTabItem ptab = new CTabItem(tabFolder, SWT.NONE);
ptab.setText(Messages.PDFExporterPreferencePage_38);
Composite sc = new Composite(tabFolder, SWT.NONE);
ptab.setControl(sc);
addField(new StringFieldEditor(PdfExporterConfiguration.PROPERTY_METADATA_TITLE,
Messages.PDFExporterPreferencePage_39, sc));
addField(new StringFieldEditor(PdfExporterConfiguration.PROPERTY_METADATA_AUTHOR,
Messages.PDFExporterPreferencePage_40, sc));
addField(new StringFieldEditor(PdfExporterConfiguration.PROPERTY_METADATA_SUBJECT,
Messages.PDFExporterPreferencePage_41, sc));
addField(new StringFieldEditor(PdfExporterConfiguration.PROPERTY_METADATA_KEYWORDS,
Messages.PDFExporterPreferencePage_42, sc));
addField(new StringFieldEditor(PdfExporterConfiguration.PROPERTY_METADATA_CREATOR,
Messages.PDFExporterPreferencePage_43, sc));
sc.setLayout(new GridLayout(3, false));
}
示例14: createPlatformTab
import org.eclipse.swt.custom.CTabItem; //導入方法依賴的package包/類
private void createPlatformTab(CTabFolder tabFolder) {
CTabItem item = new CTabItem(tabFolder, SWT.NONE);
item.setText("Platform");
PlatformViewerPage page = new PlatformViewerPage(tabFolder, this);
page.setShowReadOnly(loadBoolPref(SHOW_READ_ONLY_PREF, false));
item.setControl(page);
}
示例15: addTabPage
import org.eclipse.swt.custom.CTabItem; //導入方法依賴的package包/類
private static void addTabPage(String title, Control control) {
CTabFolder parent = (CTabFolder) control.getParent();
CTabItem tabItem = new CTabItem(parent, NONE);
tabItem.setText(title);
tabItem.setControl(control);
}