Package com.volantis.mcs.themes.mappers

Examples of com.volantis.mcs.themes.mappers.DefaultKeywordMapper


    // Javadoc inherited.
    protected void initialiseStyleHandlers() {
        super.initialiseStyleHandlers();

        // center and justify are both treated as center which is the default.
        DefaultKeywordMapper alignmentMapper = new DefaultKeywordMapper();
        alignmentMapper.addMapping(TextAlignKeywords.LEFT, "left");
        alignmentMapper.addMapping(TextAlignKeywords.RIGHT, "right");

        horizontalRuleAlignHandler = new ValueHandlerToPropertyAdapter(StylePropertyDetails.TEXT_ALIGN,
                new KeywordValueHandler(alignmentMapper));

        DefaultKeywordMapper shadeMapper = new DefaultKeywordMapper();
        shadeMapper.addMapping(BorderStyleKeywords.SOLID, "true");

        horizontalRuleShadeHandler = new ValueHandlerToPropertyAdapter(StylePropertyDetails.BORDER_TOP_STYLE,
                new KeywordValueHandler(shadeMapper));

        horizontalRuleSizeHandler = new ValueHandlerToPropertyAdapter(StylePropertyDetails.HEIGHT,
                new PositivePixelLengthHandler());

        // noWrap property
        // noWrapMapper maps "noWrap" to the NOWRAP value and will null to other
        // values
        final DefaultKeywordMapper noWrapMapper = new DefaultKeywordMapper();
        noWrapMapper.addMapping(WhiteSpaceKeywords.NOWRAP, "noWrap");

        noWrapHandler = new ValueHandlerToPropertyAdapter(StylePropertyDetails.WHITE_SPACE,
                new KeywordValueHandler(noWrapMapper));
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.themes.mappers.DefaultKeywordMapper

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.