MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / setTabsLayout

Method setTabsLayout

CodenameOne/src/com/codename1/ui/Tabs.java:1576–1600  ·  view source on GitHub ↗
(int tabPlacement)

Source from the content-addressed store, hash-verified

1574 }
1575
1576 private void setTabsLayout(int tabPlacement) {
1577 if (tabPlacement == TOP || tabPlacement == BOTTOM) {
1578 if (tabsFillRows) {
1579 FlowLayout f = new FlowLayout();
1580 f.setFillRows(true);
1581 tabsContainer.setLayout(f);
1582 } else {
1583 if (tabsGridLayout) {
1584 tabsContainer.setLayout(new GridLayout(1, Math.max(1, getTabCount())));
1585 } else {
1586 tabsContainer.setLayout(new BoxLayout(BoxLayout.X_AXIS));
1587 }
1588 }
1589 tabsContainer.setScrollableX(true);
1590 tabsContainer.setScrollableY(false);
1591 } else { // LEFT Or RIGHT
1592 if (tabsGridLayout) {
1593 tabsContainer.setLayout(new GridLayout(Math.max(1, getTabCount()), 1));
1594 } else {
1595 tabsContainer.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
1596 }
1597 tabsContainer.setScrollableX(false);
1598 tabsContainer.setScrollableY(true);
1599 }
1600 }
1601
1602 /// The UIID for a tab component which defaults to Tab
1603 ///

Callers 3

insertTabMethod · 0.95
removeTabAtMethod · 0.95
setTabPlacementMethod · 0.95

Calls 6

setFillRowsMethod · 0.95
maxMethod · 0.95
getTabCountMethod · 0.95
setLayoutMethod · 0.45
setScrollableXMethod · 0.45
setScrollableYMethod · 0.45

Tested by

no test coverage detected