A node that requires special user settings as input will need to provide a NodeDialog. To do so, you must implement a NodeDialogPane, which will be displayed by the platform whenever a user clicks on the node to configure it. Furthermore, your node's NodeFactory must be adapted to deliver an instance of this pane and the hasDialog() method must be changed to return true.

In a NodeDialogPane, you can create JPanels, add Swing components to them, layout those components, and add these composite panels as tabs to the dialog pane. Each dialog pane must implement load and save methods to transfer settings values from and into the components.

KNIME also provides an easier (and highly recommended whenever it suits your purposes) way to create simple dialog panes for standard parameters: the DefaultComponents.

NodeDialogPane Constructor

In the constructor you can create all the Swing components that you need for your user settings. Place them in a JPanel, use a LayoutManager to arrange them nicely, and add any ChangeListeners, etc. After one panel is complete, add it to the dialog pane by calling addTab(String title, Component panel). Note that the title must be unique and it can be used as ID to retrieve this panel with getTab().


What are you looking for?