Package com.volantis.mcs.protocols.styles

Examples of com.volantis.mcs.protocols.styles.PositivePixelLengthHandler


        // Initialise the style value handlers.
        paneTableChecker = new XHTMLFullPaneTableChecker();
        paneTableChecker.setWidthChecker(widthHandler);

        ValueHandler valueHandler = new PositivePixelLengthHandler();
        PropertyHandler propertyHandler = new EdgePropertyHandler(
                PropertyGroups.PADDING_PROPERTIES, valueHandler,
                NoopPropertyUpdater.getDefaultInstance());
        paddingHandler = new DefaultingPropertyHandler(
                propertyHandler, "0");
View Full Code Here


    protected void initialiseStyleHandlers() {
        super.initialiseStyleHandlers();

        widthHandler = new ValueHandlerToPropertyAdapter(
            StylePropertyDetails.WIDTH,
            new PositivePixelLengthHandler());
        heightHandler = new ValueHandlerToPropertyAdapter(
            StylePropertyDetails.HEIGHT,
            new PositivePixelLengthHandler());

        lineHeightRenderer = new ValueHandlerToPropertyAdapter(
                StylePropertyDetails.LINE_HEIGHT,
                new PositivePixelLengthOrPercentageHandler());
View Full Code Here

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

        // A border should only be rendered if the border style is not none
        // and the border width is valid.
        final ChoicePropertyHandler borderWidthHandler =
            new ChoicePropertyHandler();
        borderWidthHandler.addHandlers(PropertyGroups.BORDER_WIDTH_PROPERTIES,
                                       new PositivePixelLengthHandler());

        final ChoicePropertyHandler borderStyleHandler =
            new ChoicePropertyHandler();
        borderStyleHandler.addHandlers(PropertyGroups.BORDER_STYLE_PROPERTIES,
                new ValueRendererChecker() {
                    public void visit(StyleKeyword value,
                                      Object object) {
                        if (value != BorderStyleKeywords.NONE) {
                            string = "true";
                        }
                    }
                });

        borderHandler = new AbstractPropertyHandler() {
            public boolean isSignificant(PropertyValues propertyValues) {
                return borderStyleHandler.isSignificant(propertyValues) &&
                    borderWidthHandler.isSignificant(propertyValues);
            }

            public String getAsString(MutablePropertyValues propertyValues) {
                return borderStyleHandler.isSignificant(propertyValues) ?
                    borderWidthHandler.getAsString(propertyValues) : null;
            }
        };

        if (context.getDeviceName().endsWith("Netscape4")) {
            borderHandler = new DefaultingPropertyHandler(borderHandler, "0");
        }

        borderSpacingHandler = new AverageBorderSpacingRenderer();
        marginEdgeHandler = new PositivePixelLengthHandler();
        marginTopHandler =
            new ValueHandlerToPropertyAdapter(StylePropertyDetails.MARGIN_TOP,
                                              marginEdgeHandler);

        ChoicePropertyHandler choicePropertyHandler =
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.styles.PositivePixelLengthHandler

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.