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,CompositeComponent,DialogComponent,DtGranularEditorPageAefComponent,EventHandlerCollectionComponent,ExtendedFieldComponent,FieldComponent,GraphicalSchemeEventHandlerComponent,NewWizardPageComponent,TypeDescriptionComponent,UnsettablePropertyFieldComponent
public class ContainerComponent<M extends IModel,P extends IParameterization> extends StandardComponent<M,P>
The container component.- See Also:
IContainerViewModel
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com._1c.g5.aef2.standard.components.StandardComponent
StandardComponent.BindingDirection
-
-
Constructor Summary
Constructors Constructor Description ContainerComponent(P parameterization)Creates a new container component.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <C extends IComponent<?>>
CaddComponent(C component)Adds the child component.ButtonComponentbutton(ILabeledParametrization parametrization)Creates a newButtonComponentand adds it to this component.ButtonComponentbutton(String text)Creates a newButtonComponentand adds it to this component.CheckBoxComponentcheckBox(IValue<Boolean> value)Creates a newCheckBoxComponent, sets the given model and adds it to this component.CheckBoxComponentcheckBox(IValue<Boolean> value, ILabeledParametrization parameterization)Creates a newCheckBoxComponent, sets the given model and adds it to this component.<T> ComboComponent<T>combo(IValue<T> item, Collection<T> items)Creates a newComboComponent, sets the given model and adds it to this component.protected IContainerViewModelcreateContainerViewModel()Creates the view model of the container.protected voidcreateViewModels()Creates the view models of this component.voiddisposeChildren()Disposes the children of the component.FieldComponentfield(ILabeledParametrization parametrization)Creates a newFieldComponentand adds it to this component.FieldComponentfield(String labelText)Creates a newFieldComponentand adds it to this component.protected IContainerViewModelgetContainerViewModel()Returns the view model of the container.protected booleanisEditable()Checks is component editable.LabelComponentlabel(ILabeledParametrization parametrization)Creates a newLabelComponentand adds it to this component.LabelComponentlabel(String text)Creates a newLabelComponentand adds it to this component.voidrefreshChildren()Refreshes children of the component.SeparatorComponentseparator()Creates a newSeparatorComponentand adds it to this component.SpinnerComponentspinner(IValue<Integer> value, int min, int max)Creates a newSpinnerComponent, sets the given model and adds it to this component.TextComponenttext(IValue<String> text)Creates a newTextComponent, sets the given model and adds it to this component.voidupdateViewModels()Updates view models of the component.-
Methods inherited from class com._1c.g5.aef2.standard.components.StandardComponent
bindList, bindModel, bindValue, bindValue, createDefaultViewModelList, createDefaultViewModelValue, disposeViewModels, getLayoutData, handleExternalValidationEvent, isEnabled, isPassive, setEnabled, setFocus, setLayoutData, updateViewModelStatus
-
Methods inherited from class com._1c.g5.aef2.components.Component
addListener, addViewModel, areChildCommitsEnabled, areChildRefreshEnabled, areComponentsCreated, attachToModel, beginExternalUpdate, checkComponents, checkViewModels, commit, createComponents, detachFromModel, dispose, disposeComponents, endExternalUpdate, getComponents, getModel, getParameterization, getParent, getRunnableQueue, getScene, getServiceEventQualifiers, getViewModels, isDisposed, isInExternalUpdate, queueAndWaitEvent, queueEvent, removeComponent, removeListener, removeViewModel, setChildCommitsEnabled, setChildRefreshEnable, setModel, setParent, setScene, subscribeOnEvents, subscribeOnEvents, unsubscribeOnEvents
-
-
-
-
Constructor Detail
-
ContainerComponent
public ContainerComponent(P parameterization)
Creates a new container component.- Parameters:
parameterization- the parameterization.
-
-
Method Detail
-
addComponent
public <C extends IComponent<?>> C addComponent(C component)
Description copied from class:ComponentAdds the child component.- Overrides:
addComponentin classComponent<M extends IModel,P extends IParameterization>- Returns:
- the added component.
-
field
public FieldComponent field(String labelText)
Creates a newFieldComponentand 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 newFieldComponentand 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 newLabelComponentand 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 newLabelComponentand 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 newButtonComponentand 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 newButtonComponentand 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 newTextComponent, 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 newComboComponent, 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 newCheckBoxComponent, 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 newCheckBoxComponent, 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 newSpinnerComponent, 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 newSeparatorComponentand adds it to this component.- Returns:
- the newly created separator component.
-
updateViewModels
public void updateViewModels()
Description copied from class:StandardComponentUpdates view models of the component. Override it to update view model properties according to current state of the component.- Overrides:
updateViewModelsin classStandardComponent<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:ComponentCreates the view models of this component. Override it to provide a view models of this component.- Overrides:
createViewModelsin classStandardComponent<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:
trueif editable,falseotherwise
-
-