aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit
ModeNameSize
d---------accordion327logstatsplain
d---------all74logstatsplain
d---------core111logstatsplain
d---------datepicker334logstatsplain
-rw-r--r--defaults.html2321logstatsplain
d---------dialog306logstatsplain
d---------draggable327logstatsplain
d---------droppable327logstatsplain
-rw-r--r--index.html2175logstatsplain
d---------progressbar341logstatsplain
d---------resizable360logstatsplain
d---------selectable334logstatsplain
d---------slider306logstatsplain
d---------sortable320logstatsplain
d---------tabs368logstatsplain
-rw-r--r--testsuite.css181logstatsplain
-rw-r--r--testsuite.js2115logstatsplain
ption; /** * Generic shorthand parser for ListProperties */ public class GenericShorthandParser implements ShorthandParser { /** * Constructor. */ public GenericShorthandParser() { } /** * @param list the ListProperty * @param index the index into the List of properties * @return the property from the List of properties at the index parameter */ protected Property getElement(Property list, int index) { if (list.getList().size() > index) { return (Property) list.getList().get(index); } else { return null; } } /** * @see org.apache.fop.fo.properties.ShorthandParser#getValueForProperty() */ public Property getValueForProperty(int propId, Property property, PropertyMaker maker, PropertyList propertyList) throws PropertyException { // Check for keyword "inherit" if (property.getList().size() == 1) { String sval = getElement(property, 0).getString(); if (sval != null && sval.equals("inherit")) { return propertyList.getFromParent(propId); } } return convertValueForProperty(propId, property, maker, propertyList); } /** * Converts a property name into a Property * @param propId the property ID in the Constants interface * @param maker the Property.Maker to be used in the conversion * @param property ... * @param propertyList the PropertyList from which the Property should be * extracted * @return the Property matching the parameters, or null if not found * @throws PropertyException (when?) */ protected Property convertValueForProperty(int propId, Property property, PropertyMaker maker, PropertyList propertyList) throws PropertyException { Property prop = null; // Try each of the stored values in turn Iterator iprop = property.getList().iterator(); while (iprop.hasNext() && prop == null) { Property p = (Property)iprop.next(); prop = maker.convertShorthandProperty(propertyList, p, null); } return prop; } }