Search in sources :

Example 1 with Label

use of org.akaza.openclinica.web.pform.dto.Label in project OpenClinica by OpenClinica.

the class InputWidget method getUserControl.

@Override
public UserControl getUserControl() {
    Input input = new Input();
    Label label = new Label();
    label.setLabel(itemFormMetadataBean.getLeftItemText());
    input.setLabel(label);
    // input.setHint(hint);
    if (appearance != null)
        input.setAppearance(appearance);
    input.setRef("/" + version.getOid() + "/" + itemGroupBean.getOid() + "/" + item.getOid());
    return input;
}
Also used : Input(org.akaza.openclinica.web.pform.dto.Input) Label(org.akaza.openclinica.web.pform.dto.Label)

Example 2 with Label

use of org.akaza.openclinica.web.pform.dto.Label in project OpenClinica by OpenClinica.

the class Select1Widget method getUserControl.

@Override
public UserControl getUserControl() {
    Select1 select1 = new Select1();
    Label label = new Label();
    label.setLabel(itemFormMetadataBean.getLeftItemText());
    select1.setLabel(label);
    // Hint hint = new Hint();
    // hint.setHint(item.getItemMeta().getLeftItemText());
    // select1.setHint(hint);
    select1.setRef("/" + version.getOid() + "/" + itemGroupBean.getOid() + "/" + item.getOid());
    select1.setAppearance(appearance);
    ArrayList<Item> itemList = new ArrayList<Item>();
    select1.setItem(itemList);
    ArrayList<ResponseOptionBean> options = itemFormMetadataBean.getResponseSet().getOptions();
    for (ResponseOptionBean option : options) {
        Item item = new Item();
        Label itemLabel = new Label();
        itemLabel.setLabel(option.getText());
        item.setValue(option.getValue());
        item.setLabel(itemLabel);
        itemList.add(item);
    }
    return select1;
}
Also used : Item(org.akaza.openclinica.web.pform.dto.Item) Select1(org.akaza.openclinica.web.pform.dto.Select1) Label(org.akaza.openclinica.web.pform.dto.Label) ArrayList(java.util.ArrayList) ResponseOptionBean(org.akaza.openclinica.bean.submit.ResponseOptionBean)

Example 3 with Label

use of org.akaza.openclinica.web.pform.dto.Label in project OpenClinica by OpenClinica.

the class OpenRosaXmlGenerator method setSectionWidget.

/**
     * @param section
     * @param crfVersion
     * @param sectionExpression
     * @param bindList
     * @param factory
     * @param singleSection
     */
private void setSectionWidget(SectionBean section, CRFVersionBean crfVersion, String sectionExpression, ArrayList<Bind> bindList, WidgetFactory factory, Group singleSection) {
    Widget sectionWidget = factory.getSectionWidget(section, crfVersion, sectionExpression);
    bindList.add(sectionWidget.getBinding());
    if (section.getTitle() != null && !section.getTitle().equals("")) {
        Label sectionLabel = new Label();
        sectionLabel.setLabel(section.getTitle());
        singleSection.setLabel(sectionLabel);
    }
    singleSection.setGroup(new ArrayList<Group>());
    Widget subtitle = factory.getSectionTextWidget(crfVersion.getOid(), WidgetFactory.SECTION_TEXT_TYPE_SUBTITLE, section);
    Widget instructions = factory.getSectionTextWidget(crfVersion.getOid(), WidgetFactory.SECTION_TEXT_TYPE_INSTRUCTIONS, section);
    if (subtitle != null) {
        singleSection.getUsercontrol().add(subtitle.getUserControl());
        bindList.add(subtitle.getBinding());
    }
    if (instructions != null) {
        singleSection.getUsercontrol().add(instructions.getUserControl());
        bindList.add(instructions.getBinding());
    }
}
Also used : Group(org.akaza.openclinica.web.pform.dto.Group) Widget(org.akaza.openclinica.web.pform.widget.Widget) Label(org.akaza.openclinica.web.pform.dto.Label)

Example 4 with Label

use of org.akaza.openclinica.web.pform.dto.Label in project OpenClinica by OpenClinica.

the class SelectWidget method getUserControl.

@Override
public UserControl getUserControl() {
    Select select = new Select();
    Label label = new Label();
    label.setLabel(itemFormMetadataBean.getLeftItemText());
    select.setLabel(label);
    // Hint hint = new Hint();
    // hint.setHint(item.getItemMeta().getLeftItemText());
    // select.setHint(hint);
    select.setRef("/" + version.getOid() + "/" + itemGroupBean.getOid() + "/" + item.getOid());
    select.setAppearance(appearance);
    ArrayList<Item> itemList = new ArrayList<Item>();
    select.setItem(itemList);
    ArrayList<ResponseOptionBean> options = itemFormMetadataBean.getResponseSet().getOptions();
    for (ResponseOptionBean option : options) {
        Item item = new Item();
        Label itemLabel = new Label();
        itemLabel.setLabel(option.getText());
        item.setValue(option.getValue());
        item.setLabel(itemLabel);
        itemList.add(item);
    }
    return select;
}
Also used : Item(org.akaza.openclinica.web.pform.dto.Item) Select(org.akaza.openclinica.web.pform.dto.Select) Label(org.akaza.openclinica.web.pform.dto.Label) ArrayList(java.util.ArrayList) ResponseOptionBean(org.akaza.openclinica.bean.submit.ResponseOptionBean)

Example 5 with Label

use of org.akaza.openclinica.web.pform.dto.Label in project OpenClinica by OpenClinica.

the class SubHeaderWidget method getUserControl.

@Override
public UserControl getUserControl() {
    Input input = new Input();
    Label label = new Label();
    label.setLabel(itemMetaData.getSubHeader());
    input.setLabel(label);
    input.setRef("/" + version.getOid() + "/" + itemGroup.getOid() + "/" + item.getOid() + ".SUBHEADER");
    return input;
}
Also used : Input(org.akaza.openclinica.web.pform.dto.Input) Label(org.akaza.openclinica.web.pform.dto.Label)

Aggregations

Label (org.akaza.openclinica.web.pform.dto.Label)8 Input (org.akaza.openclinica.web.pform.dto.Input)4 ArrayList (java.util.ArrayList)2 ResponseOptionBean (org.akaza.openclinica.bean.submit.ResponseOptionBean)2 Group (org.akaza.openclinica.web.pform.dto.Group)2 Item (org.akaza.openclinica.web.pform.dto.Item)2 HashMap (java.util.HashMap)1 ItemGroupMetadataBean (org.akaza.openclinica.bean.submit.ItemGroupMetadataBean)1 ItemGroupMetadataDAO (org.akaza.openclinica.dao.submit.ItemGroupMetadataDAO)1 Repeat (org.akaza.openclinica.web.pform.dto.Repeat)1 Select (org.akaza.openclinica.web.pform.dto.Select)1 Select1 (org.akaza.openclinica.web.pform.dto.Select1)1 UserControl (org.akaza.openclinica.web.pform.dto.UserControl)1 Widget (org.akaza.openclinica.web.pform.widget.Widget)1