org.eclipse.swt.widgets.Group.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(17.7k)|赞(0)|评价(0)|浏览(106)

本文整理了Java中org.eclipse.swt.widgets.Group.<init>()方法的一些代码示例,展示了Group.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Group.<init>()方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Group
类名称:Group
方法名:<init>

Group.<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中定义的一个样式常量,适用于该类的实例,或者必须通过按位或将两个或多个SWT样式常量(即,使用int“|”运算符)组合在一起来生成。类描述列出了适用于该类的样式常量。样式位也继承自超类。

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

private Group createGroup( Composite parentTab, Control top, String label ) {
 Group group = new Group( parentTab, SWT.SHADOW_NONE );
 props.setLook( group );
 group.setText( label );
 FormLayout groupLayout = new FormLayout();
 groupLayout.marginWidth = 10;
 groupLayout.marginHeight = 10;
 group.setLayout( groupLayout );
 FormData fdGroup = new FormData();
 fdGroup.left = new FormAttachment( 0, Const.MARGIN );
 fdGroup.top = new FormAttachment( top, Const.MARGIN );
 fdGroup.right = new FormAttachment( 100, -Const.MARGIN );
 group.setLayoutData( fdGroup );
 return group;
}

代码示例来源:origin: caoxinyu/RedisClient

composite.setLayout(new GridLayout(6, true));
Label lblFind = new Label(composite, SWT.NONE);
lblFind.setText(RedisClient.i18nFile.getText(I18nFile.FINDDATA));
pattern.setFocus();
Group grpFindDirection = new Group(composite, SWT.NONE);
grpFindDirection.setLayout(new GridLayout(1, false));
grpFindDirection.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 3, 1));
grpFindDirection.setText(RedisClient.i18nFile.getText(I18nFile.FINDDIRECTION));
final Button btnForward = new Button(grpFindDirection, SWT.RADIO);
btnForward.setSelection(true);
btnForward.addSelectionListener(new SelectionAdapter() {
btnForward.setText(RedisClient.i18nFile.getText(I18nFile.FORWARD));
Button btnBackward = new Button(grpFindDirection, SWT.RADIO);
btnBackward.setText(RedisClient.i18nFile.getText(I18nFile.BACKWARD));
Group grpKeyType = new Group(composite, SWT.NONE);
grpKeyType.setLayout(new GridLayout(1, false));
grpKeyType.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 3, 1));
grpKeyType.setText(RedisClient.i18nFile.getText(I18nFile.KEYTYPE));

代码示例来源:origin: caoxinyu/RedisClient

grpValues = new Group(dataComposite, SWT.NONE);
grpValues.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 4,
    1));
grpValues.setText(RedisClient.i18nFile.getText(I18nFile.VALUES));
grpValues.setLayout(new GridLayout(4, false));
tblclmnNewColumn.setWidth(200);
btnAdd.setText(RedisClient.i18nFile.getText(I18nFile.ADD));
btnDelete.setText(RedisClient.i18nFile.getText(I18nFile.DELETE));
btnDown.setText(RedisClient.i18nFile.getText(I18nFile.DOWN));
Group grpOrderToAdd = new Group(dataComposite, SWT.NONE);
grpOrderToAdd.setLayout(new GridLayout(2, false));
grpOrderToAdd.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false,
    false, 4, 1));
grpOrderToAdd.setText(RedisClient.i18nFile.getText(I18nFile.LISTORDER));
btnFromTailTo.setText(RedisClient.i18nFile.getText(I18nFile.TAILHEAD));
grpWhenListNot = new Group(dataComposite, SWT.NONE);
grpWhenListNot.setLayout(new GridLayout(2, true));
grpWhenListNot.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true,
    false, 4, 1));
grpWhenListNot.setText(RedisClient.i18nFile.getText(I18nFile.LISTNOTEXIST));

代码示例来源:origin: caoxinyu/RedisClient

grpValues = new Group(dataComposite, SWT.NONE);
grpValues.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 4,
    1));
grpValues.setText(RedisClient.i18nFile.getText(I18nFile.VALUES));
grpValues.setLayout(new GridLayout(4, false));
tblclmnNewColumn.setWidth(200);
Button btnAdd = new Button(grpValues, SWT.NONE);
btnAdd.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1));
btnAdd.addSelectionListener(new SelectionAdapter() {
btnAdd.setText(RedisClient.i18nFile.getText(I18nFile.ADD));
btnDelete = new Button(grpValues, SWT.NONE);
btnDelete.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false,
    1, 1));

