assertNoErrors(panel);
assertHierarchy(
"{this: test.client.RowPanel} {this} {}",
" {implicit-layout: com.gwtext.client.widgets.layout.RowLayout} {implicit-layout} {}");
assertTrue(panel.hasLayout());
LayoutInfo layout = panel.getLayout();
// check association
assertInstanceOf(ImplicitObjectAssociation.class, layout.getAssociation());
// check creation support
{
ImplicitLayoutCreationSupport creationSupport =
(ImplicitLayoutCreationSupport) layout.getCreationSupport();
assertEquals(panel.getCreationSupport().getNode(), creationSupport.getNode());
assertEquals(
"implicit-layout: com.gwtext.client.widgets.layout.RowLayout",
creationSupport.toString());
// validation
assertFalse(creationSupport.canReorder());
assertFalse(creationSupport.canReparent());
// no clipboard
assertNull(creationSupport.getImplicitClipboard());
}
// check variable
{
ImplicitLayoutVariableSupport variableSupport =
(ImplicitLayoutVariableSupport) layout.getVariableSupport();
assertTrue(variableSupport.isDefault());
assertEquals("implicit-layout", variableSupport.toString());
assertEquals("(implicit layout)", variableSupport.getTitle());
// name
assertFalse(variableSupport.hasName());
try {
variableSupport.getName();
fail();
} catch (IllegalStateException e) {
}
try {
variableSupport.setName("foo");
fail();
} catch (IllegalStateException e) {
}
// conversion
assertFalse(variableSupport.canConvertLocalToField());
try {
variableSupport.convertLocalToField();
fail();
} catch (IllegalStateException e) {
}
assertFalse(variableSupport.canConvertFieldToLocal());
try {
variableSupport.convertFieldToLocal();
fail();
} catch (IllegalStateException e) {
}
}
// check association
assertInstanceOf(ImplicitObjectAssociation.class, layout.getAssociation());
}