protected Tab add( Tab tab ) { tab.setPos( tabs.size() == 0 ? -chrome.marginLeft() + 1 : tabs.get( tabs.size() - 1 ).right(), height ); tab.select( false ); super.add( tab ); tabs.add( tab ); return tab; }
protected Tab add( Tab tab ) { tab.setPos( tabs.size() == 0 ? -chrome.marginLeft() + 1 : tabs.get( tabs.size() - 1 ).right(), height ); tab.select( false ); super.add( tab ); tabs.add( tab ); return tab; }
protected Tab add( Tab tab ) { tab.setPos( tabs.size() == 0 ? -chrome.marginLeft() + 1 : tabs.get( tabs.size() - 1 ).right(), height ); tab.select( false ); super.add( tab ); tabs.add( tab ); return tab; }
public void layoutTabs(){ //subract two as there's extra horizontal space for those nobs on the top. int fullWidth = width+chrome.marginHor()-2; int numTabs = tabs.size(); if (numTabs == 0) return; if (numTabs == 1) { tabs.get(0).setSize(fullWidth, tabHeight()); return; } int spaces = numTabs-1; int spacing = -1; while (spacing == -1) { for (int i = 0; i <= 3; i++){ if ((fullWidth - i*(spaces)) % numTabs == 0) { spacing = i; break; } } if (spacing == -1) fullWidth--; } int tabWidth = (fullWidth - spacing*(numTabs-1)) / numTabs; for (int i = 0; i < tabs.size(); i++){ tabs.get(i).setSize(tabWidth, tabHeight()); tabs.get(i).setPos( i == 0 ? -chrome.marginLeft() + 1 : tabs.get( i - 1 ).right() + spacing, height ); } }
public void layoutTabs(){ //subract two as there's extra horizontal space for those nobs on the top. int fullWidth = width+chrome.marginHor()-2; int numTabs = tabs.size(); if (numTabs == 0) return; if (numTabs == 1) { tabs.get(0).setSize(fullWidth, tabHeight()); return; } int spaces = numTabs-1; int spacing = -1; while (spacing == -1) { for (int i = 0; i <= 3; i++){ if ((fullWidth - i*(spaces)) % numTabs == 0) { spacing = i; break; } } if (spacing == -1) fullWidth--; } int tabWidth = (fullWidth - spacing*(numTabs-1)) / numTabs; for (int i = 0; i < tabs.size(); i++){ tabs.get(i).setSize(tabWidth, tabHeight()); tabs.get(i).setPos( i == 0 ? -chrome.marginLeft() + 1 : tabs.get( i - 1 ).right() + spacing, height ); } }
@Override protected void layout() { panel.x = this.x; panel.y = this.y; panel.alpha(alpha); panel.visible = updateAvailable || !quiet; updateMessage.x = panel.x+panel.marginLeft(); updateMessage.y = panel.y+panel.marginTop(); updateMessage.measure(); updateMessage.alpha(alpha); updateMessage.visible = updateAvailable || !quiet; panel.size( panel.marginHor()+updateMessage.width(), panel.marginVer()+updateMessage.height()-1); this.width = panel.width(); this.height = panel.height(); }
add( shadow ); chrome.x = -chrome.marginLeft(); chrome.y = -chrome.marginTop(); chrome.size(
add( shadow ); chrome.x = -chrome.marginLeft(); chrome.y = -chrome.marginTop(); chrome.size(
add( shadow ); chrome.x = -chrome.marginLeft(); chrome.y = -chrome.marginTop(); chrome.size(
panel.x + panel.marginLeft(), panel.y + panel.marginTop(), panel.innerWidth(),
int pw = 135 + panel.marginLeft() + panel.marginRight() - 2; int ph = h - 16; panel.x + panel.marginLeft(), panel.y + panel.marginTop() - 1, panel.innerWidth(),
int pw = 135 + panel.marginLeft() + panel.marginRight() - 2; int ph = h - 16; panel.x + panel.marginLeft(), panel.y + panel.marginTop() - 1, panel.innerWidth(),