Using DefaultNodeSettingsPane can we add Default Dialog Components dynamically?

Hi,

I want to add/create Default Dialog Components according to the selection of DialogComponentStringListSelection..How do I get a particular panel where I want to put the group or

may I want to extend the NodeDialogPane instead of DefaultNodeSettingsPane  to implement this..

list.addChangeListener(new ChangeListener() {
        
        @Override
        public void stateChanged(ChangeEvent arg0) {
               createNewGroup("Parameter1");
              
            
        }
    });

I don't think that's possible and even if it was it wouldn't be within the design scope of these default dialog components. I guess you should look at writing a custom dialog with plain old java. Here is an easy one to get started:

org.knime.base.node.preproc.columnrenameregex.ColumnRenameRegexNodeDialogPane

A more complex one with dynamically adding components:

org.knime.base.node.preproc.datavalidator.DataValidatorNodeDialogPane

- Bernd

I had a situation where I wanted to change some of the display properties of a default dialog component based on a button press.  I eventually solved this as follows (this is just a code snippet for the button ActionListener, and the component I was changing was called propertyListDlg (defined by final DialogComponentStringListSelection propertyListDlg) a ScrollPane - you may be able to adapt - good luck:

 

final DialogComponentButton showAll = new DialogComponentButton(
				"Show all");
		showAll.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e) {
				//Do whatever you want to do

				// Now make it resize
				for (Component comp : propertyListDlg.getComponentPanel()
						.getComponents()) {
					if (comp instanceof JScrollPane) {
						((JScrollPane) comp).getViewport().revalidate();
						// ((JScrollPane) comp).getViewport().repaint();
					}
				}
			}
		});

Steve