Package io.jmix.ui.component
Interface TwinColumn<V>
- Type Parameters:
V
- value and options type for the component
- All Superinterfaces:
Component
,Component.BelongToFrame
,Component.Editable
,Component.Focusable
,Component.HasCaption
,Component.HasDescription
,Component.HasIcon
,Field<Collection<V>>
,HasContextHelp
,HasHtmlCaption
,HasHtmlDescription
,HasHtmlSanitizer
,HasOptionCaptionProvider<V>
,HasOptionStyleProvider<V>
,HasValidator<Collection<V>>
,HasValue<Collection<V>>
,HasValueSource<Collection<V>>
,OptionsField<Collection<V>,
,V> Requirable
,Validatable
- All Known Implementing Classes:
TwinColumnImpl
@StudioComponent(caption="TwinColumn",
category="Components",
xmlElement="twinColumn",
icon="io/jmix/ui/icon/component/twinColumn.svg",
canvasBehaviour=TWIN_COLUMN,
documentationURL="https://docs.jmix.io/jmix/%VERSION%/ui/vcl/components/twin-column.html")
public interface TwinColumn<V>
extends OptionsField<Collection<V>,V>, Component.Focusable, HasOptionStyleProvider<V>
A component with two lists: left list for available options, right list for selected values.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEvent
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasValue
HasValue.ValueChangeEvent<V>
-
Field Summary
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
-
Method Summary
Modifier and TypeMethodDescriptionReturns caption of the left column.Returns caption of the right column.int
getRows()
boolean
boolean
void
setAddAllBtnEnabled
(boolean enabled) Enables "Add all" and "Remove all" buttons.void
setLeftColumnCaption
(String leftColumnCaption) Sets caption for the left column.void
setReorderable
(boolean reorderable) Allows you to configure whether items should be reordered after selection.void
setRightColumnCaption
(String rightColumnCaption) Sets caption for the right column.void
setRows
(int rows) Sets the number of visible rows.Methods inherited from interface io.jmix.ui.component.Component
addStyleName, 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, withUnwrappedComposition
Methods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrame
Methods inherited from interface io.jmix.ui.component.Component.Editable
isEditable, isEditableWithParent, setEditable
Methods inherited from interface io.jmix.ui.component.Component.Focusable
focus, getTabIndex, isFocusable, setFocusable, setTabIndex
Methods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaption
Methods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescription
Methods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSet
Methods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
Methods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
Methods inherited from interface io.jmix.ui.component.HasOptionCaptionProvider
getOptionCaptionProvider, setOptionCaptionProvider
Methods inherited from interface io.jmix.ui.component.HasOptionStyleProvider
getOptionStyleProvider, setOptionStyleProvider
Methods inherited from interface io.jmix.ui.component.HasValidator
addValidator, addValidators, getValidators, removeValidator
Methods inherited from interface io.jmix.ui.component.HasValue
addValueChangeListener, clear, getEmptyValue, getValue, isEmpty, setValue
Methods inherited from interface io.jmix.ui.component.data.HasValueSource
getValueSource, setValueSource
Methods inherited from interface io.jmix.ui.component.OptionsField
getOptions, setOptions, setOptionsEnum, setOptionsList, setOptionsMap
Methods inherited from interface io.jmix.ui.component.Requirable
getRequiredMessage, isRequired, setRequired, setRequiredMessage
Methods inherited from interface io.jmix.ui.component.Validatable
isValid, isValidateOnCommit, validate
-
Field Details
-
NAME
- See Also:
-
-
Method Details
-
getRows
int getRows()- Returns:
- the number of visible rows
-
setRows
Sets the number of visible rows.- Parameters:
rows
- number of visible rows
-
setReorderable
void setReorderable(boolean reorderable) Allows you to configure whether items should be reordered after selection.Reordering is enabled by default.
- Parameters:
reorderable
- pass 'true' to enable reordering or 'false' otherwise
-
isReorderable
boolean isReorderable()- Returns:
- true if items are reordered or false otherwise
-
setAddAllBtnEnabled
@StudioProperty(name="addAllBtnEnabled", defaultValue="false") void setAddAllBtnEnabled(boolean enabled) Enables "Add all" and "Remove all" buttons.- Parameters:
enabled
- true if buttons should be enabled
-
isAddAllBtnEnabled
boolean isAddAllBtnEnabled()- Returns:
- true if buttons are enabled
-
setLeftColumnCaption
@StudioProperty(type=LOCALIZED_STRING) void setLeftColumnCaption(@Nullable String leftColumnCaption) Sets caption for the left column.- Parameters:
leftColumnCaption
- a caption for the left column
-
getLeftColumnCaption
Returns caption of the left column.- Returns:
- caption text or null if not set.
-
setRightColumnCaption
@StudioProperty(type=LOCALIZED_STRING) void setRightColumnCaption(@Nullable String rightColumnCaption) Sets caption for the right column.- Parameters:
rightColumnCaption
- a caption for the right column
-
getRightColumnCaption
Returns caption of the right column.- Returns:
- caption text or null if not set.
-