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; }
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);
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));
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(); }
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));
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; }
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();
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 );
@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);
@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);
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);
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);
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);
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);
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);
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();
searchText.setLayoutData( frmData ); Label lblFind = new Label( sShell, SWT.LEFT ); lblFind.setText( BaseMessages.getString( PKG, "Widget.Styled.Comp.Find.Title" ) ); frmData = new FormData(); frmData.right = new FormAttachment( searchText, -8 ); lblFind.setLayoutData( frmData ); btnNext = new Button( sShell, SWT.PUSH ); btnNext.setText( BaseMessages.getString( PKG, "Widget.Styled.Comp.FindNext" ) ); btnNext.setEnabled( false ); frmData = new FormData(); btnNext.setLayoutData( frmData ); btnCancel.setLayoutData( frmData ); 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 ); frmData.right = new FormAttachment( btnNext, -7 ); frmData.bottom = new FormAttachment( 100, -10 ); grpDir.setLayoutData( frmData );
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" ) );
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 );
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 );