Package edu.stanford.bmir.protege.web.client.ui.portlet

Examples of edu.stanford.bmir.protege.web.client.ui.portlet.PropertyWidget


            Object value = panelConf.get(prop);
            if (value instanceof Map) {
                Map<String, Object> map = (Map<String, Object>) value;
                String component_type = (String) ((Map) value).get(FormConstants.COMPONENT_TYPE);
                if (component_type != null) {
                    PropertyWidget widget = null;
                    if (component_type.equals(FormConstants.TEXTFIELD)) {
                        widget = createTextField(map, prop);
                    } else if (component_type.equals(FormConstants.TEXTAREA)) {
                        widget = createTextArea(map, prop);
                    } else if (component_type.equals(FormConstants.COMBOBOX)) {
                        widget = createComboBox(map, prop);
                    } else if (component_type.equals(FormConstants.HTMLEDITOR)) {
                        widget = createHtmlEditor(map, prop);
                    } else if (component_type.equals(FormConstants.FIELDSET)) {
                        // widget = createFieldSet((Map)value);
                    } else if (component_type.equals(FormConstants.MULTITEXTFIELD)) {
                        widget = createMultiTextField(map, prop);
                    } else if (component_type.equals(FormConstants.INSTANCETEXTFIELD)) {
                      widget = createInstanceTextField(map, prop);
                    else if (component_type.equals(FormConstants.INSTANCEREFERENCE)) {
                      widget = createInstanceReferenceField(map, prop);
                    } else if (component_type.equals(FormConstants.GRID)) {
                        widget = createGrid(map, prop);
                    } else if (component_type.equals(FormConstants.EXTERNALREFERENCE)) {
                        widget = createExternalReference(map, prop);
                    } else if (component_type.equals(FormConstants.CLASS_SELECTION_FIELD)) {
                        widget = createClassSelectionField(map, prop);
                    } else if (component_type.equals(FormConstants.PROPERTY_SELECTION_FIELD)) {
                        widget = createPropertySelectionField(map, prop);
                    } else if (component_type.equals(FormConstants.HTMLMESSAGE)) {
                        widget = createHtmlMessage(map, prop);
                    } else if (component_type.equals(FormConstants.INSTANCE_CHECKBOX)) {
                        widget = createInstanceCheckBox(map, prop);
                    } else if (component_type.equals(FormConstants.INSTANCE_RADIOBUTTON)) {
                        widget = createInstanceRadioButton(map, prop);
                    } else if (component_type.equals(FormConstants.INSTANCE_COMBOBOX)) {
                        widget = createInstanceComboBox(map, prop);
                    }
                    if (widget != null && widget.getComponent() != null) {
                        widgets.add(widget);
                        panel.add(widget.getComponent());
                        addToMap(panel, widget);
                    }
                }
            }
        }
View Full Code Here


  @Override
    public void refresh() {
  }

  protected void onAddNewValue() {
    PropertyWidget widget = createWidget("");
    //TODO: fix me!!!!! hack!! not cast to component
    wrappingPanel.add(widget.getComponent());
  }
View Full Code Here

    public void setValues(Collection<EntityData> vs) {
    this.values = vs;
    wrappingPanel.clear();
    if (values.size() > 0)  {
      for (EntityData value : values) {
        PropertyWidget widget = createWidget(value);
        widgets.add(widget);
        add(widget);
        List<EntityData> vals = new ArrayList<EntityData>();
        vals.add(value);
        widget.setValues(vals);
      }
    } else {
        add(createWidget(""));
    }
    if (!isDisabled() && !isReadOnly()) {
View Full Code Here

TOP

Related Classes of edu.stanford.bmir.protege.web.client.ui.portlet.PropertyWidget

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.