"}");
frame.refresh();
HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
WidgetInfo button = panel.getChildrenWidgets().get(0);
//
Property property = PropertyUtils.getByPath(button, "Cell/verticalAlignment");
// current value
assertTrue(property.isModified());
assertEquals(RowInfo.Alignment.BOTTOM, property.getValue());
// set "center"
property.setValue(RowInfo.Alignment.MIDDLE);
assertEditor(
"public class Test implements EntryPoint {",
" public void onModuleLoad() {",
" RootPanel rootPanel = RootPanel.get();",
" FlexTable panel = new FlexTable();",
" rootPanel.add(panel);",
" panel.setWidget(0, 0, new Button());",
" panel.getCellFormatter().setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_MIDDLE);",
" }",
"}");
// set "unknown", so remove
property.setValue(RowInfo.Alignment.UNKNOWN);
assertEditor(
"public class Test implements EntryPoint {",
" public void onModuleLoad() {",
" RootPanel rootPanel = RootPanel.get();",
" FlexTable panel = new FlexTable();",
" rootPanel.add(panel);",
" panel.setWidget(0, 0, new Button());",
" }",
"}");
// set "middle", so add
property.setValue(RowInfo.Alignment.MIDDLE);
assertEditor(
"public class Test implements EntryPoint {",
" public void onModuleLoad() {",
" RootPanel rootPanel = RootPanel.get();",
" FlexTable panel = new FlexTable();",
" rootPanel.add(panel);",
" panel.setWidget(0, 0, new Button());",
" panel.getCellFormatter().setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_MIDDLE);",
" }",
"}");
// set Property.UNKNOWN_VALUE, so remove
property.setValue(Property.UNKNOWN_VALUE);
assertEditor(
"public class Test implements EntryPoint {",
" public void onModuleLoad() {",
" RootPanel rootPanel = RootPanel.get();",
" FlexTable panel = new FlexTable();",