代码示例来源:origin: caoxinyu/RedisClient

composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
Group grpValueType = new Group(composite, SWT.NONE);
grpValueType.setLayout(new GridLayout(2, false));
grpValueType.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
grpValueType.setText(RedisClient.i18nFile.getText(I18nFile.DATATYPE));
Button btnRadioButton = new Button(grpValueType, SWT.RADIO);
btnRadioButton.setSelection(true);
btnRadioButton.setText(RedisClient.i18nFile.getText(I18nFile.TEXT));
textType.select(0);
Button btnRadioButton_1 = new Button(grpValueType, SWT.RADIO);
btnRadioButton_1.setText(RedisClient.i18nFile.getText(I18nFile.IMAGE));
final Combo imageType = new Combo(grpValueType, SWT.DROP_DOWN | SWT.READ_ONLY);
imageType.setItems(new String[] { RedisClient.i18nFile.getText(I18nFile.BASE64IMAGE) });
final Group grpValue = new Group(composite, SWT.NONE);
grpValue.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
grpValue.setText(RedisClient.i18nFile.getText(I18nFile.DATA));
grpValue.setBounds(0, 0, 70, 81);
grpValue.setLayout(new GridLayout(1, false));
composite_1.setLayout(new FillLayout(SWT.HORIZONTAL));

代码示例来源:origin: caoxinyu/RedisClient

@Override
protected void initData(Composite dataComposite) {
  Group grpValues = new Group(dataComposite, SWT.NONE);
  grpValues.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 4,
      1));
  grpValues.setText(RedisClient.i18nFile.getText(I18nFile.VALUES));
  grpValues.setLayout(new GridLayout(4, false));
  tblclmnMember.setText(RedisClient.i18nFile.getText(I18nFile.VALUE));
  Button btnAdd = new Button(grpValues, SWT.NONE);
  btnAdd.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1));
  btnAdd.addSelectionListener(new SelectionAdapter() {
  btnAdd.setText(RedisClient.i18nFile.getText(I18nFile.ADD));
  btnDelete = new Button(grpValues, SWT.NONE);
  btnDelete.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false,
      1, 1));
  btnDelete.setEnabled(false);
  btnDelete.setText(RedisClient.i18nFile.getText(I18nFile.DELETE));
  new Label(grpValues, SWT.NONE);

代码示例来源:origin: pentaho/pentaho-kettle

protected void optionsSectionLayout( Class<?> PKG, String prefix ) {
 gDetails = new Group( shell, SWT.SHADOW_ETCHED_IN );
 gDetails.setText( BaseMessages.getString( PKG, prefix + ".DetailsGroup.Label" ) );
 props.setLook( gDetails );
 // The layout
 gDetails.setLayout( new FormLayout() );
 fdDetails = new FormData();
 fdDetails.top = new FormAttachment( cRunConfiguration, 15 );
 fdDetails.right = new FormAttachment( 100, -15 );
 fdDetails.left = new FormAttachment( 0, 15 );
 gDetails.setBackground( shell.getBackground() ); // the default looks ugly
 gDetails.setLayoutData( fdDetails );
 optionsSectionControls();
}

代码示例来源:origin: caoxinyu/RedisClient

@Override
protected void initData(Composite dataComposite) {
  grpValues = new Group(dataComposite, SWT.NONE);
  grpValues.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 4,
      1));
  grpValues.setText(RedisClient.i18nFile.getText(I18nFile.VALUES));
  grpValues.setLayout(new GridLayout(4, false));
  tblclmnMember.setText(RedisClient.i18nFile.getText(I18nFile.MEMBER));
  Button btnAdd = new Button(grpValues, SWT.NONE);
  btnAdd.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1));
  btnAdd.addSelectionListener(new SelectionAdapter() {
  btnAdd.setText(RedisClient.i18nFile.getText(I18nFile.ADD));
  btnDelete = new Button(grpValues, SWT.NONE);
  btnDelete.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false,
      1, 1));
  btnDelete.setEnabled(false);
  btnDelete.setText(RedisClient.i18nFile.getText(I18nFile.DELETE));
  new Label(grpValues, SWT.NONE);

代码示例来源:origin: caoxinyu/RedisClient

grpValues = new Group(dataComposite, SWT.NONE);
grpValues.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 4,
    1));
