Package com.halware.nakedide.eclipse.ext.annot.mdd

Examples of com.halware.nakedide.eclipse.ext.annot.mdd.MetadataDescriptor


  }

    protected Image doGetColumnImage(
            T element,
            int columnIndex) {
        MetadataDescriptor metadataDescriptor = getMetadataDescriptor(columnIndex);
        return metadataDescriptor.getImageFor(element);
    }
View Full Code Here



    private String doGetColumnText(
            T asT,
            int columnIndex) {
        MetadataDescriptor metadataDescriptor = getMetadataDescriptor(columnIndex);
        return metadataDescriptor.getTextFor(asT);
    }
View Full Code Here

    }

    protected Image doGetColumnImage(
            NakedObjectMember nom,
            int columnIndex) {
        MetadataDescriptor metadataDescriptor = getMetadataDescriptor(columnIndex);
        if (!metadataDescriptor.isApplicable(nom)) {
            return null;
        }
        return super.doGetColumnImage(nom, columnIndex);
    }
View Full Code Here

        }
        return super.doGetColumnImage(nom, columnIndex);
    }

    public Color doGetBackground(NakedObjectMember nom, int columnIndex) {
        MetadataDescriptor metadataDescriptor = getMetadataDescriptor(columnIndex);
        if (!metadataDescriptor.isApplicable(nom)) {
            return inactiveBackground;
        }
        return null;
    }
View Full Code Here

  }
 
    @Override
    public boolean canModify(Object element, String property) {
      NakedObjectActionParameter noap = (NakedObjectActionParameter)element;
      MetadataDescriptor metadataDescriptor = getMetadataDescriptor(property);
        if (!metadataDescriptor.isApplicable(noap)) {
            return false;
        }
        return super.canModify(element, property);
    }
View Full Code Here

     * action parameters) whereby the metadata descriptor may only apply for
     * strings (eg <tt>MaxLength</tt>) should override and call
     * {@link MetadataDescriptor#isStringSpecific()).
     */
  public boolean canModify(Object element, String property) {
    MetadataDescriptor metadataDescriptor = getMetadataDescriptor(property);
    return metadataDescriptor.isModifiable();
  }
View Full Code Here

    return metadataDescriptor.isModifiable();
  }

  public Object getValue(Object element, String property) {
   
    MetadataDescriptor metadataDescriptor = getMetadataDescriptor(property);
    Object value = metadataDescriptor.evaluate(element);
   
    getLOGGER().debug("getValue() returning: >>" + value + "<<");
   
    return value;
  }
View Full Code Here

    getLOGGER().debug("modify(..., value): value = " + value);
   
    TableItem tableItem = (TableItem)element;
    T nakedObjectProperty = Generics.asT(tableItem.getData());
 
    MetadataDescriptor metadataDescriptor = getMetadataDescriptor(property);
    metadataDescriptor.modify(nakedObjectProperty, value);
 
    doModify(nakedObjectProperty, property, value);
  }
View Full Code Here

  public List<MetadataDescriptor> getDescriptors() {
   
    List<MetadataDescriptor> descriptors = new ArrayList<MetadataDescriptor>();
   
    descriptors.add(
      new MetadataDescriptor("Parameter",
        new IEvaluator(){
          public Object evaluate(Object object) {
            NakedObjectActionParameter nakedObjectActionParameter = (NakedObjectActionParameter)object;
            return nakedObjectActionParameter.getParameterName();
          }
                    public MetadataDescriptorKind<? extends CellEditor> getKind() {
                        return MetadataDescriptorKind.STRING;
                    }
        }, null
      ));

    descriptors.add(
        new MetadataDescriptor("Type",
          new IEvaluator(){
            public Object evaluate(Object object) {
              NakedObjectActionParameter nakedObjectActionParameter = (NakedObjectActionParameter)object;
              return nakedObjectActionParameter.getType();
            }
View Full Code Here

  public List<MetadataDescriptor> getDescriptors() {
   
    List<MetadataDescriptor> descriptors = new ArrayList<MetadataDescriptor>();
   
    descriptors.add(
      new MetadataDescriptor("Action",
        new IEvaluator(){
          public Object evaluate(Object object) {
            NakedObjectAction nakedObjectAction = (NakedObjectAction)object;
            return nakedObjectAction.getActionMethodName();
          }
View Full Code Here

TOP

Related Classes of com.halware.nakedide.eclipse.ext.annot.mdd.MetadataDescriptor

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.