Examples of CssProperty


Examples of com.google.gwt.resources.css.ast.CssProperty

          b.append("((" + asIf.getExpression() + ") ? " + expression + " : "
              + elseExpression + ") ");
          numExpressions = concatOp(numExpressions, b);

        } else if (x instanceof CssProperty) {
          CssProperty property = (CssProperty) x;

          validateValue(loopLogger, context.getClientBundleType(),
              property.getValues());

          // (expr) +
          b.append("(" + property.getValues().getExpression() + ") ");
          numExpressions = concatOp(numExpressions, b);

        } else {
          // This indicates that some unexpected node is slipping by our visitors
          loopLogger.log(TreeLogger.ERROR, "Unhandled substitution "
View Full Code Here

Examples of com.google.gwt.resources.css.ast.CssProperty

    replacement.getSelectors().addAll(x.getSelectors());
    List<CssProperty> properties = replacement.getProperties();

    if (repeatStyle == RepeatStyle.None
        || repeatStyle == RepeatStyle.Horizontal) {
      properties.add(new CssProperty("height", new ExpressionValue(instance
          + ".getHeight() + \"px\""), false));
    }

    if (repeatStyle == RepeatStyle.None || repeatStyle == RepeatStyle.Vertical) {
      properties.add(new CssProperty("width", new ExpressionValue(instance
          + ".getWidth() + \"px\""), false));
    }
    properties.add(new CssProperty("overflow", new IdentValue("hidden"), false));

    String repeatText;
    switch (repeatStyle) {
      case None:
        repeatText = " no-repeat";
        break;
      case Horizontal:
        repeatText = " repeat-x";
        break;
      case Vertical:
        repeatText = " repeat-y";
        break;
      case Both:
        repeatText = " repeat";
        break;
      default:
        throw new RuntimeException("Unknown repeatStyle " + repeatStyle);
    }

    String backgroundExpression = "\"url(\\\"\" + " + instance
        + ".getURL() + \"\\\") -\" + " + instance + ".getLeft() + \"px -\" + "
        + instance + ".getTop() + \"px " + repeatText + "\"";
    properties.add(new CssProperty("background", new ExpressionValue(
        backgroundExpression), false));

    // Retain any user-specified properties
    properties.addAll(x.getProperties());
View Full Code Here

Examples of com.google.gwt.resources.css.ast.CssProperty

      List<Value> values = new ArrayList<Value>();
      if (value != null) {
        extractValueOf(values, value);
      }
      currentRule.getProperties().add(
          new CssProperty(escapeIdent(name), new ListValue(values), important));
    }
View Full Code Here

Examples of com.google.gwt.resources.css.ast.CssProperty

          b.append("((" + asIf.getExpression() + ") ? " + expression + " : "
              + elseExpression + ") ");
          numExpressions = concatOp(numExpressions, b);

        } else if (x instanceof CssProperty) {
          CssProperty property = (CssProperty) x;

          validateValue(loopLogger, context.getClientBundleType(),
              property.getValues());

          // (expr) +
          b.append("(" + property.getValues().getExpression() + ") ");
          numExpressions = concatOp(numExpressions, b);

        } else {
          // This indicates that some magic node is slipping by our visitors
          loopLogger.log(TreeLogger.ERROR, "Unhandled substitution "
View Full Code Here

Examples of com.google.gwt.resources.css.ast.CssProperty

      List<Value> values = new ArrayList<Value>();
      if (value != null) {
        extractValueOf(values, value);
      }
      currentRule.getProperties().add(
          new CssProperty(escapeIdent(name), new ListValue(values), important));
    }
View Full Code Here

Examples of com.google.gwt.resources.css.ast.CssProperty

          b.append("((" + asIf.getExpression() + ") ? " + expression + " : "
              + elseExpression + ") ");
          numExpressions = concatOp(numExpressions, b);

        } else if (x instanceof CssProperty) {
          CssProperty property = (CssProperty) x;

          validateValue(loopLogger, context.getClientBundleType(),
              property.getValues());

          // (expr) +
          b.append("(" + property.getValues().getExpression() + ") ");
          numExpressions = concatOp(numExpressions, b);

        } else {
          // This indicates that some unexpected node is slipping by our visitors
          loopLogger.log(TreeLogger.ERROR, "Unhandled substitution "
View Full Code Here

Examples of com.volantis.mcs.css.version.CSSProperty

            boolean supportsDisplayKeyword;
            final CSSVersion cssVersion = getCssVersion();
            if (cssVersion == null) {
                supportsDisplayKeyword = false;
            } else {
                CSSProperty display = cssVersion.getProperty(
                        StylePropertyDetails.DISPLAY);
                // In for the marquee css properties to have an effect, the
                // display must be set to marquee. If this keyword isn't
                // supported, then all marquee properties must be emulated.
                supportsDisplayKeyword = display.supportsKeyword(
                        DisplayKeywords.MCS_MARQUEE);
            }

            // The value of mcs-marquee-style determines if the other marquee
            // styles apply. So, if the mcs-marquee-style property css isn't
View Full Code Here

Examples of com.volantis.mcs.css.version.CSSProperty

        // Tell log4j to log everything for your test packages.
        category.setLevel(Level.ALL);

        final String ssversion = DevicePolicyConstants.CSS_MOBILE_PROFILE1;
        DefaultDevice device = createDevice("Master", ssversion, null);
        CSSProperty cssProperty;

        // Test the default setup for CSSWAP.
        cssConfigurator.initialise(config,
            INTERNAL_DEVICE_FACTORY.createInternalDevice(device));
        cssProperty = config.getCssVersion().getProperty(
                StylePropertyDetails.VERTICAL_ALIGN);

        // It should not have top or bottom.
        assertFalse(cssProperty.supportsKeyword(VerticalAlignKeywords.TOP));
        assertFalse(cssProperty.supportsKeyword(VerticalAlignKeywords.BOTTOM));
        // It should have super and sub.
        assertTrue(cssProperty.supportsKeyword(VerticalAlignKeywords.SUPER));
        assertTrue(cssProperty.supportsKeyword(VerticalAlignKeywords.SUB));

        final Map policies = new HashMap();
        policies.put("ssversion", ssversion);
        // Add top and bottom.
        policies.put(
            "x-css.properties.vertical-align.keyword.top.support", "full");
        policies.put(
            "x-css.properties.vertical-align.keyword.bottom.support", "full");
        // Remove super and sub.
        policies.put(
            "x-css.properties.vertical-align.keyword.super.support", "none");
        policies.put(
            "x-css.properties.vertical-align.keyword.sub.support", "none");
        device = createDevice("Master", policies, null);

        cssConfigurator.initialise(config,
            INTERNAL_DEVICE_FACTORY.createInternalDevice(device));
        cssProperty = config.getCssVersion().getProperty(
                StylePropertyDetails.VERTICAL_ALIGN);
        // It should have top and bottom.
        assertTrue(cssProperty.supportsKeyword(VerticalAlignKeywords.TOP));
        assertTrue(cssProperty.supportsKeyword(VerticalAlignKeywords.BOTTOM));
        // It should not have super or sub.
        assertFalse(cssProperty.supportsKeyword(VerticalAlignKeywords.SUPER));
        assertFalse(cssProperty.supportsKeyword(VerticalAlignKeywords.SUB));
    }
View Full Code Here

Examples of org.carrot2.labs.smartsprites.css.CssProperty

                if (directiveString == null)
                {
                    continue;
                }

                final CssProperty backgroundProperty = extractSpriteReferenceCssProperty(line);
                final String imageUrl = CssSyntaxUtils.unpackUrl(
                    backgroundProperty.value, messageLog);
                if (imageUrl == null)
                {
                    continue;
View Full Code Here

Examples of org.carrot2.labs.smartsprites.css.CssProperty

            messageLog.warning(
                MessageType.MORE_THAN_ONE_RULE_NEXT_TO_SPRITE_REFERENCE_DIRECTIVE, css);
            return null;
        }

        final CssProperty backgroundImageRule = rules.iterator().next();
        if (!backgroundImageRule.rule.equals("background-image"))
        {
            messageLog.warning(
                MessageType.NO_BACKGROUND_IMAGE_RULE_NEXT_TO_SPRITE_REFERENCE_DIRECTIVE,
                css);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.