@Override public void transFinished( Trans trans ) throws KettleException { try { endProcessing(); lastWrittenStepPerformanceSequenceNr = writeStepPerformanceLogRecords( lastWrittenStepPerformanceSequenceNr, LogStatus.END ); } catch ( KettleException e ) { throw new KettleException( BaseMessages.getString( PKG, "Trans.Exception.UnableToPerformLoggingAtTransEnd" ), e ); } } } );
protected Button createSettingsButton( Composite p, String text, String title, Control top, SelectionAdapter sa ) { Button button = new Button( p, SWT.CHECK ); button.setText( BaseMessages.getString( PKG, text ) ); button.setToolTipText( BaseMessages.getString( PKG, title ) ); props.setLook( button ); FormData fd = new FormData(); fd.left = new FormAttachment( 0, Const.MARGIN * 2 ); if ( top == null ) { fd.top = new FormAttachment( 0, 10 ); } else { fd.top = new FormAttachment( top, 5 ); } fd.right = new FormAttachment( 100, 0 ); button.setLayoutData( fd ); button.addSelectionListener( sa ); return button; }
@Override protected Control addAdditionalComponentIfNeed( int middle, int margin, Composite wFileComp, Composite topComp ) { // Run this as a command instead? wlFileIsCommand = new Label( wFileComp, SWT.RIGHT ); wlFileIsCommand .setText( BaseMessages.getString( textFileOutputLegacyMetaClass, "TextFileOutputLegacyDialog.FileIsCommand.Label" ) ); props.setLook( wlFileIsCommand ); fdlFileIsCommand = new FormData(); fdlFileIsCommand.left = new FormAttachment( 0, 0 ); fdlFileIsCommand.top = new FormAttachment( topComp, margin ); fdlFileIsCommand.right = new FormAttachment( middle, -margin ); wlFileIsCommand.setLayoutData( fdlFileIsCommand ); wFileIsCommand = new Button( wFileComp, SWT.CHECK ); props.setLook( wFileIsCommand ); fdFileIsCommand = new FormData(); fdFileIsCommand.left = new FormAttachment( middle, 0 ); fdFileIsCommand.top = new FormAttachment( topComp, margin ); fdFileIsCommand.right = new FormAttachment( 100, 0 ); wFileIsCommand.setLayoutData( fdFileIsCommand ); wFileIsCommand.addSelectionListener( new SelectionAdapter() { public void widgetSelected( SelectionEvent e ) { input.setChanged(); enableParentFolder(); } } ); return wlFileIsCommand; }
fileNameSupplier = repository == null ? this::promptForLocalFile : this::promptForRepositoryFile; FormLayout formLayout = new FormLayout(); formLayout.marginWidth = 0; formLayout.marginHeight = 0; FormData fdFileName = new FormData(); fdFileName.left = new FormAttachment( 0, 0 ); fdFileName.top = new FormAttachment( 0, 0 ); fdFileName.width = 275; wFileName.setLayoutData( fdFileName ); wBrowse.setText( BaseMessages.getString( PKG, "VFSFileSelection.Dialog.Browse" ) ); FormData fdBrowse = new FormData(); fdBrowse.left = new FormAttachment( wFileName, 5 ); fdBrowse.top = new FormAttachment( wFileName, 0, SWT.TOP ); wBrowse.setLayoutData( fdBrowse );
/** * @param factory * factory to use. */ protected void buildLogFileLine( final PluginWidgetFactory factory ) { final Control topControl = this.wFastLoadPath; this.wlLogFile = factory.createRightLabel( BaseMessages.getString( PKG, "TeraFastDialog.LogFile.Label" ) ); this.props.setLook( this.wlLogFile ); this.wlLogFile.setLayoutData( factory.createLabelLayoutData( topControl ) ); this.wbLogFile = factory.createPushButton( BaseMessages.getString( PKG, "TeraFastDialog.Browse.Button" ) ); this.props.setLook( this.wbLogFile ); FormData formData = factory.createControlLayoutData( topControl ); formData.left = null; this.wbLogFile.setLayoutData( formData ); this.wLogFile = factory.createSingleTextVarLeft(); this.props.setLook( this.wLogFile ); formData = factory.createControlLayoutData( topControl ); formData.right = new FormAttachment( this.wbLogFile, -factory.getMargin() ); this.wLogFile.setLayoutData( formData ); }
props.setLook( composite ); FormLayout compLayout = new FormLayout(); compLayout.marginHeight = Const.FORM_MARGIN; compLayout.marginWidth = Const.FORM_MARGIN; composite.setLayout( compLayout ); wlServername = new Label( composite, SWT.RIGHT ); wlServername.setText( BaseMessages.getString( PKG, "CreateDatabaseWizardPageInformix.Servername.Label" ) ); props.setLook( wlServername ); fdlServername = new FormData(); fdlServername.top = new FormAttachment( 0, 0 ); fdlServername.left = new FormAttachment( 0, 0 ); fdlServername.right = new FormAttachment( middle, 0 ); wlServername.setLayoutData( fdlServername ); fdServername = new FormData(); fdServername.top = new FormAttachment( 0, 0 ); fdServername.left = new FormAttachment( middle, margin );
private void buildSetupTab() { wSetupTab = new CTabItem( wTabFolder, SWT.NONE ); wSetupTab.setText( BaseMessages.getString( PKG, "BaseStreamingDialog.SetupTab" ) ); wSetupComp = new Composite( wTabFolder, SWT.NONE ); props.setLook( wSetupComp ); FormLayout setupLayout = new FormLayout(); setupLayout.marginHeight = 15; setupLayout.marginWidth = 15; wSetupComp.setLayout( setupLayout ); buildSetup( wSetupComp ); FormData fdSetupComp = new FormData(); fdSetupComp.left = new FormAttachment( 0, 0 ); fdSetupComp.top = new FormAttachment( 0, 0 ); fdSetupComp.right = new FormAttachment( 100, 0 ); fdSetupComp.bottom = new FormAttachment( 100, 0 ); wSetupComp.setLayoutData( fdSetupComp ); wSetupComp.layout(); wSetupTab.setControl( wSetupComp ); }
private void ensureHasPermissions() throws KettleException { if ( !hasNecessaryPermissions ) { throw new KettleException( BaseMessages.getString( UserRoleDelegate.class, "UserRoleDelegate.ERROR_0014_INSUFFICIENT_PRIVILEGES" ) ); //$NON-NLS-1$ } }
/** * @param factory * factory to use. */ protected void buildDataFileLine( final PluginWidgetFactory factory ) { final Control topControl = this.wbTruncateTable; this.wlDataFile = factory.createRightLabel( BaseMessages.getString( PKG, "TeraFastDialog.DataFile.Label" ) ); this.props.setLook( this.wlDataFile ); this.wlDataFile.setLayoutData( factory.createLabelLayoutData( topControl ) ); this.wbDataFile = factory.createPushButton( BaseMessages.getString( PKG, "TeraFastDialog.Browse.Button" ) ); this.props.setLook( this.wbDataFile ); FormData formData = factory.createControlLayoutData( topControl ); formData.left = null; this.wbDataFile.setLayoutData( formData ); this.wDataFile = factory.createSingleTextVarLeft(); this.props.setLook( this.wDataFile ); formData = factory.createControlLayoutData( topControl ); formData.right = new FormAttachment( this.wbDataFile, -factory.getMargin() ); this.wDataFile.setLayoutData( formData ); }
private static Button newButton( final Composite parent ) { Button button = new Button( parent, SWT.PUSH ); button.setImage( GUIResource.getInstance().getImageHelpWeb() ); button.setText( BaseMessages.getString( PKG, "System.Button.Help" ) ); button.setToolTipText( BaseMessages.getString( PKG, "System.Tooltip.Help" ) ); FormData fdButton = new FormData(); fdButton.left = new FormAttachment( 0, 0 ); fdButton.bottom = new FormAttachment( 100, 0 ); button.setLayoutData( fdButton ); return button; }
props.setLook( composite ); FormLayout compLayout = new FormLayout(); compLayout.marginHeight = Const.FORM_MARGIN; compLayout.marginWidth = Const.FORM_MARGIN; composite.setLayout( compLayout ); wlDSN = new Label( composite, SWT.RIGHT ); wlDSN.setText( BaseMessages.getString( PKG, "CreateDatabaseWizardPageODBC.DSN.Label" ) ); props.setLook( wlDSN ); fdlDSN = new FormData(); fdlDSN.left = new FormAttachment( 0, 0 ); fdlDSN.right = new FormAttachment( middle, 0 ); wlDSN.setLayoutData( fdlDSN ); wDSN = new Text( composite, SWT.SINGLE | SWT.BORDER ); props.setLook( wDSN ); fdDSN = new FormData(); fdDSN.left = new FormAttachment( middle, margin ); fdDSN.right = new FormAttachment( 100, 0 ); wDSN.setLayoutData( fdDSN );
private void buildFieldsTab() { CTabItem wFieldsTab = new CTabItem( wTabFolder, SWT.NONE, 3 ); wFieldsTab.setText( BaseMessages.getString( PKG, "MQTTConsumerDialog.FieldsTab" ) ); Composite wFieldsComp = new Composite( wTabFolder, SWT.NONE ); props.setLook( wFieldsComp ); FormLayout fieldsLayout = new FormLayout(); fieldsLayout.marginHeight = 15; fieldsLayout.marginWidth = 15; wFieldsComp.setLayout( fieldsLayout ); FormData fieldsFormData = new FormData(); fieldsFormData.left = new FormAttachment( 0, 0 ); fieldsFormData.top = new FormAttachment( wFieldsComp, 0 ); fieldsFormData.right = new FormAttachment( 100, 0 ); fieldsFormData.bottom = new FormAttachment( 100, 0 ); wFieldsComp.setLayoutData( fieldsFormData ); buildFieldTable( wFieldsComp, wFieldsComp ); wFieldsComp.layout(); wFieldsTab.setControl( wFieldsComp ); }
public List<String> getAllowedActions( String nameSpace ) throws KettleException { try { return allowedActionsActiveCache.get( nameSpace ); } catch ( Exception e ) { throw new KettleException( BaseMessages.getString( AbsSecurityProvider.class, "AbsSecurityProvider.ERROR_0003_UNABLE_TO_ACCESS_GET_ALLOWED_ACTIONS" ), e ); //$NON-NLS-1$ } }
/** * @param factory * factory to use. */ protected void buildFastloadLine( final PluginWidgetFactory factory ) { final Control topControl = this.wVariableSubstitution; this.wlFastLoadPath = factory.createRightLabel( BaseMessages.getString( PKG, "TeraFastDialog.FastloadPath.Label" ) ); this.props.setLook( this.wlFastLoadPath ); this.wlFastLoadPath.setLayoutData( factory.createLabelLayoutData( topControl ) ); this.wbFastLoadPath = factory.createPushButton( BaseMessages.getString( PKG, "TeraFastDialog.Browse.Button" ) ); this.props.setLook( this.wbFastLoadPath ); FormData formData = factory.createControlLayoutData( topControl ); formData.left = null; this.wbFastLoadPath.setLayoutData( formData ); this.wFastLoadPath = factory.createSingleTextVarLeft(); this.props.setLook( this.wFastLoadPath ); formData = factory.createControlLayoutData( topControl ); formData.right = new FormAttachment( this.wbFastLoadPath, -factory.getMargin() ); this.wFastLoadPath.setLayoutData( formData ); }
private void setCloseButton() { closeButton = new Button( shell, SWT.PUSH ); closeButton.setText( BaseMessages.getString( PKG, "System.Button.Close" ) ); FormData fdbutton = new FormData(); fdbutton.right = new FormAttachment( 100, 0 ); //Button should below the link and separated by 30 fdbutton.top = new FormAttachment( link, padding ); fdbutton.height = padding; closeButton.setLayoutData( fdbutton ); props.setLook( closeButton ); // Add listeners closeButton.addListener( SWT.Selection, new Listener() { public void handleEvent( Event e ) { close(); } } ); }
props.setLook( composite ); FormLayout compLayout = new FormLayout(); compLayout.marginHeight = Const.FORM_MARGIN; compLayout.marginWidth = Const.FORM_MARGIN; composite.setLayout( compLayout ); wlTNS = new Label( composite, SWT.RIGHT ); wlTNS.setText( BaseMessages.getString( PKG, "CreateDatabaseWizardPageOCI.TNS.Label" ) ); props.setLook( wlTNS ); fdlTNS = new FormData(); fdlTNS.left = new FormAttachment( 0, 0 ); fdlTNS.right = new FormAttachment( middle, 0 ); wlTNS.setLayoutData( fdlTNS ); wTNS = new Text( composite, SWT.SINGLE | SWT.BORDER ); props.setLook( wTNS ); fdTNS = new FormData(); fdTNS.left = new FormAttachment( middle, margin ); fdTNS.right = new FormAttachment( 100, 0 ); wTNS.setLayoutData( fdTNS );
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 boolean isAllowed( String actionName ) throws KettleException { try { return isAllowedActiveCache.get( actionName ); } catch ( Exception e ) { throw new KettleException( BaseMessages.getString( AbsSecurityProvider.class, "AbsSecurityProvider.ERROR_0002_UNABLE_TO_ACCESS_IS_ALLOWED" ), e ); //$NON-NLS-1$ } }
/** * @param factory * factory to use. */ protected void buildControlFileLine( final PluginWidgetFactory factory ) { final Control topControl = this.wUseControlFile; this.wlControlFile = factory.createRightLabel( BaseMessages.getString( PKG, "TeraFastDialog.ControlFile.Label" ) ); this.props.setLook( this.wlControlFile ); this.wlControlFile.setLayoutData( factory.createLabelLayoutData( topControl ) ); this.wbControlFile = factory.createPushButton( BaseMessages.getString( PKG, "TeraFastDialog.Browse.Button" ) ); this.props.setLook( this.wbControlFile ); FormData formData = factory.createControlLayoutData( topControl ); formData.left = null; this.wbControlFile.setLayoutData( formData ); this.wControlFile = factory.createSingleTextVarLeft(); this.props.setLook( this.wControlFile ); formData = factory.createControlLayoutData( topControl ); formData.right = new FormAttachment( this.wbControlFile, -factory.getMargin() ); this.wControlFile.setLayoutData( formData ); }
Label rulesLable = new Label( shell, SWT.NONE ); rulesLable.setText( BaseMessages.getString( PKG, "NumberRange.Ranges" ) ); props.setLook( rulesLable ); FormData lableFormData = new FormData(); lableFormData.left = new FormAttachment( 0, 0 ); lableFormData.right = new FormAttachment( props.getMiddlePct(), -Const.MARGIN ); lableFormData.top = new FormAttachment( fallBackValueControl, Const.MARGIN ); rulesLable.setLayoutData( lableFormData ); colinf[0] = new ColumnInfo( BaseMessages.getString( PKG, "NumberRange.LowerBound" ), ColumnInfo.COLUMN_TYPE_TEXT, false ); colinf[1] = new ColumnInfo( BaseMessages.getString( PKG, "NumberRange.UpperBound" ), ColumnInfo.COLUMN_TYPE_TEXT, false ); colinf[2] = new ColumnInfo( BaseMessages.getString( PKG, "NumberRange.Value" ), ColumnInfo.COLUMN_TYPE_TEXT, false ); transMeta, shell, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI, colinf, FieldsRows, lsMod, props ); fdFields = new FormData(); fdFields.left = new FormAttachment( 0, 0 ); fdFields.top = new FormAttachment( rulesLable, Const.MARGIN );