1 17 18 19 20 package org.apache.fop.fo.properties; 21 22 import org.apache.fop.fo.Constants; 23 import org.apache.fop.fo.FObj; 24 import org.apache.fop.fo.FOPropertyMapping; 25 import org.apache.fop.fo.PropertyList; 26 import org.apache.fop.fo.expr.PropertyException; 27 28 31 public class FontShorthandParser extends GenericShorthandParser { 32 33 36 public Property getValueForProperty(int propId, 37 Property property, 38 PropertyMaker maker, 39 PropertyList propertyList) 40 throws PropertyException { 41 42 int index = -1; 43 Property newProp; 44 switch (propId) { 45 case Constants.PR_FONT_SIZE: 46 index = 0; 47 break; 48 case Constants.PR_FONT_FAMILY: 49 index = 1; 50 break; 51 case Constants.PR_LINE_HEIGHT: 52 index = 2; 53 break; 54 case Constants.PR_FONT_STYLE: 55 index = 3; 56 break; 57 case Constants.PR_FONT_VARIANT: 58 index = 4; 59 break; 60 case Constants.PR_FONT_WEIGHT: 61 index = 5; 62 break; 63 default: 64 } 66 newProp = (Property) property.getList().get(index); 67 return newProp; 68 } 69 } 70 | Popular Tags |