str,
reader.readInteger(0),
reader.readInteger(0));
} else {
// TableLayout
return new TableLayout(str,
reader.readString(""),
reader.readInteger(0),
reader.readInteger(0));
}
} else {
reader.revert();
// Try if there's an array now:
Object[] array = reader.readObject(Object[].class);
if (array != null) {
// TableLayout
return new TableLayout(array,
reader.readObject(Object[].class),
reader.readInteger(0),
reader.readInteger(0));
} else {
reader.revert();
// BorderLayout
return new BorderLayout(
reader.readInteger(0),
reader.readInteger(0));
}
}
} else if (reader.isMap()) {
if (reader.has("columns")) {
// TableLayout
String str = reader.readString("columns");
if (str != null) {
return new TableLayout( str,
reader.readString("rows", ""),
reader.readInteger("", 0),
reader.readInteger(0));
} else {
Object[] array = reader.readObject("columns",
Object[].class);
if (array != null) {
return new TableLayout(array,
reader.readObject("rows", Object[].class),
reader.readInteger("hgap", 0),
reader.readInteger("vgap", 0));
} else {
throw new RuntimeException(