本文整理了Java中org.eclipse.swt.widgets.Button.getSize()
方法的一些代码示例,展示了Button.getSize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.getSize()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Button
类名称:Button
方法名:getSize
暂无
代码示例来源:origin: pentaho/pentaho-kettle
if ( null == widestWidget || previous.getSize().y > widestWidget.getSize().y ) {
widestWidget = previous;
代码示例来源:origin: pentaho/pentaho-kettle
fdButtonGroup.left = new FormAttachment( 50, -( wAddAll.getSize().x / 2 ) - 5 );
fdButtonGroup.top = new FormAttachment( 30, 0 );
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.ide
private Button createPermissionEditor(Table table, TableItem item, int index) {
Button button = new Button(table, SWT.CHECK);
button.pack();
TableEditor editor = new TableEditor(table);
editor.grabVertical = true;
editor.verticalAlignment = SWT.CENTER;
editor.minimumWidth = button.getSize().x;
editor.setEditor(button, item, index);
editor.getEditor();
return button;
}
代码示例来源:origin: org.apache.uima/uimaj-ep-configurator
/**
* New push button.
*
* @param parent the parent
* @param label the label
* @param tip the tip
* @param enabled the enabled
* @param style the style
* @return the button
*/
public Button newPushButton(Composite parent, String label, String tip, boolean enabled, int style) {
Button button = toolkit.createButton(parent, label, SWT.PUSH | style);
GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
button.setLayoutData(gd);
button.pack(false);
button.setToolTipText(tip);
button.setEnabled(enabled);
button.addListener(SWT.Selection, this);
Point buttonSize = button.getSize();
gd.heightHint = buttonSize.y - 2;
gd.widthHint = buttonSize.x - 2;
return button;
}
代码示例来源:origin: org.codehaus.openxma/xmartserver
protected Point getMinSize() {
int minWidth = scaler.convertXToCurrent(23) + detailButton.getSize().x + scaler.convertXToCurrent(HORIZONTAL_OFFSET);
minWidth += copyButton.getSize().x + scaler.convertXToCurrent(HORIZONTAL_OFFSET);
minWidth += getButtonComposite().getSize().x + scaler.convertXToCurrent(HORIZONTAL_OFFSET);
int okBottomEnd = getButtonComposite().getLocation().y + getButtonComposite().getSize().y;
int minHeight = okBottomEnd + scaler.convertYToCurrent(SHELL_DEFAULT_MIN_HEIGHT);
if(detailOpen) {
minHeight += scaler.convertYToCurrent(100);
}
return new Point(minWidth,minHeight);
}
代码示例来源:origin: org.codehaus.openxma/xmartclient
protected Point getMinSize() {
int minWidth = scaler.convertXToCurrent(23) + detailButton.getSize().x + scaler.convertXToCurrent(HORIZONTAL_OFFSET);
minWidth += copyButton.getSize().x + scaler.convertXToCurrent(HORIZONTAL_OFFSET);
minWidth += getButtonComposite().getSize().x + scaler.convertXToCurrent(HORIZONTAL_OFFSET);
int okBottomEnd = getButtonComposite().getLocation().y + getButtonComposite().getSize().y;
int minHeight = okBottomEnd + scaler.convertYToCurrent(SHELL_DEFAULT_MIN_HEIGHT);
if(detailOpen) {
minHeight += scaler.convertYToCurrent(100);
}
return new Point(minWidth,minHeight);
}
代码示例来源:origin: eclipse-jetty/eclipse-jetty-plugin
includeButton.pack();
includeEditor.minimumWidth = includeButton.getSize().x;
includeEditor.horizontalAlignment = SWT.CENTER;
includeEditor.setEditor(includeButton, item, 0);
globalButton.pack();
globalEditor.minimumWidth = globalButton.getSize().x;
globalEditor.horizontalAlignment = SWT.CENTER;
globalEditor.setEditor(globalButton, item, 2);
代码示例来源:origin: stefanhaustein/flowgrid
@Override
public void widgetSelected(SelectionEvent e) {
Menu menu = new Menu(flowgrid.shell());
operationEditor.fillMenuImpl(menu);
menu.setLocation(moreButton.toDisplay(0, moreButton.getSize().y));
menu.setVisible(true);
}
代码示例来源:origin: eclipse-jetty/eclipse-jetty-plugin
button.pack();
editor.minimumWidth = button.getSize().x;
editor.horizontalAlignment = SWT.CENTER;
editor.setEditor(button, item, 0);
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.ide
private void showMenu(Button button, IContributionItem menuContribution) {
Menu menu = new Menu(button);
Point p = button.getLocation();
p.y = p.y + button.getSize().y;
p = button.getParent().toDisplay(p);
menu.setLocation(p);
menuContribution.fill(menu, 0);
menu.setVisible(true);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench
Point buttonLocation = buttonAddKey.getLocation();
buttonLocation = groupKeySequence.toDisplay(buttonLocation.x, buttonLocation.y);
Point buttonSize = buttonAddKey.getSize();
menuButtonAddKey.setLocation(buttonLocation.x, buttonLocation.y + buttonSize.y);
menuButtonAddKey.setVisible(true);
代码示例来源:origin: BiglySoftware/BiglyBT
boolean checked = button.getSelection();
Point size = c.getSize();
Point sizeButton = button.getSize();
e.gc.setAntialias(SWT.ON);
if (color != null) {
} else {
if (!Constants.isOSX && button.getSelection()) {
Point size = button.getSize();
if (color != null) {
e.gc.setBackground(color);
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench
Point buttonLocation = addKeyButton.getLocation();
buttonLocation = dataArea.toDisplay(buttonLocation.x, buttonLocation.y);
Point buttonSize = addKeyButton.getSize();
addKeyMenu.setLocation(buttonLocation.x, buttonLocation.y + buttonSize.y);
addKeyMenu.setVisible(true);
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
Point size = arrow.getSize();
Rectangle rect = new Rectangle(0, 0, size.x, size.y);
if (rect.contains(point)) {
代码示例来源:origin: org.apache.uima/uimaj-ep-configurator
"Click here to search for an Analysis Engine", ENABLED);
addButton.setSize(removeButton.getSize());
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
Point size = arrow.getSize();
Rectangle rect = new Rectangle(0, 0, size.x, size.y);
if (rect.contains(point)) {
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
Point size = arrow.getSize();
Rectangle rect = new Rectangle(0, 0, size.x, size.y);
if (rect.contains(point)) {
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
Point size = arrow.getSize();
Rectangle rect = new Rectangle(0, 0, size.x, size.y);
if (rect.contains(point)) {
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
Point size = arrow.getSize();
Rectangle rect = new Rectangle(0, 0, size.x, size.y);
if (rect.contains(point)) {
内容来源于网络,如有侵权,请联系作者删除!