public class Element extends Object
Infantium_SDK.addElement(Element)
,
Infantium_SDK.addElements(List)
Constructor and Description |
---|
Element(String id) |
Element(String id,
String t) |
Element(String id,
String t,
Integer width,
Integer height) |
Modifier and Type | Method and Description |
---|---|
Long |
get_appears() |
ColorInfo |
get_color_info() |
String |
get_id() |
KineticInfo |
get_kinetic_info() |
SizeInfo |
get_size_info() |
HashMap<String,Object> |
get_t_params() |
String |
get_t() |
void |
set_appears(Long appears) |
void |
set_id(String id)
Set the ID of the element.
|
void |
set_movement(String movement) |
void |
set_named_color(String color) |
void |
set_rgb_color(Integer red,
Integer green,
Integer blue) |
void |
set_size(Integer width,
Integer height) |
void |
set_t_params(HashMap<String,Object> t_params) |
void |
set_t(String t)
The type can be STATIC_OBJECT or ANIMATED_OBJECT
|
JSONObject |
to_json()
The Element is converted to JSON format
|
Boolean |
validate_element() |
public Element(String id)
id
- public String get_id()
public void set_id(String id)
id
- The ID of the element.public String get_t()
public void set_t(String t)
t
- the type to setpublic void set_t_params(HashMap<String,Object> t_params)
t_params
- the type_params to setpublic SizeInfo get_size_info()
public ColorInfo get_color_info()
public KineticInfo get_kinetic_info()
public void set_rgb_color(Integer red, Integer green, Integer blue) throws IllegalArgumentException
red
- green
- blue
- IllegalArgumentException
public void set_named_color(String color) throws IllegalArgumentException
color
- IllegalArgumentException
public void set_movement(String movement) throws IllegalArgumentException
movement
- IllegalArgumentException
public Long get_appears()
public void set_appears(Long appears)
appears
- the appears to setpublic Boolean validate_element()
public JSONObject to_json() throws JSONException
JSONException