You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.5 KiB
48 lines
1.5 KiB
package com.fr.design.widgettheme; |
|
|
|
import com.fr.design.widgettheme.common.TreeEditorSettingPane; |
|
import com.fr.form.ui.TreeEditor; |
|
import com.fr.widgettheme.theme.widget.style.ThemeTextStyle; |
|
import com.fr.widgettheme.theme.widget.theme.ParaTreeTheme; |
|
import com.fr.widgettheme.theme.widget.theme.cell.TreeTheme; |
|
|
|
import java.util.Arrays; |
|
|
|
/** |
|
* 参数面板:设计器控件属性的“高级”设置增加主题样式设置项,包括: |
|
* 视图树 |
|
* |
|
* @author Bruce.Deng |
|
* @since 11.0 |
|
* Created on 2023/2/28 |
|
*/ |
|
public class ParaTreeEditorSettingPane<T extends TreeEditor> extends TreeEditorSettingPane<T> { |
|
|
|
public ParaTreeEditorSettingPane() { |
|
super(Arrays.asList( |
|
StyleSetting.THEME_COLOR, |
|
StyleSetting.STYLE_TYPE, |
|
StyleSetting.TEXT_STYLE |
|
)); |
|
} |
|
|
|
@Override |
|
protected TreeTheme getTreeTheme() { |
|
return new ParaTreeTheme(); |
|
} |
|
|
|
@Override |
|
protected void assignFontSizePane(TreeTheme widgetTheme) { |
|
ThemeTextStyle textStyle = widgetTheme.getTextStyle(); |
|
fontSizePane.setValue(textStyle.getFontSize()); |
|
fontColorButton.setColor(textStyle.getFontColor()); |
|
} |
|
|
|
@Override |
|
protected void assignFontSizeStyle(TreeTheme widgetTheme) { |
|
ThemeTextStyle textStyle = new ThemeTextStyle(); |
|
textStyle.setFontSize(fontSizePane.getValue()); |
|
textStyle.setFontColor(fontColorButton.getColor()); |
|
widgetTheme.setTextStyle(textStyle); |
|
} |
|
}
|
|
|