use of io.jmix.ui.component.GroupBoxLayout in project jmix by jmix-framework.
the class FilterDelegateImpl method createLayout.
@Override
public void createLayout() {
if (layout == null) {
groupBoxLayout = uiComponents.create(GroupBoxLayout.class);
groupBoxLayout.addExpandedStateChangeListener(e -> fireExpandStateChange(e.isUserOriginated()));
groupBoxLayout.setOrientation(GroupBoxLayout.Orientation.VERTICAL);
groupBoxLayout.setWidthFull();
layout = groupBoxLayout;
layout.setSpacing(true);
if (caption == null) {
setCaption(getMainMessage("filter.groupBoxCaption"));
}
} else {
Collection<Component> components = layout.getComponents();
for (Component component : components) {
layout.remove(component);
}
}
appliedFiltersLayout = uiComponents.create(VBoxLayout.class);
conditionsLayout = uiComponents.create(CssLayout.class);
// initially hidden
conditionsLayout.setVisible(false);
conditionsLayout.setWidthFull();
conditionsLayout.setStyleName("filter-conditions");
if (filterMode == FilterMode.GENERIC_MODE) {
createControlsLayoutForGeneric();
} else {
createControlsLayoutForFts();
}
if (CONDITIONS_LOCATION_TOP.equals(conditionsLocation)) {
layout.add(conditionsLayout);
layout.add(controlsLayout);
} else {
layout.add(controlsLayout);
layout.add(conditionsLayout);
}
}
use of io.jmix.ui.component.GroupBoxLayout in project jmix by jmix-framework.
the class FilterDelegateImpl method createGroupConditionBox.
protected Component createGroupConditionBox(AbstractCondition condition, Node<AbstractCondition> node, ConditionsFocusType conditionsFocusType, boolean focusSet, int level) {
Component groupCellContent;
GroupBoxLayout groupBox = uiComponents.create(GroupBoxLayout.class);
groupBox.setStyleName("conditions-group");
groupBox.setWidth("100%");
groupBox.setCaption(condition.getLocCaption());
if (!node.getChildren().isEmpty()) {
recursivelyCreateConditionsLayout(conditionsFocusType, focusSet, node.getChildren(), groupBox, level);
}
groupCellContent = groupBox;
return groupCellContent;
}
Aggregations