Class FormModel

java.lang.Object
groovy.swing.model.FormModel

public class FormModel extends Object
Represents a number of field models which can be ValueModel, PropertyModel, TableModel, TreeModel or nested FormModel instances
  • Constructor Details

    • FormModel

      public FormModel()
      Creates an empty form model.
    • FormModel

      public FormModel(Map<String,Object> fieldModels)
      Creates a form model backed by the supplied model map.
      Parameters:
      fieldModels - the initial field model map
  • Method Details

    • addModel

      public void addModel(String name, Object model)
      Registers a model under the given field name.
      Parameters:
      name - the field name
      model - the field model to expose
    • getModel

      public Object getModel(String name)
      Looks up the model associated with the supplied field name.
      Parameters:
      name - the field name
      Returns:
      the registered model, or null if none exists