|
|
|
@ -21,7 +21,9 @@ import com.fr.design.mainframe.EditingMouseListener;
|
|
|
|
|
import com.fr.design.mainframe.FormDesigner; |
|
|
|
|
import com.fr.design.mainframe.WidgetPropertyPane; |
|
|
|
|
import com.fr.form.ui.CardSwitchButton; |
|
|
|
|
import com.fr.form.ui.LayoutBorderStyle; |
|
|
|
|
import com.fr.form.ui.Widget; |
|
|
|
|
import com.fr.form.ui.WidgetTitle; |
|
|
|
|
import com.fr.form.ui.container.WCardLayout; |
|
|
|
|
import com.fr.form.ui.container.WTabDisplayPosition; |
|
|
|
|
import com.fr.form.ui.container.cardlayout.WCardTagLayout; |
|
|
|
@ -55,7 +57,7 @@ public class XWCardTagLayout extends XWHorizontalBoxLayout {
|
|
|
|
|
|
|
|
|
|
private static final int HEIGHT_SIDE_OFFSET = 20; |
|
|
|
|
|
|
|
|
|
private static final int DEFAULT_BUTTON_HEIGHT = 40; |
|
|
|
|
private static final int DEFAULT_VERTICAL_SPACING = 3; |
|
|
|
|
|
|
|
|
|
public static final String DEFAULT_NAME = "tabpane"; |
|
|
|
|
|
|
|
|
@ -333,7 +335,12 @@ public class XWCardTagLayout extends XWHorizontalBoxLayout {
|
|
|
|
|
XCardSwitchButton temp = (XCardSwitchButton) this.getComponent(i); |
|
|
|
|
CardSwitchButton tempCard = (CardSwitchButton) temp.toData(); |
|
|
|
|
String tempText = tempCard.getText(); |
|
|
|
|
Font f = tempCard.getFont(); |
|
|
|
|
if (this.cardLayout == null) { |
|
|
|
|
initCardLayout(); |
|
|
|
|
} |
|
|
|
|
LayoutBorderStyle borderStyle = this.cardLayout.toData().getBorderStyle(); |
|
|
|
|
WidgetTitle title = borderStyle.getTitle(); |
|
|
|
|
FRFont f = title.getFrFont(); |
|
|
|
|
FontMetrics fm = GraphHelper.getFontMetrics(f); |
|
|
|
|
|
|
|
|
|
switch (wCardTagLayout.getTextDirection()) { |
|
|
|
@ -349,7 +356,7 @@ public class XWCardTagLayout extends XWHorizontalBoxLayout {
|
|
|
|
|
} else { |
|
|
|
|
cardWidth.put(i, 0); |
|
|
|
|
} |
|
|
|
|
cardHeight.put(i,(perHeight+3)*wordCount); |
|
|
|
|
cardHeight.put(i, (perHeight + DEFAULT_VERTICAL_SPACING) * wordCount); |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
break; |
|
|
|
|