Search in sources :

Example 1 with DefaultFormGroup

use of org.kie.workbench.common.forms.dynamic.client.rendering.formGroups.impl.def.DefaultFormGroup in project kie-wb-common by kiegroup.

the class ColorPickerFieldRenderer method getFormGroup.

@Override
protected FormGroup getFormGroup(RenderMode renderMode) {
    colorPicker.setReadOnly(!renderingContext.getRenderMode().equals(RenderMode.EDIT_MODE));
    DefaultFormGroup formGroup = formGroupsInstance.get();
    formGroup.render(colorPicker, field);
    return formGroup;
}
Also used : DefaultFormGroup(org.kie.workbench.common.forms.dynamic.client.rendering.formGroups.impl.def.DefaultFormGroup)

Example 2 with DefaultFormGroup

use of org.kie.workbench.common.forms.dynamic.client.rendering.formGroups.impl.def.DefaultFormGroup in project kie-wb-common by kiegroup.

the class AbstractListBoxFieldRenderer method getFormGroup.

@Override
protected FormGroup getFormGroup(RenderMode renderMode) {
    DefaultFormGroup formGroup = formGroupsInstance.get();
    if (renderMode.equals(RenderMode.PRETTY_MODE)) {
        formGroup.render(new HTML(), field);
    } else {
        String inputId = generateUniqueId();
        widgetList.setId(inputId);
        widgetList.setEnabled(!field.getReadOnly());
        refreshSelectorOptions();
        formGroup.render(inputId, widgetList, field);
    }
    return formGroup;
}
Also used : HTML(com.google.gwt.user.client.ui.HTML) DefaultFormGroup(org.kie.workbench.common.forms.dynamic.client.rendering.formGroups.impl.def.DefaultFormGroup)

Example 3 with DefaultFormGroup

use of org.kie.workbench.common.forms.dynamic.client.rendering.formGroups.impl.def.DefaultFormGroup in project kie-wb-common by kiegroup.

the class DecimalBoxFieldRenderer method getFormGroup.

@Override
protected FormGroup getFormGroup(RenderMode renderMode) {
    DefaultFormGroup formGroup = formGroupsInstance.get();
    if (renderMode.equals(RenderMode.PRETTY_MODE)) {
        formGroup.render(new HTML(), field);
    } else {
        String inputId = generateUniqueId();
        decimalBox.setId(inputId);
        decimalBox.setPlaceholder(field.getPlaceHolder());
        decimalBox.setMaxLength(field.getMaxLength());
        decimalBox.setEnabled(!field.getReadOnly());
        formGroup.render(inputId, decimalBox.asWidget(), field);
    }
    return formGroup;
}
Also used : HTML(com.google.gwt.user.client.ui.HTML) DefaultFormGroup(org.kie.workbench.common.forms.dynamic.client.rendering.formGroups.impl.def.DefaultFormGroup)

Example 4 with DefaultFormGroup

use of org.kie.workbench.common.forms.dynamic.client.rendering.formGroups.impl.def.DefaultFormGroup in project kie-wb-common by kiegroup.

the class IntegerBoxFieldRenderer method getFormGroup.

@Override
protected FormGroup getFormGroup(RenderMode renderMode) {
    Widget widget;
    String inputId = generateUniqueId();
    if (renderMode.equals(RenderMode.PRETTY_MODE)) {
        widget = new HTML();
        widget.getElement().setId(inputId);
    } else {
        integerBox.setId(inputId);
        integerBox.setPlaceholder(field.getPlaceHolder());
        integerBox.setMaxLength(field.getMaxLength());
        integerBox.setEnabled(!field.getReadOnly());
        widget = integerBox.asWidget();
    }
    DefaultFormGroup formGroup = formGroupsInstance.get();
    formGroup.render(inputId, widget, field);
    return formGroup;
}
Also used : Widget(com.google.gwt.user.client.ui.Widget) HTML(com.google.gwt.user.client.ui.HTML) DefaultFormGroup(org.kie.workbench.common.forms.dynamic.client.rendering.formGroups.impl.def.DefaultFormGroup)

Example 5 with DefaultFormGroup

use of org.kie.workbench.common.forms.dynamic.client.rendering.formGroups.impl.def.DefaultFormGroup in project kie-wb-common by kiegroup.

the class MultipleSelectorFieldRenderer method getFormGroup.

@Override
protected FormGroup getFormGroup(RenderMode renderMode) {
    DefaultFormGroup formGroup = formGroupsInstance.get();
    final List<TYPE> values = field.getListOfValues();
    selector.init(searchService, new MultipleLiveSearchSelectionHandler<>(field.getMaxElementsOnTitle()));
    selector.setMaxItems(field.getMaxDropdownElements());
    selector.setEnabled(!field.getReadOnly() && renderingContext.getRenderMode().equals(RenderMode.EDIT_MODE));
    selector.setFilterEnabled(field.getAllowFilter());
    selector.setClearSelectionEnabled(field.getAllowClearSelection());
    if (renderMode.equals(RenderMode.PRETTY_MODE)) {
        selector.setEnabled(false);
    }
    formGroup.render(selector.asWidget(), field);
    return formGroup;
}
Also used : DefaultFormGroup(org.kie.workbench.common.forms.dynamic.client.rendering.formGroups.impl.def.DefaultFormGroup)

Aggregations

DefaultFormGroup (org.kie.workbench.common.forms.dynamic.client.rendering.formGroups.impl.def.DefaultFormGroup)18 HTML (com.google.gwt.user.client.ui.HTML)6 Widget (com.google.gwt.user.client.ui.Widget)1 TextArea (org.gwtbootstrap3.client.ui.TextArea)1 TextBox (org.gwtbootstrap3.client.ui.TextBox)1 DateFlatView (org.kie.workbench.common.forms.common.rendering.client.widgets.flatViews.impl.DateFlatView)1 BPMNDefinition (org.kie.workbench.common.stunner.bpmn.definition.BPMNDefinition)1