Package org.foray.fotree.fo

Examples of org.foray.fotree.fo.FoValue


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


    public double getValue(final FoContext context, final FObj fobj) {
        if (value().canEvalNumeric()) {
            return value().evalNumeric();
        }
        if (value().canEvalKeyword()) {
            final FoValue keyword = this.convertValueToFoValue(value());
            switch (keyword) {
            case INHERIT: {
                return getValueNoInstance(context, fobj);
            }
            case NONE: {
View Full Code Here

     * @param fobj The FO for which this value is needed.
     * @return The value of this property.
     */
    public String[] getValue(final FoContext context, final FObj fobj) {
        if (value().canEvalKeyword()) {
            final FoValue keyword = this.convertValueToFoValue(value());
            switch (keyword) {
            case INHERIT: {
                return getValueNoInstance(context, fobj);
            }
            case MALE:
            case FEMALE:
            case CHILD: {
                final String[] returnArray
                        = {keyword.toXslFo()};
                return returnArray;
            }
            }
        }
        if (value() instanceof ValueCollection) {
            final ValueCollection collection = (ValueCollection) value();
            final String[] returnArray = new String[collection.getCount()];
            for (int i = 0; i < returnArray.length; i++) {
                final PropertyValue innerValue = collection.getItem(i);
                if (innerValue.canEvalKeyword()) {
                    final FoValue foValue = this.convertValueToFoValue(
                            innerValue);
                    returnArray[i] = foValue.toXslFo();
                } else if (innerValue instanceof DtName) {
                    final DtName name = (DtName) innerValue;
                    returnArray[i] = name.getValue();
                } else {
                    throw this.unexpectedRetrieval();
View Full Code Here

     * @return The value of this property.
     */
    public int getValue(final FoContext context, final FObj fobj,
            final int lastPageNumberUsed) {
        if (value().canEvalKeyword()) {
            final FoValue keyword = this.convertValueToFoValue(value());
            switch (keyword) {
            case INHERIT: {
                final FObj parent = fobj.effectiveParent(context);
                if (parent != null) {
                    final PdInitialPageNumber property = (PdInitialPageNumber)
View Full Code Here

     * @param fobj The FO for which this value is needed.
     * @return The initial value for this property.
     */
    public FoValue getRawValue(final FObj fobj) {
        if (value().canEvalKeyword()) {
            final FoValue keyword = this.convertValueToFoValue(value());
            if (keyword == FoValue.INHERIT) {
                final FObj parent = fobj.getParent();
                if (parent != null) {
                    final PropertyList propertyList = parent.getPropertyList();
                    return propertyList.getRawInitialPageNumber(parent);
View Full Code Here

            final PropertyValue pv = property.value();
            final DtLength length = (DtLength) pv;
            return length.getValue(fobj.traitFontSize(context));
        }
        if (value().canEvalKeyword()) {
            final FoValue keyword = this.convertValueToFoValue(value());
            switch (keyword) {
            /* We really don't know what to do with these keyword values, so
             * we'll just return some default values for now. */
            case AUTO: {
                return AbstractPageDimension.getValueNoInstance(axis);
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.
     */
    private int getKeywordValue(final FoContext context,
            final AbsoluteCompass direction, final FObj fobj) {
        final FoValue foValue = this.convertValueToFoValue(value());
        switch (foValue) {
        case INHERIT: {
            final FObj effectiveParent = fobj.effectiveParent(context);
            if (direction == AbsoluteCompass.LEFT) {
                return effectiveParent.getMarginLeft(context);
View Full Code Here

     * @param fobj The FO for which this value is needed.
     * @return The value of this property.
     */
    public int getValue(final FoContext context, final FObj fobj) {
        if (value().canEvalKeyword()) {
            final FoValue keyword = this.convertValueToFoValue(value());
            switch (keyword) {
            case AUTO: {
                return CommonPositionPa.ABSOLUTE_POSITION_AUTO;
            }
            case INHERIT: {
View Full Code Here

     * @return The value of this property.
     */
    public Color getValue(final Compass direction, final FObj fobj,
            final FoContext context) {
        if (value().canEvalKeyword()) {
            final FoValue keywordValue = this.convertValueToFoValue(value());
            if (keywordValue == FoValue.TRANSPARENT) {
                return DtColor.COLOR_RGB_TRANSPARENT;
            } else if (keywordValue == FoValue.INHERIT) {
                final FObj parent = fobj.getParent();
                if (parent == null) {
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.