Search in sources :

Example 1 with SingleFieldConstraintOperatorSelector

use of org.drools.workbench.screens.guided.rule.client.widget.operator.SingleFieldConstraintOperatorSelector in project drools-wb by kiegroup.

the class FactPatternWidget method operatorDropDown.

private Widget operatorDropDown(final SingleFieldConstraint constraint, final FlexTable inner, final int rowIndex, final int colIndex) {
    final HorizontalPanel dropdownContainer = new HorizontalPanel();
    if (!this.readOnly) {
        final SingleFieldConstraintOperatorSelector operatorSelectorBuilder = GWT.create(SingleFieldConstraintOperatorSelector.class);
        operatorSelectorBuilder.configure(constraint, () -> constraintValueEditor, this::createValueEditor, this, dropdownContainer, inner, rowIndex, colIndex, getConnectives().getDataModelOracle());
    } else {
        final SmallLabel sl = new SmallLabel("<b>" + (constraint.getOperator() == null ? GuidedRuleEditorResources.CONSTANTS.pleaseChoose() : HumanReadable.getOperatorDisplayName(constraint.getOperator())) + "</b>");
        dropdownContainer.add(sl);
    }
    return dropdownContainer;
}
Also used : SmallLabel(org.uberfire.ext.widgets.common.client.common.SmallLabel) HorizontalPanel(com.google.gwt.user.client.ui.HorizontalPanel) SingleFieldConstraintOperatorSelector(org.drools.workbench.screens.guided.rule.client.widget.operator.SingleFieldConstraintOperatorSelector)

Aggregations

HorizontalPanel (com.google.gwt.user.client.ui.HorizontalPanel)1 SingleFieldConstraintOperatorSelector (org.drools.workbench.screens.guided.rule.client.widget.operator.SingleFieldConstraintOperatorSelector)1 SmallLabel (org.uberfire.ext.widgets.common.client.common.SmallLabel)1