Examples of ListValue


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

            i.add(defValue);
          }
        }
      }

      x.setValue(new ListValue(values));
    }
View Full Code Here

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

   */
  private static void validateValue(TreeLogger logger,
      JClassType resourceBundleType, Value value)
      throws UnableToCompleteException {

    ListValue list = value.isListValue();
    if (list != null) {
      for (Value v : list.getValues()) {
        validateValue(logger, resourceBundleType, v);
      }
      return;
    }

View Full Code Here

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

    return false;
  }

  private void setImageProperty(Value value) {
    StringValue stringValue;
    ListValue listValue;

    if ((stringValue = value.isStringValue()) != null) {
      String s = stringValue.getValue();

      // Allow the user to use both raw idents and quoted strings
      if (s.startsWith("\"")) {
        s = s.substring(1, s.length() - 1);
      }

      resourceFunction = new DotPathValue(s);

    } else if ((listValue = value.isListValue()) != null) {
      List<Value> values = listValue.getValues();
      if (values.size() == 1) {
        setImageProperty(values.get(0));
      }

    } else {
View Full Code Here

Examples of com.volantis.mcs.build.themes.definitions.values.ListValue

            pushObject(pair);
            processThemePropertyChildren(element);
            popObject();

            ListValue value = definitionsFactory.createListValue();
            Value next = null;
            while((next = pair.getNext())!=null){
                value.setNext(next);
            }
           
            ValueContainer container =
                    (ValueContainer) findObject(ValueContainer.class);
            container.addValue(value);
        } else if (name.equals("frequencyValue")) {
            String valStr = element.getText();

            try {
                double doubleVal = Double.parseDouble(valStr);
                String units = element.getAttributeValue("units");
                ValueContainer container =
                        (ValueContainer) findObject(ValueContainer.class);
                FrequencyValue value = definitionsFactory.createFrequencyValue();
                value.setNumber(doubleVal);
                value.setUnits(units);
                container.addValue(value);
            } catch (NumberFormatException nfe) {
                System.out.println("Invalid frequency: '" + valStr + "'");
            }
        } else if (name.equals("fractionValue")) {
            PairValueContainer pair = new PairValueContainer();

            pushObject(pair);
            processThemePropertyChildren(element);
            popObject();

            FractionValue value = definitionsFactory.createFractionValue();
            value.setNumerator(pair.getFirst());
            value.setDenominator(pair.getSecond());

            ValueContainer container =
                    (ValueContainer) findObject(ValueContainer.class);
            container.addValue(value);
        } else if (name.equals("keywordRef")) {
View Full Code Here

Examples of com.volantis.shared.metadata.value.ListValue

    protected Collection verify(final MetaDataValue value, final String path) {
        final Collection errors = super.verify(value, path);
        if (value instanceof ListValue) {
            // check unique member constraint
            if (uniqueMemberConstraint != null) {
                final ListValue list = (ListValue) value;
                final Set values = new HashSet();
                final Iterator iter = list.getContentsAsList().iterator();
                for (int i = 1; iter.hasNext(); i++) {
                    final MetaDataValue child = (MetaDataValue) iter.next();
                    if (!values.add(child)) {
                        errors.add(new VerificationError(
                            VerificationError.TYPE_CONSTRAINT_VIOLATION,
View Full Code Here

Examples of com.volantis.shared.metadata.value.ListValue

    public boolean equals(Object obj) {
        if (!(obj instanceof ListValue)) {
            return false;
        }

        ListValue other = (ListValue) obj;

        return getContentsAsList().equals(other.getContentsAsList());
    }
View Full Code Here

Examples of edu.stanford.nlp.sempre.ListValue

    }

    if (!(pDerivation.value instanceof ListValue))
      throw new RuntimeException("Derivation value is not a list: " + pDerivation.value);

    ListValue list = (ListValue) pDerivation.value;
    if (Formulas.isCountFormula(pDerivation.formula)) {
      if (list.values.size() != 1) {
        throw new RuntimeException(
            "Evaluation of count formula " + pDerivation.formula + " has size " + list.values.size());
      }
View Full Code Here

Examples of org.apache.batik.css.engine.value.ListValue

            int ci = engine.getColorIndex();
            return engine.getComputedStyle(elt, pseudo, ci);
        }
        if (value.getCssValueType() == CSSValue.CSS_VALUE_LIST) {
            ListValue lv = (ListValue)value;
            Value v = lv.item(0);
            Value t = super.computeValue(elt, pseudo, engine, idx, sm, v);
            if (t != v) {
                ListValue result = new ListValue(' ');
                result.append(t);
                result.append(lv.item(1));
                return result;
            }
            return value;
        }
        return super.computeValue(elt, pseudo, engine, idx, sm, value);
View Full Code Here

Examples of org.apache.batik.css.engine.value.ListValue

            default:
                throw new Error(); // can't be reached
            }
        } else { // List
            ListValue lv = (ListValue)paintDef;
            Value v = lv.item(0);
            switch (v.getPrimitiveType()) {
            case CSSPrimitiveValue.CSS_RGBCOLOR:
                return convertRGBICCColor(paintedElement, v,
                                          (ICCColor)lv.item(1),
                                          opacity, ctx);

            case CSSPrimitiveValue.CSS_URI:
                Paint result = silentConvertURIPaint(paintedElement,
                                                     paintedNode,
                                                     lv,
                                                     opacity,
                                                     ctx);
                if (result == null) {
                    v = lv.item(1);
                    switch (v.getPrimitiveType()) {
                    case CSSPrimitiveValue.CSS_IDENT:
                        return null; // none

                    case CSSPrimitiveValue.CSS_RGBCOLOR:
                        if (lv.getLength() == 2) {
                            return convertColor(v, opacity);
                        } else {
                            return convertRGBICCColor(paintedElement, v,
                                                      (ICCColor)lv.item(2),
                                                      opacity, ctx);
                        }
                    default:
                        throw new Error(); // can't be reached
                    }
View Full Code Here

Examples of org.apache.batik.css.engine.value.ListValue

                                        UnitProcessor.Context uctx*/) {
        Value v = getComputedStyle(e, SVGCSSEngine.ENABLE_BACKGROUND_INDEX);
        if (v.getCssValueType() != CSSValue.CSS_VALUE_LIST) {
            return null; // accumulate
        }
        ListValue lv = (ListValue)v;
        int length = lv.getLength();
        switch (length) {
        case 1:
            return CompositeGraphicsNode.VIEWPORT; // new
        case 5: // new <x>,<y>,<width>,<height>
            float x = lv.item(1).getFloatValue();
            float y = lv.item(2).getFloatValue();
            float w = lv.item(3).getFloatValue();
            float h = lv.item(4).getFloatValue();
            return new Rectangle2D.Float(x, y, w, h);

        default:
            throw new InternalError(); // Cannot happen
        }
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.