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;
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.theme.TemplateTheme;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.gui.frpane.FontSizeComboPane;
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.i18n.Toolkit;
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.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;
import com.fr.util.ColorUtils;
import com.fr.widgettheme.theme.bean.ButtonBackground;
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.WidgetThemeDesignerUtils;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Color;
@ -130,8 +127,9 @@ public abstract class BaseStyleSettingPane<T extends Widget> extends BasicBeanPa
protected void initPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.add(createHeadPane(), BorderLayout.NORTH);
this.add(createCustomPane(), BorderLayout.CENTER);
this.add(column(10,
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());
fontSizePane = new FontSizeComboPane();
fontColorButton = new UIColorButton();
bold = new UIToggleButton(IOUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png"));
italic = new UIToggleButton(IOUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png"));
bold = new UIToggleButton(new LazyIcon("bold"));
italic = new UIToggleButton(new LazyIcon("italic"));
widgetBgColorSelectBox = new NewColorSelectBox(WidgetThemeDisplayConstants.THEME_WIDGET_COMPONENT_WIDTH, true);
widgetBgAlphaDragPane = new UIPercentDragPane();
paneMap.put(StyleSetting.THEME_COLOR, colorSelectBox);
@ -180,34 +178,14 @@ public abstract class BaseStyleSettingPane<T extends Widget> extends BasicBeanPa
switchCard();
}
};
JPanel headPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{
new Component[]{headLabel, styleSettingHead}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1);
headPane.setBorder(BorderFactory.createEmptyBorder(0, 0, IntervalConstants.INTERVAL_L1, 0));
return headPane;
return FineLayoutBuilder.createHorizontalLayout(0, new double[] {1.2, 3}, headLabel, styleSettingHead);
}
protected JPanel createCustomPane() {
int size = styleSettingList.size();
double f = TableLayout.FILL;
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));
customPane = FineLayoutBuilder.compatibleTableLayout(10, createComponents(size), new double[]{1.2, 3});
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;
import com.formdev.flatlaf.ui.FlatRoundBorder;
import com.fr.base.DynamicUnitList;
import com.fr.base.ScreenResolution;
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.ElementCasePane;
import com.fr.design.mainframe.JDashboard;
import com.fr.design.mainframe.JForm;
import com.fr.design.mainframe.JFormSliderPane;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.mainframe.JTemplateProvider;
import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus;
import com.fr.form.FormElementCaseContainerProvider;
@ -59,6 +58,7 @@ public class FormReportComponentComposite extends JComponent implements TargetMo
this.elementCaseDesigner.elementCasePane.getGrid().addMouseWheelListener(new FormReportComponentCompositeMouseWheelHandler(this));
elementCaseDesigner.addTargetModifiedListener(this);
this.jSliderContainer.setShowValue((ScreenResolution.getScreenResolution() * HUND) / Constants.DEFAULT_WEBWRITE_AND_SCREEN_RESOLUTION);
setBorder(new FlatRoundBorder());
}
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) {
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.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.widgettheme.processor.WidgetThemeCreatorPaneAdder;
import com.fr.form.ui.CheckBox;
import com.fr.general.GeneralContext;
@ -37,8 +36,6 @@ public class CheckBoxDefinePane extends AbstractDataModify<CheckBox> {
protected final List<BasicBeanPane<CheckBox>> extraPaneList = new ArrayList<>();
protected JPanel extraPane;
protected static double F = TableLayout.FILL;
protected static double P = TableLayout.PREFERRED;
public CheckBoxDefinePane() {
this.iniComponents();
@ -51,24 +48,16 @@ public class CheckBoxDefinePane extends AbstractDataModify<CheckBox> {
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(
column(
10,
row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Text"))).weight(LEFT_WEIGHT),
cell(text)).weight(RIGHT_WEIGHT),
row(cell(extraPane))
cell(text).weight(RIGHT_WEIGHT)
),
cell(extraPane)
).getComponent()
);
}
UIExpandablePane uiExpandablePane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 24, content);
this.add(uiExpandablePane);
}

Loading…
Cancel
Save