本文整理了Java中org.eclipse.swt.widgets.ToolBar.getItems()
方法的一些代码示例,展示了ToolBar.getItems()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ToolBar.getItems()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.ToolBar
类名称:ToolBar
方法名:getItems
[英]Returns an array of ToolItem
s which are the items in the receiver.
Note: This is not the actual structure used by the receiver to maintain its list of items, so modifying the array will not affect the receiver.
[中]返回ToolItem
的数组,它们是接收方中的项目。
注意:这不是接收方维护其项目列表所使用的实际结构,因此修改数组不会影响接收方。
代码示例来源:origin: pentaho/pentaho-kettle
private void renderConnectButton() {
connectButton = new ToolItem( toolBar, toolBar.getItems().length );
connectButton.setText( BaseMessages.getString( PKG, "RepositoryConnectMenu.Connect" ) );
connectButton.addSelectionListener( new SelectionAdapter() {
@Override
public void widgetSelected( SelectionEvent selectionEvent ) {
new RepositoryDialog( spoon.getShell(), repoConnectController ).openCreation();
renderAndUpdate();
}
} );
}
代码示例来源:origin: pentaho/pentaho-kettle
private void renderConnectDropdown() {
connectDropdown = new ToolItem( toolBar, SWT.DROP_DOWN, toolBar.getItems().length );
connectDropdown.setText( BaseMessages.getString( PKG, "RepositoryConnectMenu.Connect" ) );
connectDropdown.addSelectionListener( new SelectionAdapter() {
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
@Override
boolean mnemonicMatch (char key) {
ToolItem [] items = getItems ();
for (int i=0; i<items.length; i++) {
int /*long*/ labelHandle = items [i].labelHandle;
if (labelHandle != 0 && mnemonicMatch (labelHandle, key)) return true;
}
return false;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
@Override
boolean mnemonicMatch (char key) {
ToolItem [] items = getItems ();
for (int i=0; i<items.length; i++) {
int /*long*/ labelHandle = items [i].labelHandle;
if (labelHandle != 0 && mnemonicMatch (labelHandle, key)) return true;
}
return false;
}
代码示例来源:origin: org.eclipse.e4.ui.workbench.addons/swt
private ToolItem getChangedToolItem(MUIElement changedElement) {
ToolItem[] toolItems = trimStackTB.getItems();
for (ToolItem toolItem : toolItems) {
if (changedElement.equals(toolItem.getData())) {
return toolItem;
}
}
return null;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench
protected ToolItem getItemFor(MPerspective persp) {
if (perspSwitcherToolbar == null)
return null;
for (ToolItem ti : perspSwitcherToolbar.getItems()) {
if (ti.getData() == persp)
return ti;
}
return null;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
ToolItem getItemInPixels (Point point) {
ToolItem [] items = getItems ();
for (int i=0; i<items.length; i++) {
Rectangle rect = items [i].getBoundsInPixels ();
if (rect.contains (point)) return items [i];
}
return null;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
@Override
void removeControl (Control control) {
super.removeControl (control);
ToolItem [] items = getItems ();
for (int i=0; i<items.length; i++) {
ToolItem item = items [i];
if (item.control == control) item.setControl (null);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
@Override
void setForegroundColor (GdkColor color) {
super.setForegroundColor (color);
ToolItem [] items = getItems ();
for (int i = 0; i < items.length; i++) {
items[i].setForegroundColor (color);
}
}
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
boolean forceFocus (NSView focusView) {
if (lastFocus != null && lastFocus.setFocus ()) return true;
ToolItem [] items = getItems ();
for (int i = 0; i < items.length; i++) {
ToolItem item = items [i];
if (item.setFocus ()) {
lastFocus = item;
return true;
}
}
return false;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
@Override
void removeControl (Control control) {
super.removeControl (control);
ToolItem [] items = getItems ();
for (int i=0; i<items.length; i++) {
ToolItem item = items [i];
if (item.control == control) item.setControl (null);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
@Override
void setForegroundColor (GdkColor color) {
super.setForegroundColor (color);
ToolItem [] items = getItems ();
for (int i = 0; i < items.length; i++) {
items[i].setForegroundColor (color);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
@Override
void releaseChildren (boolean destroy) {
ToolItem [] items = getItems ();
for (int i=0; i<items.length; i++) {
ToolItem item = items [i];
if (item != null && !item.isDisposed ()) {
item.release (false);
}
}
super.releaseChildren (destroy);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
@Override
void releaseChildren (boolean destroy) {
ToolItem [] items = getItems ();
for (int i=0; i<items.length; i++) {
ToolItem item = items [i];
if (item != null && !item.isDisposed ()) {
item.release (false);
}
}
super.releaseChildren (destroy);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
@Override
void setFontDescription (int /*long*/ font) {
super.setFontDescription (font);
ToolItem [] items = getItems ();
for (int i = 0; i < items.length; i++) {
items[i].setFontDescription (font);
}
relayout ();
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
void selectRadio () {
int index = 0;
ToolItem [] items = parent.getItems ();
while (index < items.length && items [index] != this) index++;
int i = index - 1;
while (i >= 0 && items [i].setRadioSelection (false)) --i;
int j = index + 1;
while (j < items.length && items [j].setRadioSelection (false)) j++;
setSelection (true);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
@Override
void setFontDescription (long /*int*/ font) {
super.setFontDescription (font);
ToolItem [] items = getItems ();
for (int i = 0; i < items.length; i++) {
items[i].setFontDescription (font);
}
relayout ();
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
@Override
void setFontDescription (int /*long*/ font) {
super.setFontDescription (font);
ToolItem [] items = getItems ();
for (int i = 0; i < items.length; i++) {
items[i].setFontDescription (font);
}
relayout ();
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
@Override
public void setToolTipText (String string) {
checkWidget();
super.setToolTipText (string);
Shell shell = _getShell ();
ToolItem [] items = getItems ();
for (int i = 0; i < items.length; i++) {
String newString = string != null ? null : items [i].toolTipText;
shell.setToolTipText (items [i].handle, newString);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
@Override
public void setToolTipText (String string) {
checkWidget();
super.setToolTipText (string);
Shell shell = _getShell ();
ToolItem [] items = getItems ();
for (int i = 0; i < items.length; i++) {
String newString = string != null ? null : items [i].toolTipText;
shell.setToolTipText (items [i].handle, newString);
}
}
内容来源于网络,如有侵权,请联系作者删除!