Package com.volantis.styling

Examples of com.volantis.styling.Styles


            Element element = dom.openStyledElement("select", attributes);

            // set attributes that should be set for all form fields.
            addFormFieldAttributes(element, attributes);

            Styles styles = attributes.getStyles();
            PropertyValues propertyValues = styles.getPropertyValues();
            String value;
            if ((value = mcsImageHandler.getAsString(styles)) != null) {
                element.setAttribute("localsrc", value);
            }
View Full Code Here


         */
        protected void initialise(XFSelectAttributes attributes) {

            selectAttributes = attributes;

            Styles styles = attributes.getStyles();
            PropertyValues propertyValues = styles.getPropertyValues();
            StyleValue styleValue = propertyValues.getComputedValue(
                    StylePropertyDetails.MCS_MENU_ORIENTATION);

            this.verticalOptions =
                    (styleValue == MCSMenuOrientationKeywords.VERTICAL);
View Full Code Here

            protected void doSelectAttributes(Element element) {

                super.doSelectAttributes(element);

                if (!this.attributes.isMultiple()) {
                    Styles styles = attributes.getStyles();
                    PropertyValues propertyValues = styles.getPropertyValues();
                    StyleValue value = propertyValues.getComputedValue(
                            StylePropertyDetails.MCS_SELECTION_LIST_STYLE);
                    String listStyle = null;
                    if (value == MCSSelectionListStyleKeywords.CIRCULAR_LIST) {
                        listStyle = "spin";
View Full Code Here

    public Document parse(Document document) {
        WalkingDOMVisitor visitor = new WalkingDOMVisitorStub() {
            public void visit(Element element) {

                String cssValues = element.getAttributeValue("style");
                Styles styles = StylesBuilder.getStyles(
                        cssValues, specified);

                if (styles != null) {
                    element.setStyles(styles);
                    // Remove the style attribute as it's information is now
View Full Code Here

     * @param result Element whose name and Styles to compare
     */
    private void assertStylesEqual(Element original, Element result) {

        assertEquals(original.getName(), result.getName());
        Styles originalStyles = original.getStyles();
        Styles resultStyles = result.getStyles();

        if (originalStyles == null) {
            assertNull(resultStyles);
        } else {
            PropertyValues originalValues = originalStyles.getPropertyValues();
            PropertyValues resultValues = resultStyles.getPropertyValues();
            StylePropertyDefinitions definitions =
                    StylePropertyDetails.getDefinitions();
            for(Iterator i = definitions.stylePropertyIterator(); i.hasNext();) {
                StyleProperty property = (StyleProperty)i.next();
                assertEquals(originalValues.getComputedValue(property),
View Full Code Here

        }

        // Javadoc inherited.
        public void visit(Element element) {

            Styles styles = element.getStyles();
            if (styles != null) {
                Styles pseudoStyles =
                        styles.removeNestedStyles(getPseudoElement());
                if (pseudoStyles != null) {
                    Element e = replacementFactory
                            .createElement(element, pseudoStyles);
                    if (e != null) {
View Full Code Here

     * Removes the list-style-property style from the property values.
     *
     * @param element the element containing the style.
     */
    protected void removeListStylePosition(final Element element) {
        Styles styles = element.getStyles();
        MutablePropertyValues propertyValues = styles.getPropertyValues();
        propertyValues.markAsUnspecified(
                StylePropertyDetails.LIST_STYLE_POSITION);
    }
View Full Code Here

        // NOTE: this code is mostly duplicated by other openwave renderers
        // that need to generate openwave style "menus" for other purposes.

        // todo: only set whitespace if it was not specified by user
        // currently we cannot tell, fix when VBM:2005092701 is fixed
        Styles styles = attributes.getStyles();
        styles.getPropertyValues().setComputedValue(
                StylePropertyDetails.WHITE_SPACE,
                WhiteSpaceKeywords.NOWRAP);
        Element p = dom.openStyledElement(WMLConstants.BLOCH_ELEMENT, styles);

        // @todo 2005060816 annotate child with style information if it's not inherited from the parent
View Full Code Here

    public void visit(Element element) {

        // This element should be a <li>.

        // now inside a supported list: ul, ol, nl, etc
        final Styles styles = element.getStyles();
        if (styles != null) {
            DOMFactory domFactory = element.getDOMFactory();
            Element div = domFactory.createElement(DIV);
            div.setStyles(styles);

            // Clear the display property as this is not a list-item
            // any more.
            styles.getPropertyValues()
                    .clearPropertyValue(StylePropertyDetails.DISPLAY);

            Styles markerStyles =
                    styles.removeNestedStyles(PseudoElements.MARKER);
            if (markerStyles != null) {
                Element marker =
                        createMarkerElement(domFactory, markerStyles);
                div.addTail(marker);
View Full Code Here

        // remove the list-style-position style
        removeListStylePosition(listElement);

        listElement.setName(TABLE);
        Styles styles = listElement.getStyles();
        styles.getPropertyValues()
                .clearPropertyValue(StylePropertyDetails.DISPLAY);
    }
View Full Code Here

TOP

Related Classes of com.volantis.styling.Styles

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.