Class ContainerComponent<M extends IModel,​P extends IParameterization>

    • Constructor Detail

      • ContainerComponent

        public ContainerComponent​(P parameterization)
        Creates a new container component.
        Parameters:
        parameterization - the parameterization.
    • Method Detail

      • field

        public FieldComponent field​(String labelText)
        Creates a new FieldComponent and adds it to this component.
        Parameters:
        labelText - the text of the label in the field component.
        Returns:
        the newly created field component.
      • field

        public FieldComponent field​(ILabeledParametrization parametrization)
        Creates a new FieldComponent and adds it to this component.
        Parameters:
        parametrization - the parameterization of the field component.
        Returns:
        the newly created field component.
      • label

        public LabelComponent label​(String text)
        Creates a new LabelComponent and adds it to this component.
        Parameters:
        text - the text of the label component.
        Returns:
        the newly created label component.
      • label

        public LabelComponent label​(ILabeledParametrization parametrization)
        Creates a new LabelComponent and adds it to this component.
        Parameters:
        parametrization - the parametrization of the label component.
        Returns:
        the newly created label component.
      • button

        public ButtonComponent button​(String text)
        Creates a new ButtonComponent and adds it to this component.
        Parameters:
        text - the text of the button component.
        Returns:
        the newly created button component.
      • button

        public ButtonComponent button​(ILabeledParametrization parametrization)
        Creates a new ButtonComponent and adds it to this component.
        Parameters:
        parametrization - the parametrization of the button component.
        Returns:
        the newly created button component.
      • text

        public TextComponent text​(IValue<String> text)
        Creates a new TextComponent, sets the given model and adds it to this component.
        Parameters:
        text - the model value for the text component
        Returns:
        the newly created text component.
      • combo

        public <T> ComboComponent<T> combo​(IValue<T> item,
                                           Collection<T> items)
        Creates a new ComboComponent, sets the given model and adds it to this component.
        Parameters:
        item - the model value for the combo component.
        para - the collection of potential values of combo
        Returns:
        the newly created combo component.
      • checkBox

        public CheckBoxComponent checkBox​(IValue<Boolean> value)
        Creates a new CheckBoxComponent, sets the given model and adds it to this component.
        Parameters:
        value - the model value for the checkbox component.
        Returns:
        the newly created checkbox component.
      • checkBox

        public CheckBoxComponent checkBox​(IValue<Boolean> value,
                                          ILabeledParametrization parameterization)
        Creates a new CheckBoxComponent, sets the given model and adds it to this component.
        Parameters:
        value - the model value for the checkbox component.
        parameterization - the parameterization.
        Returns:
        the newly created checkbox component.
      • spinner

        public SpinnerComponent spinner​(IValue<Integer> value,
                                        int min,
                                        int max)
        Creates a new SpinnerComponent, sets the given model and adds it to this component.
        Parameters:
        value - the model value for spinner component.
        min - the minimum value of the spinner.
        max - the maximum value of the spinner.
        Returns:
        the newly created spinner component.
      • refreshChildren

        public void refreshChildren()
        Refreshes children of the component. It disposes all child components and creates it again.
      • disposeChildren

        public void disposeChildren()
        Disposes the children of the component.
      • createContainerViewModel

        protected IContainerViewModel createContainerViewModel()
        Creates the view model of the container.
        Returns:
        the newly created container view model.
      • getContainerViewModel

        protected final IContainerViewModel getContainerViewModel()
        Returns the view model of the container. Can be used in cases of manual manages of the content and order of the children.
        Returns:
        the container view model
      • isEditable

        protected boolean isEditable()
        Checks is component editable.
        Returns:
        true if editable, false otherwise