@Override
public void onClientData(final JSONObject event) throws JSONException {
final String handler = event.getString(HANDLER.KEY);
if (HANDLER.KEY_.RESIZE_HANDLER.equals(handler)) {
final PLayoutResizeEvent resizeEvent = new PLayoutResizeEvent(this);
final JSONArray array = event.getJSONArray(PROPERTY.VALUE);
for (int i = 0; i < array.length(); i++) {
final JSONObject ws = array.getJSONObject(i);
final long objectID = ws.getLong(PROPERTY.OBJECT_ID);
final PWidget w = getChild(objectID);
if (w != null) {
final double widgetSize = ws.getDouble(PROPERTY.SIZE);
resizeEvent.addLayoutResizeData(new LayoutResizeData(w, widgetSize));
}
}
fireLayoutResize(resizeEvent);
} else {
super.onClientData(event);