grpValues.setText(RedisClient.i18nFile.getText(I18nFile.VALUES));
grpValues.setLayout(new GridLayout(4, false));
tblclmnNewColumn.setWidth(200);
btnInsertHead = new Button(grpValues, SWT.NONE);
btnInsertHead.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1));
btnInsertHead.addSelectionListener(new SelectionAdapter() {
btnInsertHead.setText(RedisClient.i18nFile.getText(I18nFile.INSERTHEAD));
btnAppendTail = new Button(grpValues, SWT.NONE);
btnAppendTail.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false,
    1, 1));
btnAppendTail.setText(RedisClient.i18nFile.getText(I18nFile.APPENDTAIL));
btnDeleteHead = new Button(grpValues, SWT.NONE);
btnDeleteHead.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1));
btnDeleteHead.addSelectionListener(new SelectionAdapter() {

代码示例来源:origin: pentaho/pentaho-kettle

Group layoutForm() {
 FormLayout setupLayout = new FormLayout();
 setupLayout.marginHeight = 15;
 setupLayout.marginWidth = 15;
 parentComponent.setLayout( setupLayout );
 wConnectionGroup = new Group( parentComponent, SWT.SHADOW_ETCHED_IN );
 wConnectionGroup.setText( getString( PKG, "JmsDialog.Connection" ) );
 FormLayout flConnection = new FormLayout();
 flConnection.marginHeight = 15;
 flConnection.marginWidth = 15;
 wConnectionGroup.setLayout( flConnection );
 FormData fdConnectionGroup = new FormData();
 fdConnectionGroup.left = new FormAttachment( 0, 0 );
 fdConnectionGroup.top = new FormAttachment( 0, 0 );
 fdConnectionGroup.right = new FormAttachment( 100, 0 );
 fdConnectionGroup.width = INPUT_WIDTH;
 wConnectionGroup.setLayoutData( fdConnectionGroup );
 props.setLook( wConnectionGroup );
 displayConnTypes( wConnectionGroup );
 setStartingsVals();
 return wConnectionGroup;
}

代码示例来源:origin: caoxinyu/RedisClient

grpValues = new Group(dataComposite, SWT.NONE);
grpValues.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 4,
    1));
grpValues.setText(RedisClient.i18nFile.getText(I18nFile.VALUES));
grpValues.setLayout(new GridLayout(4, false));
tblclmnNewColumn.setWidth(200);
btnAdd = new Button(grpValues, SWT.NONE);
btnAdd.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1));
btnAdd.addSelectionListener(new SelectionAdapter() {
btnAdd.setText(RedisClient.i18nFile.getText(I18nFile.ADD));
btnDelete = new Button(grpValues, SWT.NONE);
btnDelete.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false,
    1, 1));
btnDelete.setText(RedisClient.i18nFile.getText(I18nFile.DELETE));
btnRefresh = new Button(grpValues, SWT.NONE);
btnRefresh.addSelectionListener(new SelectionAdapter() {
  @Override

代码示例来源:origin: caoxinyu/RedisClient

grpValues = new Group(dataComposite, SWT.NONE);
grpValues.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 4, 1));
grpValues.setText(RedisClient.i18nFile.getText(I18nFile.VALUES));
grpValues.setLayout(new GridLayout(4, false));
tblclmnMember.setText(RedisClient.i18nFile.getText(I18nFile.MEMBER));
btnAdd = new Button(grpValues, SWT.NONE);
btnAdd.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1));
btnAdd.addSelectionListener(new SelectionAdapter() {
btnAdd.setText(RedisClient.i18nFile.getText(I18nFile.ADD));
btnDelete = new Button(grpValues, SWT.NONE);
btnDelete.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false,
    1, 1));
