Browse Source

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

fbp/release
lemon 3 months ago
parent
commit
cf556bfe13
  1. 42
      designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java
  2. 4
      designer-realize/src/main/java/com/fr/design/mainframe/form/FormReportComponentComposite.java
  3. 1
      designer-realize/src/main/java/com/fr/design/report/freeze/FormECRepeatAndFreezeSettingPane.java
  4. 17
      designer-realize/src/main/java/com/fr/design/widget/ui/CheckBoxDefinePane.java

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

@ -1,10 +1,11 @@
package com.fr.design.widgettheme; package com.fr.design.widgettheme;
import com.fine.swing.ui.layout.Column; import com.fine.swing.ui.layout.Column;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.base.background.ColorBackground; import com.fr.base.background.ColorBackground;
import com.fr.base.theme.TemplateTheme; import com.fr.base.theme.TemplateTheme;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.gui.frpane.FontSizeComboPane; import com.fr.design.gui.frpane.FontSizeComboPane;
import com.fr.design.gui.frpane.UIPercentDragPane; import com.fr.design.gui.frpane.UIPercentDragPane;
@ -18,15 +19,12 @@ import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.style.FRFontPane; import com.fr.design.gui.style.FRFontPane;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
import com.fr.design.style.color.NewColorSelectBox; import com.fr.design.style.color.NewColorSelectBox;
import com.fr.design.utils.DesignUtils; import com.fr.design.utils.DesignUtils;
import com.fr.design.widget.FRWidgetFactory; import com.fr.design.widget.FRWidgetFactory;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
import com.fr.general.FRFont; import com.fr.general.FRFont;
import com.fr.general.IOUtils;
import com.fr.util.ColorUtils; import com.fr.util.ColorUtils;
import com.fr.widgettheme.theme.bean.ButtonBackground; import com.fr.widgettheme.theme.bean.ButtonBackground;
import com.fr.widgettheme.theme.panel.ButtonStyleDefinedPane; import com.fr.widgettheme.theme.panel.ButtonStyleDefinedPane;
@ -38,7 +36,6 @@ import com.fr.widgettheme.theme.widget.theme.WidgetThemeDisplayConstants;
import com.fr.widgettheme.util.WidgetStyleComponentCombiner; import com.fr.widgettheme.util.WidgetStyleComponentCombiner;
import com.fr.widgettheme.util.WidgetThemeDesignerUtils; import com.fr.widgettheme.util.WidgetThemeDesignerUtils;
import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color; import java.awt.Color;
@ -130,8 +127,9 @@ public abstract class BaseStyleSettingPane<T extends Widget> extends BasicBeanPa
protected void initPane() { protected void initPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.add(createHeadPane(), BorderLayout.NORTH); this.add(column(10,
this.add(createCustomPane(), BorderLayout.CENTER); cell(createHeadPane()), cell(createCustomPane())
).getComponent(), BorderLayout.CENTER);
} }
@ -145,8 +143,8 @@ public abstract class BaseStyleSettingPane<T extends Widget> extends BasicBeanPa
fontNameSelectBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report()); fontNameSelectBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report());
fontSizePane = new FontSizeComboPane(); fontSizePane = new FontSizeComboPane();
fontColorButton = new UIColorButton(); fontColorButton = new UIColorButton();
bold = new UIToggleButton(IOUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png")); bold = new UIToggleButton(new LazyIcon("bold"));
italic = new UIToggleButton(IOUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png")); italic = new UIToggleButton(new LazyIcon("italic"));
widgetBgColorSelectBox = new NewColorSelectBox(WidgetThemeDisplayConstants.THEME_WIDGET_COMPONENT_WIDTH, true); widgetBgColorSelectBox = new NewColorSelectBox(WidgetThemeDisplayConstants.THEME_WIDGET_COMPONENT_WIDTH, true);
widgetBgAlphaDragPane = new UIPercentDragPane(); widgetBgAlphaDragPane = new UIPercentDragPane();
paneMap.put(StyleSetting.THEME_COLOR, colorSelectBox); paneMap.put(StyleSetting.THEME_COLOR, colorSelectBox);
@ -180,34 +178,14 @@ public abstract class BaseStyleSettingPane<T extends Widget> extends BasicBeanPa
switchCard(); switchCard();
} }
}; };
JPanel headPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{
new Component[]{headLabel, styleSettingHead}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); return FineLayoutBuilder.createHorizontalLayout(0, new double[] {1.2, 3}, headLabel, styleSettingHead);
headPane.setBorder(BorderFactory.createEmptyBorder(0, 0, IntervalConstants.INTERVAL_L1, 0));
return headPane;
} }
protected JPanel createCustomPane() { protected JPanel createCustomPane() {
int size = styleSettingList.size(); int size = styleSettingList.size();
double f = TableLayout.FILL; customPane = FineLayoutBuilder.compatibleTableLayout(10, createComponents(size), new double[]{1.2, 3});
double p = TableLayout.PREFERRED;
int columnCount = 2;
double[] rowSize = new double[size];
for (int i = 0; i < size; i++) {
rowSize[i] = p;
}
double[] columnSize = {p, f};
int[][] rowCount = new int[size][columnCount];
for (int i = 0; i < size; i++) {
for (int j = 0; j < columnCount; j++) {
rowCount[i][j] = 1;
}
}
customPane = TableLayoutHelper.createGapTableLayoutPane(createComponents(size), rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1);
customPane.setBorder(BorderFactory.createEmptyBorder(0, 0, IntervalConstants.INTERVAL_L1, 0));
return customPane; return customPane;
} }

