Package org.foray.fotree.fo

Examples of org.foray.fotree.fo.FoValue


     * @return The index to {@code value} in the valid keywords, or -1 if
     * it is not found.
     */
    private static int getIndex(final FoValue value) {
        for (int i = 0; i < DtBorderStyle.VALID_KEYWORDS.length; i++) {
            final FoValue foValue = DtBorderStyle.VALID_KEYWORDS[i];
            if (value == foValue) {
                return i;
            }
        }
        return -1;
View Full Code Here


            final String possibleKeyword) {
        if (validKeywords == null
                || validKeywords.length < 1) {
            return null;
        }
        final FoValue value = FoValue.xslValueOf(possibleKeyword);
        for (FoValue testValue : validKeywords) {
            if (testValue.equals(value)) {
                return FoPropertyKeyword.getPropertyKeyword(value);
            }
        }
View Full Code Here

     * Returns the value of this border-width if its value is a keyword.
     * @return The value of this border-width if its value is a keyword, or
     * {@link Integer#MIN_VALUE} otherwise.
     */
    private int getKeywordValue() {
        final FoValue foValue = Datatype.convertValueToFoValue(this.value);
        if (foValue == null) {
            return Integer.MIN_VALUE;
        }
        switch (foValue) {
        case THIN: return DtBorderWidth.BORDER_WIDTH_THIN;
View Full Code Here

                    "null");
        }
        if (value.canEvalLength()) {
            return true;
        }
        final FoValue foValue = Datatype.convertValueToFoValue(value);
        if (foValue == null) {
            return false;
        }
        switch (foValue) {
        case THIN:
View Full Code Here

     * @param fobj The FO for which this value is needed.
     * @return The value of this property.
     */
    public FoValue getValue(final FoContext context, final FObj fobj) {
        if (value().canEvalKeyword()) {
            final FoValue keyword = this.convertValueToFoValue(value());
            if (keyword == FoValue.INHERIT) {
                final FObj parent = fobj.effectiveParent(context);
                if (parent != null) {
                    return getInheritedValue(context, parent);
                }
View Full Code Here

     * @param fobj The FO for which this value is needed.
     * @return The value of this property.
     */
    public FoValue getValue(final FoContext context, final FObj fobj) {
        if (value().canEvalKeyword()) {
            final FoValue keyword = this.convertValueToFoValue(value());
            if (keyword == FoValue.INHERIT) {
                final FObj parent = fobj.effectiveParent(context);
                if (parent != null) {
                    return getInheritedValue(context, parent);
                }
View Full Code Here

        }
        if (value().canEvalLength()) {
            return this.convertValueToLength(value(), fobj, context);
        }
        if (value().canEvalKeyword()) {
            final FoValue keyword = this.convertValueToFoValue(value());
            switch (keyword) {
            case AUTO: {
                return FObj.DIMENSION_AUTO;
            }
            case INHERIT: {
View Full Code Here

            final ValueCollection collection = (ValueCollection) value();
            final String[] returnArray = new String[collection.getCount()];
            for (int i = 0; i < collection.getCount(); i++) {
                final PropertyValue pv = collection.getItem(i);
                if (pv.canEvalKeyword()) {
                    final FoValue foValue = this.convertValueToFoValue(pv);
                    returnArray[i] = foValue.toXslFo();
                } else if (pv instanceof DtName) {
                    final DtName dtName = (DtName) pv;
                    returnArray[i] = dtName.getValue();
                } else if (pv instanceof DtString) {
                    final DtString stringDT = (DtString) pv;
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public RetrievePosition traitRetrievePosition() {
        final FoValue foRetrievePosition = this.getPropertyList()
                .getRetrievePosition();
        return convertRetrievePosition(foRetrievePosition);
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public RetrieveBoundary traitRetrieveBoundary() {
        final FoValue foRetrieveBoundary = this.getPropertyList()
                .getRetrieveBoundary();
        return convertRetrieveBoundary(foRetrieveBoundary);
    }
View Full Code Here

TOP

Related Classes of org.foray.fotree.fo.FoValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.