Package org.foray.fotree

Examples of org.foray.fotree.FObj


    /**
     * {@inheritDoc}
     */
    public int inlineHyphenationCharacter(final FoContext context) {
        final FObj effectiveParent = effectiveParent(context);
        return effectiveParent.traitHyphenationCharacter(context);
    }
View Full Code Here


    /**
     * {@inheritDoc}
     */
    public int inlineFauxSmallCapsFontSize(final FoContext context) {
        final FObj effectiveParent = effectiveParent(context);
        return effectiveParent.getFauxSmallCapFontSize(context);
    }
View Full Code Here

     * @param fobj The FO for which this value is needed.
     * @return The initial value for this property.
     */
    public static FoValue getValueNoInstance(final FoContext context,
            final FObj fobj) {
        final FObj parent = fobj.effectiveParent(context);
        if (parent != null) {
            return parent.getPropertyList().getWrapOption(parent, context);
        }
        return FoValue.WRAP;
    }
View Full Code Here

     */
    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);
                }
                return getValueNoInstance(context, fobj);
            }
View Full Code Here

     * @param fobj The FO for which this value is needed.
     * @return The initial value for this property.
     */
    public static FoValue getValueNoInstance(final FoContext context,
            final FObj fobj) {
        final FObj parent = fobj.effectiveParent(context);
        if (parent != null) {
            return parent.getPropertyList().traitSpeakNumeral(parent, context);
        }
        return FoValue.CONTINUOUS;
    }
View Full Code Here

     */
    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);
                }
                return getValueNoInstance(context, fobj);
            }
View Full Code Here

     * @param fobj The FO for which this value is needed.
     * @return The inherited value of this property.
     */
    private static String getInheritedValue(final FoContext context,
            final FObj fobj) {
        final FObj parent = fobj.effectiveParent(context);
        if (parent != null) {
            return fobj.traitPlayDuring(context);
        }
        return PdPlayDuring.getValueNoInstance();
    }
View Full Code Here

     * @param fobj The FO for which this value is needed.
     * @return The initial value for this property.
     */
    public static boolean getValueNoInstance(final FoContext context,
            final FObj fobj) {
        final FObj parent = fobj.effectiveParent(context);
        if (parent != null) {
            return parent.traitHyphenate(context);
        }
        return false;
    }
View Full Code Here

     * @param fobj The FO for which this value is needed.
     * @return The initial value for this property.
     */
    public static int getValueNoInstance(final FoContext context,
            final FObj fobj) {
        final FObj parent = fobj.effectiveParent(context);
        if (parent == null) {
            return 0;
        }
        return parent.traitTextIndent(context);
    }
View Full Code Here

    protected void validateDescendants() throws FoTreeException {
        boolean anyBlockContent = false;
        for (int i = 0; i < getChildren().size(); i++) {
            /* Cast to FObj should be OK, because it is not possible to create
             * an FOText item whose parent is anything but an FObjMixed. */
            final FObj child = getChildren().get(i);
            if (child.isContentBlock()) {
                anyBlockContent = true;
                continue;
            }
            throwException(getFullName() + "has invalid content: "
                    + child.getName());
        }
        if (! anyBlockContent) {
            throwException(getFullName() + "must contain at least one %block "
                    + "item.");
        }
View Full Code Here

TOP

Related Classes of org.foray.fotree.FObj

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.