Beispiel #1
0
        protected override Property convertValueForProperty(
            string propName, PropertyMaker maker, PropertyList propertyList)
        {
            Property p = null;

            if (propName.IndexOf("-top") >= 0)
            {
                p = getElement(0);
            }
            else if (propName.IndexOf("-right") >= 0)
            {
                p = getElement(count() > 1 ? 1 : 0);
            }
            else if (propName.IndexOf("-bottom") >= 0)
            {
                p = getElement(count() > 2 ? 2 : 0);
            }
            else if (propName.IndexOf("-left") >= 0)
            {
                p = getElement(count() > 3 ? 3 : (count() > 1 ? 1 : 0));
            }
            if (p != null)
            {
                return(maker.ConvertShorthandProperty(propertyList, p, null));
            }
            return(p);
        }
 protected override Property convertValueForProperty(
     string propName, PropertyMaker maker, PropertyList propertyList)
 {
     Property p = null;
     if (propName.IndexOf("-top") >= 0)
     {
         p = getElement(0);
     }
     else if (propName.IndexOf("-right") >= 0)
     {
         p = getElement(count() > 1 ? 1 : 0);
     }
     else if (propName.IndexOf("-bottom") >= 0)
     {
         p = getElement(count() > 2 ? 2 : 0);
     }
     else if (propName.IndexOf("-left") >= 0)
     {
         p = getElement(count() > 3 ? 3 : (count() > 1 ? 1 : 0));
     }
     if (p != null)
     {
         return maker.ConvertShorthandProperty(propertyList, p, null);
     }
     return p;
 }
 protected virtual Property convertValueForProperty(
     string propName, PropertyMaker maker, PropertyList propertyList)
 {
     foreach (Property p in list)
     {
         Property prop = maker.ConvertShorthandProperty(propertyList, p, null);
         if (prop != null)
         {
             return prop;
         }
     }
     return null;
 }
 public Property GetValueForProperty(string propName,
                                     PropertyMaker maker,
                                     PropertyList propertyList)
 {
     if (count() == 1)
     {
         string sval = ((Property)list[0]).GetString();
         if (sval != null && sval.Equals("inherit"))
         {
             return propertyList.GetFromParentProperty(propName);
         }
     }
     return convertValueForProperty(propName, maker, propertyList);
 }
Beispiel #5
0
 public PropertyInfo(PropertyMaker maker, PropertyList plist, FObj fo)
 {
     this.maker = maker;
     this.plist = plist;
     this.fo = fo;
 }
 public PropertyInfo(PropertyMaker maker, PropertyList plist, FObj fo)
 {
     this.maker = maker;
     this.plist = plist;
     this.fo    = fo;
 }
Beispiel #7
0
 private Property ComputeProperty(
     PropertyList propertyList, PropertyMaker propertyMaker)
 {
     Property p = null;
     try
     {
         p = propertyMaker.Compute(propertyList);
     }
     catch (FonetException e)
     {
         FonetDriver.ActiveDriver.FireFonetError(e.Message);
     }
     return p;
 }