Package org.pentaho.di.ui.trans.step
Class BaseStepXulDialog
- java.lang.Object
-
- org.pentaho.ui.xul.XulEventSourceAdapter
-
- org.pentaho.ui.xul.impl.AbstractXulEventHandler
-
- org.pentaho.di.ui.trans.step.BaseStepGenericXulDialog
-
- org.pentaho.di.ui.trans.step.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 Summary
Fields Modifier and Type Field Description protected boolean
backupChanged
protected static int
BUTTON_ALIGNMENT_CENTER
protected static int
BUTTON_ALIGNMENT_LEFT
protected static int
BUTTON_ALIGNMENT_RIGHT
protected static int
buttonAlignment
protected boolean
changed
protected DatabaseDialog
databaseDialog
protected org.eclipse.swt.widgets.Shell
dialogShell
protected org.eclipse.swt.widgets.Listener
lsCancel
protected org.eclipse.swt.widgets.Listener
lsCreate
protected org.eclipse.swt.widgets.Listener
lsGet
protected org.eclipse.swt.widgets.Listener
lsOK
protected org.eclipse.swt.widgets.Listener
lsPreview
protected org.eclipse.swt.widgets.Listener
lsResize
protected org.eclipse.swt.widgets.Listener
lsSQL
protected PropsUI
props
-
Fields inherited from class org.pentaho.di.ui.trans.step.BaseStepGenericXulDialog
baseStepMeta, bf, log, loggingObject, metaStore, parent, repository, stepMeta, stepname, transMeta, variables, wCancel, wCreate, wGet, wlStepname, wOK, wPreview, wSQL, wStepname, xulDialog
-
-
Constructor Summary
Constructors Constructor Description 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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Reset this dialog and its controls to a default state.void
dispose()
static 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)
Create a new field mapping between source and target steps.protected static int
getButtonAlignment()
Returns the default alignment for the buttons.protected DatabaseDialog
getDatabaseDialog(org.eclipse.swt.widgets.Shell shell)
static 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.static void
getFieldsFromPrevious(org.pentaho.di.core.row.RowMetaInterface row, org.pentaho.ui.xul.containers.XulTree tableView, List<Object> fields, StepTableDataObject field, TableItemInsertXulListener listener)
static 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.ResourceBundle
getResourceBundle()
org.pentaho.ui.xul.XulSettingsManager
getSettingsManager()
org.eclipse.swt.widgets.Shell
getShell()
protected void
initializeXul()
The implementors of this method should call the sibling method initializeXul(XulLoder, BindingFactory, XulRunner, parent) with the desired Xul implementation classes - SWT or Swing.void
onHelp()
void
setShellImage(org.eclipse.swt.widgets.Shell shell, org.pentaho.di.trans.step.StepMetaInterface stepMetaInterface)
void
setSize()
Set the shell size, based upon the previous time the geometry was saved in the Properties file.static void
setSize(org.eclipse.swt.widgets.Shell shell)
static void
setSize(org.eclipse.swt.widgets.Shell shell, int minWidth, int minHeight, boolean packIt)
void
storeScreenSize()
boolean
validate()
-
Methods inherited from class org.pentaho.di.ui.trans.step.BaseStepGenericXulDialog
addDatabases, addDatabases, close, getBindingFactory, getClassForMessages, getEventHandlers, getMetaStore, getName, getPlugin, getRepository, initializeXul, isBasic, isDebug, isDetailed, isRowLevel, logBasic, logBasic, logDebug, logDebug, logDetailed, logDetailed, logError, logError, logError, logMinimal, logMinimal, logRowlevel, logRowlevel, onAccept, onCancel, open, selectDatabase, setMetaStore, setModalParent, setRepository, showClearDataMessage, showMessage, showPromptMessage, showPromptMessage
-
Methods inherited from class org.pentaho.ui.xul.impl.AbstractXulEventHandler
bind, bind, getData, getXulDomContainer, setData, setName, setXulDomContainer
-
-
-
-
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
-
props
protected PropsUI props
-
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
-
databaseDialog
protected DatabaseDialog databaseDialog
-
dialogShell
protected org.eclipse.swt.widgets.Shell dialogShell
-
-
Method Detail
-
getSettingsManager
public org.pentaho.ui.xul.XulSettingsManager getSettingsManager()
- Specified by:
getSettingsManager
in classBaseStepGenericXulDialog
-
getResourceBundle
public ResourceBundle getResourceBundle()
- Specified by:
getResourceBundle
in classBaseStepGenericXulDialog
-
clear
public void clear()
Description copied from class:BaseStepGenericXulDialog
Reset this dialog and its controls to a default state.- Specified by:
clear
in classBaseStepGenericXulDialog
-
validate
public boolean validate()
- Specified by:
validate
in classBaseStepGenericXulDialog
-
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 classBaseStepGenericXulDialog
- Throws:
org.pentaho.ui.xul.XulException
-
setShellImage
public void setShellImage(org.eclipse.swt.widgets.Shell shell, org.pentaho.di.trans.step.StepMetaInterface stepMetaInterface)
-
dispose
public void dispose()
- Specified by:
dispose
in classBaseStepGenericXulDialog
-
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 keyButton_Position
. The valid values are:left
center
right
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 fieldstableView
- the table view to modifykeyColumn
- the column in the table view to match with the names of the fields, checks for existance if >0nameColumn
- the column numbers in which the name should end up indataTypeColumn
- the target column numbers in which the data type should end up inlengthColumn
- 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 populateTransMeta
- the source transformationStepMeta
- 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 windowsourceFields
- the source fieldstargetFields
- the target fieldsfieldMapping
- 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
-
getFieldsFromPrevious
public static void getFieldsFromPrevious(org.pentaho.di.core.row.RowMetaInterface row, org.pentaho.ui.xul.containers.XulTree tableView, List<Object> fields, StepTableDataObject field, TableItemInsertXulListener listener)
-
onHelp
public void onHelp()
- Overrides:
onHelp
in classBaseStepGenericXulDialog
-
-