Refine search
private void buildProperiesTab() { CTabItem wPropertiesTab = new CTabItem( wTabFolder, SWT.NONE ); wPropertiesTab.setText( BaseMessages.getString( PKG, "JmsProducerDialog.Properties.Tab" ) ); Composite wPropertiesComp = new Composite( wTabFolder, SWT.NONE ); props.setLook( wPropertiesComp ); FormLayout fieldsLayout = new FormLayout(); fieldsLayout.marginHeight = 15; fieldsLayout.marginWidth = 15; wPropertiesComp.setLayout( fieldsLayout ); FormData propertiesFormData = new FormData(); propertiesFormData.left = new FormAttachment( 0, 0 ); propertiesFormData.top = new FormAttachment( wPropertiesComp, 0 ); propertiesFormData.right = new FormAttachment( 100, 0 ); propertiesFormData.bottom = new FormAttachment( 100, 0 ); wPropertiesComp.setLayoutData( propertiesFormData ); buildPropertiesTable( wPropertiesComp ); wPropertiesComp.layout(); wPropertiesTab.setControl( wPropertiesComp ); }
public void showPerfView() { // What button? // // XulToolbarButton showLogXulButton = toolbar.getButtonById("trans-show-log"); // ToolItem toolBarButton = (ToolItem) showLogXulButton.getNativeObject(); if ( transPerfTab == null || transPerfTab.isDisposed() ) { addTransPerf(); } else { transPerfTab.dispose(); transGraph.checkEmptyExtraView(); } }
public void handleEvent( Event e ) { CTabItem item = folder.getSelection(); StyledTextComp st = (StyledTextComp) item.getControl(); addCtab( item.getText(), st.getText(), ADD_COPY ); } } );
private void refresh() { // CTabItem item = getCTabItemByName(strActiveScript); for ( int i = 0; i < folder.getItemCount(); i++ ) { CTabItem item = folder.getItem( i ); if ( item.getText().equals( strActiveScript ) ) { item.setImage( imageActiveScript ); } else if ( item.getText().equals( strActiveStartScript ) ) { item.setImage( imageActiveStartScript ); } else if ( item.getText().equals( strActiveEndScript ) ) { item.setImage( imageActiveEndScript ); } else { item.setImage( imageInactiveScript ); } } // modifyScriptTree(null, SET_ACTIVE_ITEM); }
private void refreshScripts() { CTabItem[] cTabs = folder.getItems(); for ( int i = 0; i < cTabs.length; i++ ) { if ( cTabs[i].getImage().equals( imageActiveStartScript ) ) { strActiveStartScript = cTabs[i].getText(); } else if ( cTabs[i].getImage().equals( imageActiveEndScript ) ) { strActiveEndScript = cTabs[i].getText(); } } }
wMonitorTab = new CTabItem( wTabFolder, SWT.NONE ); wMonitorTab.setText( BaseMessages.getString( PKG, "TransDialog.MonitorTab.Label" ) ); Composite wMonitorComp = new Composite( wTabFolder, SWT.NONE ); props.setLook( wMonitorComp ); monitorLayout.marginWidth = Const.FORM_MARGIN; monitorLayout.marginHeight = Const.FORM_MARGIN; wMonitorComp.setLayout( monitorLayout ); wEnableStepPerfMonitor.setLayoutData( fdEnableStepPerfMonitor ); wEnableStepPerfMonitor.addSelectionListener( lsModSel ); wStepPerfInterval = new Text( wMonitorComp, SWT.LEFT | SWT.BORDER | SWT.SINGLE ); props.setLook( wStepPerfInterval ); FormData fdStepPerfInterval = new FormData(); wStepPerfInterval.setLayoutData( fdStepPerfInterval ); wStepPerfInterval.addModifyListener( lsMod ); wMonitorComp.setLayoutData( fdMonitorComp ); wMonitorTab.setControl( wMonitorComp );
wSettingsTab = new CTabItem( wTabFolder, SWT.NONE ); wSettingsTab.setText( BaseMessages.getString( PKG, "JobDialog.SettingsTab.Label" ) ); LogLayout.marginHeight = Const.MARGIN; Composite wSettingsComp = new Composite( wTabFolder, SWT.NONE ); props.setLook( wSettingsComp ); wSettingsComp.setLayout( LogLayout ); fdLogComp.right = new FormAttachment( 100, 0 ); fdLogComp.bottom = new FormAttachment( 100, 0 ); wSettingsComp.setLayoutData( fdLogComp ); wSettingsComp.layout(); wSettingsTab.setControl( wSettingsComp );
private void buildResultsTab() { wResultsTab = new CTabItem( wTabFolder, SWT.NONE ); wResultsTab.setText( BaseMessages.getString( PKG, "BaseStreamingDialog.ResultsTab" ) ); wResultsComp = new Composite( wTabFolder, SWT.NONE ); props.setLook( wResultsComp ); FormLayout resultsLayout = new FormLayout(); resultsLayout.marginHeight = 15; resultsLayout.marginWidth = 15; wResultsComp.setLayout( resultsLayout ); fdResultsComp.left = new FormAttachment( 0, 0 ); fdResultsComp.top = new FormAttachment( 0, 0 ); fdResultsComp.right = new FormAttachment( 100, 0 ); fdResultsComp.bottom = new FormAttachment( 100, 0 ); wResultsComp.setLayoutData( fdResultsComp ); wlSubStep = new Label( wResultsComp, SWT.LEFT ); props.setLook( wlSubStep ); FormData fdlSubTrans = new FormData(); fdlSubTrans.left = new FormAttachment( 0, 0 ); fdlSubTrans.top = new FormAttachment( 0, 0 ); wlSubStep.setLayoutData( fdlSubTrans ); wlSubStep.setText( BaseMessages.getString( PKG, "BaseStreaming.Dialog.Transformation.SubTransStep" ) ); wResultsComp.layout(); wResultsTab.setControl( wResultsComp );
getClass().getResourceAsStream("/subscribe.png")); tbtmNewItem = new CTabItem(tabFolder, SWT.NONE); tbtmNewItem.setShowClose(true); composite_3 = new Composite(tabFolder, SWT.NONE); tbtmNewItem.setControl(composite_3); composite_3.setLayout(new GridLayout(1, false)); tbtmNewItem.setText(server.getName() +" "+RedisClient.i18nFile.getText(I18nFile.SUBSCRIBE)); tbtmNewItem.setImage(subImage); Composite composite_4 = new Composite(composite_3, SWT.NONE); composite_4.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); composite_4.setLayout(new GridLayout(3, false)); lblNewLabel = new Label(composite_4, SWT.NONE); lblNewLabel.setBounds(0, 0, 55, 15); lblNewLabel.setText(RedisClient.i18nFile.getText(I18nFile.CHANNEL)); final Text channel = new Text(composite_4, SWT.BORDER); channel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); channel.setBounds(0, 0, 88, 23); channel.addControlListener(new ControlAdapter() { @Override btnNewButton = new Button(composite_4, SWT.NONE); btnNewButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); btnNewButton.setBounds(0, 0, 75, 25); btnNewButton.setText(RedisClient.i18nFile.getText(I18nFile.SUBSCRIBE));
private void addParametersTab( final MappingParameters parameters ) { CTabItem wParametersTab = new CTabItem( wTabFolder, SWT.NONE ); wParametersTab.setText( BaseMessages.getString( PKG, "SimpleMappingDialog.Parameters.Title" ) ); wParametersTab.setToolTipText( BaseMessages.getString( PKG, "SimpleMappingDialog.Parameters.Tooltip" ) ); Composite wParametersComposite = new Composite( wTabFolder, SWT.NONE ); props.setLook( wParametersComposite ); parameterTabLayout.marginWidth = 15; parameterTabLayout.marginHeight = 15; wParametersComposite.setLayout( parameterTabLayout ); Button wInheritAll = new Button( wParametersComposite, SWT.CHECK ); wInheritAll.setText( BaseMessages.getString( PKG, "SimpleMappingDialog.Parameters.InheritAll" ) ); props.setLook( wInheritAll ); FormData fdInheritAll = new FormData(); fdInheritAll.bottom = new FormAttachment( 100, 0 ); fdInheritAll.left = new FormAttachment( 0, 0 ); fdInheritAll.right = new FormAttachment( 100, -30 ); wInheritAll.setLayoutData( fdInheritAll ); wInheritAll.setSelection( parameters.isInheritingAllVariables() ); fdParametersComposite.right = new FormAttachment( 100, 0 ); fdParametersComposite.bottom = new FormAttachment( 100, 0 ); wParametersComposite.setLayoutData( fdParametersComposite ); wParametersComposite.layout(); wParametersTab.setControl( wParametersComposite );
wDateTab = new CTabItem( wTabFolder, SWT.NONE ); wDateTab.setText( BaseMessages.getString( PKG, "TransDialog.DateTab.Label" ) ); DateLayout.marginHeight = Const.MARGIN; Composite wDateComp = new Composite( wTabFolder, SWT.NONE ); props.setLook( wDateComp ); wDateComp.setLayout( DateLayout ); wMaxdatetable = new Text( wDateComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER ); props.setLook( wMaxdatetable ); wMaxdatetable.addModifyListener( lsMod ); wMaxdatetable.setLayoutData( fdMaxdatetable ); wDateComp.setLayoutData( fdDateComp ); wDateTab.setControl( wDateComp );
private void addServersTab() { wServersTab = new CTabItem( wTabFolder, SWT.NONE ); wServersTab.setText( BaseMessages.getString( PKG, "ElasticSearchBulkDialog.ServersTab.TabTitle" ) ); serversLayout.marginHeight = Const.FORM_MARGIN; Composite wServersComp = new Composite( wTabFolder, SWT.NONE ); wServersComp.setLayout( serversLayout ); props.setLook( wServersComp ); wTestCl = new Button( wServersComp, SWT.PUSH ); wTestCl.setText( BaseMessages.getString( PKG, "ElasticSearchBulkDialog.TestCluster.Label" ) ); wTestCl.setToolTipText( BaseMessages.getString( PKG, "ElasticSearchBulkDialog.TestCluster.Tooltip" ) ); wTestCl.addListener( SWT.Selection, new Listener() { props ); FormData fdServers = new FormData(); fdServers.left = new FormAttachment( 0, Const.MARGIN ); fdServers.top = new FormAttachment( 0, Const.MARGIN ); fdServers.right = new FormAttachment( 100, -Const.MARGIN ); fdServers.bottom = new FormAttachment( wTestCl, -Const.MARGIN ); wServers.setLayoutData( fdServers ); fdServersComp.right = new FormAttachment( 100, 0 ); fdServersComp.bottom = new FormAttachment( 100, 0 ); wServersComp.setLayoutData( fdServersComp ); wServersComp.layout(); wServersTab.setControl( wServersComp );
private void addResultFilesTab() { final CTabItem wTab = new CTabItem( wTabFolder, SWT.NONE ); wTab.setText( BaseMessages.getString( PKG, "JobExecutorDialog.ResultFiles.Title" ) ); wTab.setToolTipText( BaseMessages.getString( PKG, "JobExecutorDialog.ResultFiles.Tooltip" ) ); Composite wInputComposite = new Composite( scrolledComposite, SWT.NONE ); props.setLook( wInputComposite ); tabLayout.marginWidth = 15; tabLayout.marginHeight = 15; wInputComposite.setLayout( tabLayout ); FormData fdResultFilesTarget = new FormData(); fdResultFilesTarget.width = 250; fdResultFilesTarget.top = new FormAttachment( wlResultFilesTarget, 5 ); fdResultFilesTarget.left = new FormAttachment( 0, 0 ); // To the right wResultFilesTarget.setLayoutData( fdResultFilesTarget ); wResultFileNameField.setLayoutData( fdResultFileNameField ); wInputComposite.pack(); Rectangle bounds = wInputComposite.getBounds(); scrolledComposite.setMinHeight( bounds.height ); wTab.setControl( scrolledComposite ); wTabFolder.setSelection( wTab );
@Override public void refreshLangUI() { tbtmNewItem.setText(server.getName() +" "+RedisClient.i18nFile.getText(I18nFile.SUBSCRIBE)); lblNewLabel.setText(RedisClient.i18nFile.getText(I18nFile.CHANNEL)); btnNewButton.setText(RedisClient.i18nFile.getText(I18nFile.SUBSCRIBE)); for(SubChannel subedChannel: subChannels){ subedChannel.refreshLangUI(); } composite_3.pack(); }
@Override public void execute() { super.execute(); if(result.getType() != ResultType.Error){ tbtmNewItem = new CTabItem(console.getTabFolder_2(), SWT.NONE); tbtmNewItem.setText(RedisClient.i18nFile.getText(I18nFile.DATA)+(console.getTabFolder_2().indexOf(tbtmNewItem))); Composite composite = new Composite(console.getTabFolder_2(), SWT.NONE); tbtmNewItem.setControl(composite); composite.setLayout(new GridLayout(1, false)); initData(composite); console.getTabFolder_2().setSelection(tbtmNewItem); } } protected abstract void initData(Composite composite) ;
public static CTabFolder createTabFolder( Composite composite, FormData fd, String... titles ) { Composite container = new Composite( composite, SWT.NONE ); WidgetUtils.setFormLayout( container, 0 ); container.setLayoutData( fd ); CTabFolder tabFolder = new CTabFolder( container, SWT.NONE ); tabFolder.setLayoutData( new FormDataBuilder().fullSize().result() ); for ( String title : titles ) { if ( title.length() < 8 ) { title = StringUtils.rightPad( title, 8 ); } Composite tab = new Composite( tabFolder, SWT.NONE ); WidgetUtils.setFormLayout( tab, ConstUI.MEDUIM_MARGIN ); CTabItem tabItem = new CTabItem( tabFolder, SWT.NONE ); tabItem.setText( title ); tabItem.setControl( tab ); } tabFolder.setSelection( 0 ); return tabFolder; }
private void ok() { if ( Utils.isEmpty( wStepname.getText() ) ) { return; stepname = wStepname.getText(); // return value switch ( mb.open() ) { case SWT.OK: strActiveScript = folder.getItem( 0 ).getText(); refresh(); bInputOK = true; if ( bInputOK && wCompatible.getSelection() ) {
@Override public void refreshLangUI() { tbtmNewItem.setText(server.getName() + " " + RedisClient.i18nFile.getText(I18nFile.CONSOLE)); tbtmNewItem_1.setText(RedisClient.i18nFile.getText(I18nFile.RESULT)); btnExecButton.setText(RedisClient.i18nFile.getText(I18nFile.RUNCURRENT)); btnExecButton.setToolTipText(RedisClient.i18nFile.getText(I18nFile.RUNCURRENTTIP)+"\tF7"); btnExecSelectButton.setText(RedisClient.i18nFile.getText(I18nFile.RUNSELECT)); btnExecSelectButton.setToolTipText(RedisClient.i18nFile.getText(I18nFile.RUNSELECTTIP)+"\tF8"); btnExecNextButton.setText(RedisClient.i18nFile.getText(I18nFile.RUNFOLLOW)); btnExecNextButton.setToolTipText(RedisClient.i18nFile.getText(I18nFile.RUNFOLLOWTIP)+"\tF9"); for(DataCommand dataCommand: dataCmds) dataCommand.refreshLangUI(); menu.dispose(); initMenu(); composite_4.pack(); }
private void addCtab( String tabName, String tabCode, TabAddActions tabType ) { CTabItem item = new CTabItem( folder, SWT.CLOSE ); item.setText( tabName ); break; default: item.setText( getNextName( tabName ) ); break; new StyledTextComp( transMeta, item.getParent(), SWT.MULTI | SWT.LEFT | SWT.H_SCROLL | SWT.V_SCROLL, item .getText(), false ); if ( ( tabCode != null ) && tabCode.length() > 0 ) { wScript.setText( tabCode ); wScript.setText( snippitsHelper.getDefaultCode() ); item.setImage( imageInactiveScript ); props.setLook( wScript, Props.WIDGET_STYLE_FIXED ); item.setControl( wScript );