Implement the NodeDialog

When the NumericBinnerNodeDialog is created you will see that the constructor already contains some exemplary code. You may delete it and add instead the code for your desired control elements. For the NumericBinnerNodeDialog we need two GUI elements: one to set the number of bins and one to select the column for the binning. The KNIME framework provides a very convenient setting to apply standard dialog elements to the NodeDialog. Thus, your NumericBinnerNodeDialog extends the DefaultNodeSettingsPane by default. If the default dialog components do not suit your needs, for example if some components should be enabled or disabled depending on the user's settings, you may extend the NodeDialogPane directly. In our case a DialogComponentNumber for the number of bins and a DialogComponentColumnSelection need to be added. Each component's constructor requires a new instance of a SettingsModel. The SettingsModel expects a string identifier, which it uses to store and load the value of the component, and a default value, which it holds until a new value is loaded. Additional parameters are necessary, depending on the type of component. The loading from and saving to the settings is executed automatically via the key passed in the constructor. We recommend using the key defined in the NodeModel. If you do this, you must make it public at this point.

  	public class NumericBinnerNodeDialog extends DefaultNodeSettingsPane {        /**       * New pane for configuring NumericBinner node dialog.       * Contains control elements to adjust the number of bins        * and to select the column to bin.       * Suppress warnings here: it is unavoidable since the        * allowed types passed as an generic array.        */      @SuppressWarnings ("unchecked")      protected NumericBinnerNodeDialog() {          super();          // nr of bins control element          addDialogComponent(new DialogComponentNumber(                  new SettingsModelIntegerBounded(                      NumericBinnerNodeModel.CFGKEY_NR_OF_BINS,                      NumericBinnerNodeModel.DEFAULT_NR_OF_BINS,                      1, Integer.MAX_VALUE),                      "Number of bins:", /*step*/ 1));          // column to bin          addDialogComponent(new DialogComponentColumnNameSelection(                  new SettingsModelString(                      NumericBinnerNodeModel.CFGKEY_COLUMN_NAME,                      "Select a column"),                      "Select the column to bin",                      NumericBinnerNodeModel.IN_PORT,                      DoubleValue.class));                          }  }  

After you have created your node and have implemented the NodeModel and the NodeDialog don’t forget to edit your node description in the XML file (with exactly the same name as your NodeFactory). Describe your node, the dialog settings, the in- and outports and later on, the view. This is explained in detail in "How to adapt your NodeDescription".