Package com.volantis.styling.values

Examples of com.volantis.styling.values.PropertyValues


            MarinerURL url = null;
            Map params = null;
            boolean post = false;

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

            styleValue = propertyValues.getComputedValue(
                    StylePropertyDetails.MCS_HTTP_METHOD_HINT);
            if (styleValue == MCSHttpMethodHintKeywords.POST) {
                post = true;

                // Check to see whether the URL has any parameters, if it has
View Full Code Here


     */
    protected void addTextInputValidation(
            Element element, XFTextInputAttributes attributes) {

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

        StyleInteger rowsValue = (StyleInteger) styleValue;
        int rows = rowsValue.getInteger();
        if (rows > 1) {
View Full Code Here

    // javadoc inherited from superclass
    protected SelectionRenderer
            getSelectionRenderer(XFSelectAttributes attributes) {

        Styles styles = attributes.getStyles();
        PropertyValues propertyValues = styles.getPropertyValues();

        StyleValue listStyle = propertyValues.getComputedValue(
                StylePropertyDetails.MCS_SELECTION_LIST_STYLE);
        SelectionRenderer renderer = null;
        if (listStyle != MCSSelectionListStyleKeywords.CONTROLS) {
            if (null == defaultSelectionRenderer) {
                defaultSelectionRenderer = new WAPTV5DefaultSelectionRenderer();
View Full Code Here

     * @return Link
     */
    private Link createLink(Styles nestedStyles, String linkName) {
        Link link = null;
        if (nestedStyles != null) {
            PropertyValues propertyValues = nestedStyles.getPropertyValues();
            StyleValue value = propertyValues.getSpecifiedValue(
                    StylePropertyDetails.CONTENT);

            // Determine the link text.
            if (!(URLConstants.RESET_FORM_FRAGMENT.equals(linkName) &&
                    containsOnlyNone(value))) {
View Full Code Here

            final String label = formFragment.getLabel();
            final String contentsValue = label != null? label: defaultText;
            final StringBuffer linkTextBuffer = new StringBuffer();
            final Styles styles = link.getLinkStyles();
            if (styles != null) {
                final PropertyValues propertyValues = styles.getPropertyValues();
                final StyleValue styleValue = propertyValues.getSpecifiedValue(
                        StylePropertyDetails.CONTENT);
                buildLinkText(linkTextBuffer, styleValue, contentsValue);
                final String linkText = linkTextBuffer.toString();
                if (linkText.length() > 0) {
                    link.setLinkText(linkText);
View Full Code Here

     if there is not one.
     */
    public ShortcutProperties getShortcutProperties() {


        PropertyValues propertyValues =
                getElementDetails().getStyles().getPropertyValues();

        // shortcut properties should never be null but if it is then
        // create a default one.
        if (shortcutProperties == null) {
            shortcutProperties = new ShortcutProperties();


            if (propertyValues != null) {
                StyleValue activeStyle = propertyValues.
                        getComputedValue(StylePropertyDetails.
                                      MCS_MENU_ITEM_SHORTCUT_ACTIVE);

                boolean active =
                        (activeStyle == MCSMenuItemShortcutActiveKeywords.ACTIVE);
View Full Code Here

        }

        // Obtain the parent menu's properties
        AccessibleMenuStyleProperties element =
                (AccessibleMenuStyleProperties) pageContext.getCurrentElement();
        PropertyValues parentProperties = element.getPropertyValues();

        // Obtain specified image style, if any, from the parent properties
        StyleValue imageStyle = parentProperties.getComputedValue(
                StylePropertyDetails.MCS_MENU_IMAGE_STYLE);

        // Handle the various steps in the image reference resolution
        if (imageStyle == MCSMenuImageStyleKeywords.ROLLOVER) {
            // A rollover menu has been specified
View Full Code Here

            !h.tableContains(table, getFactory(), "onevent", false) &&
            !h.tableContains(t, getFactory(), "onevent", false) &&
            !h.tableHasId(table, getFactory(), false);

        if (canOptimize) {
            PropertyValues outerCellProps = null;
            PropertyValues tableProps = null;
            StyleValue outerCellWidth = null;
            StyleValue outerCellHeight = null;
            StyleValue tableWidth = null;
            StyleValue tableHeight = null;

            if (c.getStyles() != null) {
                outerCellProps = c.getStyles().getPropertyValues();
                outerCellWidth = outerCellProps.getComputedValue(
                        StylePropertyDetails.WIDTH);
                outerCellHeight = outerCellProps.getComputedValue(
                        StylePropertyDetails.HEIGHT);
            }
            if (table.getStyles() != null) {
                tableProps = table.getStyles().getPropertyValues();
                tableWidth = tableProps.getComputedValue(
                        StylePropertyDetails.WIDTH);
                tableHeight = tableProps.getComputedValue(
                        StylePropertyDetails.HEIGHT);
            }

            canOptimize = canOptimize &&
                    (tableProps == null ||
View Full Code Here

     * </p>
     */
    private static class BackgroundColorAnalyser implements Analyser{
        // javadoc inherited
        public boolean hasVisualEffect(final Element element) {
            final PropertyValues propertyValues =
                element.getStyles().getPropertyValues();
            boolean result = true;
            final StyleValue bgColorValue = propertyValues.getComputedValue(
                StylePropertyDetails.BACKGROUND_COLOR);
            if (bgColorValue == null ||
                    BackgroundColorKeywords.TRANSPARENT.equals(bgColorValue)) {
                // value is 'transparent' or missing
                result = false;
            } else {
                final Element parent = getParent(element);
                if (parent != null) {
                    final Styles parentStyles = parent.getStyles();
                    if (parentStyles != null) {
                        final PropertyValues parentValues =
                            parentStyles.getPropertyValues();
                        // value is the same as the parent...
                        if (bgColorValue.equals(parentValues.getComputedValue(
                                StylePropertyDetails.BACKGROUND_COLOR))) {
                            // ...and the parent doesn't have a background image
                            final StyleValue bgImageValue =
                                parentValues.getComputedValue(
                                    StylePropertyDetails.BACKGROUND_IMAGE);
                            result = bgImageValue != null &&
                                !bgImageValue.equals(
                                    BackgroundImageKeywords.NONE);
                        }
View Full Code Here

            this.styleProperty = styleProperty;
        }

        // javadoc inherited
        public boolean hasVisualEffect(final Element element) {
            final PropertyValues propertyValues =
                element.getStyles().getPropertyValues();
            final StyleValue borderWidthValue =
                propertyValues.getComputedValue(widthProperty);
            boolean result = true;
            if (borderWidthValue != null) {
                if (borderWidthValue instanceof StyleLength) {
                    final StyleLength length = (StyleLength) borderWidthValue;
                    if (length.getNumber() == 0.0) {
                        result = false;
                    }
                }
            }
            if (result) {
                final StyleValue borderStyleValue =
                    propertyValues.getComputedValue(styleProperty);
                if (borderStyleValue == null ||
                        borderStyleValue.equals(BorderStyleKeywords.NONE)) {
                    result = false;
                }
            }
View Full Code Here

TOP

Related Classes of com.volantis.styling.values.PropertyValues

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.