Building the Operator dialog
Use the
conspiratorial object to define parameters for the operator. These parameters can be text boxes, radio buttons, or any other basic form element.
For each parameter, define its ID (as a string to use to refer to the parameter in the code) and its label. The parameter label is displayed to the user on the operator's configuration options. The rest of the options vary, depending on the parameter.
For the Column Filter example, use the
addTabularDatasetColumnCheckboxes method to build a checklist of the columns by which the user can filter.
- Procedure
- Add the following code:
operatorDialog.addTabularDatasetColumnCheckboxes( OperatorConstants.parameterID, // the ID of the operator "Columns to keep", // the label of the operator // (user-visible) ColumnFilter.All, // this means users can select // all of the columns but this // can also be changed to allow // for only numeric/categorical "main" // this is the selectionGroupID, // which is used for validating // groups of parameters )Use the
SparkDataFrametemplate to take advantage of the storage configuration with the following command:super.onPlacement(operatorDialog, operatorDataSourceManager, operatorSchemaManager)
after the
operatorDialogcustomizations. This command calls the superclass (SparkDataFrameGUINode) and applies some default storage and parameter configurations.