Class CustomVariable


  • public class CustomVariable
    extends java.lang.Object
    Defines non standard Attributes
    • Constructor Detail

      • CustomVariable

        public CustomVariable​(java.lang.String name,
                              int type,
                              java.lang.String value)
      • CustomVariable

        public CustomVariable​(java.lang.String name,
                              int type,
                              int value)
      • CustomVariable

        public CustomVariable​(java.lang.String name,
                              int type,
                              float value)
      • CustomVariable

        public CustomVariable​(java.lang.String name,
                              int type,
                              boolean value)
      • CustomVariable

        public CustomVariable​(java.lang.String name,
                              int attributeType)
      • CustomVariable

        public CustomVariable​(java.lang.String name,
                              int attributeType,
                              java.lang.Object value)
      • CustomVariable

        public CustomVariable​(CustomVariable source,
                              java.lang.Object value)
    • Method Detail

      • colorString

        public static java.lang.String colorString​(int v)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getType

        public int getType()
      • getBooleanValue

        public boolean getBooleanValue()
      • getFloatValue

        public float getFloatValue()
      • getColorValue

        public int getColorValue()
      • getIntegerValue

        public int getIntegerValue()
      • getStringValue

        public java.lang.String getStringValue()
      • isContinuous

        public boolean isContinuous()
        Continuous types are interpolated they are fired only at
      • setFloatValue

        public void setFloatValue​(float value)
      • setBooleanValue

        public void setBooleanValue​(boolean value)
      • setIntValue

        public void setIntValue​(int value)
      • setStringValue

        public void setStringValue​(java.lang.String value)
      • numberOfInterpolatedValues

        public int numberOfInterpolatedValues()
        The number of interpolation values that need to be interpolated Typically 1 but 3 for colors.
        Returns:
        Typically 1 but 3 for colors.
      • getValueToInterpolate

        public float getValueToInterpolate()
        Transforms value to a float for the purpose of interpolation
        Returns:
        interpolation value
      • getValuesToInterpolate

        public void getValuesToInterpolate​(float[] ret)
      • setValue

        public void setValue​(float[] value)
      • hsvToRgb

        public static int hsvToRgb​(float hue,
                                   float saturation,
                                   float value)
      • diff

        public boolean diff​(CustomVariable customAttribute)
        test if the two attributes are different
      • setValue

        public void setValue​(java.lang.Object value)
      • getInterpolatedColor

        public int getInterpolatedColor​(float[] value)
      • setInterpolatedValue

        public void setInterpolatedValue​(MotionWidget view,
                                         float[] value)
      • rgbaTocColor

        public static int rgbaTocColor​(float r,
                                       float g,
                                       float b,
                                       float a)
      • applyToWidget

        public void applyToWidget​(MotionWidget view)
      • getName

        public java.lang.String getName()