/** * Returns a zero value of this AnimatableValue's type. */ public AnimatableValue getZeroValue() { return new AnimatableNumberOrPercentageValue(target, 0, isPercentage); }
/** * Returns a zero value of this AnimatableValue's type. */ public AnimatableValue getZeroValue() { return new AnimatableNumberOrPercentageValue(target, 0, isPercentage); }
/** * Returns a zero value of this AnimatableValue's type. */ public AnimatableValue getZeroValue() { return new AnimatableNumberOrPercentageValue(target, 0, isPercentage); }
AnimatableNumberOrPercentageValue res; if (result == null) { res = new AnimatableNumberOrPercentageValue(target); } else { res = (AnimatableNumberOrPercentageValue) result;
AnimatableNumberOrPercentageValue res; if (result == null) { res = new AnimatableNumberOrPercentageValue(target); } else { res = (AnimatableNumberOrPercentageValue) result;
AnimatableNumberOrPercentageValue res; if (result == null) { res = new AnimatableNumberOrPercentageValue(target); } else { res = (AnimatableNumberOrPercentageValue) result;
/** * Creates a new AnimatableValue from a string. */ public AnimatableValue createValue(AnimationTarget target, String ns, String ln, boolean isCSS, String s) { float v; boolean pc; if (s.charAt(s.length() - 1) == '%') { v = Float.parseFloat(s.substring(0, s.length() - 1)); pc = true; } else { v = Float.parseFloat(s); pc = false; } return new AnimatableNumberOrPercentageValue(target, v, pc); }
/** * Creates a new AnimatableValue from a string. */ public AnimatableValue createValue(AnimationTarget target, String ns, String ln, boolean isCSS, String s) { float v; boolean pc; if (s.charAt(s.length() - 1) == '%') { v = Float.parseFloat(s.substring(0, s.length() - 1)); pc = true; } else { v = Float.parseFloat(s); pc = false; } return new AnimatableNumberOrPercentageValue(target, v, pc); }
/** * Creates a new AnimatableValue from a string. */ public AnimatableValue createValue(AnimationTarget target, String ns, String ln, boolean isCSS, String s) { float v; boolean pc; if (s.charAt(s.length() - 1) == '%') { v = Float.parseFloat(s.substring(0, s.length() - 1)); pc = true; } else { v = Float.parseFloat(s); pc = false; } return new AnimatableNumberOrPercentageValue(target, v, pc); }
/** * Creates a new AnimatableValue from a CSS {@link Value}. */ public AnimatableValue createValue(AnimationTarget target, String pn, Value v) { switch (v.getPrimitiveType()) { case CSSPrimitiveValue.CSS_PERCENTAGE: return new AnimatableNumberOrPercentageValue (target, v.getFloatValue(), true); case CSSPrimitiveValue.CSS_NUMBER: return new AnimatableNumberOrPercentageValue (target, v.getFloatValue()); } // XXX Do something better than returning null. return null; } }
/** * Creates a new AnimatableValue from a CSS {@link Value}. */ public AnimatableValue createValue(AnimationTarget target, String pn, Value v) { switch (v.getPrimitiveType()) { case CSSPrimitiveValue.CSS_PERCENTAGE: return new AnimatableNumberOrPercentageValue (target, v.getFloatValue(), true); case CSSPrimitiveValue.CSS_NUMBER: return new AnimatableNumberOrPercentageValue (target, v.getFloatValue()); } // XXX Do something better than returning null. return null; } }
/** * Creates a new AnimatableValue from a CSS {@link Value}. */ public AnimatableValue createValue(AnimationTarget target, String pn, Value v) { switch (v.getPrimitiveType()) { case CSSPrimitiveValue.CSS_PERCENTAGE: return new AnimatableNumberOrPercentageValue (target, v.getFloatValue(), true); case CSSPrimitiveValue.CSS_NUMBER: return new AnimatableNumberOrPercentageValue (target, v.getFloatValue()); } // XXX Do something better than returning null. return null; } }