Browse Source

Merge remote-tracking branch 'origin/release/11.0' into release/11.0

release/11.0
Destiny.Lin 7 months ago
parent
commit
f5c1a2ba26
  1. 14
      designer-base/src/main/java/com/fr/design/utils/gui/AdjustWorkBookDefaultStyleUtils.java
  2. 9
      designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/DesktopWidgetStyleEditPane.java
  3. 2
      designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/WidgetStyleEditPane.java
  4. 2
      designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java
  5. 16
      designer-form/src/main/java/com/fr/design/widgettheme/processor/WidgetThemeCreatorPaneAdder.java
  6. 7
      designer-realize/src/main/java/com/fr/design/present/PresentPane.java

14
designer-base/src/main/java/com/fr/design/utils/gui/AdjustWorkBookDefaultStyleUtils.java

@ -18,13 +18,23 @@ public class AdjustWorkBookDefaultStyleUtils {
private static final Color TEMPLATE_BACKGROUND = new Color(16, 11, 43);
private static final Color CELL_ELEMENT_BORDER = new Color(110, 110, 110);
private static final Color CELL_ELEMENT_FONT_FOREGROUND = Color.WHITE;
private static final Color CELL_ELEMENT_FONT_FOREGROUND_4_LIGHT_THEME = Color.BLACK;
private static Color currentStoryBack = null;
private static boolean isDarkTheme = true;
public static void setCurrentStoryBack(Color color) {
currentStoryBack = color;
}
public static void setIsDarkTheme(boolean isDarkTheme) {
AdjustWorkBookDefaultStyleUtils.isDarkTheme = isDarkTheme;
}
private static Color getCellForegroundColor() {
return isDarkTheme ? CELL_ELEMENT_FONT_FOREGROUND : CELL_ELEMENT_FONT_FOREGROUND_4_LIGHT_THEME;
}
private static Color getCurrentStoryBack() {
return currentStoryBack == null ? TEMPLATE_BACKGROUND : currentStoryBack;
}
@ -39,7 +49,7 @@ public class AdjustWorkBookDefaultStyleUtils {
public static Style adjustCellElement(Style style) {
if (DesignModeContext.isDuchampMode()) {
style = style.deriveFRFont(style.getFRFont().applyForeground(CELL_ELEMENT_FONT_FOREGROUND));
style = style.deriveFRFont(style.getFRFont().applyForeground(getCellForegroundColor()));
style = style.deriveBorder(0, CELL_ELEMENT_BORDER,
0, CELL_ELEMENT_BORDER,
0, CELL_ELEMENT_BORDER,
@ -49,7 +59,7 @@ public class AdjustWorkBookDefaultStyleUtils {
}
public static Color adjustCellElementFontForeground(Color color) {
return DesignModeContext.isDuchampMode() ? CELL_ELEMENT_FONT_FOREGROUND : color;
return DesignModeContext.isDuchampMode() ? getCellForegroundColor() : color;
}
public static void adjustFloatElement(FloatElement floatElement) {

9
designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/DesktopWidgetStyleEditPane.java

@ -9,6 +9,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.style.color.NewColorSelectBox;
import com.fr.design.utils.DesignUtils;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.locale.InterProviderFactory;
import com.fr.stable.StringUtils;
import com.fr.util.ColorUtils;
@ -55,7 +56,8 @@ public class DesktopWidgetStyleEditPane<T extends TemplateTheme> extends WidgetS
initSelectBackgroundColorBox();
initFontNameSelectBox();
return new Component[][]{
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Color")), colorSelectBox}, new Component[]{WidgetThemeDesignerUtils.createTopAlignmentLabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Widget_Background")), initBackGroundComponent()},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Color")), colorSelectBox},
new Component[]{WidgetThemeDesignerUtils.createTopAlignmentLabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Widget_Background")), initBackGroundComponent()},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Border_Line")), lineComboBox},
new Component[]{null, lineComboColorSelectBox},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Border_Radius")), borderRadiusSpinner},
@ -67,7 +69,10 @@ public class DesktopWidgetStyleEditPane<T extends TemplateTheme> extends WidgetS
}
private Column initBackGroundComponent() {
return column(10, cell(widgetBgColorSelectBox), cell(widgetBgAlphaDragPane)).getComponent();
return column(10,
cell(widgetBgColorSelectBox),
cell(FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Form_Widget-Style_Alpha"))),
cell(widgetBgAlphaDragPane)).getComponent();
}
private void initSelectBackgroundColorBox() {

2
designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/WidgetStyleEditPane.java

@ -18,6 +18,7 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.style.color.NewColorSelectBox;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.general.IOUtils;
import com.fr.stable.StringUtils;
import com.fr.widgettheme.theme.widget.theme.WidgetThemeDisplayConstants;
@ -120,6 +121,7 @@ public class WidgetStyleEditPane<T extends TemplateTheme> extends BasicBeanPane<
private Column initBackGroundComponent() {
return column(10,
cell(widgetBgColorSelectBox),
cell(FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Form_Widget-Style_Alpha"))),
cell(widgetBgAlphaDragPane)
).getComponent();
}

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

@ -23,6 +23,7 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.style.color.NewColorSelectBox;
import com.fr.design.utils.DesignUtils;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.form.ui.Widget;
import com.fr.general.FRFont;
import com.fr.general.IOUtils;
@ -164,6 +165,7 @@ public abstract class BaseStyleSettingPane<T extends Widget> extends BasicBeanPa
return column(
10,
cell(widgetBgColorSelectBox),
cell(FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Form_Widget-Style_Alpha"))),
cell(widgetBgAlphaDragPane)
).getComponent();
}

16
designer-form/src/main/java/com/fr/design/widgettheme/processor/WidgetThemeCreatorPaneAdder.java

@ -1,8 +1,11 @@
package com.fr.design.widgettheme.processor;
import com.fr.design.widgettheme.common.SelectEditorSettingPane;
import com.fr.widgettheme.util.WidgetThemeDesignerUtils;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.widgettheme.common.ButtonSettingPane;
import com.fr.design.widgettheme.common.EditorSettingPane;
import com.fr.design.widgettheme.common.NormalButtonSettingPane;
import com.fr.design.widgettheme.common.SelectEditorSettingPane;
import com.fr.design.widgettheme.common.TreeEditorSettingPane;
import com.fr.form.parameter.FormSubmitButton;
import com.fr.form.ui.Button;
import com.fr.form.ui.CheckBox;
@ -21,10 +24,7 @@ import com.fr.form.ui.TreeEditor;
import com.fr.report.web.button.form.TreeNodeToggleButton;
import com.fr.report.web.button.write.AppendRowButton;
import com.fr.report.web.button.write.DeleteRowButton;
import com.fr.design.widgettheme.common.ButtonSettingPane;
import com.fr.design.widgettheme.common.EditorSettingPane;
import com.fr.design.widgettheme.common.NormalButtonSettingPane;
import com.fr.design.widgettheme.common.TreeEditorSettingPane;
import com.fr.widgettheme.util.WidgetThemeDesignerUtils;
import com.fr.widgettheme.utils.WidgetThemeServerUtils;
import java.util.Arrays;
@ -97,7 +97,7 @@ public class WidgetThemeCreatorPaneAdder {
}
private static <T> void acceptEditor(Class<?> creator, List<BasicBeanPane<T>> extraPaneList) {
boolean accept = WidgetThemeServerUtils.isNewComboBoxTreeEditor(creator) || EDITOR_SET.contains(creator);
boolean accept = EDITOR_SET.contains(creator);
if (accept) {
insertShortCut(extraPaneList, new EditorSettingPane<>());
}
@ -126,7 +126,7 @@ public class WidgetThemeCreatorPaneAdder {
}
private static <T> void acceptSelect(Class<?> creator, List<BasicBeanPane<T>> extraPaneList) {
boolean accept = SELECT_SET.contains(creator);
boolean accept = WidgetThemeServerUtils.isNewComboBoxTreeEditor(creator) || SELECT_SET.contains(creator);
if (accept) {
insertShortCut(extraPaneList, new SelectEditorSettingPane<>());
}

7
designer-realize/src/main/java/com/fr/design/present/PresentPane.java

@ -52,10 +52,9 @@ public class PresentPane extends UIComboBoxPane<Present> {
@Override
public void populateBean(Present ob) {
if(ob == null) {
dictPresentPane.reset();
formulaPresentPane.reset();
barCodePane.reset();
currencyLinePane.reset();
for (FurtherBasicBeanPane<?> pane : cards) {
pane.reset();
}
}
super.populateBean(ob);
}

Loading…
Cancel
Save