4
designer-realize/src/main/java/com/fr/design/mainframe/form/FormReportComponentComposite.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.form; package com.fr.design.mainframe.form;
import com.formdev.flatlaf.ui.FlatRoundBorder;
import com.fr.base.DynamicUnitList; import com.fr.base.DynamicUnitList;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.design.cell.bar.DynamicScrollBar; import com.fr.design.cell.bar.DynamicScrollBar;
@ -11,9 +12,7 @@ import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerUIModeConfig; import com.fr.design.mainframe.DesignerUIModeConfig;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.mainframe.JDashboard; import com.fr.design.mainframe.JDashboard;
import com.fr.design.mainframe.JForm;
import com.fr.design.mainframe.JFormSliderPane; import com.fr.design.mainframe.JFormSliderPane;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.mainframe.JTemplateProvider; import com.fr.design.mainframe.JTemplateProvider;
import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus; import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus;
import com.fr.form.FormElementCaseContainerProvider; import com.fr.form.FormElementCaseContainerProvider;
@ -59,6 +58,7 @@ public class FormReportComponentComposite extends JComponent implements TargetMo
this.elementCaseDesigner.elementCasePane.getGrid().addMouseWheelListener(new FormReportComponentCompositeMouseWheelHandler(this)); this.elementCaseDesigner.elementCasePane.getGrid().addMouseWheelListener(new FormReportComponentCompositeMouseWheelHandler(this));
elementCaseDesigner.addTargetModifiedListener(this); elementCaseDesigner.addTargetModifiedListener(this);
this.jSliderContainer.setShowValue((ScreenResolution.getScreenResolution() * HUND) / Constants.DEFAULT_WEBWRITE_AND_SCREEN_RESOLUTION); this.jSliderContainer.setShowValue((ScreenResolution.getScreenResolution() * HUND) / Constants.DEFAULT_WEBWRITE_AND_SCREEN_RESOLUTION);
setBorder(new FlatRoundBorder());
} }
public FormReportComponentComposite(BaseJForm jform, FormElementCaseDesigner elementCaseDesign, FormElementCaseContainerProvider ecContainer) { public FormReportComponentComposite(BaseJForm jform, FormElementCaseDesigner elementCaseDesign, FormElementCaseContainerProvider ecContainer) {

1
designer-realize/src/main/java/com/fr/design/report/freeze/FormECRepeatAndFreezeSettingPane.java

@ -30,6 +30,7 @@ public class FormECRepeatAndFreezeSettingPane extends RepeatAndFreezeSettingPane
protected void addWriteFrozen(JPanel freezePanel, JPanel pagePanel) { protected void addWriteFrozen(JPanel freezePanel, JPanel pagePanel) {
super.initWriteFrozenPane(); super.initWriteFrozenPane();
this.add(pagePanel);
} }
} }

17
designer-realize/src/main/java/com/fr/design/widget/ui/CheckBoxDefinePane.java

@ -7,7 +7,6 @@ import com.fr.design.fun.WidgetAdvancedPaneProvider;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.widgettheme.processor.WidgetThemeCreatorPaneAdder; import com.fr.design.widgettheme.processor.WidgetThemeCreatorPaneAdder;
import com.fr.form.ui.CheckBox; import com.fr.form.ui.CheckBox;
import com.fr.general.GeneralContext; import com.fr.general.GeneralContext;
@ -37,8 +36,6 @@ public class CheckBoxDefinePane extends AbstractDataModify<CheckBox> {
protected final List<BasicBeanPane<CheckBox>> extraPaneList = new ArrayList<>(); protected final List<BasicBeanPane<CheckBox>> extraPaneList = new ArrayList<>();
protected JPanel extraPane; protected JPanel extraPane;
protected static double F = TableLayout.FILL;
protected static double P = TableLayout.PREFERRED;
public CheckBoxDefinePane() { public CheckBoxDefinePane() {
this.iniComponents(); this.iniComponents();
@ -51,24 +48,16 @@ public class CheckBoxDefinePane extends AbstractDataModify<CheckBox> {
JPanel content = new JPanel(new BorderLayout()); JPanel content = new JPanel(new BorderLayout());
if (extraPane == null) {
content.add(
row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Text"))).weight(LEFT_WEIGHT),
cell(text).weight(RIGHT_WEIGHT)
).getComponent()
);
} else {
content.add( content.add(
column( column(
10, 10,
row( row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Text"))).weight(LEFT_WEIGHT), cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Text"))).weight(LEFT_WEIGHT),
cell(text)).weight(RIGHT_WEIGHT), cell(text).weight(RIGHT_WEIGHT)
row(cell(extraPane)) ),
cell(extraPane)
).getComponent() ).getComponent()
); );
}
UIExpandablePane uiExpandablePane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 24, content); UIExpandablePane uiExpandablePane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 24, content);
this.add(uiExpandablePane); this.add(uiExpandablePane);
} }

Loading…
Cancel
Save