BlocklyEvent.DeleteEvent

public static final class BlocklyEvent.DeleteEvent extends BlocklyEvent

Event fired when a block is removed from the workspace.

Inherited Constant Summary

Inherited Field Summary

Public Constructor Summary

BlocklyEvent.DeleteEvent(String workspaceId, Block block)
Constructs a DeleteEvent, signifying the removal of a block from the workspace.
BlocklyEvent.DeleteEvent(JSONObject json)
Constructs a DeleteEvent 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.DeleteEvent (String workspaceId, Block block)

Constructs a DeleteEvent, signifying the removal of a block from the workspace.

Parameters
workspaceId The id of the workspace or similar block container (toolbox, trash) from which the block was deleted.
block The root deleted block (or to-be-deleted block), with all children attached.

public BlocklyEvent.DeleteEvent (JSONObject json)

Constructs a DeleteEvent from the JSON serialized representation.

Parameters
json The serialized DeleteEvent.
Throws
JSONException

Public Methods

public List<String> getIds ()

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

public String getXml ()

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

Protected Methods

protected void writeJsonAttributes (JSONStringer out)

Parameters
out
Throws
JSONException