
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 GenericBorderWidth extends  LengthProperty.Maker {




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

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

    }


   public boolean isInherited() { return false; }

    protected String checkValueKeywords(String value) {
  
      if (value.equals("thin")) {
	return new String("0.5pt");
      }
  
      if (value.equals("medium")) {
	return new String("1pt");
      }
  
      if (value.equals("thick")) {
	return new String("2pt");
      }
  
      return super.checkValueKeywords(value);
    }

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

}
