本文整理了Java中org.eclipse.swt.widgets.ToolBar.getBounds()
方法的一些代码示例,展示了ToolBar.getBounds()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ToolBar.getBounds()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.ToolBar
类名称:ToolBar
方法名:getBounds
暂无
代码示例来源:origin: pentaho/pentaho-kettle
public void update() {
Rectangle rect = toolBar.getBounds();
if ( connectDropdown != null && !connectDropdown.isDisposed() ) {
if ( spoon.rep != null ) {
StringBuilder connectionLabel = new StringBuilder();
if ( spoon.rep.getUserInfo() != null ) {
connectionLabel.append( spoon.rep.getUserInfo().getLogin() );
connectionLabel.append( " | " );
}
StringBuilder connectionLabelTip = new StringBuilder( connectionLabel.toString() );
if ( repoConnectController != null && repoConnectController.getConnectedRepository() != null ) {
connectionLabel.append( truncateName( spoon.getRepositoryName() ) );
connectionLabelTip.append( spoon.getRepositoryName() );
}
connectDropdown.setText( connectionLabel.toString() );
connectDropdown.setToolTipText( connectionLabelTip.toString() );
} else {
connectDropdown.setText( BaseMessages.getString( PKG, "RepositoryConnectMenu.Connect" ) );
}
}
// This fixes some SWT goofiness
toolBar.pack();
toolBar.setBounds( rect );
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
void onSelection (Event ev) {
Rectangle bounds = chevron.getBounds();
Event event = new Event();
event.detail = SWT.ARROW;
if ((parent.style & SWT.VERTICAL) != 0) {
event.x = bounds.x + bounds.width;
event.y = bounds.y;
} else {
event.x = bounds.x;
event.y = bounds.y + bounds.height;
}
event.stateMask = ev.stateMask;
sendSelectionEvent (SWT.Selection, event, false);
}
/**
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
void onSelection (Event ev) {
Rectangle bounds = chevron.getBounds();
Event event = new Event();
event.detail = SWT.ARROW;
if ((parent.style & SWT.VERTICAL) != 0) {
event.x = bounds.x + bounds.width;
event.y = bounds.y;
} else {
event.x = bounds.x;
event.y = bounds.y + bounds.height;
}
event.stateMask = ev.stateMask;
sendSelectionEvent (SWT.Selection, event, false);
}
/**
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
void onSelection (Event ev) {
Rectangle bounds = chevron.getBounds();
Event event = new Event();
event.detail = SWT.ARROW;
if ((parent.style & SWT.VERTICAL) != 0) {
event.x = bounds.x + bounds.width;
event.y = bounds.y;
} else {
event.x = bounds.x;
event.y = bounds.y + bounds.height;
}
event.stateMask = ev.stateMask;
sendSelectionEvent (SWT.Selection, event, false);
}
/**
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
void onSelection() {
Rectangle bounds = chevron.getBounds();
Event event = new Event();
event.detail = SWT.ARROW;
if ( (parent.style & SWT.VERTICAL) != 0 ) {
event.x = bounds.x + bounds.width;
event.y = bounds.y;
} else {
event.x = bounds.x;
event.y = bounds.y + bounds.height;
}
// postEvent (SWT.Selection, event);
event.widget = this;
notifyListeners( SWT.Selection, event );
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
void onSelection (Event ev) {
Rectangle bounds = chevron.getBounds();
Event event = new Event();
event.detail = SWT.ARROW;
if ((parent.style & SWT.VERTICAL) != 0) {
event.x = bounds.x + bounds.width;
event.y = bounds.y;
} else {
event.x = bounds.x;
event.y = bounds.y + bounds.height;
}
event.stateMask = ev.stateMask;
sendSelectionEvent (SWT.Selection, event, false);
}
/**
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
void layoutItems() {
for( int i = 0; i < itemHolder.size(); i++ ) {
ToolItem item = itemHolder.getItem( i );
Rectangle ibounds = item.getBounds();
Rectangle bounds = getBounds();
boolean hasEnoughWidth = ibounds.x + ibounds.width <= bounds.width;
boolean hasEnoughHeight = ibounds.y + ibounds.height <= bounds.height;
item.setVisible( hasEnoughWidth && hasEnoughHeight );
item.resizeControl();
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
Rectangle toolbarBounds= fToolBar.getBounds();
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
Rectangle toolbarBounds= fToolBar.getBounds();
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
/**
* Show the dialog's menu. This message has no effect if the receiver was
* not configured to show a menu. Clients may call this method in order to
* trigger the menu via keystrokes or other gestures. Subclasses typically
* do not override method.
*/
protected void showDialogMenu() {
if (!showDialogMenu) {
return;
}
if (menuManager == null) {
menuManager = new MenuManager();
fillDialogMenu(menuManager);
}
// Setting this flag works around a problem that remains on X only,
// whereby activating the menu deactivates our shell.
listenToDeactivate = !Util.isGtk();
Menu menu = menuManager.createContextMenu(getShell());
Rectangle bounds = toolBar.getBounds();
Point topLeft = new Point(bounds.x, bounds.y + bounds.height);
topLeft = getShell().toDisplay(topLeft);
menu.setLocation(topLeft.x, topLeft.y);
menu.setVisible(true);
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
/**
* Show the dialog's menu. This message has no effect if the receiver was
* not configured to show a menu. Clients may call this method in order to
* trigger the menu via keystrokes or other gestures. Subclasses typically
* do not override method.
*/
protected void showDialogMenu() {
if (!showDialogMenu) {
return;
}
if (menuManager == null) {
menuManager = new MenuManager();
fillDialogMenu(menuManager);
}
// Setting this flag works around a problem that remains on X only,
// whereby activating the menu deactivates our shell.
listenToDeactivate = !Util.isGtk();
Menu menu = menuManager.createContextMenu(getShell());
Rectangle bounds = toolBar.getBounds();
Point topLeft = new Point(bounds.x, bounds.y + bounds.height);
topLeft = getShell().toDisplay(topLeft);
menu.setLocation(topLeft.x, topLeft.y);
menu.setVisible(true);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.debug.ui
Rectangle toolbarBounds= fToolBar.getBounds();
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
/**
* Show the dialog's menu. This message has no effect if the receiver was
* not configured to show a menu. Clients may call this method in order to
* trigger the menu via keystrokes or other gestures. Subclasses typically
* do not override method.
*/
protected void showDialogMenu() {
if (!showDialogMenu) {
return;
}
if (menuManager == null) {
menuManager = new MenuManager();
fillDialogMenu(menuManager);
}
// Setting this flag works around a problem that remains on X only,
// whereby activating the menu deactivates our shell.
listenToDeactivate = !Util.isGtk();
Menu menu = menuManager.createContextMenu(getShell());
Rectangle bounds = toolBar.getBounds();
Point topLeft = new Point(bounds.x, bounds.y + bounds.height);
topLeft = getShell().toDisplay(topLeft);
menu.setLocation(topLeft.x, topLeft.y);
menu.setVisible(true);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
Rectangle toolBarBounds = toolBar.getBounds();
ToolItem[] items = toolBar.getItems();
ArrayList<ToolItem> hidden = new ArrayList<>();
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
Rectangle toolBarBounds = toolBar.getBounds();
ToolItem[] items = toolBar.getItems();
ArrayList hidden = new ArrayList();
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench
Rectangle bounds = historyManager.getControl().getBounds();
Point topLeft = new Point(bounds.x + bounds.width, bounds.y + bounds.height);
topLeft = historyManager.getControl().toDisplay(topLeft);
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
Rectangle toolBarBounds = toolBar.getBounds();
ToolItem[] items = toolBar.getItems();
ArrayList<ToolItem> hidden = new ArrayList<>();
内容来源于网络,如有侵权,请联系作者删除!