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

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

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

Group.setLayout介绍

暂无

代码示例

代码示例来源: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));
final Button btnHash = new Button(grpKeyType, SWT.CHECK);

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

runConfigurationDialog.getGroup().setLayout( gridLayout );
Label schemaLabel = new Label( runConfigurationDialog.getGroup(), SWT.LEFT );
props.setLook( schemaLabel );
schemaLabel.setText( BaseMessages.getString( PKG, "SparkRunConfigurationDialog.Label.Schema" ) );
schemaLabel.setLayoutData( protocolLabelData );
Label optionLabel = new Label( runConfigurationDialog.getGroup(), SWT.LEFT );
props.setLook( optionLabel );
optionLabel.setText( BaseMessages.getString( PKG, "SparkRunConfigurationDialog.Label.URL" ) );
optionLabel.setLayoutData( urlLabelData );

代码示例来源: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));
btnUp.setText(RedisClient.i18nFile.getText(I18nFile.UP));
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));
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: 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

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));
btnDelete.setText(RedisClient.i18nFile.getText(I18nFile.DELETE));

代码示例来源: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

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_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.setEnabled(false);
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));
Button btnOk = new Button(composite_1, SWT.NONE);
btnOk.addSelectionListener(new SelectionAdapter() {
  @Override
btnOk.setText(RedisClient.i18nFile.getText(I18nFile.OK));
super.createContents();

代码示例来源: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: 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.setText(RedisClient.i18nFile.getText(I18nFile.DELETE));
  new Label(grpValues, SWT.NONE);

代码示例来源: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.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() {
btnDeleteHead.setText(RedisClient.i18nFile.getText(I18nFile.DELETEHEAD));
btnDeleteTail = new Button(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);
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
btnRefresh.setText(RedisClient.i18nFile.getText(I18nFile.REFRESH));
btnWatch = new Button(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));
tblclmnMember.setText(RedisClient.i18nFile.getText(I18nFile.VALUE));
btnAdd = new Button(grpValues, SWT.NONE);
btnAdd.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1));
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.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1));
btnApply.setText(RedisClient.i18nFile.getText(I18nFile.APPLY));
btnCancel = new Button(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));
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
setApply(false);
btnApply.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1));
btnApply.setText(RedisClient.i18nFile.getText(I18nFile.APPLY));
btnCancel = new Button(grpValues, SWT.NONE);

代码示例来源: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() {
btnRenameButton.setText(RedisClient.i18nFile.getText(I18nFile.RENAME));
btnRemoveButton = new Button(grpFavorites, SWT.NONE);
btnRemoveButton.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1));
btnRemoveButton.addSelectionListener(new SelectionAdapter() {
btnRemoveButton.setText(RedisClient.i18nFile.getText(I18nFile.REMOVE));
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")
btnOk.setText(RedisClient.i18nFile.getText(I18nFile.OK));
Button btnCancel = new Button(composite, SWT.NONE);

代码示例来源: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" ) );
 FormData fdAbort = new FormData();
 fdAbort.left = new FormAttachment( 0, 0 );
 props.setLook( wAbortButton );
 props.setLook( wAbortWithErrorButton );
 props.setLook( wSafeStopButton );
 wlRowThreshold = new Label( wOptionsGroup, SWT.RIGHT );
 wlRowThreshold.setText( BaseMessages.getString( PKG, "AbortDialog.Options.RowThreshold.Label" ) );
 props.setLook( wlRowThreshold );
 fdlRowThreshold = new FormData();

代码示例来源: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 );
 wAlwaysLogRows.setToolTipText( BaseMessages.getString( PKG, "AbortDialog.Logging.AlwaysLogRows.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 );

代码示例来源: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.setSelection( !topicInField );
wTopicFromText.setText( textTopicRadioLabel );
wTopicFromField.setText( fieldTopicRadioLabel );
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 );

相关文章