Class ContainerComponent<M extends IModel,P extends IParameterization>

java.lang.Object
com._1c.g5.aef2.components.Component<M,P>
com._1c.g5.aef2.standard.components.StandardComponent<M,P>
com._1c.g5.aef2.standard.components.ContainerComponent<M,P>
All Implemented Interfaces:
IComponent<M>, IEventChannel
Direct Known Subclasses:
AbstractGridWithToolbarComponent, AddressingAttributesComponent, ApplicationEditorComponent, ChartAxisComponent, ChartDescriptorPointComponent, ChartDescriptorSeriesComponent, CommandActionExtensionCollectionComponent, CompositeComponent, DialogComponent, DtGranularEditorPageAefComponent, EventHandlerCollectionComponent, ExtendedFieldComponent, FieldComponent, GanttChartTimeScaleLevelComponent, GraphicalSchemeEventHandlerComponent, NewWizardPageComponent, RealPiePointComponent, RealStockSeriesComponent, SpreadSheetDocumentScrollBarComponent, StyleComponent, TypeDescriptionComponent, UnsettablePropertyFieldComponent

public class ContainerComponent<M extends IModel,P extends IParameterization> extends StandardComponent<M,P>
The container component.
See Also:
  • Constructor Details

    • ContainerComponent

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

    • addComponent

      public <C extends IComponent<?>> C addComponent(C component)
      Description copied from class: Component
      Adds the child component.
      Overrides:
      addComponent in class Component<M extends IModel,P extends IParameterization>
      Returns:
      the added component.
    • 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.
    • separator

      public SeparatorComponent separator()
      Creates a new SeparatorComponent and adds it to this component.
      Returns:
      the newly created separator component.
    • updateViewModels

      public void updateViewModels()
      Description copied from class: StandardComponent
      Updates view models of the component. Override it to update view model properties according to current state of the component.
      Overrides:
      updateViewModels in class StandardComponent<M extends IModel,P extends IParameterization>
    • 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.
    • createViewModels

      protected void createViewModels()
      Description copied from class: Component
      Creates the view models of this component. Override it to provide a view models of this component.
      Overrides:
      createViewModels in class StandardComponent<M extends IModel,P extends IParameterization>
    • 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