btnDelete.setText(RedisClient.i18nFile.getText(I18nFile.DELETE));
btnApply = new Button(grpValues, SWT.NONE);
btnApply.addSelectionListener(new SelectionAdapter() {
  @Override

代码示例来源:origin: caoxinyu/RedisClient

Group grpFavorites = new Group(shell, SWT.NONE);
grpFavorites.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
grpFavorites.setText(RedisClient.i18nFile.getText(I18nFile.FAVORITES));
grpFavorites.setLayout(new GridLayout(4, false));
tblclmnNewColumn_1.setText(RedisClient.i18nFile.getText(I18nFile.FAVORITE));
btnRenameButton = new Button(grpFavorites, SWT.NONE);
btnRenameButton.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1));
btnRenameButton.addSelectionListener(new SelectionAdapter() {
btnRemoveButton = new Button(grpFavorites, SWT.NONE);
btnRemoveButton.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1));
btnRemoveButton.addSelectionListener(new SelectionAdapter() {
composite.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));
Button btnOk = new Button(composite, SWT.NONE);
btnOk.addSelectionListener(new SelectionAdapter() {
  @SuppressWarnings("unchecked")

代码示例来源:origin: pentaho/pentaho-kettle

private void buildOptions( Control widgetAbove ) {
 wOptionsGroup = new Group( shell, SWT.SHADOW_ETCHED_IN );
 props.setLook( wOptionsGroup );
 wOptionsGroup.setText( BaseMessages.getString( PKG, "AbortDialog.Options.Group.Label" ) );
 FormLayout flOptionsGroup = new FormLayout();
 flOptionsGroup.marginHeight = 15;
 flOptionsGroup.marginWidth = 15;
 wOptionsGroup.setLayout( flOptionsGroup );
 fdOptionsGroup.top = new FormAttachment( widgetAbove, 15 );
 fdOptionsGroup.right = new FormAttachment( 100, 0 );
 wOptionsGroup.setLayoutData( fdOptionsGroup );
 wAbortButton = new Button( wOptionsGroup, SWT.RADIO );
 wAbortButton.addSelectionListener( lsSelMod );
 wAbortButton.setText( BaseMessages.getString( PKG, "AbortDialog.Options.Abort.Label" ) );
 props.setLook( wAbortButton );
 wAbortWithErrorButton = new Button( wOptionsGroup, SWT.RADIO );
 wAbortWithErrorButton.addSelectionListener( lsSelMod );
 wAbortWithErrorButton.setText( BaseMessages.getString( PKG, "AbortDialog.Options.AbortWithError.Label" ) );
 props.setLook( wAbortWithErrorButton );
 props.setLook( wSafeStopButton );

代码示例来源:origin: pentaho/pentaho-kettle

searchText.setLayoutData( frmData );
lblFind.setLayoutData( frmData );
btnNext = new Button( sShell, SWT.PUSH );
btnNext.setText( BaseMessages.getString( PKG, "Widget.Styled.Comp.FindNext" ) );
btnNext.setEnabled( false );
btnNext.setLayoutData( frmData );
btnCancel = new Button( sShell, SWT.PUSH );
btnCancel.setText( BaseMessages.getString( PKG, "Widget.Styled.Comp.Close" ) );
frmData = new FormData();
btnCancel.setLayoutData( frmData );
btnIgnoreCase = new Button( sShell, SWT.CHECK );
btnIgnoreCase.setText( BaseMessages.getString( PKG, "Widget.Styled.Comp.CaseSensitive" ) );
frmData = new FormData();
btnWrapSearch.setLayoutData( frmData );
Group grpDir = new Group( sShell, SWT.SHADOW_IN );
grpDir.setText( BaseMessages.getString( PKG, "Widget.Styled.Comp.Direction" ) );
optForward = new Button( grpDir, SWT.RADIO );

代码示例来源:origin: pentaho/pentaho-kettle

private void buildLogging( Composite widgetAbove ) {
 wLoggingGroup = new Group( shell, SWT.SHADOW_ETCHED_IN );
 props.setLook( wLoggingGroup );
 wLoggingGroup.setText( BaseMessages.getString( PKG, "AbortDialog.Logging.Group" ) );
 FormLayout flLoggingGroup = new FormLayout();
 flLoggingGroup.marginHeight = 15;
 flLoggingGroup.marginWidth = 15;
 wLoggingGroup.setLayout( flLoggingGroup );
 fdLoggingGroup.right = new FormAttachment( 100, 0 );
 fdLoggingGroup.bottom = new FormAttachment( hSpacer, -15 );
 wLoggingGroup.setLayoutData( fdLoggingGroup );
 wlMessage = new Label( wLoggingGroup, SWT.RIGHT );
 wlMessage.setText( BaseMessages.getString( PKG, "AbortDialog.Logging.AbortMessage.Label" ) );
 props.setLook( wlMessage );
 fdlMessage = new FormData();
 wMessage.setLayoutData( fdMessage );
 wAlwaysLogRows = new Button( wLoggingGroup, SWT.CHECK );
 wAlwaysLogRows.setText( BaseMessages.getString( PKG, "AbortDialog.Logging.AlwaysLogRows.Label" ) );
 props.setLook( wAlwaysLogRows );

代码示例来源:origin: pentaho/pentaho-kettle

this.setLayout( topicSelectionLayout );
wTopicGroup = new Group( this, SWT.SHADOW_ETCHED_IN );
props.setLook( wTopicGroup );
wTopicGroup.setText( topicGroupLabel );
wTopicGroup.setLayout( topicGroupLayout );
wTopicGroup.setLayoutData( new FormDataBuilder().top( 0, ConstUI.MEDUIM_MARGIN ).fullWidth().bottom().result() );
wTopicFromText = new Button( wTopicGroup, SWT.RADIO );
wTopicFromField = new Button( wTopicGroup, SWT.RADIO );
props.setLook( wTopicFromText );
props.setLook( wTopicFromField );
wTopicFromText.addSelectionListener( selectionListener );
Label separator = new Label( wTopicGroup, SWT.SEPARATOR | SWT.VERTICAL );
separator.setLayoutData( new FormDataBuilder().top().left( wTopicFromField, 15 ).bottom().result() );
wlTopic = new Label( wTopicGroup, SWT.LEFT );
wlTopic.setLayoutData( new FormDataBuilder().top().left( separator, 15 ).right().result() );
props.setLook( wlTopic );

代码示例来源:origin: pentaho/pentaho-kettle

marginLayout.marginHeight = 15;
radioGroup = new Group( this, i );
radioGroup.setLayout( marginLayout );
radioGroup.setText( title );
FormData fdRadioGroup = new FormData();
fdRadioGroup.top = new FormAttachment( 0 );
fdRadioGroup.left = new FormAttachment( 0 );
fdRadioGroup.right = new FormAttachment( 100 );
radioGroup.setLayoutData( fdRadioGroup );
props.setLook( radioGroup );

代码示例来源:origin: pentaho/pentaho-kettle

wSettingsGroup = new Group( parentTab, SWT.SHADOW_NONE );
props.setLook( wSettingsGroup );
wSettingsGroup.setText( BaseMessages.getString( PKG, "ElasticSearchBulkDialog.SettingsGroup.Label" ) );
wSettingsGroup.setLayout( settingGroupLayout );
wlBatchSize = new Label( wSettingsGroup, SWT.RIGHT );
wlBatchSize.setText( BaseMessages.getString( PKG, "ElasticSearchBulkDialog.BatchSize.Label" ) );
props.setLook( wlBatchSize );
wlStopOnError = new Label( wSettingsGroup, SWT.RIGHT );
wlStopOnError.setText( BaseMessages.getString( PKG, "ElasticSearchBulkDialog.StopOnError.Label" ) );
wStopOnError = new Button( wSettingsGroup, SWT.CHECK | SWT.RIGHT );
wStopOnError.setToolTipText( BaseMessages.getString( PKG, "ElasticSearchBulkDialog.StopOnError.Tooltip" ) );
wStopOnError.addSelectionListener( new SelectionListener() {
getPreviousFields( wIdInField );
wlIsOverwrite = new Label( wSettingsGroup, SWT.RIGHT );
wlIsOverwrite.setText( BaseMessages.getString( PKG, "ElasticSearchBulkDialog.Overwrite.Label" ) );
wlUseOutput.setText( BaseMessages.getString( PKG, "ElasticSearchBulkDialog.UseOutput.Label" ) );
wUseOutput = new Button( wSettingsGroup, SWT.CHECK | SWT.RIGHT );
wUseOutput.setToolTipText( BaseMessages.getString( PKG, "ElasticSearchBulkDialog.UseOutput.Tooltip" ) );

代码示例来源:origin: pentaho/pentaho-kettle

private void fillIndexGroup( Composite parentTab ) {
 wIndexGroup = new Group( parentTab, SWT.SHADOW_NONE );
 props.setLook( wIndexGroup );
 wIndexGroup.setText( BaseMessages.getString( PKG, "ElasticSearchBulkDialog.IndexGroup.Label" ) );
 wIndexGroup.setLayout( indexGroupLayout );
 wTest = new Button( wIndexGroup, SWT.PUSH );
 wTest.setText( BaseMessages.getString( PKG, "ElasticSearchBulkDialog.TestIndex.Label" ) );
 wTest.setToolTipText( BaseMessages.getString( PKG, "ElasticSearchBulkDialog.TestIndex.Tooltip" ) );
 fdIndexGroup.top = new FormAttachment( wStepname, Const.MARGIN );
 fdIndexGroup.right = new FormAttachment( 100, -Const.MARGIN );
 wIndexGroup.setLayoutData( fdIndexGroup );

相关文章