Class CommonStepDialog<StepMetaType extends CommonStepMeta>
- java.lang.Object
-
- org.eclipse.swt.widgets.Dialog
-
- org.pentaho.di.ui.trans.step.BaseStepDialog
-
- org.pentaho.di.ui.trans.step.common.CommonStepDialog<StepMetaType>
-
- Type Parameters:
StepMetaType
-
- All Implemented Interfaces:
org.pentaho.di.trans.step.StepDialogInterface
public abstract class CommonStepDialog<StepMetaType extends CommonStepMeta> extends BaseStepDialog implements org.pentaho.di.trans.step.StepDialogInterface
A common implementation of theBaseStepDialog
that creates many of the common UI components.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.pentaho.di.ui.trans.step.BaseStepDialog
BaseStepDialog.AddConnectionListener, BaseStepDialog.EditConnectionListener, BaseStepDialog.FieldsChoiceDialogProvider
-
-
Field Summary
Fields Modifier and Type Field Description protected static int
ELEMENT_SPACING
protected org.eclipse.swt.widgets.Label
footerSpacer
protected org.eclipse.swt.widgets.Label
headerSpacer
protected static int
LABEL_SPACING
protected org.eclipse.swt.events.ModifyListener
lsMod
protected org.eclipse.swt.custom.CTabFolder
m_wTabFolder
protected static int
MARGIN_SIZE
protected static int
MEDIUM_FIELD
protected static int
MEDIUM_SMALL_FIELD
protected StepMetaType
meta
protected static int
SHELL_WIDTH_OFFSET
protected static int
SMALL_FIELD
protected static int
VAR_ICON_HEIGHT
protected static int
VAR_ICON_WIDTH
-
Fields inherited from class org.pentaho.di.ui.trans.step.BaseStepDialog
backupChanged, baseStepMeta, BUTTON_ALIGNMENT_CENTER, BUTTON_ALIGNMENT_LEFT, BUTTON_ALIGNMENT_RIGHT, buttonAlignment, changed, databaseDialog, fdCancel, fdCreate, fdGet, fdlStepname, fdOK, fdPreview, fdSQL, fdStepname, log, loggingObject, lsCancel, lsCreate, lsDef, lsGet, lsOK, lsPreview, lsResize, lsSQL, metaStore, props, repository, shell, stepMeta, stepname, transMeta, variables, wCancel, wCreate, wGet, wlStepname, wOK, wPreview, wSQL, wStepname
-
-
Constructor Summary
Constructors Constructor Description CommonStepDialog(org.eclipse.swt.widgets.Shell parent, Object meta, org.pentaho.di.trans.TransMeta tr, String sname)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
buildBody()
protected org.eclipse.swt.widgets.Button
buildCancelButton()
protected org.eclipse.swt.widgets.Button
buildGetFieldsButton(org.eclipse.swt.widgets.Composite parent, org.eclipse.swt.events.SelectionAdapter listener)
protected org.eclipse.swt.widgets.Button
buildOkButton()
protected void
buildPostFooter()
Called at the bottom ofbuildFooter()
, can be overridden to build additional "footer" elements.protected void
buildPostHeader()
Called at the bottom ofbuildHeader()
, can be overridden to build additional "header" elements.protected void
buildPreFooter()
Called at the top ofbuildFooter()
, can be overridden to build additional "footer" elements.protected void
buildPreHeader()
Called at the top ofbuildHeader()
, can be overridden to build additional "header" elements.protected org.eclipse.swt.widgets.Button
buildPreviewButton()
protected org.eclipse.swt.custom.CTabFolder
buildTabFolder()
protected void
cancel()
protected boolean
fieldsExist()
To be overridden by a preview-capable dialog, returns true by default.abstract void
getData(StepMetaType meta)
Copy information from theCommonStepDialog
meta to the dialog fields.protected org.eclipse.swt.graphics.Image
getImage()
protected abstract StepMetaType
getPopulatedMeta()
Returns a new instance ofCommonStepDialog
that is populated according to dialog selection.protected abstract String
getTitle()
protected void
initListenersImpl()
Can be overridden to initialize additional listeners.protected void
layoutTabFolder()
protected void
ok()
String
open()
protected void
openDialog(String title, String message, int dialogType)
protected void
openFieldsErrorDialog()
protected void
openNoFieldsDialog()
protected void
openNoRowsToPreviewError()
protected void
openPreviewError()
protected abstract void
populateMeta(StepMetaType meta)
Creates a new instance ofCommonStepDialog
and populates it with provided data from the dialog.protected void
updateGetFieldsButtonStatus()
Can be overridden by the implementing class, if the "Get fields" button is to be enabled only under certain conditions.protected void
updatePreviewButtonStatus()
To be overridden by a preview-capable step dialog.-
Methods inherited from class org.pentaho.di.ui.trans.step.BaseStepDialog
addConnectionLine, addConnectionLine, addConnectionLine, addConnectionLine, addDatabases, addDatabases, centerButtons, createHelpButton, dispose, generateFieldMapping, getButtonAlignment, getDatabaseDialog, getFieldsFromPrevious, getFieldsFromPrevious, getFieldsFromPrevious, getFieldsFromPrevious, getFieldsFromPrevious, getMetaStore, getModifyListenerTooltipText, getPathOf, getRepository, isBasic, isDebug, isDetailed, isRowLevel, leftAlignButtons, logBasic, logBasic, logDebug, logDebug, logDetailed, logDetailed, logError, logError, logError, logMinimal, logMinimal, logRowlevel, logRowlevel, positionBottomButtons, positionBottomButtons, positionBottomLeftButtons, positionBottomRightButtons, reinitConnectionDropDown, rightAlignButtons, selectDatabase, setButtonPositions, setMetaStore, setMinimalShellHeight, setRepository, setShellImage, setSize, setSize, setSize, setSize, setTraverseOrder, showDbDialogUnlessCancelledOrValid, showDbExistsDialog, storeScreenSize, toString
-
Methods inherited from class org.eclipse.swt.widgets.Dialog
checkSubclass, getParent, getStyle, getText, setText
-
-
-
-
Field Detail
-
MARGIN_SIZE
protected static final int MARGIN_SIZE
- See Also:
- Constant Field Values
-
LABEL_SPACING
protected static final int LABEL_SPACING
- See Also:
- Constant Field Values
-
ELEMENT_SPACING
protected static final int ELEMENT_SPACING
- See Also:
- Constant Field Values
-
MEDIUM_FIELD
protected static final int MEDIUM_FIELD
- See Also:
- Constant Field Values
-
MEDIUM_SMALL_FIELD
protected static final int MEDIUM_SMALL_FIELD
- See Also:
- Constant Field Values
-
SMALL_FIELD
protected static final int SMALL_FIELD
- See Also:
- Constant Field Values
-
SHELL_WIDTH_OFFSET
protected static final int SHELL_WIDTH_OFFSET
- See Also:
- Constant Field Values
-
VAR_ICON_WIDTH
protected static final int VAR_ICON_WIDTH
-
VAR_ICON_HEIGHT
protected static final int VAR_ICON_HEIGHT
-
meta
protected final StepMetaType extends CommonStepMeta meta
-
footerSpacer
protected org.eclipse.swt.widgets.Label footerSpacer
-
headerSpacer
protected org.eclipse.swt.widgets.Label headerSpacer
-
lsMod
protected org.eclipse.swt.events.ModifyListener lsMod
-
m_wTabFolder
protected org.eclipse.swt.custom.CTabFolder m_wTabFolder
-
-
Method Detail
-
initListenersImpl
protected void initListenersImpl()
Can be overridden to initialize additional listeners.
-
open
public String open()
- Specified by:
open
in interfaceorg.pentaho.di.trans.step.StepDialogInterface
-
buildPreHeader
protected void buildPreHeader()
Called at the top ofbuildHeader()
, can be overridden to build additional "header" elements.
-
buildPostHeader
protected void buildPostHeader()
Called at the bottom ofbuildHeader()
, can be overridden to build additional "header" elements.
-
buildBody
protected abstract void buildBody()
-
buildPreFooter
protected void buildPreFooter()
Called at the top ofbuildFooter()
, can be overridden to build additional "footer" elements.
-
buildPostFooter
protected void buildPostFooter()
Called at the bottom ofbuildFooter()
, can be overridden to build additional "footer" elements.
-
buildPreviewButton
protected org.eclipse.swt.widgets.Button buildPreviewButton()
-
buildGetFieldsButton
protected org.eclipse.swt.widgets.Button buildGetFieldsButton(org.eclipse.swt.widgets.Composite parent, org.eclipse.swt.events.SelectionAdapter listener)
-
buildCancelButton
protected org.eclipse.swt.widgets.Button buildCancelButton()
-
buildOkButton
protected org.eclipse.swt.widgets.Button buildOkButton()
-
fieldsExist
protected boolean fieldsExist()
To be overridden by a preview-capable dialog, returns true by default.- Returns:
- true by default
-
updatePreviewButtonStatus
protected void updatePreviewButtonStatus()
To be overridden by a preview-capable step dialog.
-
updateGetFieldsButtonStatus
protected void updateGetFieldsButtonStatus()
Can be overridden by the implementing class, if the "Get fields" button is to be enabled only under certain conditions.
-
ok
protected void ok()
-
cancel
protected void cancel()
-
getImage
protected org.eclipse.swt.graphics.Image getImage()
-
getPopulatedMeta
protected abstract StepMetaType getPopulatedMeta()
Returns a new instance ofCommonStepDialog
that is populated according to dialog selection.- Returns:
- a new instance of
CommonStepDialog
that is populated according to dialog selection
-
populateMeta
protected abstract void populateMeta(StepMetaType meta)
Creates a new instance ofCommonStepDialog
and populates it with provided data from the dialog.- Parameters:
meta
- a new instance ofCommonStepDialog
-
getTitle
protected abstract String getTitle()
-
getData
public abstract void getData(StepMetaType meta)
Copy information from theCommonStepDialog
meta to the dialog fields.
-
buildTabFolder
protected org.eclipse.swt.custom.CTabFolder buildTabFolder()
-
layoutTabFolder
protected void layoutTabFolder()
-
openPreviewError
protected void openPreviewError()
-
openNoRowsToPreviewError
protected void openNoRowsToPreviewError()
-
openNoFieldsDialog
protected void openNoFieldsDialog()
-
openFieldsErrorDialog
protected void openFieldsErrorDialog()
-
-