本文整理了Java中org.eclipse.swt.widgets.ToolBar.<init>()
方法的一些代码示例,展示了ToolBar.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ToolBar.<init>()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.ToolBar
类名称:ToolBar
方法名:<init>
[英]Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.
The style value is either one of the style constants defined in class SWT
which is applicable to instances of this class, or must be built by bitwise OR'ing together (that is, using the int
"|" operator) two or more of those SWT
style constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses.
[中]根据该类的父类和描述其行为和外观的样式值,构造该类的新实例。
样式值可以是类SWT
中定义的样式常量之一,该类适用于该类的实例,或者必须通过位或组合(即使用int
“|”运算符)两个或多个SWT
样式常量来构建。类描述列出了适用于该类的样式常量。样式位也继承自超类。
代码示例来源:origin: pentaho/pentaho-kettle
sep3.setLayoutData( fdSep3 );
ToolBar treeTb = new ToolBar( this, SWT.HORIZONTAL | SWT.FLAT );
props.setLook( treeTb, Props.WIDGET_STYLE_TOOLBAR );
treeTb.setLayoutData( fdTreeToolbar );
ToolBar selectionFilterTb = new ToolBar( this, SWT.HORIZONTAL | SWT.FLAT );
props.setLook( selectionFilterTb, Props.WIDGET_STYLE_TOOLBAR );
代码示例来源:origin: pentaho/pentaho-kettle
ToolBar treeTb = new ToolBar( shell, SWT.HORIZONTAL | SWT.FLAT );
props.setLook( treeTb );
代码示例来源:origin: pentaho/pentaho-kettle
ToolBar tb = new ToolBar( wFilesComp, SWT.HORIZONTAL | SWT.FLAT );
props.setLook( tb );
FormData fdTb = new FormData();
代码示例来源:origin: pentaho/pentaho-kettle
toolbarLeft = new ToolBar( shell, SWT.WRAP );
FormData fdToolbarLeft = new FormData();
fdToolbarLeft.top = new FormAttachment( 0, MARGIN );
toolbarRight = new ToolBar( shell, SWT.WRAP );
FormData fdToolbarRight = new FormData();
fdToolbarRight.top = new FormAttachment( 0, MARGIN );
代码示例来源:origin: pentaho/pentaho-kettle
ToolBar treeTb = new ToolBar( shell, SWT.HORIZONTAL | SWT.FLAT );
props.setLook( treeTb );
代码示例来源:origin: pentaho/pentaho-kettle
ToolBar treeTb = new ToolBar( shell, SWT.HORIZONTAL | SWT.FLAT );
props.setLook( treeTb );
fdTreeTb = new FormData();
代码示例来源:origin: org.eclipse/org.eclipse.ltk.ui.refactoring
/**
* Returns the toolbar manager of this control
*
* @return the toolbar manager
*/
protected ToolBarManager getToolBarManager() {
if (fToolBarManager == null) {
final ToolBar toolbar= new ToolBar(fHistoryPane, SWT.FLAT);
fHistoryPane.setTopCenter(toolbar);
fToolBarManager= new ToolBarManager(toolbar);
}
return fToolBarManager;
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
public static LineWrapPreference create(Composite parentComposite, String label, String key, String wrapBeforeKey, Images images) {
ToolBar toolBar= new ToolBar(parentComposite, SWT.FLAT);
toolBar.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
LineWrapPreference lineWrapPreference= new LineWrapPreference(toolBar, label, key, wrapBeforeKey, images);
lineWrapPreference.addLabel(label, true, 0);
return lineWrapPreference;
}
代码示例来源:origin: openaudible/openaudible
BookButtonBar(Composite parent, int gridStyle) {
toolbar = new ToolBar(parent, SWT.FLAT | SWT.NO_FOCUS);
gd = new GridData(gridStyle);
toolbar.setLayoutData(gd);
for (Command cmd : cmds) {
addIconButton(toolbar, cmd);
}
BookNotifier.getInstance().addListener(this);
refresh();
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
static ToolItem createToolItem(Composite parent, Images images) {
ToolBar toolBar= new ToolBar(parent, SWT.FLAT);
ToolItem item= new ToolItem(toolBar, SWT.PUSH);
item.setToolTipText(FormatterMessages.ModifyDialog_modifyAll_tooltip);
item.setImage(images.get(JavaPluginImages.DESC_ELCL_MODIFYALL));
return item;
}
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
public ViewerPane(Composite parent, int style) {
super(parent, style);
marginWidth= 0;
marginHeight= 0;
CLabel label= new CLabel(this, SWT.NONE);
setTopLeft(label);
ToolBar tb= new ToolBar(this, SWT.FLAT);
setTopCenter(tb);
fToolBarManager= new ToolBarManager(tb);
}
代码示例来源:origin: org.eclipse.egit/ui
private void addToolbar(Composite parent) {
ToolBar toolbar = new ToolBar(parent, SWT.VERTICAL);
GridDataFactory.fillDefaults().grab(false, true).applyTo(toolbar);
UIUtils.addExpansionItems(toolbar, treeViewer);
}
代码示例来源:origin: org.eclipse.egit/ui
private void addToolbar(Composite parent) {
ToolBar toolbar = new ToolBar(parent, SWT.VERTICAL);
GridDataFactory.fillDefaults().grab(false, true).applyTo(toolbar);
UIUtils.addExpansionItems(toolbar, treeViewer);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
public ViewerPane(Composite parent, int style) {
super(parent, style);
marginWidth= 0;
marginHeight= 0;
CLabel label= new CLabel(this, SWT.NONE);
setTopLeft(label);
ToolBar tb= new ToolBar(this, SWT.FLAT);
setTopCenter(tb);
fToolBarManager= new ToolBarManager(tb);
}
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
public ViewerPane(Composite parent, int style) {
super(parent, style);
marginWidth= 0;
marginHeight= 0;
CLabel label= new CLabel(this, SWT.NONE);
setTopLeft(label);
ToolBar tb= new ToolBar(this, SWT.FLAT);
setTopCenter(tb);
fToolBarManager= new ToolBarManager(tb);
}
代码示例来源:origin: org.eclipse/org.eclipse.ltk.ui.refactoring
public ViewerPane(Composite parent, int style) {
super(parent, style);
marginWidth= 0;
marginHeight= 0;
CLabel label= new CLabel(this, SWT.NONE);
setTopLeft(label);
ToolBar tb= new ToolBar(this, SWT.FLAT);
setTopCenter(tb);
fToolBarManager= new ToolBarManager(tb);
}
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
ToolBar getChevron() {
if (chevronTb == null) {
chevronTb = new ToolBar(this, SWT.FLAT);
initAccessibleChevronTb();
addTabControl(chevronTb, SWT.TRAIL, -1, false);
}
if (chevronItem == null) {
chevronItem = new ToolItem(chevronTb, SWT.PUSH);
chevronItem.setToolTipText(SWT.getMessage("SWT_ShowList"));
chevronItem.addListener(SWT.Selection, listener);
}
return chevronTb;
}
/**
代码示例来源:origin: com.eclipsesource.tabris/tabris
private void createPageSwitcher() {
pageSwitcher = new ToolBar( uiParent, SWT.NONE );
pageSwitcher.setData( RWT.CUSTOM_VARIANT, CUSTOM_VARIANT_TABRIS_UI );
pageSwitcher.setLayoutData( new GridData( GridData.FILL, GridData.CENTER, false, false ) );
ToolItem pageSwitcherDropDown = new ToolItem( pageSwitcher, SWT.DROP_DOWN );
pageSwitcherDropDown.setData( RWT.CUSTOM_VARIANT, CUSTOM_VARIANT_TABRIS_UI );
pageSwitcherDropDown.addListener( SWT.Selection, new PageSwitcherSelectionListener() );
pageSwitcherMenu = new Menu( uiParent.getShell(), SWT.POP_UP );
pageSwitcherMenu.setData( RWT.CUSTOM_VARIANT, CUSTOM_VARIANT_TABRIS_UI );
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
private ToolBar createHelpImageButton(Composite parent, Image image) {
ToolBar toolBar = new ToolBar(parent, SWT.FLAT | SWT.NO_FOCUS);
((GridLayout) parent.getLayout()).numColumns++;
toolBar.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER));
toolBar.setCursor(parent.getDisplay().getSystemCursor(SWT.CURSOR_HAND));
fHelpButton = new ToolItem(toolBar, SWT.CHECK);
fHelpButton.setImage(image);
fHelpButton.setToolTipText(JFaceResources.getString("helpToolTip")); //$NON-NLS-1$
fHelpButton.addSelectionListener(widgetSelectedAdapter(e -> helpPressed()));
return toolBar;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench
private void createFeedback() {
dragShell = new Shell(SWT.NO_TRIM | SWT.NO_BACKGROUND);
dragShell.setAlpha(175);
ToolBar dragTB = new ToolBar(dragShell, SWT.RIGHT);
ToolItem newTI = new ToolItem(dragTB, SWT.RADIO);
newTI.setText(dragItem.getText());
newTI.setImage(dragItem.getImage());
dragTB.pack();
dragShell.pack();
dragShell.setVisible(true);
}
内容来源于网络,如有侵权,请联系作者删除!