Class ConditionSelectionAdapterFileDialogTextVar
java.lang.Object
org.eclipse.swt.events.SelectionAdapter
org.pentaho.di.ui.core.events.dialog.SelectionAdapterFileDialog<TextVar>
org.pentaho.di.ui.core.events.dialog.SelectionAdapterFileDialogTextVar
org.pentaho.di.ui.core.events.dialog.ConditionSelectionAdapterFileDialogTextVar
- All Implemented Interfaces:
EventListener,org.eclipse.swt.events.SelectionListener,org.eclipse.swt.internal.SWTEventListener
This Adapter class extends the SelectionAdapterFileDialogTextVar but includes (DetermineSelectionOperationOp) Interface to
allow the dialog to determine which SelectionOperation (File or Folder) when the widget is selected. This is useful
for steps that include "File Or Directory" option based on the dialog settings.
Example:
SelectionAdapterOptions options = new SelectionAdapterOptions( SelectionOperation.FILE,
new FilterType[] { FilterType.ALL, FilterType.XML }, FilterType.XML );
adapter = new ConditionSelectionAdapterFileDialogTextVar( log, wFilename, transMeta, options,
() -> ( [ Is Folder Condition ] ) ? SelectionOperation.FOLDER : SelectionOperation.FILE );
Note:
The class only updates SelectionOperation to Folder the other options remain the same.
-
Constructor Summary
ConstructorsConstructorDescriptionConditionSelectionAdapterFileDialogTextVar(org.pentaho.di.core.logging.LogChannelInterface log, TextVar textUiWidget, org.pentaho.di.base.AbstractMeta meta, SelectionAdapterOptions options, DetermineSelectionOperationOp operator) -
Method Summary
Modifier and TypeMethodDescriptionvoidwidgetSelected(org.eclipse.swt.events.SelectionEvent selectionEvent) Methods inherited from class org.pentaho.di.ui.core.events.dialog.SelectionAdapterFileDialogTextVar
getText, setTextMethods inherited from class org.pentaho.di.ui.core.events.dialog.SelectionAdapterFileDialog
concat, getSelectionOptions, getTextWidget, isConnectionFile, isUrl, resolveFile, setFilterMethods inherited from class org.eclipse.swt.events.SelectionAdapter
widgetDefaultSelected
-
Constructor Details
-
ConditionSelectionAdapterFileDialogTextVar
public ConditionSelectionAdapterFileDialogTextVar(org.pentaho.di.core.logging.LogChannelInterface log, TextVar textUiWidget, org.pentaho.di.base.AbstractMeta meta, SelectionAdapterOptions options, DetermineSelectionOperationOp operator)
-
-
Method Details
-
widgetSelected
public void widgetSelected(org.eclipse.swt.events.SelectionEvent selectionEvent) - Specified by:
widgetSelectedin interfaceorg.eclipse.swt.events.SelectionListener- Overrides:
widgetSelectedin classSelectionAdapterFileDialog<TextVar>
-