Examples of FoPropertyKeyword


Examples of org.foray.fotree.fo.FoPropertyKeyword

        final PropertyValue value = collection.getItem(whichElement);
        if (value.canEvalLength()) {
            return this.convertValueToLength(value, fobj, context);
        }
        if (value.canEvalKeyword()) {
            final FoPropertyKeyword keyword = (FoPropertyKeyword) value;
            final FoValue keywordValue = keyword.getValue();
            switch (keywordValue) {
            case THIN: {
                return DtBorderWidth.BORDER_WIDTH_THIN;
            }
            case THICK: {
View Full Code Here

Examples of org.foray.fotree.fo.FoPropertyKeyword

     * @param fobj The FO for which this value is needed.
     * @return The value of this property.
     */
    private int getKeywordValue(final FoContext context,
            final RelativeCompass direction, final FObj fobj) {
        final FoPropertyKeyword kw = (FoPropertyKeyword) value();
        switch (kw.getValue()) {
        case THIN: {
            return DtBorderWidth.BORDER_WIDTH_THIN;
        }
        case MEDIUM: {
            return DtBorderWidth.BORDER_WIDTH_MEDIUM;
View Full Code Here

Examples of org.foray.fotree.fo.FoPropertyKeyword

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

Examples of org.foray.fotree.fo.FoPropertyKeyword

    @Test
    public void testThin() throws PropertyException {
        final AbstractBorderWidth property = createProperty(null, "thin");
        final PropertyValue value = property.value();
        assertTrue(value instanceof FoPropertyKeyword);
        final FoPropertyKeyword keyword = (FoPropertyKeyword) value;
        assertEquals(FoValue.THIN, keyword.getValue());
    }
View Full Code Here

Examples of org.foray.fotree.fo.FoPropertyKeyword

    @Test
    public void testThick() throws PropertyException {
        final AbstractBorderWidth property = createProperty(null, "thick");
        final PropertyValue value = property.value();
        assertTrue(value instanceof FoPropertyKeyword);
        final FoPropertyKeyword keyword = (FoPropertyKeyword) value;
        assertEquals(FoValue.THICK, keyword.getValue());
    }
View Full Code Here

Examples of org.foray.fotree.fo.FoPropertyKeyword

    @Test
    public void testMedium() throws PropertyException {
        final AbstractBorderWidth property = createProperty(null, "medium");
        final PropertyValue value = property.value();
        assertTrue(value instanceof FoPropertyKeyword);
        final FoPropertyKeyword keyword = (FoPropertyKeyword) value;
        assertEquals(FoValue.MEDIUM, keyword.getValue());
    }
View Full Code Here

Examples of org.foray.fotree.fo.FoPropertyKeyword

    @Test
    public void testInherit() throws PropertyException {
        final AbstractBorderWidth property = createProperty(null, "inherit");
        final PropertyValue value = property.value();
        assertTrue(value instanceof FoPropertyKeyword);
        final FoPropertyKeyword keyword = (FoPropertyKeyword) value;
        assertEquals(FoValue.INHERIT, keyword.getValue());
    }
View Full Code Here

Examples of org.foray.fotree.fo.FoPropertyKeyword

        }
        final PvKeyword genericKeyword = value.evalKeyword();
        if (! (genericKeyword instanceof FoPropertyKeyword)) {
            return null;
        }
        final FoPropertyKeyword keyword = (FoPropertyKeyword) genericKeyword;
        final FoValue keywordValue = keyword.getValue();
        return keywordValue;
    }
View Full Code Here

Examples of org.foray.fotree.fo.FoPropertyKeyword

     */
    public boolean addComponent(final String subPropertyName,
            final PropertyValue value) throws PropertyException {
        if ("conditionality".equals(subPropertyName)) {
            if (value instanceof FoPropertyKeyword) {
                final FoPropertyKeyword keyword = (FoPropertyKeyword) value;
                final FoValue foValue = keyword.getValue();
                this.setConditionality(foValue);
                return true;
            }
            return false;
        }
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.