Package org.axsl.common.value

Examples of org.axsl.common.value.AbsoluteCompass


     * @param fobj The FO for which this value is needed.
     * @return The value of this property.
     */
    private int getKeywordValue(final FoContext context, final FObj fobj) {
        final FoValue foValue = this.convertValueToFoValue(value());
        final AbsoluteCompass direction = this.getAbsoluteCompass();
        switch (foValue) {
        case INHERIT: {
            final FObj effectiveParent = fobj.effectiveParent(context);
            if (direction == AbsoluteCompass.LEFT) {
                return effectiveParent.getMarginLeft(context);
View Full Code Here


     */
    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;
View Full Code Here

     * WritingModeDT.DIRECTION_LEFT, or WritingModeDT.DIRECTION_RIGHT.
     * @return True if the property (or a shorthand) exists, false otherwise.
     */
    private boolean correspondingMarginExists(final FObj fobj,
            final FoContext context, final RelativeCompass relativeDirection) {
        final AbsoluteCompass absoluteDirection = getWritingMode(fobj, context)
                .getAbsoluteDirection(relativeDirection);
        final FoProperty propertyType = AbstractMargin.rawPropertyType(
                absoluteDirection);
        AbstractMargin marginProperty = (AbstractMargin) getProperty(
                propertyType);
View Full Code Here

         *    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);
View Full Code Here

            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

         * is discussed in XSL-FO Recommendation 1.1, Sections 5.2 and 5.3. */

        /* Precedence is given to the absolute explicit property, if it is
         * set. */
        AbstractPadding explicitPadding = null;
        final AbsoluteCompass absoluteDirection = getWritingMode(fobj,
                context).getAbsoluteDirection(relativeDirection);
        FoProperty rawPropertyType = AbstractPadding.rawPropertyType(
                absoluteDirection);
        explicitPadding = (AbstractPadding) getProperty(rawPropertyType);

View Full Code Here

TOP

Related Classes of org.axsl.common.value.AbsoluteCompass

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.