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.ButtonComponent
button(ILabeledParametrization parametrization)
Creates a newButtonComponent
and adds it to this component.ButtonComponent
button(String text)
Creates a newButtonComponent
and adds it to this component.CheckBoxComponent
checkBox(IValue<Boolean> value)
Creates a newCheckBoxComponent
, sets the given model and adds it to this component.CheckBoxComponent
checkBox(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 IContainerViewModel
createContainerViewModel()
Creates the view model of the container.protected void
createViewModels()
Creates the view models of this component.void
disposeChildren()
Disposes the children of the component.FieldComponent
field(ILabeledParametrization parametrization)
Creates a newFieldComponent
and adds it to this component.FieldComponent
field(String labelText)
Creates a newFieldComponent
and adds it to this component.protected IContainerViewModel
getContainerViewModel()
Returns the view model of the container.protected boolean
isEditable()
Checks is component editable.LabelComponent
label(ILabeledParametrization parametrization)
Creates a newLabelComponent
and adds it to this component.LabelComponent
label(String text)
Creates a newLabelComponent
and adds it to this component.void
refreshChildren()
Refreshes children of the component.SeparatorComponent
separator()
Creates a newSeparatorComponent
and adds it to this component.SpinnerComponent
spinner(IValue<Integer> value, int min, int max)
Creates a newSpinnerComponent
, sets the given model and adds it to this component.TextComponent
text(IValue<String> text)
Creates a newTextComponent
, sets the given model and adds it to this component.void
updateViewModels()
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:Component
Adds the child component.- Overrides:
addComponent
in classComponent<M extends IModel,P extends IParameterization>
- Returns:
- the added component.
-
field
public FieldComponent field(String labelText)
Creates a newFieldComponent
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 newFieldComponent
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 newLabelComponent
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 newLabelComponent
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 newButtonComponent
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 newButtonComponent
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 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 newSeparatorComponent
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 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:Component
Creates the view models of this component. Override it to provide a view models of this component.- Overrides:
createViewModels
in 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:
true
if editable,false
otherwise
-
-