|
|
@ -166,7 +166,6 @@ public class XWCardTagLayout extends XWHorizontalBoxLayout { |
|
|
|
comp.setBackupParent(this); |
|
|
|
comp.setBackupParent(this); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// setTabsAndAdjust();
|
|
|
|
|
|
|
|
isRefreshing = false; |
|
|
|
isRefreshing = false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -359,16 +358,13 @@ public class XWCardTagLayout extends XWHorizontalBoxLayout { |
|
|
|
int tabPaneSize = parent.getHeight(); |
|
|
|
int tabPaneSize = parent.getHeight(); |
|
|
|
//调整XWCardTagLayout的高度
|
|
|
|
//调整XWCardTagLayout的高度
|
|
|
|
int tempX = 0; |
|
|
|
int tempX = 0; |
|
|
|
// int maxHeight = DEFAULT_BUTTON_HEIGHT;
|
|
|
|
|
|
|
|
for (int i = 0; i < tabLength; i++) { |
|
|
|
for (int i = 0; i < tabLength; i++) { |
|
|
|
|
|
|
|
|
|
|
|
Rectangle rectangle = this.getComponent(i).getBounds(); |
|
|
|
Rectangle rectangle = this.getComponent(i).getBounds(); |
|
|
|
Integer cardWidth = width.get(i) + WIDTH_SIDE_OFFSET; |
|
|
|
Integer cardWidth = width.get(i) + WIDTH_SIDE_OFFSET; |
|
|
|
Integer cardHeight = tabPaneSize; |
|
|
|
Integer cardHeight = tabPaneSize; |
|
|
|
if(cardHeight < DEFAULT_BUTTON_HEIGHT){ |
|
|
|
if(cardHeight < DEFAULT_BUTTON_HEIGHT){ |
|
|
|
cardHeight = DEFAULT_BUTTON_HEIGHT; |
|
|
|
cardHeight = DEFAULT_BUTTON_HEIGHT; |
|
|
|
} |
|
|
|
} |
|
|
|
// maxHeight = maxHeight > cardHeight ? maxHeight : cardHeight ;
|
|
|
|
|
|
|
|
rectangle.setBounds(tempX, 0, cardWidth, cardHeight); |
|
|
|
rectangle.setBounds(tempX, 0, cardWidth, cardHeight); |
|
|
|
tempX += cardWidth; |
|
|
|
tempX += cardWidth; |
|
|
|
XCardSwitchButton temp = (XCardSwitchButton) this.getComponent(i); |
|
|
|
XCardSwitchButton temp = (XCardSwitchButton) this.getComponent(i); |
|
|
@ -405,11 +401,9 @@ public class XWCardTagLayout extends XWHorizontalBoxLayout { |
|
|
|
XLayoutContainer parent = this.getBackupParent(); |
|
|
|
XLayoutContainer parent = this.getBackupParent(); |
|
|
|
int tabPaneSize = parent.getWidth(); |
|
|
|
int tabPaneSize = parent.getWidth(); |
|
|
|
int tempY = 0; |
|
|
|
int tempY = 0; |
|
|
|
// int maxWidth = DEFAULT_BUTTON_HEIGHT;
|
|
|
|
|
|
|
|
for (int i = 0; i < tabLength; i++) { |
|
|
|
for (int i = 0; i < tabLength; i++) { |
|
|
|
Rectangle rectangle = this.getComponent(i).getBounds(); |
|
|
|
Rectangle rectangle = this.getComponent(i).getBounds(); |
|
|
|
Integer cardWidth = tabPaneSize; |
|
|
|
Integer cardWidth = tabPaneSize; |
|
|
|
// maxWidth = maxWidth > cardWidth ? maxWidth : cardWidth;
|
|
|
|
|
|
|
|
//先用这边的固定高度
|
|
|
|
//先用这边的固定高度
|
|
|
|
Integer cardHeight = height.get(i) + HEIGHT_SIDE_OFFSET; |
|
|
|
Integer cardHeight = height.get(i) + HEIGHT_SIDE_OFFSET; |
|
|
|
|
|
|
|
|
|
|
|