|
|
@ -28,12 +28,6 @@ public class DesktopWidgetStyleEditPane<T extends TemplateTheme> extends WidgetS |
|
|
|
protected UIRadioButton style1; |
|
|
|
protected UIRadioButton style1; |
|
|
|
// 风格2
|
|
|
|
// 风格2
|
|
|
|
protected UIRadioButton style2; |
|
|
|
protected UIRadioButton style2; |
|
|
|
// 控件深浅主题 自动
|
|
|
|
|
|
|
|
protected UIRadioButton widgetThemeAuto; |
|
|
|
|
|
|
|
// 控件深浅主题 深色
|
|
|
|
|
|
|
|
protected UIRadioButton widgetThemeDark; |
|
|
|
|
|
|
|
// 控件深浅主题 浅色
|
|
|
|
|
|
|
|
protected UIRadioButton widgetThemeLight; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public DesktopWidgetStyleEditPane() { |
|
|
|
public DesktopWidgetStyleEditPane() { |
|
|
|
super(); |
|
|
|
super(); |
|
|
@ -47,17 +41,12 @@ public class DesktopWidgetStyleEditPane<T extends TemplateTheme> extends WidgetS |
|
|
|
stylePane.add(style1); |
|
|
|
stylePane.add(style1); |
|
|
|
stylePane.add(style2); |
|
|
|
stylePane.add(style2); |
|
|
|
|
|
|
|
|
|
|
|
JPanel widgetThemePane = new JPanel(FRGUIPaneFactory.createBoxFlowLayout()); |
|
|
|
|
|
|
|
widgetThemePane.add(widgetThemeAuto); |
|
|
|
|
|
|
|
widgetThemePane.add(widgetThemeDark); |
|
|
|
|
|
|
|
widgetThemePane.add(widgetThemeLight); |
|
|
|
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Color")), colorSelectBox}, |
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Color")), colorSelectBox}, |
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Style")), stylePane}, |
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Style")), stylePane}, |
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Border_Line")), lineComboBox}, |
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Border_Line")), lineComboBox}, |
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Border_Radius")), borderRadiusSpinner}, |
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Border_Radius")), borderRadiusSpinner}, |
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Font_Size")), fontSizeComoBox}, |
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Font_Size")), fontSizeComoBox} |
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Theme_Widget_Theme")), widgetThemePane}, |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
return components; |
|
|
|
return components; |
|
|
|
} |
|
|
|
} |
|
|
@ -69,14 +58,6 @@ public class DesktopWidgetStyleEditPane<T extends TemplateTheme> extends WidgetS |
|
|
|
ButtonGroup buttonGroup = new ButtonGroup(); |
|
|
|
ButtonGroup buttonGroup = new ButtonGroup(); |
|
|
|
buttonGroup.add(style1); |
|
|
|
buttonGroup.add(style1); |
|
|
|
buttonGroup.add(style2); |
|
|
|
buttonGroup.add(style2); |
|
|
|
|
|
|
|
|
|
|
|
widgetThemeAuto = new UIRadioButton(Toolkit.i18nText("Fine-Design_Theme_Widget_Theme_Auto")); |
|
|
|
|
|
|
|
widgetThemeDark = new UIRadioButton(Toolkit.i18nText("Fine-Design_Widget_Theme_Dark")); |
|
|
|
|
|
|
|
widgetThemeLight = new UIRadioButton(Toolkit.i18nText("Fine-Design_Theme_Widget_Theme_Light")); |
|
|
|
|
|
|
|
ButtonGroup widgetThemeGroup = new ButtonGroup(); |
|
|
|
|
|
|
|
widgetThemeGroup.add(widgetThemeAuto); |
|
|
|
|
|
|
|
widgetThemeGroup.add(widgetThemeDark); |
|
|
|
|
|
|
|
widgetThemeGroup.add(widgetThemeLight); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -91,17 +72,6 @@ public class DesktopWidgetStyleEditPane<T extends TemplateTheme> extends WidgetS |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
style2.setSelected(true); |
|
|
|
style2.setSelected(true); |
|
|
|
} |
|
|
|
} |
|
|
|
switch (style.getWidgetThemeType()) { |
|
|
|
|
|
|
|
case 1: |
|
|
|
|
|
|
|
widgetThemeDark.setSelected(true); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case 2: |
|
|
|
|
|
|
|
widgetThemeLight.setSelected(true); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
default: |
|
|
|
|
|
|
|
widgetThemeAuto.setSelected(true); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
colorSelectBox.setSelectObject(style.getThemeColor()); |
|
|
|
colorSelectBox.setSelectObject(style.getThemeColor()); |
|
|
|
lineComboBox.setSelectedLineStyle(style.getBorderStyle().getLineType()); |
|
|
|
lineComboBox.setSelectedLineStyle(style.getBorderStyle().getLineType()); |
|
|
|
borderRadiusSpinner.setValue(style.getBorderStyle().getRadius()); |
|
|
|
borderRadiusSpinner.setValue(style.getBorderStyle().getRadius()); |
|
|
@ -131,6 +101,5 @@ public class DesktopWidgetStyleEditPane<T extends TemplateTheme> extends WidgetS |
|
|
|
buttonBackgroundStyle.setClickBackground(buttonBackground); |
|
|
|
buttonBackgroundStyle.setClickBackground(buttonBackground); |
|
|
|
style.setButtonBackgroundStyle(buttonBackgroundStyle); |
|
|
|
style.setButtonBackgroundStyle(buttonBackgroundStyle); |
|
|
|
style.setStyleType(style1.isSelected() ? 1 : 2); |
|
|
|
style.setStyleType(style1.isSelected() ? 1 : 2); |
|
|
|
style.setWidgetThemeType(widgetThemeAuto.isSelected() ? 0 : widgetThemeDark.isSelected() ? 1 : 2); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |