Examples of AttributeInfo


Examples of org.geomajas.configuration.AttributeInfo

    }

    // now list 'm up
    for (String name : attributeNames) {
      if (attrs.containsKey(name)) {
        AttributeInfo a = attrs.get(name);
        if (a instanceof PrimitiveAttributeInfo) {
          PrimitiveAttributeInfo attr = (PrimitiveAttributeInfo) a;
          switch (attr.getType()) {
            case BOOLEAN:
              builder.add(attr.getName(), Boolean.class);
View Full Code Here

Examples of org.geomajas.configuration.AttributeInfo

    }
    return attribs;
  }

  private Attribute convertAttribute(Object object, String name) throws LayerException {
    AttributeInfo attributeInfo = attributeInfoMap.get(name);
    if (null == attributeInfo) {
      throw new LayerException(ExceptionCode.ATTRIBUTE_UNKNOWN, name, attributeInfoMap.keySet());
    }
    try {
      return converterService.toDto(object, attributeInfo);
View Full Code Here

Examples of org.geomajas.configuration.AttributeInfo

  }

  // FeatureModel implementation:

  public Attribute getAttribute(Object feature, String name) throws LayerException {
    AttributeInfo attributeInfo = attributeInfoMap.get(name);
    if (null == attributeInfo) {
      throw new LayerException(ExceptionCode.ATTRIBUTE_UNKNOWN, name, attributeInfoMap.keySet());
    }
    try {
      return converterService.toDto(asFeature(feature).getAttribute(name), attributeInfo);
View Full Code Here

Examples of org.geomajas.configuration.AttributeInfo

      for (NamedStyleInfo namedStyle : info.getNamedStyleInfos()) {
        for (FeatureStyleInfo featureStyle : namedStyle.getFeatureStyles()) {
          featureStyle.applyDefaults();
        }
        if (namedStyle.getLabelStyle().getLabelAttributeName() == null) {
          AttributeInfo attributeInfo = info.getFeatureInfo().getAttributes().get(0);
          namedStyle.getLabelStyle().setLabelAttributeName(attributeInfo.getName());
        }
        namedStyle.getLabelStyle().getBackgroundStyle().applyDefaults();
        namedStyle.getLabelStyle().getFontStyle().applyDefaults();
      }
    }
View Full Code Here

Examples of org.geomajas.configuration.AttributeInfo

   *
   * @see org.geomajas.gwt.client.widget.attribute.FeatureForm#toForm(java.lang.String,
   * org.geomajas.layer.feature.Attribute)
   */
  public void toForm(String name, Attribute<?> attribute) {
    AttributeInfo info = attributeInfoMap.get(name);
    if (info == null || !isIncluded(info)) {
      return;
    }
    FormItem item = formWidget.getField(info.getName());
    if (item != null) {
      if (info instanceof PrimitiveAttributeInfo) {
        PrimitiveAttribute<?> primitive = (PrimitiveAttribute<?>) attribute;
        if (attribute == null) {
          item.setDisabled(true);
        } else {
          switch (primitive.getType()) {
            case BOOLEAN:
              setValue(info.getName(), (BooleanAttribute) primitive); // NOSONAR valid cast
              break;
            case SHORT:
              setValue(info.getName(), (ShortAttribute) primitive); // NOSONAR valid cast
              break;
            case INTEGER:
              setValue(info.getName(), (IntegerAttribute) primitive); // NOSONAR valid cast
              break;
            case LONG:
              setValue(info.getName(), (LongAttribute) primitive); // NOSONAR valid cast
              break;
            case FLOAT:
              setValue(info.getName(), (FloatAttribute) primitive); // NOSONAR valid cast
              break;
            case DOUBLE:
              setValue(info.getName(), (DoubleAttribute) primitive); // NOSONAR valid cast
              break;
            case CURRENCY:
              setValue(info.getName(), (CurrencyAttribute) primitive); // NOSONAR valid cast
              break;
            case STRING:
              setValue(info.getName(), (StringAttribute) primitive); // NOSONAR valid cast
              break;
            case URL:
              setValue(info.getName(), (UrlAttribute) primitive); // NOSONAR valid cast
              break;
            case IMGURL:
              setValue(info.getName(), (ImageUrlAttribute) primitive); // NOSONAR valid cast
              break;
            case DATE:
              setValue(info.getName(), (DateAttribute) primitive); // NOSONAR valid cast
              break;
            default:
              throw new IllegalStateException("Unhandled primitive attribute type " +
                  primitive.getType());
          }
View Full Code Here

Examples of org.geomajas.configuration.AttributeInfo

   *
   * @see org.geomajas.gwt.client.widget.attribute.FeatureForm#fromForm(java.lang.String,
   * org.geomajas.layer.feature.Attribute)
   */
  public void fromForm(String name, Attribute<?> attribute) {
    AttributeInfo info = attributeInfoMap.get(name);
    if (attribute == null || !isIncluded(info)) {
      return;
    }
    if (info instanceof PrimitiveAttributeInfo) {
      PrimitiveAttribute<?> primitive = (PrimitiveAttribute<?>) attribute;
View Full Code Here

Examples of org.gjt.jclasslib.structures.AttributeInfo

    protected AbstractAttributeListDetailPane(BrowserServices services) {
        super(services);
    }
   
    protected TableModel getTableModel(TreePath treePath) {
        AttributeInfo attribute = findAttribute(treePath);
       
        tableModel = getCachedTableModel(attribute);
        return tableModel;
    }
View Full Code Here

Examples of org.gjt.jclasslib.structures.AttributeInfo

   
    }

    public void show(TreePath treePath) {
       
        AttributeInfo attribute = findAttribute(treePath);

        constantPoolHyperlink(lblNameIndex,
                              null,
                              attribute.getAttributeNameIndex());
       
        lblLength.setText(attribute.getAttributeLength());
       
        super.show(treePath);
    }
View Full Code Here

Examples of org.gjt.jclasslib.structures.AttributeInfo

    }

    public void show(TreePath treePath) {

        AttributeInfo attribute = findAttribute(treePath);

        String paneName = null;
        if (attribute instanceof ConstantValueAttribute) {
            paneName = SCREEN_CONSTANT_VALUE;
        } else if (attribute instanceof CodeAttribute) {
View Full Code Here

Examples of org.jboss.forge.furnace.proxy.javassist.bytecode.AttributeInfo

        else
            throw new NotFoundException(m.toString());
    }

    public byte[] getAttribute(String name) {
        AttributeInfo ai = getClassFile2().getAttribute(name);
        if (ai == null)
            return null;
        else
            return ai.get();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.