SaveElement.java :  » Workflow-Engines » OpenWFE » org » openwfe » gpe » model » Java Open Source

Java Open Source » Workflow Engines » OpenWFE 
OpenWFE » org » openwfe » gpe » model » SaveElement.java
/*
 * Created on 26 avr. 2005
 *
 */
package org.openwfe.gpe.model;

import org.eclipse.ui.views.properties.IPropertyDescriptor;
import org.eclipse.ui.views.properties.TextPropertyDescriptor;

/**
 * @author Christelle
 *
 */
public class SaveElement extends NoChild{
  
  public static String name = "Save";
  private String toVariable = "";
  
  protected static IPropertyDescriptor[] descriptors;
  
  public static final String TOVARIABLE = "to-variable";
  
  static {
    descriptors = new IPropertyDescriptor[] {
        new TextPropertyDescriptor(TOVARIABLE,"to-variable"),};
  }
  public String getName(){
    return name;
  }
  
  public void setName(String s) {
    name = s;
  }
  public String getToVariable(){
    return toVariable;
  }
  public void setToVariable(String s){
    toVariable = s;
    firePropertyChange(TOVARIABLE, null, s);
  }
  
  
  public IPropertyDescriptor[] getPropertyDescriptors() {
    return descriptors;
  }
  
  public Object getPropertyValue(Object propName) {
    if(TOVARIABLE.equals(propName))
      return getToVariable();
    return super.getPropertyValue(propName);
  }
  
  public void setPropertyValue(Object id, Object value){
    if(id == TOVARIABLE)
      setToVariable((String)value);
    
  }
  
  
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.