Browse Source

调整

master
PanLi320 8 years ago
parent
commit
16a0924d53
  1. 3
      designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java

3
designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java

@ -11,6 +11,7 @@ import java.util.*;
import javax.swing.*; import javax.swing.*;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.GraphHelper;
import com.fr.base.background.ColorBackground; import com.fr.base.background.ColorBackground;
import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.AdapterBus;
import com.fr.design.designer.beans.ComponentAdapter; import com.fr.design.designer.beans.ComponentAdapter;
@ -353,7 +354,7 @@ public class XCardSwitchButton extends XButton {
CardSwitchButton tempCard = (CardSwitchButton) temp.toData(); CardSwitchButton tempCard = (CardSwitchButton) temp.toData();
String tempText = tempCard.getText(); String tempText = tempCard.getText();
Font f = ((CardSwitchButton)this.toData()).getFont(); Font f = ((CardSwitchButton)this.toData()).getFont();
FontMetrics fm = Toolkit.getDefaultToolkit().getFontMetrics(f); FontMetrics fm = GraphHelper.getFontMetrics(f);
cardWidth.put(i,fm.stringWidth(tempText)); cardWidth.put(i,fm.stringWidth(tempText));
cardHeight.put(i,fm.getHeight()); cardHeight.put(i,fm.getHeight());
} }

Loading…
Cancel
Save