public class ShapeElement extends Element
Constructor and Description |
---|
ShapeElement(String id) |
ShapeElement(String id,
Integer n_sides) |
ShapeElement(String id,
Integer width,
Integer height) |
Modifier and Type | Method and Description |
---|---|
Integer |
get_n_sides() |
void |
set_n_sides(Integer n_sides) |
void |
setShapeAttributes(Boolean regular,
Boolean is_star,
Boolean has_border,
Integer n_sides)
Set the Shape attributes, all parameters are optional (use null for unused parameters)
|
JSONObject |
to_json()
The Element is converted to JSON format
|
Boolean |
validate_element() |
get_appears, get_color_info, get_id, get_kinetic_info, get_size_info, get_t_params, get_t, set_appears, set_id, set_movement, set_named_color, set_rgb_color, set_size, set_t_params, set_t
public ShapeElement(String id)
id
- public void setShapeAttributes(Boolean regular, Boolean is_star, Boolean has_border, Integer n_sides)
regular
- is_star
- has_border
- n_sides
- public void set_n_sides(Integer n_sides)
public Integer get_n_sides()
public Boolean validate_element()
validate_element
in class Element
public JSONObject to_json() throws JSONException
Element
to_json
in class Element
JSONException