congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
AnimatableLengthListValue
Code IndexAdd Tabnine to your IDE (free)

How to use
AnimatableLengthListValue
in
org.apache.batik.anim.values

Best Java code snippets using org.apache.batik.anim.values.AnimatableLengthListValue (Showing top 18 results out of 315)

origin: org.apache.xmlgraphics/batik-anim

/**
 * Returns a zero value of this AnimatableValue's type.
 */
public AnimatableValue getZeroValue() {
  float[] vs = new float[lengthValues.length];
  return new AnimatableLengthListValue
    (target, lengthTypes, vs, percentageInterpretation);
}
origin: org.apache.xmlgraphics/batik-anim

  /**
   * Returns the CSS text representation of the value.
   * Length lists can never be used for CSS properties.
   */
  public String getCssText() {
    StringBuffer sb = new StringBuffer();
    if (lengthValues.length > 0) {
      sb.append(formatNumber(lengthValues[0]));
      sb.append(AnimatableLengthValue.UNITS[lengthTypes[0] - 1]);
    }
    for (int i = 1; i < lengthValues.length; i++) {
      sb.append(',');
      sb.append(formatNumber(lengthValues[i]));
      sb.append(AnimatableLengthValue.UNITS[lengthTypes[i] - 1]);
    }
    return sb.toString();
  }
}
origin: org.apache.xmlgraphics/batik-anim

/**
 * Updates the animated value with the given {@link AnimatableValue}.
 */
protected void updateAnimatedValue(AnimatableValue val) {
  if (val == null) {
    hasAnimVal = false;
  } else {
    hasAnimVal = true;
    AnimatableLengthListValue animLengths =
      (AnimatableLengthListValue) val;
    if (animVal == null) {
      animVal = new AnimSVGLengthList();
    }
    animVal.setAnimatedValue(animLengths.getLengthTypes(),
                 animLengths.getLengthValues());
  }
  fireAnimatedAttributeListeners();
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Updates the animated value with the given {@link AnimatableValue}.
 */
protected void updateAnimatedValue(AnimatableValue val) {
  if (val == null) {
    hasAnimVal = false;
  } else {
    hasAnimVal = true;
    AnimatableLengthListValue animLengths =
      (AnimatableLengthListValue) val;
    if (animVal == null) {
      animVal = new AnimSVGLengthList();
    }
    animVal.setAnimatedValue(animLengths.getLengthTypes(),
                 animLengths.getLengthValues());
  }
  fireAnimatedAttributeListeners();
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Returns a zero value of this AnimatableValue's type.
 */
public AnimatableValue getZeroValue() {
  float[] vs = new float[lengthValues.length];
  return new AnimatableLengthListValue
    (target, lengthTypes, vs, percentageInterpretation);
}
origin: apache/batik

/**
 * Updates the animated value with the given {@link AnimatableValue}.
 */
protected void updateAnimatedValue(AnimatableValue val) {
  if (val == null) {
    hasAnimVal = false;
  } else {
    hasAnimVal = true;
    AnimatableLengthListValue animLengths =
      (AnimatableLengthListValue) val;
    if (animVal == null) {
      animVal = new AnimSVGLengthList();
    }
    animVal.setAnimatedValue(animLengths.getLengthTypes(),
                 animLengths.getLengthValues());
  }
  fireAnimatedAttributeListeners();
}
origin: fr.avianey.apache-xmlgraphics/batik

  /**
   * Returns the CSS text representation of the value.
   * Length lists can never be used for CSS properties.
   */
  public String getCssText() {
    StringBuffer sb = new StringBuffer();
    if (lengthValues.length > 0) {
      sb.append(formatNumber(lengthValues[0]));
      sb.append(AnimatableLengthValue.UNITS[lengthTypes[0] - 1]);
    }
    for (int i = 1; i < lengthValues.length; i++) {
      sb.append(',');
      sb.append(formatNumber(lengthValues[i]));
      sb.append(AnimatableLengthValue.UNITS[lengthTypes[i] - 1]);
    }
    return sb.toString();
  }
}
origin: apache/batik

/**
 * Returns a zero value of this AnimatableValue's type.
 */
public AnimatableValue getZeroValue() {
  float[] vs = new float[lengthValues.length];
  return new AnimatableLengthListValue
    (target, lengthTypes, vs, percentageInterpretation);
}
origin: apache/batik

  /**
   * Returns the CSS text representation of the value.
   * Length lists can never be used for CSS properties.
   */
  public String getCssText() {
    StringBuffer sb = new StringBuffer();
    if (lengthValues.length > 0) {
      sb.append(formatNumber(lengthValues[0]));
      sb.append(AnimatableLengthValue.UNITS[lengthTypes[0] - 1]);
    }
    for (int i = 1; i < lengthValues.length; i++) {
      sb.append(',');
      sb.append(formatNumber(lengthValues[i]));
      sb.append(AnimatableLengthValue.UNITS[lengthTypes[i] - 1]);
    }
    return sb.toString();
  }
}
origin: org.apache.xmlgraphics/batik-bridge

