Browse Source

抽常量、改命名,补充一个下拉框主题刷新类

feature/x
obo 12 months ago
parent
commit
2409d627dc
  1. 18
      designer-base/src/main/java/com/fr/widgettheme/theme/panel/WidgetTextStylePane.java
  2. 4
      designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java
  3. 1
      designer-form/src/main/java/com/fr/design/widgettheme/ParaButtonSettingPane.java

18
designer-base/src/main/java/com/fr/widgettheme/theme/panel/WidgetTextStylePane.java

@ -2,7 +2,7 @@ package com.fr.widgettheme.theme.panel;
import com.fr.design.gui.ibutton.UIColorButton; import com.fr.design.gui.ibutton.UIColorButton;
import com.fr.design.gui.frpane.FontSizeComboPane; import com.fr.design.gui.frpane.FontSizeComboPane;
import com.fr.widgettheme.theme.widget.style.TextStyle; import com.fr.widgettheme.theme.widget.style.ThemeTextStyle;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -39,16 +39,16 @@ public class WidgetTextStylePane extends JPanel {
this.add(fontColorButton); this.add(fontColorButton);
} }
public void setTextStyle(TextStyle textStyle) { public void setTextStyle(ThemeTextStyle themeTextStyle) {
this.fontSizePane.setValue(textStyle.getFontSize()); this.fontSizePane.setValue(themeTextStyle.getFontSize());
this.fontColorButton.setColor(textStyle.getFontColor()); this.fontColorButton.setColor(themeTextStyle.getFontColor());
} }
public TextStyle getTextStyle() { public ThemeTextStyle getTextStyle() {
TextStyle textStyle = new TextStyle(); ThemeTextStyle themeTextStyle = new ThemeTextStyle();
textStyle.setFontSize(this.fontSizePane.getValue()); themeTextStyle.setFontSize(this.fontSizePane.getValue());
textStyle.setFontColor(this.fontColorButton.getColor()); themeTextStyle.setFontColor(this.fontColorButton.getColor());
return textStyle; return themeTextStyle;
} }
public void setFontSizeValue(int fontSize) { public void setFontSizeValue(int fontSize) {

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

@ -3,7 +3,7 @@ package com.fr.design.widgettheme;
import com.fr.base.theme.TemplateTheme; import com.fr.base.theme.TemplateTheme;
import com.fr.widgettheme.theme.panel.WidgetTextStylePane; import com.fr.widgettheme.theme.panel.WidgetTextStylePane;
import com.fr.widgettheme.theme.widget.style.BorderStyle; import com.fr.widgettheme.theme.widget.style.BorderStyle;
import com.fr.widgettheme.theme.widget.style.TextStyle; import com.fr.widgettheme.theme.widget.style.ThemeTextStyle;
import com.fr.widgettheme.theme.widget.style.ThemedWidgetStyle; import com.fr.widgettheme.theme.widget.style.ThemedWidgetStyle;
import com.fr.widgettheme.theme.bean.ButtonBackground; import com.fr.widgettheme.theme.bean.ButtonBackground;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
@ -270,7 +270,7 @@ public abstract class BaseStyleSettingPane<T extends Widget> extends BasicBeanPa
borderRadiusSpinner.setValue(BorderStyle.DEFAULT_BORDER_RADIUS); borderRadiusSpinner.setValue(BorderStyle.DEFAULT_BORDER_RADIUS);
} }
if (textStylePane != null) { if (textStylePane != null) {
textStylePane.setTextStyle(new TextStyle()); textStylePane.setTextStyle(new ThemeTextStyle());
} }
if (frFontPane != null) { if (frFontPane != null) {
frFontPane.populateBean(FRFont.getInstance()); frFontPane.populateBean(FRFont.getInstance());

1
designer-form/src/main/java/com/fr/design/widgettheme/ParaButtonSettingPane.java

@ -2,7 +2,6 @@ package com.fr.design.widgettheme;
import com.fr.design.widgettheme.common.ButtonSettingPane; import com.fr.design.widgettheme.common.ButtonSettingPane;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
import com.fr.widgettheme.theme.widget.style.TextStyle;
import com.fr.widgettheme.theme.widget.theme.ParaButtonTheme; import com.fr.widgettheme.theme.widget.theme.ParaButtonTheme;
import com.fr.widgettheme.theme.widget.theme.cell.ButtonTheme; import com.fr.widgettheme.theme.widget.theme.cell.ButtonTheme;

Loading…
Cancel
Save