
package org.apache.fop.fo.properties;

import org.apache.fop.datatypes.*;
import org.apache.fop.fo.*;
import org.apache.fop.apps.FOPException;
import org.apache.fop.messaging.MessageHandler;

public class LeaderAlignmentMaker extends  EnumProperty.Maker implements LeaderAlignment {



  protected final static EnumProperty s_propNONE = new EnumProperty(NONE);

  protected final static EnumProperty s_propREFERENCE_AREA = new EnumProperty(REFERENCE_AREA);

  protected final static EnumProperty s_propPAGE = new EnumProperty(PAGE);


    static public Property.Maker maker(String propName) {
	return new LeaderAlignmentMaker(propName);
    }

    protected LeaderAlignmentMaker(String name) {
	super(name);

    }


   public boolean isInherited() { return true; }

    public Property checkEnumValues(String value) {
    
      if (value.equals("none")) { return s_propNONE; }
    
      if (value.equals("reference-area")) { return s_propREFERENCE_AREA; }
    
      if (value.equals("page")) { return s_propPAGE; }
    
	return super.checkEnumValues(value);
    }

    private Property m_defaultProp=null;
  
    public Property make(PropertyList propertyList) throws FOPException {
      
        if (m_defaultProp == null) {
            m_defaultProp=make(propertyList, "none", propertyList.getParentFObj());
	}
        return m_defaultProp;
	
    }

}