/**
 * Creates a new AnimatableValue from a string.
 */
public AnimatableValue createValue(AnimationTarget target, String ns,
                  String ln, boolean isCSS, String s) {
  try {
    short pcInterp = target.getPercentageInterpretation
      (ns, ln, isCSS);
    parser.parse(s);
    return new AnimatableLengthListValue
      (target, producer.getLengthTypeArray(),
       producer.getLengthValueArray(),
       pcInterp);
  } catch (ParseException e) {
    // XXX Do something better than returning null.
    return null;
  }
}
origin: apache/batik

/**
 * Creates a new AnimatableValue from a string.
 */
public AnimatableValue createValue(AnimationTarget target, String ns,
                  String ln, boolean isCSS, String s) {
  try {
    short pcInterp = target.getPercentageInterpretation
      (ns, ln, isCSS);
    parser.parse(s);
    return new AnimatableLengthListValue
      (target, producer.getLengthTypeArray(),
       producer.getLengthValueArray(),
       pcInterp);
  } catch (ParseException e) {
    // XXX Do something better than returning null.
    return null;
  }
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Creates a new AnimatableValue from a string.
 */
public AnimatableValue createValue(AnimationTarget target, String ns,
                  String ln, boolean isCSS, String s) {
  try {
    short pcInterp = target.getPercentageInterpretation
      (ns, ln, isCSS);
    parser.parse(s);
    return new AnimatableLengthListValue
      (target, producer.getLengthTypeArray(),
       producer.getLengthValueArray(),
       pcInterp);
  } catch (ParseException e) {
    // XXX Do something better than returning null.
    return null;
  }
}
origin: org.apache.xmlgraphics/batik-anim

/**
 * Returns the base value of the attribute as an {@link AnimatableValue}.
 */
public AnimatableValue getUnderlyingValue(AnimationTarget target) {
  SVGLengthList ll = getBaseVal();
  int n = ll.getNumberOfItems();
  short[] types = new short[n];
  float[] values = new float[n];
  for (int i = 0; i < n; i++) {
    SVGLength l = ll.getItem(i);
    types[i] = l.getUnitType();
    values[i] = l.getValueInSpecifiedUnits();
  }
  return new AnimatableLengthListValue
    (target, types, values,
     target.getPercentageInterpretation
       (getNamespaceURI(), getLocalName(), false));
}
origin: apache/batik

/**
 * Returns the base value of the attribute as an {@link AnimatableValue}.
 */
public AnimatableValue getUnderlyingValue(AnimationTarget target) {
  SVGLengthList ll = getBaseVal();
  int n = ll.getNumberOfItems();
  short[] types = new short[n];
  float[] values = new float[n];
  for (int i = 0; i < n; i++) {
    SVGLength l = ll.getItem(i);
    types[i] = l.getUnitType();
    values[i] = l.getValueInSpecifiedUnits();
  }
  return new AnimatableLengthListValue
    (target, types, values,
     target.getPercentageInterpretation
       (getNamespaceURI(), getLocalName(), false));
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Returns the base value of the attribute as an {@link AnimatableValue}.
 */
public AnimatableValue getUnderlyingValue(AnimationTarget target) {
  SVGLengthList ll = getBaseVal();
  int n = ll.getNumberOfItems();
  short[] types = new short[n];
  float[] values = new float[n];
  for (int i = 0; i < n; i++) {
    SVGLength l = ll.getItem(i);
    types[i] = l.getUnitType();
    values[i] = l.getValueInSpecifiedUnits();
  }
  return new AnimatableLengthListValue
    (target, types, values,
     target.getPercentageInterpretation
       (getNamespaceURI(), getLocalName(), false));
}
origin: fr.avianey.apache-xmlgraphics/batik

res = new AnimatableLengthListValue(target);
res.lengthTypes = new short[len];
res.lengthValues = new float[len];
origin: org.apache.xmlgraphics/batik-anim

res = new AnimatableLengthListValue(target);
res.lengthTypes = new short[len];
res.lengthValues = new float[len];
origin: apache/batik

res = new AnimatableLengthListValue(target);
res.lengthTypes = new short[len];
res.lengthValues = new float[len];
org.apache.batik.anim.valuesAnimatableLengthListValue

Javadoc

An SVG length list value in the animation system.

Most used methods

  • <init>
    Creates a new AnimatableLengthListValue.
  • formatNumber
  • getLengthTypes
    Gets the length types.
  • getLengthValues
    Gets the length values.

Popular in Java

  • Finding current android device location
  • getSystemService (Context)
  • getSharedPreferences (Context)
  • findViewById (Activity)
  • Socket (java.net)
    Provides a client-side TCP socket.
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • JTextField (javax.swing)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now