public class CustomVariable


Defines non standard Attributes

Summary

Public constructors

CustomVariable(String name, int attributeType)
CustomVariable(String name, int attributeType, Object value)
CustomVariable(String name, int type, boolean value)
CustomVariable(String name, int type, float value)
CustomVariable(String name, int type, int value)
CustomVariable(String name, int type, String value)

Public methods

void
static String
colorString(int v)
CustomVariable
boolean
diff(CustomVariable customAttribute)

test if the two attributes are different

boolean
int
float
int
int
getInterpolatedColor(float[] value)
String
String
int
float

Transforms value to a float for the purpose of interpolation

void
static int
hsvToRgb(float hue, float saturation, float value)
boolean

Continuous types are interpolated they are fired only at

int

The number of interpolation values that need to be interpolated Typically 1 but 3 for colors.

static int
rgbaTocColor(float r, float g, float b, float a)
void
setBooleanValue(boolean value)
void
setFloatValue(float value)
void
setIntValue(int value)
void
setInterpolatedValue(MotionWidget view, float[] value)
void
void
void
setValue(float[] value)
String

Public constructors

CustomVariable

Added in 1.1.0
public CustomVariable(CustomVariable c)

CustomVariable

Added in 1.1.0
public CustomVariable(String name, int attributeType)

CustomVariable

Added in 1.1.0
public CustomVariable(CustomVariable source, Object value)

CustomVariable

Added in 1.1.0
public CustomVariable(String name, int attributeType, Object value)

CustomVariable

Added in 1.1.0
public CustomVariable(String name, int type, boolean value)

CustomVariable

Added in 1.1.0
public CustomVariable(String name, int type, float value)

CustomVariable

Added in 1.1.0
public CustomVariable(String name, int type, int value)

CustomVariable

Added in 1.1.0
public CustomVariable(String name, int type, String value)

Public methods

applyToWidget

Added in 1.1.0
public void applyToWidget(MotionWidget view)

colorString

Added in 1.1.0
public static String colorString(int v)

copy

Added in 1.1.0
public CustomVariable copy()

diff

Added in 1.1.0
public boolean diff(CustomVariable customAttribute)

test if the two attributes are different

getBooleanValue

Added in 1.1.0
public boolean getBooleanValue()

getColorValue

Added in 1.1.0
public int getColorValue()

getFloatValue

Added in 1.1.0
public float getFloatValue()

getIntegerValue

Added in 1.1.0
public int getIntegerValue()

getInterpolatedColor

Added in 1.1.0
public int getInterpolatedColor(float[] value)

getName

Added in 1.1.0
public String getName()

getStringValue

Added in 1.1.0
public String getStringValue()

getType

Added in 1.1.0
public int getType()

getValueToInterpolate

Added in 1.1.0
public float getValueToInterpolate()

Transforms value to a float for the purpose of interpolation

Returns
float

interpolation value

getValuesToInterpolate

Added in 1.1.0
public void getValuesToInterpolate(float[] ret)

hsvToRgb

Added in 1.1.0
public static int hsvToRgb(float hue, float saturation, float value)

isContinuous

Added in 1.1.0
public boolean isContinuous()

Continuous types are interpolated they are fired only at

numberOfInterpolatedValues

Added in 1.1.0
public int numberOfInterpolatedValues()

The number of interpolation values that need to be interpolated Typically 1 but 3 for colors.

Returns
int

Typically 1 but 3 for colors.

rgbaTocColor

Added in 1.1.0
public static int rgbaTocColor(float r, float g, float b, float a)

setBooleanValue

Added in 1.1.0
public void setBooleanValue(boolean value)

setFloatValue

Added in 1.1.0
public void setFloatValue(float value)

setIntValue

Added in 1.1.0
public void setIntValue(int value)

setInterpolatedValue

Added in 1.1.0
public void setInterpolatedValue(MotionWidget view, float[] value)

setStringValue

Added in 1.1.0
public void setStringValue(String value)

setValue

Added in 1.1.0
public void setValue(Object value)

setValue

Added in 1.1.0
public void setValue(float[] value)

toString

public String toString()