Package org.foray.fotree.value

Examples of org.foray.fotree.value.DtWritingMode


    /**
     * {@inheritDoc}
     */
    public Color getParentValue(final FObj parent, final FoContext context) {
        final DtWritingMode writingMode = parent.traitWritingMode(context);
        final RelativeCompass direction = writingMode.getRelativeDirection(
                AbsoluteCompass.BOTTOM);
        return parent.getPropertyList().getBorderColor(parent, context,
                direction);
    }
View Full Code Here


    /**
     * {@inheritDoc}
     */
    public Color getParentValue(final FObj parent, final FoContext context) {
        final DtWritingMode writingMode = parent.traitWritingMode(context);
        final RelativeCompass direction = writingMode.getRelativeDirection(
                AbsoluteCompass.RIGHT);
        return parent.getPropertyList().getBorderColor(parent, context,
                direction);
    }
View Full Code Here

     * {@link FoProperty#MARGIN_RIGHT}.
     */
    public static FoProperty rawAbsoluteCorrespondingPropertyType(
            final FObj fobj, final FoContext context,
            final RelativeCompass direction) {
        final DtWritingMode writingMode = fobj.traitWritingMode(context);
        final AbsoluteCompass absoluteCompass =
                writingMode.getAbsoluteDirection(direction);
        switch(absoluteCompass) {
        case TOP: return FoProperty.MARGIN_TOP;
        case BOTTOM: return FoProperty.MARGIN_BOTTOM;
        case LEFT: return FoProperty.MARGIN_LEFT;
        case RIGHT: return FoProperty.MARGIN_RIGHT;
View Full Code Here

     * @return The parsed, storable property value.
     * @throws PropertyException For an invalid property value.
     */
    private PropertyValue createPropertyValue(final String value,
            final FObj fobj) throws PropertyException {
        final DtWritingMode writingMode = DtWritingMode.obtainWritingMode(
                value);
        if (writingMode != null) {
            return writingMode;
        }
        throw unexpectedValue(value, fobj);
View Full Code Here

    /**
     * {@inheritDoc}
     */
    protected RelativeCompass getRelativeCompass(final FoContext context,
            final FObj fobj) {
        final DtWritingMode writingMode = fobj.traitWritingMode(context);
        return writingMode.getRelativeDirection(AbsoluteCompass.RIGHT);
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    protected RelativeCompass getRelativeCompass(
            final FoContext context, final FObj fobj) {
        final DtWritingMode writingMode = fobj.traitWritingMode(context);
        return writingMode.getRelativeDirection(AbsoluteCompass.RIGHT);
    }
View Full Code Here

        final FObj parent = this.effectiveParent(context);
        if (this.isBlockLevelFo()
                || parent == null) {
            final Script script = this.traitScript(context);
            if (script.equals("auto")) {
                final DtWritingMode writingMode = this.traitWritingMode(context);
                if (writingMode.isHorizontal()) {
                    return Baseline.ALPHABETIC;
                } else {
                    return Baseline.CENTRAL;
                }
            } else {
View Full Code Here

         * 2) The relative-direction property (space-before, for example), if
         *    explicitly set.
         * 3) The absolute-direction shorthand property (margin). */

        /* First try the absolute-direction property. */
        final DtWritingMode writingMode = this.getWritingMode(fobj, context);
        final AbsoluteCompass absoluteDirection =
                writingMode.getAbsoluteDirection(relativeDirection);
        final FoProperty absolutePropertyType = AbstractMargin.rawPropertyType(
                absoluteDirection);
        final AbstractMargin absoluteProperty = (AbstractMargin) getProperty(
                absolutePropertyType);
        if (absoluteProperty != null) {
View Full Code Here

            return property.getValue(context, subProperty, fobj);
        }

        /* Try the corresponding absolute dimension. */
        AbstractAbsoluteDimension absDimProperty = null;
        final DtWritingMode writingMode = this.getWritingMode(fobj, context);
        final AbsoluteAxis absoluteAxis = writingMode.getAbsoluteAxis(
                relativeAxis);
        if (absoluteAxis == AbsoluteAxis.HORIZONTAL) {
            switch (subProperty) {
            case MINIMUM: {
                absDimProperty = (AbstractAbsoluteDimension) getProperty(
View Full Code Here

        if (abstractBorderWidth != null) {
            return abstractBorderWidth.getValue(context, fobj);
        }

        /* Now try the corresponding explicit value, e.g. "border-top-width". */
        final DtWritingMode writingMode = this.getWritingMode(fobj, context);
        final AbsoluteCompass otherDirection = writingMode.getAbsoluteDirection(
                direction);
        rawPropertyType = AbstractBorderWidth.rawPropertyType(otherDirection);
        abstractBorderWidth = (AbstractBorderWidth) getProperty(
                rawPropertyType);
        if (abstractBorderWidth != null) {
View Full Code Here

TOP

Related Classes of org.foray.fotree.value.DtWritingMode

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.