Browse Source

Merge pull request #804 in BA/design from ~ZHENG/design:dev to dev

* commit '8500d81bb5909bc3fd2eadbabc0b5621a385fb80':
  font==null 也要注册监听器
master
superman 8 years ago
parent
commit
e0849e8a22
  1. 22
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java

22
designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java

@ -77,17 +77,17 @@ public class ChartTextAttrPane extends BasicPane {
public void populate(FRFont frFont) {
UIObserverListener listener = fontNameComboBox == null ? null : fontNameComboBox.getUiObserverListener();
removeAllComboBoxListener();
if (frFont == null) {
return;
}
fontNameComboBox.setSelectedItem(frFont.getFamily());
bold.setSelected(frFont.isBold());
italic.setSelected(frFont.isItalic());
if(fontSizeComboBox != null) {
fontSizeComboBox.setSelectedItem(frFont.getSize());
}
if (fontColor != null) {
fontColor.setColor(frFont.getForeground());
if (frFont != null) {
fontNameComboBox.setSelectedItem(frFont.getFamily());
bold.setSelected(frFont.isBold());
italic.setSelected(frFont.isItalic());
if(fontSizeComboBox != null) {
fontSizeComboBox.setSelectedItem(frFont.getSize());
}
if (fontColor != null) {
fontColor.setColor(frFont.getForeground());
}
}
//更新结束后,注册监听器

Loading…
Cancel
Save