-
Notifications
You must be signed in to change notification settings - Fork 54
Description
- Need a way to customize
WidgetModelrather than hardcoding its creation. In particular, KNIME needs aWidgetModel/SettingsModelcombo object for each input. - Need a way to customize creation of the input harvester dialog, in general. This should not be embedded in the preprocessing logic, but rather be a general-purpose "make me an
InputPanel" or similar. Consider changing the name, too, since this is useful for more than just "input harvesting".
This work may entail substantial changes to WidgetService and maybe UIService as well as the possible creation of new service(s). (Personally I think we won't need as many new services as @Squareys outlines below, but the point is that the functionality needs to go somewhere.)
Original description from @Squareys and @dietzc:
Current Solution
Custom WidgetService wraps widgets from SwingWidgetService in a WrappingKnimeDialogInputWidget which basically is just the widget plus a SettingsModel from a SettingsModelService. An InputHarvester is instantiated to generate UI from a Module on an InputPanel, which is manually created with a SwingWidgetService.
Preferred Solution
UIGenerationService creates InputPanel and UI from Module(Info) using a WidgetService. WidgetServices require WidgetModels per Inputs, which are created via a WidgetModelService. A custom KnimeWidgetModelService creates WidgetModels which store values in SettingsModels instead of Module inputs. Our dialog as well as the InputHarvester generate UI from the UIGenerationService.
Summary of Requirements for Preferred Solution
Servicefor generating UI fromModule(Info)sServiceforWidgetModelcreation fromModulesInterface/AbstractClassforWidgetModels
ModuleInfo would be more fit for our cast, but I think impossible for the ImageJ case, since current WidgetModel stores values in inputs of executing module.