Browse Source

REPORT-111619 控件基础面板的字体名面板初始化

release/11.0
obo 10 months ago
parent
commit
b269562fa7
  1. 11
      designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java

11
designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java

@ -7,6 +7,7 @@ import com.fr.design.gui.frpane.UIPercentDragPane;
import com.fr.design.gui.ibutton.UIColorButton;
import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.utils.DesignUtils;
import com.fr.general.IOUtils;
import com.fr.util.ColorUtils;
import com.fr.widgettheme.theme.widget.style.BorderStyle;
@ -136,6 +137,7 @@ public abstract class BaseStyleSettingPane<T extends Widget> extends BasicBeanPa
buttonStyleDefinedPane = new ButtonStyleDefinedPane();
selectBgColorBox = new NewColorSelectBox(WidgetThemeDisplayConstants.THEME_WIDGET_COMPONENT_WIDTH, true);
iconColorSelectBox = new NewColorSelectBox(WidgetThemeDisplayConstants.THEME_WIDGET_COMPONENT_WIDTH, true);
fontNameSelectBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report());
fontSizePane = new FontSizeComboPane();
fontColorButton = new UIColorButton();
bold = new UIToggleButton(IOUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png"));
@ -268,6 +270,15 @@ public abstract class BaseStyleSettingPane<T extends Widget> extends BasicBeanPa
if (fontColorButton != null) {
this.fontColorButton.setColor(textStyle.getFontColor());
}
if (bold != null) {
this.bold.setSelected(textStyle.isBold());
}
if (italic != null) {
this.italic.setSelected(textStyle.isItalic());
}
if (fontNameSelectBox != null) {
this.fontNameSelectBox.setSelectedItem(textStyle.getName());
}
}
private void setFrFontPane(FRFont font) {

Loading…
Cancel
Save