Skip to content

More flexible UI generation #124

Closed
Closed
@ctrueden

Description

@ctrueden
  • Need a way to customize WidgetModel rather than hardcoding its creation. In particular, KNIME needs a WidgetModel/SettingsModel combo 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

  • Service for generating UI from Module(Info)s
  • Service for WidgetModel creation from Modules
  • Interface/AbstractClass for WidgetModels

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions