public class FormImpl extends AbstractComponent<JmixFormLayout> implements Form, UiPermissionAware
Form.CaptionAlignmentEditableChangeNotifier.EditableChangeEventHasContextHelp.ContextHelpIconClickEventComponent.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.WrapperSupportsCaptionPosition.CaptionPosition| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<java.util.List<ComponentPosition>> |
columnComponentMapping |
protected boolean |
editable |
protected ValueSourceProvider |
valueSourceProvider |
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parentAUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE| Constructor and Description |
|---|
FormImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Component childComponent)
Adds a component to the first column.
|
void |
add(Component childComponent,
int column)
Adds a component to the column with the given index.
|
void |
add(Component childComponent,
int column,
int row)
Adds a component to a column with the given index to the given position.
|
void |
add(Component childComponent,
int column,
int colSpan,
int rowSpan)
Adds a component to a column with the given index with the given span.
|
void |
add(Component childComponent,
int column,
int row,
int colSpan,
int rowSpan)
Adds a component to a column with the given index to the given position with the given span.
|
protected void |
addComponentInternal(Component childComponent,
int column,
int row,
int colSpan,
int rowSpan) |
io.jmix.core.common.event.Subscription |
addEditableChangeListener(java.util.function.Consumer<EditableChangeNotifier.EditableChangeEvent> listener)
Adds a listener that is invoked when the
editable property changes. |
protected void |
applyDefaults(Component childComponent) |
void |
applyPermission(UiPermissionDescriptor permissionDescriptor)
Change state of subcomponent according to the
permissionValue. |
protected void |
assignDebugId(com.vaadin.ui.Component composition,
java.lang.String id) |
protected void |
assignTypicalAttributes(Component component) |
void |
attached()
Notifies all listeners that component has been attached.
|
protected java.util.List<ComponentArea> |
calculateComponentAreas() |
protected int |
calculateInsertIndex(int column,
int row,
java.util.List<ComponentPosition> componentPositions) |
protected void |
checkExistingOverlaps(int startColumn,
int startRow,
int colSpan,
int rowSpan) |
protected JmixFormLayout |
createComponent() |
void |
detached()
Notifies all listeners that component has been detached.
|
protected int |
detectRowsCount() |
protected int |
detectRowsCount(int column) |
protected int |
detectRowsCount(int column,
boolean isCheckAreas) |
protected int |
detectStartRowIndex(int column) |
protected void |
fillSpanMatrix(boolean[][] spanMatrix,
int col,
int row,
int colspan,
int rowspan) |
protected ComponentArea |
findComponentArea(java.util.List<ComponentArea> componentAreas,
ComponentPosition position) |
protected ComponentPosition |
findComponentPosition(java.util.List<ComponentPosition> components,
Component component) |
SupportsCaptionPosition.CaptionPosition |
getCaptionPosition() |
Form.CaptionAlignment |
getChildrenCaptionAlignment() |
Form.CaptionAlignment |
getChildrenCaptionAlignment(int column)
Returns alignment of child component captions for a column with the given index.
|
int |
getChildrenCaptionWidth() |
int |
getChildrenCaptionWidth(int column)
Returns fixed caption width for column with a given index.
|
float |
getColumnFlex(int column)
Returns the flex layout ratio for column with a given index.
|
int |
getColumns() |
Component |
getComponent(int column,
int row) |
Component |
getComponent(java.lang.String id)
Gets a component belonging to the whole components tree below this container.
|
java.util.Collection<Component> |
getComponents()
Gets all components belonging to the whole components tree below this container.
|
java.util.Collection<Component> |
getComponents(int column) |
Component |
getOwnComponent(java.lang.String id)
Gets component directly owned by this container.
|
java.util.Collection<Component> |
getOwnComponents()
Gets all components directly owned by this container.
|
java.util.stream.Stream<Component> |
getOwnComponentsStream()
Gets stream of all components directly owned by this container.
|
ValueSourceProvider |
getValueSourceProvider() |
boolean |
isEditable() |
protected void |
managedComponentAssigned(Component childComponent) |
protected void |
reattachColumnFields() |
void |
remove(Component childComponent)
Removes a component from this container.
|
void |
removeAll()
Removes all components from this container.
|
void |
setCaptionPosition(SupportsCaptionPosition.CaptionPosition captionAlignment)
Sets caption position of form child components.
|
void |
setChildrenCaptionAlignment(Form.CaptionAlignment alignment)
Sets alignment of child component captions in all columns.
|
void |
setChildrenCaptionAlignment(int column,
Form.CaptionAlignment alignment)
Sets alignment of child component captions for a column with the given index.
|
void |
setChildrenCaptionWidth(int width)
Sets fixed captions width for all columns.
|
void |
setChildrenCaptionWidth(int column,
int width)
Set fixed captions width for column with a given index.
|
void |
setColumnFlex(int column,
float flex)
Sets flex layout ratio for column with a given index.
|
void |
setColumns(int columns)
Sets the number of columns in the Form.
|
void |
setDebugId(java.lang.String id)
INTERNAL.
|
void |
setEditable(boolean editable) |
void |
setValueSourceProvider(ValueSourceProvider provider) |
addAttachListener, addDetachListener, addStyleName, assignDebugId, getAlignment, getCaption, getComponent, getComposition, getContextHelpIconClickHandler, getContextHelpText, getDebugId, getDescription, getEventHub, getFrame, getHeight, getHeightSizeUnit, getHtmlSanitizer, getIcon, getIconName, getIconResource, getId, getParent, getStyleName, getUiComponentProperties, getUiProperties, getWidth, getWidthSizeUnit, getXmlDescriptor, hasSubscriptions, hasValidationError, isAttached, isCaptionAsHtml, isContextHelpTextHtmlEnabled, isDescriptionAsHtml, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, onContextHelpIconClick, publish, removeStyleName, sanitize, setAlignment, setApplicationContext, setCaption, setCaptionAsHtml, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled, setDescription, setDescriptionAsHtml, setEnabled, setFrame, setHeight, setHtmlSanitizerEnabled, setIcon, setIconFromSet, setId, setParent, setResponsive, setStyleName, setValidationError, setVisible, setWidth, setXmlDescriptor, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedCompositionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFrame, setFramegetIcon, setIcon, setIconFromSetremovefocusFirstComponent, getComponentNNgetContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabledisEditableWithParentaddStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedCompositionisCaptionAsHtml, setCaptionAsHtmlgetCaption, setCaptiongetDescription, setDescriptionisDescriptionAsHtml, setDescriptionAsHtmlisHtmlSanitizerEnabled, setHtmlSanitizerEnabledprotected java.util.List<java.util.List<ComponentPosition>> columnComponentMapping
protected ValueSourceProvider valueSourceProvider
protected boolean editable
protected JmixFormLayout createComponent()
public void setDebugId(@Nullable
java.lang.String id)
HasDebugIdsetDebugId in interface HasDebugIdsetDebugId in class AbstractComponent<JmixFormLayout>public boolean isEditable()
isEditable in interface Component.Editablepublic void setEditable(boolean editable)
setEditable in interface Component.Editablepublic io.jmix.core.common.event.Subscription addEditableChangeListener(java.util.function.Consumer<EditableChangeNotifier.EditableChangeEvent> listener)
EditableChangeNotifiereditable property changes.addEditableChangeListener in interface EditableChangeNotifierlistener - a listener to addpublic void add(Component childComponent)
Formadd in interface ComponentContaineradd in interface FormchildComponent - a component to addpublic void add(Component childComponent, int column)
Formpublic void add(Component childComponent, int column, int colSpan, int rowSpan)
Formpublic void add(Component childComponent, int column, int row)
Formpublic void add(Component childComponent, int column, int row, int colSpan, int rowSpan)
Formprotected void checkExistingOverlaps(int startColumn,
int startRow,
int colSpan,
int rowSpan)
protected void addComponentInternal(Component childComponent, int column, int row, int colSpan, int rowSpan)
protected int calculateInsertIndex(int column,
int row,
java.util.List<ComponentPosition> componentPositions)
protected void managedComponentAssigned(Component childComponent)
protected void applyDefaults(Component childComponent)
protected void assignTypicalAttributes(Component component)
protected void assignDebugId(@Nullable
com.vaadin.ui.Component composition,
java.lang.String id)
protected int detectRowsCount(int column)
column - a column indexprotected int detectStartRowIndex(int column)
column - a column indexprotected int detectRowsCount(int column,
boolean isCheckAreas)
@Nullable protected ComponentArea findComponentArea(java.util.List<ComponentArea> componentAreas, ComponentPosition position)
protected int detectRowsCount()
protected void reattachColumnFields()
protected java.util.List<ComponentArea> calculateComponentAreas()
protected void fillSpanMatrix(boolean[][] spanMatrix,
int col,
int row,
int colspan,
int rowspan)
public void remove(Component childComponent)
ComponentContainerremove in interface ComponentContainerchildComponent - a component to remove@Nullable protected ComponentPosition findComponentPosition(java.util.List<ComponentPosition> components, Component component)
public void removeAll()
ComponentContainerremoveAll in interface ComponentContainer@Nullable public Component getOwnComponent(java.lang.String id)
HasComponentsgetOwnComponent in interface HasComponents@Nullable public Component getComponent(java.lang.String id)
HasComponentsgetComponent in interface HasComponentspublic java.util.Collection<Component> getOwnComponents()
HasComponentsgetOwnComponents in interface HasComponentspublic java.util.stream.Stream<Component> getOwnComponentsStream()
HasComponentsgetOwnComponentsStream in interface HasComponentspublic java.util.Collection<Component> getComponents()
HasComponentsgetComponents in interface HasComponentspublic java.util.Collection<Component> getComponents(int column)
getComponents in interface Formcolumn - a column indexpublic Component getComponent(int column, int row)
getComponent in interface Formcolumn - a columns indexrow - a row indexpublic SupportsCaptionPosition.CaptionPosition getCaptionPosition()
getCaptionPosition in interface FormgetCaptionPosition in interface SupportsCaptionPositionpublic void setCaptionPosition(SupportsCaptionPosition.CaptionPosition captionAlignment)
FormCaptionPosition#LEFT - component captions will be placed
in a separate column on the left side of the componentsCaptionPosition#TOP - component captions will be placed
above the componentssetCaptionPosition in interface FormsetCaptionPosition in interface SupportsCaptionPositioncaptionAlignment - component caption positionpublic int getChildrenCaptionWidth()
getChildrenCaptionWidth in interface Formpublic void setChildrenCaptionWidth(int width)
FormsetChildrenCaptionWidth in interface Formwidth - fixed caption widthpublic int getChildrenCaptionWidth(int column)
FormgetChildrenCaptionWidth in interface Formcolumn - a column indexpublic void setChildrenCaptionWidth(int column,
int width)
FormsetChildrenCaptionWidth in interface Formcolumn - a column indexwidth - fixed caption width for column with a given indexpublic Form.CaptionAlignment getChildrenCaptionAlignment()
getChildrenCaptionAlignment in interface Formpublic void setChildrenCaptionAlignment(Form.CaptionAlignment alignment)
Form
Applicable only when captions position is CaptionPosition#LEFT.
setChildrenCaptionAlignment in interface Formalignment - captions alignmentpublic Form.CaptionAlignment getChildrenCaptionAlignment(int column)
FormgetChildrenCaptionAlignment in interface Formcolumn - a column index to get captionpublic void setChildrenCaptionAlignment(int column,
Form.CaptionAlignment alignment)
FormsetChildrenCaptionAlignment in interface Formcolumn - a column index to set captionalignment - alignment of child component captions for a column with the given indexpublic int getColumns()
getColumns in interface Formpublic void setColumns(int columns)
FormsetColumns in interface Formcolumns - the new number of columns in the Formpublic void setColumnFlex(int column,
float flex)
FormsetColumnFlex in interface Formcolumn - a column indexflex - the flex ration for the columnpublic float getColumnFlex(int column)
FormgetColumnFlex in interface Formcolumn - a column index@Nullable public ValueSourceProvider getValueSourceProvider()
getValueSourceProvider in interface HasValueSourceProviderpublic void setValueSourceProvider(@Nullable
ValueSourceProvider provider)
setValueSourceProvider in interface HasValueSourceProviderpublic void applyPermission(UiPermissionDescriptor permissionDescriptor)
UiPermissionAwarepermissionValue.applyPermission in interface UiPermissionAwarepermissionDescriptor - descriptor which contains id of subcomponent and UI permission value
which will be applied to this subcomponent or ids of subcomponent and its action
and UI permission value which will be applied to subcomponent's actionpublic void attached()
AttachNotifierattached in interface AttachNotifierattached in class AbstractComponent<JmixFormLayout>public void detached()
AttachNotifierdetached in interface AttachNotifierdetached in class AbstractComponent<JmixFormLayout>