new Rectangle(insets.left, barThickness + insets.right, tabSetBounds.width
- insets.getWidth(), tabSetBounds.height - barThickness - insets.getHeight()));
}
public void test_tabBounds_left() throws Exception {
CanvasInfo canvas =
parseJavaInfo(new String[]{
"public class Test implements EntryPoint {",
" public void onModuleLoad() {",
" Canvas canvas = new Canvas();",
" TabSet tabSet = new TabSet();",
" tabSet.setTabBarPosition(Side.LEFT);",
" tabSet.addTab(new Tab('Tab_1'));",
" canvas.addChild(tabSet);",
" tabSet.moveTo(30, 20);",
" canvas.draw();",
" }",
"}"});
canvas.refresh();
//
TabSetInfo tabSet = canvas.getChildren(TabSetInfo.class).get(0);
// check bounds
Insets insets = tabSet.getTabInsets();
int barThickness = tabSet.getTabBarThickness();
TabInfo selectedTab = tabSet.getSelectedTab();
Rectangle tabSetBounds = tabSet.getModelBounds();