Class BaseStepXulDialog

  • All Implemented Interfaces:
    org.pentaho.di.trans.step.StepDialogInterface, org.pentaho.ui.xul.impl.XulEventHandler, org.pentaho.ui.xul.XulEventSource

    public abstract class BaseStepXulDialog
    extends BaseStepGenericXulDialog
    User: nbaker Date: Jun 7, 2010
    • Field Detail

      • lsOK

        protected org.eclipse.swt.widgets.Listener lsOK
      • lsGet

        protected org.eclipse.swt.widgets.Listener lsGet
      • lsPreview

        protected org.eclipse.swt.widgets.Listener lsPreview
      • lsSQL

        protected org.eclipse.swt.widgets.Listener lsSQL
      • lsCreate

        protected org.eclipse.swt.widgets.Listener lsCreate
      • lsCancel

        protected org.eclipse.swt.widgets.Listener lsCancel
      • lsResize

        protected org.eclipse.swt.widgets.Listener lsResize
      • changed

        protected boolean changed
      • backupChanged

        protected boolean backupChanged
      • BUTTON_ALIGNMENT_CENTER

        protected static final int BUTTON_ALIGNMENT_CENTER
        See Also:
        Constant Field Values
      • BUTTON_ALIGNMENT_LEFT

        protected static final int BUTTON_ALIGNMENT_LEFT
        See Also:
        Constant Field Values
      • BUTTON_ALIGNMENT_RIGHT

        protected static final int BUTTON_ALIGNMENT_RIGHT
        See Also:
        Constant Field Values
      • buttonAlignment

        protected static int buttonAlignment
      • dialogShell

        protected org.eclipse.swt.widgets.Shell dialogShell
    • Constructor Detail

      • BaseStepXulDialog

        public BaseStepXulDialog​(String xulFile,
                                 org.eclipse.swt.widgets.Shell parent,
                                 org.pentaho.di.trans.step.BaseStepMeta baseStepMeta,
                                 org.pentaho.di.trans.TransMeta transMeta,
                                 String stepname)
    • Method Detail

      • initializeXul

        protected void initializeXul()
                              throws org.pentaho.ui.xul.XulException
        Description copied from class: BaseStepGenericXulDialog
        The implementors of this method should call the sibling method initializeXul(XulLoder, BindingFactory, XulRunner, parent) with the desired Xul implementation classes - SWT or Swing.
        Specified by:
        initializeXul in class BaseStepGenericXulDialog
        Throws:
        org.pentaho.ui.xul.XulException
      • setShellImage

        public void setShellImage​(org.eclipse.swt.widgets.Shell shell,
                                  org.pentaho.di.trans.step.StepMetaInterface stepMetaInterface)
      • getShell

        public org.eclipse.swt.widgets.Shell getShell()
      • setSize

        public void setSize()
        Set the shell size, based upon the previous time the geometry was saved in the Properties file.
      • getButtonAlignment

        protected static int getButtonAlignment()
        Returns the default alignment for the buttons. This is set in the LAF properties with the key Button_Position. The valid values are:
        • left
        • center
        • right
        NOTE: if the alignment is not provided or contains an invalid value, center will be used as a default
        Returns:
        a constant which indicates the button alignment
      • getDatabaseDialog

        protected DatabaseDialog getDatabaseDialog​(org.eclipse.swt.widgets.Shell shell)
      • storeScreenSize

        public void storeScreenSize()
      • setSize

        public static void setSize​(org.eclipse.swt.widgets.Shell shell)
      • setSize

        public static void setSize​(org.eclipse.swt.widgets.Shell shell,
                                   int minWidth,
                                   int minHeight,
                                   boolean packIt)
      • getFieldsFromPrevious

        public static final void getFieldsFromPrevious​(org.pentaho.di.core.row.RowMetaInterface row,
                                                       org.pentaho.ui.xul.containers.XulTree tableView,
                                                       int keyColumn,
                                                       int[] nameColumn,
                                                       int[] dataTypeColumn,
                                                       int lengthColumn,
                                                       int precisionColumn,
                                                       TableItemInsertListener listener)
        Gets unused fields from previous steps and inserts them as rows into a table view.
        Parameters:
        row - the input fields
        tableView - the table view to modify
        keyColumn - the column in the table view to match with the names of the fields, checks for existance if >0
        nameColumn - the column numbers in which the name should end up in
        dataTypeColumn - the target column numbers in which the data type should end up in
        lengthColumn - the length column where the length should end up in (if >0)
        precisionColumn - the length column where the precision should end up in (if >0)
        listener - A listener that you can use to do custom modifications to the inserted table item, based on a value from the provided row
      • getFieldsFromPrevious

        public static final void getFieldsFromPrevious​(ComboVar comboVar,
                                                       org.pentaho.di.trans.TransMeta transMeta,
                                                       org.pentaho.di.trans.step.StepMeta stepMeta)
        Gets fields from previous steps and populate a ComboVar.
        Parameters:
        comboVar - the comboVar to populate
        TransMeta - the source transformation
        StepMeta - the source step
      • generateFieldMapping

        public static final void generateFieldMapping​(org.eclipse.swt.widgets.Shell shell,
                                                      org.pentaho.di.core.row.RowMetaInterface sourceFields,
                                                      org.pentaho.di.core.row.RowMetaInterface targetFields,
                                                      List<org.pentaho.di.core.SourceToTargetMapping> fieldMapping)
                                               throws org.pentaho.di.core.exception.KettleException
        Create a new field mapping between source and target steps.
        Parameters:
        shell - the shell of the parent window
        sourceFields - the source fields
        targetFields - the target fields
        fieldMapping - the list of source to target mappings to default to (can be empty but not null)
        Throws:
        org.pentaho.di.core.exception.KettleException - in case something goes wrong during the field mapping