Package com.volantis.mcs.themes

Examples of com.volantis.mcs.themes.StyleKeyword


     * Tests the values rendered for number and Bottom value is correct.
     */
    public void testRenderNumberBottomValue() throws Exception {
        StyleLength styleValueXPosition = styleValueFactory.getLength(null, 12, LengthUnit.PX);

        StyleKeyword styleValueYPosition = BackgroundYPositionKeywords.BOTTOM;
        stylePairTest(styleValueXPosition, styleValueYPosition, "12px 100%");
    }
View Full Code Here


     * Tests the values rendered for number and Center value is correct.
     */
    public void testRenderNumberCenterValue() throws Exception {
        StyleLength styleValueXPosition = styleValueFactory.getLength(null, 3.1, LengthUnit.PT);

        StyleKeyword styleValueYPosition = BackgroundYPositionKeywords.CENTER;
        stylePairTest(styleValueXPosition, styleValueYPosition, "3.1pt 50%");
    }
View Full Code Here

   
    public void testAddFontFamily() throws Exception {
        privateSetUp();
        Element element = domFactory.createElement();
        ArrayList fonts = new ArrayList();
        StyleKeyword keyword = FontFamilyKeywords.SANS_SERIF;
        fonts.add(keyword);
        StyleList list = styleValueFactory.getList(fonts);           
        properties.setComputedValue(StylePropertyDetails.FONT_FAMILY, list);
        style.addFontFamily(element, "font", true);
        assertTrue("Font must be sans-serif and not "+
View Full Code Here

     * This method tests the method public void addPosition ( Element,String )
     */
   public void testAddPosition() throws Exception {
        privateSetUp();

        StyleKeyword styleValuePosition = PositionKeywords.ABSOLUTE;
        properties.setComputedValue(
                StylePropertyDetails.POSITION, styleValuePosition);

        StyleInteger styleTopInteger =
                styleValueFactory.getInteger(null, 50);
View Full Code Here

            return super.getAsString(propertyValues);
        }
        StyleValue styleValue = propertyValues.getComputedValue(getStyleProperty());
        String string = getValueHandler().getAsString(styleValue);
        if (string != null) {
            StyleKeyword styleKeyword = StyleKeywords.getKeywordByName(string);
            if (styleKeyword != null) {
                // This is valid style keyword, check if device supports it
                // (turn on backword compatibility mode)
                if (supportsCSS && isKeywordSupported(styleKeyword, true)) {
                    // No property changes, no conversion
View Full Code Here

        return styleValueFactory.getComponentURI(null, backgroundComponentName);
    }

    // Javadoc inherited.
    public StyleValue getHorizontalAlign(String align) {
        StyleKeyword alignKeyword = null;
        if (FormatConstants.HORIZONTAL_ALIGNMENT_VALUE_CENTER.equals(
                align)) {
            alignKeyword = TextAlignKeywords.CENTER;
        } else if (FormatConstants.HORIZONTAL_ALIGNMENT_VALUE_RIGHT.equals(
                align)) {
View Full Code Here

        return alignKeyword;
    }

    // Javadoc inherited.
    public StyleValue getVerticalAlign(String align) {
        StyleKeyword alignKeyword = null;
        if (FormatConstants.VERTICAL_ALIGNMENT_VALUE_BOTTOM.equals(
                align)) {
            alignKeyword = VerticalAlignKeywords.BOTTOM;
        } else if (FormatConstants.VERTICAL_ALIGNMENT_VALUE_TOP.equals(
                align)) {
View Full Code Here

TOP

Related Classes of com.volantis.mcs.themes.StyleKeyword

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.