Exemplo n.º 1
0
 @Override
 public void setProportion(float proportion) {
   int width = myTabs.getWidth();
   if (myTabs.getTabsPosition() == JBTabsPosition.left) {
     setSideTabsLimit((int) Math.max(JBTabsImpl.MIN_TAB_WIDTH, proportion * width));
   } else if (myTabs.getTabsPosition() == JBTabsPosition.right) {
     setSideTabsLimit(width - (int) Math.max(JBTabsImpl.MIN_TAB_WIDTH, proportion * width));
   }
 }
Exemplo n.º 2
0
 @Override
 public float getMinProportion(boolean first) {
   return Math.min(.5F, (float) JBTabsImpl.MIN_TAB_WIDTH / Math.max(1, myTabs.getWidth()));
 }