BlocklyEvent.CreateEvent

public static final class BlocklyEvent.CreateEvent extends BlocklyEvent

Event fired when a block is added to the workspace, possibly containing other child blocks and next blocks.

Inherited Constant Summary

Inherited Field Summary

Public Constructor Summary

BlocklyEvent.CreateEvent(Block block)
Constructs a CreateEvent for the given block.
BlocklyEvent.CreateEvent(JSONObject json)
Constructs a CreateEvent from the JSON serialized representation.

Public Method Summary

List<String>
getIds()
String
getXml()

Protected Method Summary

void
writeJsonAttributes(JSONStringer out)

Inherited Method Summary

Public Constructors

public BlocklyEvent.CreateEvent (Block block)

Constructs a CreateEvent for the given block.

Parameters
block The newly created block.

public BlocklyEvent.CreateEvent (JSONObject json)

Constructs a CreateEvent from the JSON serialized representation.

Parameters
json The serialized CreateEvent.
Throws
JSONException

Public Methods

public List<String> getIds ()

Returns
  • The list of all block ids for all blocks created by this event.

public String getXml ()

Returns
  • The XML serialization of all blocks created by this event.

Protected Methods

protected void writeJsonAttributes (JSONStringer out)

Parameters
out
Throws
JSONException