Examples of RelativeCompass


Examples of org.axsl.common.value.RelativeCompass

     * @param fobj The FO for which this value is needed.
     * @return The inherited value of this property.
     */
    private int getValueInherited(final FoContext context,
            final LengthRange subProperty, final FObj fobj) {
        final RelativeCompass relativeDirection = this.getRelativeCompass();
        if (relativeDirection == RelativeCompass.BEFORE) {
            final FObj effectiveParent = fobj.effectiveParent(context);
            switch (subProperty) {
            case MINIMUM: {
                return effectiveParent.traitSpaceBeforeMinimum(context);
View Full Code Here

Examples of org.axsl.common.value.RelativeCompass

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

Examples of org.axsl.common.value.RelativeCompass

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

Examples of org.axsl.common.value.RelativeCompass

     * @param context An object that knows how to resolve FO context issues.
     * @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) {
        final RelativeCompass direction = this.getRelativeCompass(context,
                fobj);
        if (value().canEvalKeyword()) {
            return getKeywordValue(context, direction, fobj);
        }
        if (value().canEvalLength()) {
            final int length = this.convertValueToLength(value(), fobj,
                    context);
            return Math.max(length, 0);
        }
        if (value() instanceof DtLengthConditional
                && direction.isRelative()) {
            final DtLengthConditional lengthConditional
                    = (DtLengthConditional) value();
            /*
             * TODO: I'm not sure we have enough information here yet. We may
             * need to know the writing mode of the reference-area. If so,
View Full Code Here

Examples of org.axsl.common.value.RelativeCompass

     * @param fobj The FO for which this property exists.
     * @return True iff the context is on the outer edge of its parent reference
     * area.
     */
    protected boolean isOuterEdge(final FoContext context, final FObj fobj) {
        final RelativeCompass direction = this.getRelativeCompass(context,
                fobj);
        switch (direction) {
        case BEFORE:
        case START: {
            return context.isFirst();
View Full Code Here

Examples of org.axsl.common.value.RelativeCompass

    private int getKeywordValue(final FoContext context, final FObj fobj) {
        final FoPropertyKeyword kw = (FoPropertyKeyword) value();
        final FObj effectiveParent = fobj.effectiveParent(context);
        switch (kw.getValue()) {
        case INHERIT: {
            final RelativeCompass direction = this.getRelativeCompass(context,
                    fobj);
            if (direction == RelativeCompass.BEFORE) {
                return effectiveParent.traitPaddingBefore(context);
            }
            if (direction == RelativeCompass.AFTER) {
View Full Code Here

Examples of org.axsl.common.value.RelativeCompass

     * @param fobj The FO for which this property exists.
     * @return True iff the context is on the outer edge of its parent reference
     * area.
     */
    protected boolean isOuterEdge(final FoContext context, final FObj fobj) {
        final RelativeCompass direction = this.getRelativeCompass(context,
                fobj);
        switch (direction) {
        case BEFORE:
        case START: {
            return context.isFirst();
View Full Code Here

Examples of org.axsl.common.value.RelativeCompass

    /**
     * {@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

Examples of org.axsl.common.value.RelativeCompass

    /**
     * {@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

Examples of org.axsl.common.value.RelativeCompass

     * @param context An object that knows how to resolve FO context issues.
     * @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) {
        final RelativeCompass direction = this.getRelativeCompass();
        if (value().canEvalKeyword()) {
            final FoValue keyword = this.convertValueToFoValue(value());
            if (keyword == FoValue.INHERIT) {
                return getValueNoInstance(context, fobj, direction);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.