本文整理了Java中org.eclipse.swt.widgets.Button.pack()
方法的一些代码示例,展示了Button.pack()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.pack()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Button
类名称:Button
方法名:pack
暂无
代码示例来源:origin: pentaho/pentaho-kettle
protected Button buildPreviewButton() {
wPreview = new Button( shell, SWT.PUSH | SWT.CENTER );
updatePreviewButtonStatus();
wPreview.setText( BaseMessages.getString( PKG, "System.Button.Preview" ) ); //$NON-NLS-1$
wPreview.pack();
props.setLook( wPreview );
wPreview.setLayoutData( new FormDataBuilder().bottom().left( 50, -( wPreview.getBounds().width / 2 ) ).result() );
wPreview.addListener( SWT.Selection, lsPreview );
return wPreview;
}
代码示例来源:origin: pentaho/pentaho-kettle
buttons[ i ].pack( true );
Rectangle r = buttons[ i ].getBounds();
if ( largest == null || r.width > largest.width ) {
代码示例来源:origin: pentaho/pentaho-kettle
wAddAll.pack(); // get a size
fdButtonGroup.left = new FormAttachment( 50, -( wAddAll.getSize().x / 2 ) - 5 );
fdButtonGroup.top = new FormAttachment( 30, 0 );
代码示例来源:origin: pentaho/pentaho-kettle
wOK.pack( true );
Rectangle rOK = wOK.getBounds();
wCancel.pack( true );
Rectangle rCancel = wCancel.getBounds();
代码示例来源:origin: pentaho/pentaho-kettle
BaseMessages.getString( PKG, "GoogleAnalyticsDialog.Profile.CustomProfileEnabled.Tooltip" ) );
props.setLook( wCustomProfileEnabled );
wCustomProfileEnabled.pack( true );
wGetProfiles.pack( true );
wUseSegmentEnabled.pack( true );
wCustomSegmentEnabled.pack( true );
wGetSegments.pack( true );
代码示例来源:origin: org.apache.uima/uimaj-ep-configurator
/**
* New check box.
*
* @param parent the parent
* @param label the label
* @param tip the tip
* @return the button
*/
public Button newCheckBox(Composite parent, String label, String tip) {
Button button = toolkit.createButton(parent, label, SWT.CHECK);
button.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING
| GridData.HORIZONTAL_ALIGN_FILL));
button.pack();
button.setToolTipText(tip);
button.addListener(SWT.Selection, this);
return button;
}
代码示例来源: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.eclipse.platform/org.eclipse.debug.ui
/**
* Updates the encoding
* @param configuration the local configuration
*/
private void updateEncoding(ILaunchConfiguration configuration) {
String encoding = null;
try {
encoding = configuration.getAttribute(DebugPlugin.ATTR_CONSOLE_ENCODING, (String)null);
} catch (CoreException e) {
}
String defaultEncoding = getDefaultEncoding(configuration);
fDefaultEncodingButton.setText(MessageFormat.format(LaunchConfigurationsMessages.CommonTab_2, new Object[] { defaultEncoding }));
fDefaultEncodingButton.pack();
if (encoding != null) {
fAltEncodingButton.setSelection(true);
fDefaultEncodingButton.setSelection(false);
fEncodingCombo.setText(encoding);
fEncodingCombo.setEnabled(true);
} else {
fDefaultEncodingButton.setSelection(true);
fAltEncodingButton.setSelection(false);
fEncodingCombo.setEnabled(false);
}
}
代码示例来源:origin: org.eclipse/org.eclipse.compare
fCenterButton.setCursor(fNormalCursor);
fCenterButton.setText(COPY_RIGHT_TO_LEFT_INDICATOR);
fCenterButton.pack();
fCenterButton.setVisible(false);
fCenterButton.addSelectionListener(
代码示例来源:origin: org.apache.uima/uimaj-ep-configurator
SWT.PUSH);
browseButton.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
browseButton.pack(false);
browseButton.addListener(SWT.MouseUp, new Listener() {
@Override
代码示例来源:origin: org.eclipse.platform/org.eclipse.compare
fLeftToRightButton.setToolTipText(
Utilities.getString(getResourceBundle(), "action.CopyDiffLeftToRight.tooltip")); //$NON-NLS-1$
fLeftToRightButton.pack();
fLeftToRightButton.setVisible(false);
fLeftToRightButton.addSelectionListener(
fRightToLeftButton.setToolTipText(
Utilities.getString(getResourceBundle(), "action.CopyDiffRightToLeft.tooltip")); //$NON-NLS-1$
fRightToLeftButton.pack();
fRightToLeftButton.setVisible(false);
fRightToLeftButton.addSelectionListener(
代码示例来源:origin: eclipse-jetty/eclipse-jetty-plugin
button.pack();
代码示例来源:origin: eclipse-jetty/eclipse-jetty-plugin
includeButton.pack();
globalButton.pack();
代码示例来源:origin: pentaho/big-data-plugin
protected Control createFooter( Composite shell ) {
wCancel = new Button( shell, SWT.PUSH );
wCancel.setText( getMsg( "System.Button.Cancel" ) );
wCancel.addListener( SWT.Selection, lsCancel );
new FD( wCancel ).right( 100, 0 ).bottom( 100, 0 ).apply();
// Some buttons
wOK = new Button( shell, SWT.PUSH );
wOK.setText( getMsg( "System.Button.OK" ) );
wOK.addListener( SWT.Selection, lsOK );
new FD( wOK ).right( wCancel, -FIELD_LABEL_SEP ).bottom( 100, 0 ).apply();
lsPreview = getPreview();
if ( lsPreview != null ) {
wPreview = new Button( shell, SWT.PUSH );
wPreview.setText( getBaseMsg( "BaseStepDialog.Preview" ) );
wPreview.pack();
wPreview.addListener( SWT.Selection, lsPreview );
int offset = wPreview.getBounds().width / 2;
new FD( wPreview ).left( 50, -offset ).bottom( 100, 0 ).apply();
}
return wCancel;
}
代码示例来源:origin: pentaho/big-data-plugin
protected Control createFooter( Composite shell ) {
wCancel = new Button( shell, SWT.PUSH );
wCancel.setText( getMsg( "System.Button.Cancel" ) );
wCancel.addListener( SWT.Selection, lsCancel );
new FD( wCancel ).right( 100, 0 ).bottom( 100, 0 ).apply();
// Some buttons
wOK = new Button( shell, SWT.PUSH );
wOK.setText( getMsg( "System.Button.OK" ) );
wOK.addListener( SWT.Selection, lsOK );
new FD( wOK ).right( wCancel, -FIELD_LABEL_SEP ).bottom( 100, 0 ).apply();
lsPreview = getPreview();
if ( lsPreview != null ) {
wPreview = new Button( shell, SWT.PUSH );
wPreview.setText( getBaseMsg( "BaseStepDialog.Preview" ) );
wPreview.pack();
wPreview.addListener( SWT.Selection, lsPreview );
int offset = wPreview.getBounds().width / 2;
new FD( wPreview ).left( 50, -offset ).bottom( 100, 0 ).apply();
}
return wCancel;
}
代码示例来源:origin: pentaho/big-data-plugin
protected Control createFooter( Composite shell ) {
wCancel = new Button( shell, SWT.PUSH );
wCancel.setText( getMsg( "System.Button.Cancel" ) );
wCancel.addListener( SWT.Selection, lsCancel );
new FD( wCancel ).right( 100, 0 ).bottom( 100, 0 ).apply();
// Some buttons
wOK = new Button( shell, SWT.PUSH );
wOK.setText( getMsg( "System.Button.OK" ) );
wOK.addListener( SWT.Selection, lsOK );
new FD( wOK ).right( wCancel, -FIELD_LABEL_SEP ).bottom( 100, 0 ).apply();
lsPreview = getPreview();
if ( lsPreview != null ) {
wPreview = new Button( shell, SWT.PUSH );
wPreview.setText( getBaseMsg( "BaseStepDialog.Preview" ) );
wPreview.pack();
wPreview.addListener( SWT.Selection, lsPreview );
int offset = wPreview.getBounds().width / 2;
new FD( wPreview ).left( 50, -offset ).bottom( 100, 0 ).apply();
}
return wCancel;
}
代码示例来源:origin: org.codehaus.openxma/xmartclient
data.bottom = new FormAttachment(dateTextField_,scaler.convertYToCurrent(0),SWT.BOTTOM);
datePickerButton_.setLayoutData(data);
datePickerButton_.pack();
代码示例来源:origin: org.codehaus.openxma/xmartserver
data.bottom = new FormAttachment(dateTextField_,scaler.convertYToCurrent(0),SWT.BOTTOM);
datePickerButton_.setLayoutData(data);
datePickerButton_.pack();
代码示例来源:origin: BiglySoftware/BiglyBT
button.pack(true);
if (button.computeSize(100, SWT.DEFAULT).y > 0) {
RowData rd = new RowData();
内容来源于网络,如有侵权,请联系作者删除!