Browse Source

Pull request #14740: REPORT-132511 & REPORT-131838 & REPORT-132461 & REPORT-132341 & REPORT-131797 & REPORT-132386 & REPORT-132359 & REPORT-132268 & REPORT-132234 & REPORT-132341【newUI】fix:fr-fbp回归及国际化问题修复

Merge in DESIGN/design from ~RICHARD.FANG/design:fbp/release to fbp/release

* commit 'bafee7336d96029f12353e2e686e3e7309bf6763':
  REPORT-132511 & REPORT-131838 & REPORT-132461 & REPORT-132341 & REPORT-131797 & REPORT-132386 & REPORT-132359 & REPORT-132268 & REPORT-132234 & REPORT-132341【newUI】fix:fr-fbp回归及国际化问题修复
fbp/release
Richard.Fang-方超 3 months ago
parent
commit
ebbcff9779
  1. 14
      designer-base/src/main/java/com/fine/theme/utils/FineUIUtils.java
  2. 2
      designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java
  3. 41
      designer-base/src/main/java/com/fr/design/data/datapane/connect/DBCPAttrPane.java
  4. 1
      designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/FineSearchPane.java
  5. 15
      designer-base/src/main/java/com/fr/design/gui/icombobox/FRTreeComboBox.java
  6. 14
      designer-base/src/main/java/com/fr/design/gui/style/FollowingThemePane.java
  7. 6
      designer-base/src/main/java/com/fr/design/hyperlink/AbstractHyperNorthPane.java
  8. 7
      designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java
  9. 4
      designer-base/src/main/java/com/fr/design/hyperlink/WebHyperNorthPane.java
  10. 13
      designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java
  11. 19
      designer-base/src/main/java/com/fr/design/parameter/ParameterPane.java
  12. 6
      designer-base/src/main/java/com/fr/design/style/background/impl/PatternBackgroundPane.java
  13. 3
      designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties
  14. 3
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties
  15. 3
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties
  16. 3
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties
  17. 3
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties
  18. 6
      designer-realize/src/main/java/com/fr/design/actions/report/ReportWebAttrAction.java
  19. 17
      designer-realize/src/main/java/com/fr/design/cell/editor/BiasTextPainterCellEditor.java
  20. 5
      designer-realize/src/main/java/com/fr/design/cell/editor/DSColumnCellEditor.java
  21. 3
      designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnPane.java
  22. 13
      designer-realize/src/main/java/com/fr/design/dscolumn/ResultSetGroupPopUpPane.java
  23. 16
      designer-realize/src/main/java/com/fr/design/expand/ConditionParentPane.java
  24. 41
      designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java
  25. 10
      designer-realize/src/main/java/com/fr/design/sort/common/SortColumnRowPane.java
  26. 33
      designer-realize/src/main/java/com/fr/design/sort/header/HeaderAreaPane.java
  27. 8
      designer-realize/src/main/java/com/fr/design/webattr/CommonPane.java
  28. 4
      designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java
  29. 3
      designer-realize/src/main/java/com/fr/design/webattr/PageWebSettingPane.java
  30. 10
      designer-realize/src/main/java/com/fr/design/webattr/WriteToolBarPane.java

14
designer-base/src/main/java/com/fine/theme/utils/FineUIUtils.java

@ -6,6 +6,7 @@ import com.fr.design.border.FineBorderFactory;
import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.i18n.DesignSizeI18nManager; import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.stable.os.OperatingSystem; import com.fr.stable.os.OperatingSystem;
import com.fr.value.AtomicClearableLazyValue; import com.fr.value.AtomicClearableLazyValue;
@ -448,4 +449,17 @@ public class FineUIUtils {
return FineUIScale.scale(DesignSizeI18nManager.getInstance().i18nDimension(i18nDimensionKey)); return FineUIScale.scale(DesignSizeI18nManager.getInstance().i18nDimension(i18nDimensionKey));
} }
/**
* 创建一个支持自动换行的 UILabel并应用指定样式
*
* @param text 要显示的文本内容
* @param style 样式字符串
* @return 支持自动换行的 UILabel
*/
public static UILabel createLineWrapLabel(String text, String style) {
UILabel label = new UILabel(text);
FineUIStyle.setStyle(label, style);
UIComponentUtils.setLineWrap(label);
return label;
}
} }

2
designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java

@ -1252,7 +1252,7 @@ public class PreferencePane extends BasicPane {
@Override @Override
public BasicDialog showWindow(Window window, DialogActionListener l) { public BasicDialog showWindow(Window window, DialogActionListener l) {
return showWindowWithCustomSize(window, l, new Dimension(BasicDialog.DEFAULT.width, BasicDialog.DEFAULT.height + OFFSET_HEIGHT)); return showWindowWithCustomSize(window, l, new Dimension(BasicDialog.DEFAULT.width + OFFSET_HEIGHT, BasicDialog.DEFAULT.height + OFFSET_HEIGHT));
} }
private void tryGc() { private void tryGc() {

41
designer-base/src/main/java/com/fr/design/data/datapane/connect/DBCPAttrPane.java

@ -1,8 +1,8 @@
package com.fr.design.data.datapane.connect; package com.fr.design.data.datapane.connect;
import com.fine.swing.ui.layout.Layouts; import com.fine.swing.ui.layout.Layouts;
import com.fine.theme.utils.FineUIStyle;
import com.fine.theme.utils.FineUIUtils; import com.fine.theme.utils.FineUIUtils;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.data.core.db.dialect.DialectFactory; import com.fr.data.core.db.dialect.DialectFactory;
import com.fr.data.impl.JDBCDatabaseConnection; import com.fr.data.impl.JDBCDatabaseConnection;
@ -19,9 +19,7 @@ import com.fr.general.ComparatorUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.JTextField;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Window; import java.awt.Window;
import java.awt.event.InputMethodEvent; import java.awt.event.InputMethodEvent;
import java.awt.event.InputMethodListener; import java.awt.event.InputMethodListener;
@ -78,35 +76,14 @@ public class DBCPAttrPane extends BasicPane {
// JPanel northFlowPane // JPanel northFlowPane
northFlowPane = Layouts.column(LayoutConstants.VERTICAL_GAP, northFlowPane = Layouts.column(LayoutConstants.VERTICAL_GAP,
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_ConnectionPool_Attr"))).with(FineUIUtils::wrapBoldLabelWithUnderline), cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_ConnectionPool_Attr"))).with(FineUIUtils::wrapBoldLabelWithUnderline),
row( row(cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Initial_Size"))).weight(1), cell(DBCP_INITIAL_SIZE).weight(1)),
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Initial_Size"))).weight(1), row(cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Min_Idle"))).weight(1), cell(DBCP_MIN_IDLE).weight(1)),
cell(DBCP_INITIAL_SIZE).weight(1), flex(1.2) row(cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Test_On_Return"))).weight(1), cell(DBCP_TESTONRETURN).weight(1)),
), row(cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Test_While_Idle"))).weight(1), cell(DBCP_TESTWHILEIDLE).weight(1)),
row( row(cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Connection_Pool_Evictionruns_millis"))).weight(1), cell(DBCP_TIMEBETWEENEVICTIONRUNSMILLS).weight(1)),
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Min_Idle"))).weight(1), row(cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Num_Test_Per_Evction_Run"))).weight(1), cell(DBCP_NUMTESTSPEREVICTIONRUN).weight(1)),
cell(DBCP_MIN_IDLE).weight(1), flex(1.2) row(cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Connection_Pool_Mix_Evictable_Idle_Time_Millis"))).weight(1), cell(DBCP_MINEVICTABLEIDLETIMEMILLIS).weight(1)),
), cell(FineUIUtils.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Dbcp_Warning"), FineUIStyle.LABEL_WARNING_TIP))
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Test_On_Return"))).weight(1),
cell(DBCP_TESTONRETURN).weight(1), flex(1.2)
),
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Test_While_Idle"))).weight(1),
cell(DBCP_TESTWHILEIDLE).weight(1), flex(1.2)
),
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Connection_Pool_Evictionruns_millis"))).weight(1),
cell(DBCP_TIMEBETWEENEVICTIONRUNSMILLS).weight(1), flex(1.2)
),
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Num_Test_Per_Evction_Run"))).weight(1),
cell(DBCP_NUMTESTSPEREVICTIONRUN).weight(1), flex(1.2)
),
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Connection_Pool_Mix_Evictable_Idle_Time_Millis"))).weight(1),
cell(DBCP_MINEVICTABLEIDLETIMEMILLIS).weight(1), flex(1.2)
),
cell(new UILabel(Toolkit.i18nText("Fine-Design_Dbcp_Warning"))).with(it -> it.setForeground(FlatUIUtils.getUIColor("Label.strongHintColor", Color.RED)))
).getComponent(); ).getComponent();
defaultPane.add(northFlowPane); defaultPane.add(northFlowPane);
this.add(defaultPane); this.add(defaultPane);

1
designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/FineSearchPane.java

@ -159,7 +159,6 @@ public class FineSearchPane extends JPanel implements HoverAware {
@Override @Override
public void requestFocus() { public void requestFocus() {
super.requestFocus();
searchTextField.requestFocus(); searchTextField.requestFocus();
} }
} }

15
designer-base/src/main/java/com/fr/design/gui/icombobox/FRTreeComboBox.java

@ -1,17 +1,13 @@
package com.fr.design.gui.icombobox; package com.fr.design.gui.icombobox;
import com.fine.theme.light.ui.FineComboBoxUI; import com.fine.theme.light.ui.FineComboBoxUI;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton;
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.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.NameObject; import com.fr.general.NameObject;
import com.fr.stable.Constants;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.BorderFactory;
import javax.swing.DefaultListCellRenderer; import javax.swing.DefaultListCellRenderer;
import javax.swing.JComboBox; import javax.swing.JComboBox;
import javax.swing.JComponent; import javax.swing.JComponent;
@ -25,7 +21,6 @@ import javax.swing.UIManager;
import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener; import javax.swing.event.DocumentListener;
import javax.swing.event.PopupMenuListener; import javax.swing.event.PopupMenuListener;
import javax.swing.plaf.basic.BasicComboBoxUI;
import javax.swing.plaf.basic.ComboPopup; import javax.swing.plaf.basic.ComboPopup;
import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.DefaultTreeModel;
@ -34,13 +29,9 @@ import javax.swing.tree.TreeNode;
import javax.swing.tree.TreePath; import javax.swing.tree.TreePath;
import java.util.Enumeration; import java.util.Enumeration;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component; import java.awt.Component;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.IllegalComponentStateException; import java.awt.IllegalComponentStateException;
import java.awt.RenderingHints;
import java.awt.event.KeyAdapter; import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent; import java.awt.event.KeyEvent;
import java.awt.event.KeyListener; import java.awt.event.KeyListener;
@ -50,10 +41,12 @@ import java.awt.event.MouseListener;
import java.awt.event.MouseMotionAdapter; import java.awt.event.MouseMotionAdapter;
import java.awt.event.MouseMotionListener; import java.awt.event.MouseMotionListener;
import static com.fine.theme.utils.FineUIScale.scale;
public class FRTreeComboBox extends UIComboBox { public class FRTreeComboBox extends UIComboBox {
private static final int PAGE_DIFF = 5; private static final int PAGE_DIFF = scale(5);
private static final int DEFAULT_HEIGHT = 120; private static final int DEFAULT_HEIGHT = scale(120);
// richer:下拉展示用的tree // richer:下拉展示用的tree
protected JTree tree; protected JTree tree;

14
designer-base/src/main/java/com/fr/design/gui/style/FollowingThemePane.java

@ -1,6 +1,6 @@
package com.fr.design.gui.style; package com.fr.design.gui.style;
import com.fine.theme.utils.FineUIScale; import com.fine.theme.utils.FineLayoutBuilder;
import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.theme.TemplateTheme; import com.fr.base.theme.TemplateTheme;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
@ -12,15 +12,11 @@ import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
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.widget.FRWidgetFactory; import com.fr.design.widget.FRWidgetFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.util.ArrayList; import java.util.ArrayList;
@ -71,14 +67,8 @@ public class FollowingThemePane extends BasicPane implements UIObserver {
}); });
UILabel followingThemeLabel = FRWidgetFactory.createLineWrapLabel(name); UILabel followingThemeLabel = FRWidgetFactory.createLineWrapLabel(name);
JPanel followingThemePane = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3}, followingThemeLabel, followingThemeButtonGroup);
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
JPanel followingThemePane =
TableLayoutHelper.createGapTableLayoutPane( new Component[][]{new Component[] { followingThemeLabel, FRGUIPaneFactory.createBorderLayoutNorthPaneWithComponent(followingThemeButtonGroup)}},
new double[] { p }, new double[] {FineUIScale.scale(SETTING_LABEL_WIDTH), f }, 10, 0);
followingThemePane.setVisible(false); followingThemePane.setVisible(false);
followingThemePane.setPreferredSize(new Dimension(FineUIScale.scale(275), (int) followingThemePane.getPreferredSize().getHeight()));
add(followingThemePane, BorderLayout.NORTH); add(followingThemePane, BorderLayout.NORTH);
container = FRGUIPaneFactory.createBorderLayout_S_Pane(); container = FRGUIPaneFactory.createBorderLayout_S_Pane();

6
designer-base/src/main/java/com/fr/design/hyperlink/AbstractHyperNorthPane.java

@ -64,14 +64,14 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
UILabel widthLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Designer_Width")); UILabel widthLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Designer_Width"));
widthTextFiled = new UISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_V_VALUE); widthTextFiled = new UISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_V_VALUE);
newWindowConfPane.add(column(10, newWindowConfPane.add(column(10,
row(cell(heightLabel).weight(0.13), cell(heightTextFiled).weight(0.87)), row(cell(heightLabel).weight(0.2), cell(heightTextFiled).weight(0.8)),
row(cell(widthLabel).weight(0.13), cell(widthTextFiled).weight(0.87)) row(cell(widthLabel).weight(0.2), cell(widthTextFiled).weight(0.8))
).getComponent()); ).getComponent());
JPanel centerPanel = new JPanel(new BorderLayout()); JPanel centerPanel = new JPanel(new BorderLayout());
centerPanel.add(column(10, centerPanel.add(column(10,
row(cell(targetFrameLabel).weight(0.13), cell(targetFrameComboBox).weight(0.87)), row(cell(targetFrameLabel).weight(0.2), cell(targetFrameComboBox).weight(0.8)),
cell(newWindowConfPane) cell(newWindowConfPane)
).getComponent()); ).getComponent());
newWindowConfPane.setVisible(false); newWindowConfPane.setVisible(false);

7
designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java

@ -44,7 +44,6 @@ import java.util.List;
import static com.fine.swing.ui.layout.Layouts.cell; import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column; import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row; import static com.fine.swing.ui.layout.Layouts.row;
/** /**
@ -174,8 +173,8 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
}); });
reportletNamePane.add(row(4, reportletNamePane.add(row(4,
cell(reportPathTextField).weight(0.85), cell(reportPathTextField).weight(0.8),
cell(browserButton).weight(0.15) cell(browserButton).weight(0.2)
).getComponent()); ).getComponent());
return reportletNamePane; return reportletNamePane;
} }
@ -292,7 +291,7 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
postComboBox = new UIComboBox(new String[]{"GET", "POST"}); postComboBox = new UIComboBox(new String[]{"GET", "POST"});
showParameterInterface = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Parameter_UI_Display")); showParameterInterface = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Parameter_UI_Display"));
showParameterInterface.setToolTipText(Toolkit.i18nText("Fine-Design_Basic_Parameter_UI_Display"));
content.add(row(4, content.add(row(4,
cell(postComboBox).weight(0.75), cell(postComboBox).weight(0.75),
cell(showParameterInterface).weight(0.25) cell(showParameterInterface).weight(0.25)

4
designer-base/src/main/java/com/fr/design/hyperlink/WebHyperNorthPane.java

@ -57,8 +57,8 @@ public class WebHyperNorthPane extends AbstractHyperNorthPane<WebHyperlink> {
UILabel urlLabel = new UILabel("URL"); UILabel urlLabel = new UILabel("URL");
JPanel urlWithHelp = new JPanel(new BorderLayout()); JPanel urlWithHelp = new JPanel(new BorderLayout());
urlWithHelp.add(row( urlWithHelp.add(row(
cell(urlLabel).weight(0.13), cell(urlLabel).weight(0.2),
cell(urlTextField).weight(0.87) cell(urlTextField).weight(0.8)
).getComponent()); ).getComponent());
if (this.needRenamePane) { if (this.needRenamePane) {

13
designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java

@ -1,6 +1,5 @@
package com.fr.design.javascript; package com.fr.design.javascript;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.BaseFormula; import com.fr.base.BaseFormula;
import com.fr.base.Parameter; import com.fr.base.Parameter;
import com.fr.base.extension.FileExtension; import com.fr.base.extension.FileExtension;
@ -147,7 +146,7 @@ public class ExportJavaScriptPane extends AbstractHyperLinkPane<ExportJavaScript
} }
}); });
return column(LayoutConstants.VERTICAL_GAP, return column(LayoutConstants.VERTICAL_GAP,
row(cell(parameterLabel).weight(0.1), cell(extendParametersCheckBox).weight(0.2), flex(0.7)), row(cell(parameterLabel).weight(0.2), cell(extendParametersCheckBox).weight(0.3), flex(0.5)),
cell(parameterViewPane) cell(parameterViewPane)
).getComponent(); ).getComponent();
} }
@ -180,9 +179,9 @@ public class ExportJavaScriptPane extends AbstractHyperLinkPane<ExportJavaScript
}); });
return column(LayoutConstants.HORIZONTAL_GAP, return column(LayoutConstants.HORIZONTAL_GAP,
row( row(
cell(nameLabel).weight(0.1), cell(nameLabel).weight(0.2),
cell(defaultNameRadio).weight(0.15), cell(defaultNameRadio).weight(0.25),
row(LayoutConstants.HGAP_LARGE, cell(customNameRadio), cell(fileNameFormulaEditor)).weight(0.75) row(LayoutConstants.HGAP_LARGE, cell(customNameRadio), cell(fileNameFormulaEditor).weight(1)).weight(0.55)
), ),
cell(fileNameTipLabel) cell(fileNameTipLabel)
).getComponent(); ).getComponent();
@ -234,7 +233,7 @@ public class ExportJavaScriptPane extends AbstractHyperLinkPane<ExportJavaScript
UILabel typeLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Export_JS_Type")); UILabel typeLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Export_JS_Type"));
exportTypeComboBox = getComboBoxWithModel(new String[]{ExportJavaScript.EXPORT_PDF, ExportJavaScript.EXPORT_EXCEL_PAGE, ExportJavaScript.EXPORT_EXCEL_SIMPLE, ExportJavaScript.EXPORT_EXCEL_SHEET, ExportJavaScript.EXPORT_WORD, ExportJavaScript.EXPORT_IMAGE} exportTypeComboBox = getComboBoxWithModel(new String[]{ExportJavaScript.EXPORT_PDF, ExportJavaScript.EXPORT_EXCEL_PAGE, ExportJavaScript.EXPORT_EXCEL_SIMPLE, ExportJavaScript.EXPORT_EXCEL_SHEET, ExportJavaScript.EXPORT_WORD, ExportJavaScript.EXPORT_IMAGE}
, EXPORT_TYPES_MAP); , EXPORT_TYPES_MAP);
return row(cell(typeLabel).weight(0.1), cell(exportTypeComboBox).weight(0.5), flex(0.4)).getComponent(); return row(cell(typeLabel).weight(0.2), cell(exportTypeComboBox).weight(0.6), flex(0.2)).getComponent();
} }
@Override @Override
@ -794,7 +793,7 @@ public class ExportJavaScriptPane extends AbstractHyperLinkPane<ExportJavaScript
} }
} }
}); });
return row(cell(templateLabel).weight(0.1), cell(currentTemplateRadio).weight(0.15), cell(otherTemplateRadio).weight(0.15), flex(0.6)).getComponent(); return row(cell(templateLabel).weight(0.2), cell(currentTemplateRadio).weight(0.25), cell(otherTemplateRadio).weight(0.25), flex(0.3)).getComponent();
} }
@Override @Override

19
designer-base/src/main/java/com/fr/design/parameter/ParameterPane.java

@ -8,7 +8,6 @@ import com.fr.design.editor.ValueEditorPane;
import com.fr.design.editor.ValueEditorPaneFactory; import com.fr.design.editor.ValueEditorPaneFactory;
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.utils.gui.UIComponentUtils;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.BorderLayout; import java.awt.BorderLayout;
@ -46,14 +45,16 @@ public class ParameterPane extends BasicBeanPane<Parameter> {
valueEditor = ValueEditorPaneFactory.createBasicValueEditorPane(); valueEditor = ValueEditorPaneFactory.createBasicValueEditorPane();
// richer:要排列显示的控件 // richer:要排列显示的控件
JPanel centerPane = column(LayoutConstants.VERTICAL_GAP, JPanel centerPane = column(LayoutConstants.VERTICAL_GAP,
row(20, row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Name"))).weight(0.1), cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Name"))).weight(0.2),
cell(nameTextField).weight(0.8), cell(nameTextField).weight(0.7),
flex(0.1)), flex(0.1)
row(20, ),
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Default_Value"))).with(it -> it.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Default_Value"))).weight(0.1), row(
cell(valueEditor).weight(0.8), cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Default_Value"))).weight(0.2),
flex(0.1)) cell(valueEditor).weight(0.7),
flex(0.1)
)
).getComponent(); ).getComponent();
centerPane.setBorder(new ScaledEmptyBorder(0, 20, 0, 0)); centerPane.setBorder(new ScaledEmptyBorder(0, 20, 0, 0));
this.add(centerPane, BorderLayout.CENTER); this.add(centerPane, BorderLayout.CENTER);

6
designer-base/src/main/java/com/fr/design/style/background/impl/PatternBackgroundPane.java

@ -79,14 +79,12 @@ public class PatternBackgroundPane extends BPane {
contentPane.add(FineUIUtils.wrapComponentWithTitle(column( contentPane.add(FineUIUtils.wrapComponentWithTitle(column(
10, 10,
row( row(
60, cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Foreground") + ":")).weight(0.2),
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Foreground") + ":")).weight(0.1),
cell(foregroundColorPane).weight(0.45), cell(foregroundColorPane).weight(0.45),
flex() flex()
), ),
row( row(
60, cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Background") + ":")).weight(0.2),
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Background") + ":")).weight(0.1),
cell(backgroundColorPane).weight(0.45), cell(backgroundColorPane).weight(0.45),
flex() flex()
) )

3
designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties

@ -33,3 +33,6 @@ com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=100*24
com.fr.design.mainframe.EastRegionContainerPane.maximum=600*400 com.fr.design.mainframe.EastRegionContainerPane.maximum=600*400
com.fr.design.mainframe.EastRegionContainerPane.minimum=340*400 com.fr.design.mainframe.EastRegionContainerPane.minimum=340*400
com.fr.design.mainframe.EastRegionContainerPane.standard=480*400 com.fr.design.mainframe.EastRegionContainerPane.standard=480*400
com.fr.design.ds.column.cellEditor.pane=900*600
com.fr.design.actions.reportWebAttr.dialog=800*630

3
designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties

@ -32,3 +32,6 @@ com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=160*24
com.fr.design.mainframe.EastRegionContainerPane.maximum=600*400 com.fr.design.mainframe.EastRegionContainerPane.maximum=600*400
com.fr.design.mainframe.EastRegionContainerPane.minimum=340*400 com.fr.design.mainframe.EastRegionContainerPane.minimum=340*400
com.fr.design.mainframe.EastRegionContainerPane.standard=480*400 com.fr.design.mainframe.EastRegionContainerPane.standard=480*400
com.fr.design.ds.column.cellEditor.pane=900*600
com.fr.design.actions.reportWebAttr.dialog=700*630

3
designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties

@ -32,3 +32,6 @@ com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=80*24
com.fr.design.mainframe.EastRegionContainerPane.maximum=500*400 com.fr.design.mainframe.EastRegionContainerPane.maximum=500*400
com.fr.design.mainframe.EastRegionContainerPane.minimum=340*400 com.fr.design.mainframe.EastRegionContainerPane.minimum=340*400
com.fr.design.mainframe.EastRegionContainerPane.standard=340*400 com.fr.design.mainframe.EastRegionContainerPane.standard=340*400
com.fr.design.ds.column.cellEditor.pane=900*600
com.fr.design.actions.reportWebAttr.dialog=700*630

3
designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties

@ -32,3 +32,6 @@ com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=80*24
com.fr.design.mainframe.EastRegionContainerPane.maximum=400*400 com.fr.design.mainframe.EastRegionContainerPane.maximum=400*400
com.fr.design.mainframe.EastRegionContainerPane.minimum=286*400 com.fr.design.mainframe.EastRegionContainerPane.minimum=286*400
com.fr.design.mainframe.EastRegionContainerPane.standard=286*400 com.fr.design.mainframe.EastRegionContainerPane.standard=286*400
com.fr.design.ds.column.cellEditor.pane=700*600
com.fr.design.actions.reportWebAttr.dialog=660*600

3
designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties

@ -31,3 +31,6 @@ com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=80*24
com.fr.design.mainframe.EastRegionContainerPane.maximum=400*400 com.fr.design.mainframe.EastRegionContainerPane.maximum=400*400
com.fr.design.mainframe.EastRegionContainerPane.minimum=286*400 com.fr.design.mainframe.EastRegionContainerPane.minimum=286*400
com.fr.design.mainframe.EastRegionContainerPane.standard=286*400 com.fr.design.mainframe.EastRegionContainerPane.standard=286*400
com.fr.design.ds.column.cellEditor.pane=700*600
com.fr.design.actions.reportWebAttr.dialog=700*630

6
designer-realize/src/main/java/com/fr/design/actions/report/ReportWebAttrAction.java

@ -8,6 +8,7 @@ import com.fine.theme.icon.LazyIcon;
import com.fr.design.actions.JWorkBookAction; import com.fr.design.actions.JWorkBookAction;
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JWorkBook; import com.fr.design.mainframe.JWorkBook;
import com.fr.design.menu.KeySetUtils; import com.fr.design.menu.KeySetUtils;
@ -50,9 +51,8 @@ public class ReportWebAttrAction extends JWorkBookAction {
populate(wbTpl.getReportWebAttr()); populate(wbTpl.getReportWebAttr());
} }
}; };
final BasicDialog dialog = reportWebAttrPane.showWindow( final BasicDialog dialog = reportWebAttrPane.showWindowWithCustomSize(DesignerContext.getDesignerFrame(), null,
DesignerContext.getDesignerFrame() DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.actions.reportWebAttr.dialog"));
);
dialog.addDialogActionListener(new DialogActionAdapter() { dialog.addDialogActionListener(new DialogActionAdapter() {
@Override @Override

17
designer-realize/src/main/java/com/fr/design/cell/editor/BiasTextPainterCellEditor.java

@ -11,19 +11,14 @@ import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextarea.UITextArea; import com.fr.design.gui.itextarea.UITextArea;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.utils.gui.FineDesignScreen;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.grid.Grid; import com.fr.grid.Grid;
import com.fr.report.cell.TemplateCellElement; import com.fr.report.cell.TemplateCellElement;
import com.fr.report.cell.painter.BiasTextPainter; import com.fr.report.cell.painter.BiasTextPainter;
import com.fr.report.elementcase.TemplateElementCase; import com.fr.report.elementcase.TemplateElementCase;
import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.ButtonGroup; import javax.swing.ButtonGroup;
import javax.swing.JPanel;
import javax.swing.JScrollPane; import javax.swing.JScrollPane;
import javax.swing.SwingUtilities; import javax.swing.SwingUtilities;
import java.awt.BorderLayout; import java.awt.BorderLayout;
@ -121,16 +116,22 @@ public class BiasTextPainterCellEditor extends AbstractCellEditor {
scrollPane.setBorder(new FineRoundBorder()); scrollPane.setBorder(new FineRoundBorder());
formulaTextArea.setBorder(null); formulaTextArea.setBorder(null);
choice1 = new UIRadioButton((com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Slope_Line_Upper_Left_To_Lower_Right"))); String leftToLowerText = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Slope_Line_Upper_Left_To_Lower_Right");
choice2 = new UIRadioButton((com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Slope_Line_Lower_Left_To_Upper_Right"))); choice1 = new UIRadioButton(leftToLowerText);
choice1.setToolTipText(leftToLowerText);
choice1.addActionListener(leftUp); choice1.addActionListener(leftUp);
String leftToUpperText = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Slope_Line_Lower_Left_To_Upper_Right");
choice2 = new UIRadioButton(leftToUpperText);
choice2.setToolTipText(leftToUpperText);
choice2.addActionListener(leftDown); choice2.addActionListener(leftDown);
final ButtonGroup group = new ButtonGroup(); final ButtonGroup group = new ButtonGroup();
group.add(choice1); group.add(choice1);
group.add(choice2); group.add(choice2);
add(Layouts.column(10, Layouts.cell(formulaLabel).weight(0.1), Layouts.cell(scrollPane).weight(0.12), Layouts.row(5, Layouts.cell(choice1), Layouts.cell(choice2)).weight(0.12)).getComponent()); add(Layouts.column(10,
Layouts.cell(formulaLabel).weight(0.1), Layouts.cell(scrollPane).weight(0.12),
Layouts.row(5, Layouts.cell(choice1).weight(1), Layouts.cell(choice2).weight(1)).weight(0.12)).getComponent());
} }
@Override @Override

5
designer-realize/src/main/java/com/fr/design/cell/editor/DSColumnCellEditor.java

@ -5,6 +5,7 @@ import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionListener; import com.fr.design.dialog.DialogActionListener;
import com.fr.design.dialog.FineJOptionPane; import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.dscolumn.DSColumnPane; import com.fr.design.dscolumn.DSColumnPane;
import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
import com.fr.grid.Grid; import com.fr.grid.Grid;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
@ -13,7 +14,6 @@ import com.fr.report.core.SheetUtils;
import com.fr.report.elementcase.TemplateElementCase; import com.fr.report.elementcase.TemplateElementCase;
import com.fr.report.poly.PolyECBlock; import com.fr.report.poly.PolyECBlock;
import com.fr.report.worksheet.WorkSheet; import com.fr.report.worksheet.WorkSheet;
import com.fanruan.product.ProductConstants;
import javax.swing.JOptionPane; import javax.swing.JOptionPane;
import javax.swing.SwingUtilities; import javax.swing.SwingUtilities;
@ -65,7 +65,8 @@ public class DSColumnCellEditor extends AbstractCellEditor implements DialogActi
this.dsColumnPane = new DSColumnPane(); this.dsColumnPane = new DSColumnPane();
dsColumnPane.putElementcase(grid.getElementCasePane()); dsColumnPane.putElementcase(grid.getElementCasePane());
dsColumnPane.putCellElement(cellElement); dsColumnPane.putCellElement(cellElement);
BasicDialog dsColumnDialog = this.dsColumnPane.showWindowWithCustomSize(SwingUtilities.getWindowAncestor(grid), null, DSColumnPane.DEFAULT_DIMENSION); BasicDialog dsColumnDialog = this.dsColumnPane.showWindowWithCustomSize(SwingUtilities.getWindowAncestor(grid), null,
DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.ds.column.cellEditor.pane"));
dsColumnDialog.addDialogActionListener(this); dsColumnDialog.addDialogActionListener(this);
try { try {

3
designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnPane.java

@ -15,7 +15,6 @@ import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Component; import java.awt.Component;
import java.awt.Dimension;
import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener; import java.beans.PropertyChangeListener;
@ -26,8 +25,6 @@ import java.beans.PropertyChangeListener;
*/ */
public class DSColumnPane extends BasicPane { public class DSColumnPane extends BasicPane {
public static final Dimension DEFAULT_DIMENSION = new Dimension(700, 600);
private TableDataSource tplEC; private TableDataSource tplEC;
private FineTabbedPane tabbedPane; private FineTabbedPane tabbedPane;
private DSColumnBasicPane basicPane = null; private DSColumnBasicPane basicPane = null;

13
designer-realize/src/main/java/com/fr/design/dscolumn/ResultSetGroupPopUpPane.java

@ -24,6 +24,8 @@ import java.awt.event.ItemListener;
import static com.fine.swing.ui.layout.Layouts.cell; import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column; import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.row; import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.theme.utils.FineClientProperties.ADAPTIVE_COMBO_BOX;
import static com.fine.theme.utils.FineClientProperties.COMBO_BOX_TYPE;
public class ResultSetGroupPopUpPane extends ResultSetGroupPane { public class ResultSetGroupPopUpPane extends ResultSetGroupPane {
@ -68,12 +70,15 @@ public class ResultSetGroupPopUpPane extends ResultSetGroupPane {
functionComboBox = new FunctionComboBox(GUICoreUtils.getFunctionArray()); functionComboBox = new FunctionComboBox(GUICoreUtils.getFunctionArray());
this.add(column(LayoutConstants.VERTICAL_GAP, this.add(column(LayoutConstants.VERTICAL_GAP,
row(10, row(LayoutConstants.HORIZONTAL_GAP,
cell(groupRadioButton), cell(groupComboBox), cell(advancedButton) cell(groupRadioButton),
cell(groupComboBox).with(it -> it.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX)),
cell(advancedButton)
), ),
cell(listRadioButton), cell(listRadioButton),
row(10, row(LayoutConstants.HORIZONTAL_GAP,
cell(summaryRadioButton), cell(functionComboBox) cell(summaryRadioButton),
cell(functionComboBox).with(it -> it.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX))
) )
).getComponent()); ).getComponent());

16
designer-realize/src/main/java/com/fr/design/expand/ConditionParentPane.java

@ -13,6 +13,7 @@ import java.awt.event.ActionListener;
import static com.fine.swing.ui.layout.Layouts.cell; import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.flex; import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row; import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.fix;
public class ConditionParentPane extends JPanel { public class ConditionParentPane extends JPanel {
private ParentPane leftParentPane; private ParentPane leftParentPane;
@ -31,16 +32,11 @@ public class ConditionParentPane extends JPanel {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
leftParentPane = new ParentPane(ParentPane.LEFT, listener); leftParentPane = new ParentPane(ParentPane.LEFT, listener);
upParentPane = new ParentPane(ParentPane.UP, listener); upParentPane = new ParentPane(ParentPane.UP, listener);
this.add(row(10, this.add(row(
row( cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Left_Parent") + ": ")), fix(10), cell(leftParentPane),
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Left_Parent") + ": ")).weight(0.1), fix(20),
cell(leftParentPane).weight(0.3) cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Up_Parent") + ": ")), fix(10), cell(upParentPane),
).weight(0.3), flex()
row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Up_Parent") + ": ")).weight(0.1),
cell(upParentPane).weight(0.3)
).weight(0.3),
flex(0.2)
).getComponent()); ).getComponent());
} }
public void putElementcase(ElementCasePane t){ public void putElementcase(ElementCasePane t){

41
designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java

@ -2,12 +2,10 @@ package com.fr.design.report;
import com.fine.theme.utils.FineUIUtils; import com.fine.theme.utils.FineUIUtils;
import com.fr.base.BaseUtils;
import com.fine.theme.icon.LazyIcon; import com.fine.theme.icon.LazyIcon;
import com.fr.config.ServerPreferenceConfig; import com.fr.config.ServerPreferenceConfig;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.UIComponentUtils; import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.transaction.Configurations; import com.fr.transaction.Configurations;
@ -18,7 +16,6 @@ import javax.swing.JPanel;
import javax.swing.SwingConstants; import javax.swing.SwingConstants;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
@ -64,20 +61,21 @@ public class WriteShortCutsPane extends JPanel{
private JPanel getFeatureNamePane(){ private JPanel getFeatureNamePane(){
JPanel featureNamePane = new JPanel(new BorderLayout()); JPanel featureNamePane = new JPanel(new BorderLayout());
featureNamePane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); featureNamePane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
UILabel name = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Feature_Name"), SwingConstants.RIGHT); UILabel name = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Feature_Name"));
UILabel nextCol = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Next_Column"), SwingConstants.CENTER); UILabel nextCol = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Next_Column"), SwingConstants.CENTER);
UILabel nextRow = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Next_Row"), SwingConstants.CENTER); UILabel nextRow = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Next_Row"), SwingConstants.CENTER);
UILabel shortName = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Current_Keys"), SwingConstants.RIGHT); UILabel shortName = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Current_Keys"));
UIComponentUtils.setLineWrap(shortName, MAX_LABEL_WIDTH); UIComponentUtils.setLineWrap(shortName, MAX_LABEL_WIDTH);
nextColHK = new UILabel(nextColString, SwingConstants.CENTER); nextColHK = new UILabel(nextColString, SwingConstants.CENTER);
JPanel switchBtnPane = getSwitchBtnPane(); UIButton switchbt = new UIButton(new LazyIcon("switch", 24));
switchbt.addActionListener(getListener());
switchbt.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Exchange_Key"));
nextRowHK = new UILabel(nextRowString, SwingConstants.CENTER); nextRowHK = new UILabel(nextRowString, SwingConstants.CENTER);
JPanel centerPane = new JPanel(new BorderLayout()); JPanel centerPane = new JPanel(new BorderLayout());
centerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));
centerPane.add(column(10, centerPane.add(column(10,
row(10, cell(name).weight(0.13), cell(nextCol).weight(0.15), cell(new JPanel()).weight(0.12), cell(nextRow).weight(0.15), flex(0.45)), row(cell(name).weight(0.2), cell(nextCol).weight(0.3), flex(0.1), cell(nextRow).weight(0.3), flex(0.1)),
row(10, cell(shortName).weight(0.13), cell(nextColHK).weight(0.15), cell(switchBtnPane).weight(0.12), cell(nextRowHK).weight(0.15), flex(0.45)) row(cell(shortName).weight(0.2), cell(nextColHK).weight(0.3), row(flex(), cell(switchbt), flex()).weight(0.1), cell(nextRowHK).weight(0.3), flex(0.1))
).getComponent()); ).getComponent());
featureNamePane.add(centerPane, BorderLayout.CENTER); featureNamePane.add(centerPane, BorderLayout.CENTER);
@ -85,31 +83,20 @@ public class WriteShortCutsPane extends JPanel{
return featureNamePane; return featureNamePane;
} }
private JPanel getSwitchBtnPane() {
UIButton switchbt = new UIButton(new LazyIcon("switch", new Dimension(36, 24)));
switchbt.addActionListener(getListener());
switchbt.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Exchange_Key"));
JPanel switchBtnPane = FRGUIPaneFactory.createCenterFlowInnerContainer_S_Pane();
switchBtnPane.add(switchbt);
return switchBtnPane;
}
private JPanel getHintsPane(){ private JPanel getHintsPane(){
JPanel hintsPane = new JPanel(new BorderLayout()); JPanel hintsPane = new JPanel(new BorderLayout());
hintsPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); hintsPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
UILabel systemDefault = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_System_Default"), SwingConstants.RIGHT); UILabel systemDefault = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_System_Default"));
UILabel preColText = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Previous_Column"), SwingConstants.CENTER); UILabel preColText = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Previous_Column"));
UILabel preRowText = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Previous_Row"), SwingConstants.CENTER); UILabel preRowText = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Previous_Row"));
preCol = new UILabel("Shift+" + nextColString, SwingConstants.LEFT); preCol = new UILabel("Shift+" + nextColString);
preRow = new UILabel("Shift+" + nextRowString, SwingConstants.LEFT); preRow = new UILabel("Shift+" + nextRowString);
JPanel centerPane = new JPanel(new BorderLayout()); JPanel centerPane = new JPanel(new BorderLayout());
centerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));
centerPane.add(column(10, centerPane.add(column(10,
row(10, cell(systemDefault).weight(0.13), cell(preColText).weight(0.24), cell(preCol).weight(0.14), flex(0.64)), row(cell(systemDefault).weight(0.2), cell(preColText).weight(0.3), cell(preCol).weight(0.3), flex(0.2)),
row(10, cell(new JPanel()).weight(0.13), cell(preRowText).weight(0.24), cell(preRow).weight(0.14), flex(0.64)) row( cell(new JPanel()).weight(0.2), cell(preRowText).weight(0.3), cell(preRow).weight(0.3), flex(0.2))
).getComponent()); ).getComponent());
hintsPane.add(centerPane, BorderLayout.CENTER); hintsPane.add(centerPane, BorderLayout.CENTER);

10
designer-realize/src/main/java/com/fr/design/sort/common/SortColumnRowPane.java

@ -7,6 +7,7 @@ import com.fr.base.background.ColorBackground;
import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
@ -51,6 +52,7 @@ public class SortColumnRowPane extends JPanel implements UIObserver {
private final static Icon ENABLE_ICON = new LazyIcon("cellSelect"); private final static Icon ENABLE_ICON = new LazyIcon("cellSelect");
private boolean enabled; private boolean enabled;
SelectActionListener selectActionListener; SelectActionListener selectActionListener;
private AbstractAttrNoScrollPane parent;
HeaderAreaPane.CellSelectionManager cellSelectionManager; HeaderAreaPane.CellSelectionManager cellSelectionManager;
@ -63,6 +65,13 @@ public class SortColumnRowPane extends JPanel implements UIObserver {
initTextField(); initTextField();
initSelectButton(); initSelectButton();
initLayout(); initLayout();
//翻新前AbstractAttrNoScrollPane中递归注册已加载的Pane事件,UI翻新后部分面板未提前加载导致事件未注册,先主动调用下后续再重构
registerChangeListener(new UIObserverListener() {
@Override
public void doChange() {
parent.attributeChanged();
}
});
} }
private void initLayout() { private void initLayout() {
@ -75,7 +84,6 @@ public class SortColumnRowPane extends JPanel implements UIObserver {
).getComponent()); ).getComponent());
} }
void intUILabel() { void intUILabel() {
elementLabel = new UILabel(new LazyIcon("cellelement_small")); elementLabel = new UILabel(new LazyIcon("cellelement_small"));
} }

33
designer-realize/src/main/java/com/fr/design/sort/header/HeaderAreaPane.java

@ -34,6 +34,7 @@ public class HeaderAreaPane extends JPanel {
ReactiveCardPane cardPane; ReactiveCardPane cardPane;
UIComboBox uiComboBox; UIComboBox uiComboBox;
UILabel headerLabel; UILabel headerLabel;
boolean showHeaderArea;
HeaderAreaPane(int headerAreaPaneWidth, int headerAreaPaneRightWidth) { HeaderAreaPane(int headerAreaPaneWidth, int headerAreaPaneRightWidth) {
this.headerAreaPaneWidth = headerAreaPaneWidth; this.headerAreaPaneWidth = headerAreaPaneWidth;
@ -53,23 +54,31 @@ public class HeaderAreaPane extends JPanel {
private void initChangeListener() { private void initChangeListener() {
uiComboBox.addItemListener(e -> { uiComboBox.addItemListener(e -> {
if (uiComboBox.getSelectedIndex() == 0) { if ((showHeaderArea ? 1 : 0) != uiComboBox.getSelectedIndex()) {
cardPane.select("none").populate(); triggerItemChanged();
cellSelectionManager.removeNotSelectables(columnRowPane.updateBean());
columnRowPane.cancelSelectState();
} else {
cardPane.select("custom").populate();
ColumnRow columnRow = columnRowPane.updateBean();
if (cellSelectionManager.isNotSelectables(columnRow)) {
columnRowPane.setColumnRow(ColumnRow.ERROR);
} else {
cellSelectionManager.addNotSelectables(columnRow);
}
} }
}); });
uiComboBox.setEnabled(false); uiComboBox.setEnabled(false);
} }
private void triggerItemChanged() {
if (uiComboBox.getSelectedIndex() == 0) {
cardPane.select("none").populate();
showHeaderArea = false;
cellSelectionManager.removeNotSelectables(columnRowPane.updateBean());
columnRowPane.cancelSelectState();
} else {
cardPane.select("custom").populate();
showHeaderArea = true;
ColumnRow columnRow = columnRowPane.updateBean();
if (cellSelectionManager.isNotSelectables(columnRow)) {
columnRowPane.setColumnRow(ColumnRow.ERROR);
} else {
cellSelectionManager.addNotSelectables(columnRow);
}
}
}
private void initCardPane() { private void initCardPane() {
cardPane = ReactiveCardPane.create() cardPane = ReactiveCardPane.create()
.addSupplier("none", () -> column(LayoutConstants.VERTICAL_GAP, .addSupplier("none", () -> column(LayoutConstants.VERTICAL_GAP,

8
designer-realize/src/main/java/com/fr/design/webattr/CommonPane.java

@ -35,14 +35,14 @@ public class CommonPane extends JPanel {
JPanel workPanel = new JPanel(new BorderLayout()); JPanel workPanel = new JPanel(new BorderLayout());
workPanel.add(column(LayoutConstants.VERTICAL_GAP, workPanel.add(column(LayoutConstants.VERTICAL_GAP,
//标题 //标题
row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Title"))).weight(0.2), row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Title"))).weight(0.25),
cell(this.titleTextField).weight(0.5), cell(this.titleTextField).weight(0.5),
flex(0.3) flex(0.25)
), ),
//报表缓存有效时间 //报表缓存有效时间
row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cache_Validate_Time"))).weight(0.2), row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cache_Validate_Time"))).weight(0.25),
row(cell(this.cacheValidateTimeEditor).weight(0.6), fix(5), cell(new UILabel("milliseconds")).weight(0.4)).weight(0.4), row(cell(this.cacheValidateTimeEditor).weight(0.6), fix(5), cell(new UILabel("milliseconds")).weight(0.4)).weight(0.4),
flex(0.4) flex(0.35)
) )
).with(it -> it.setBorder(new ScaledEmptyBorder(10,10,10,10))).getComponent()); ).with(it -> it.setBorder(new ScaledEmptyBorder(10,10,10,10))).getComponent());
this.add(workPanel); this.add(workPanel);

4
designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java

@ -201,7 +201,7 @@ public class EditToolBar extends BasicPane {
buttonColorGroupPane.setVisible(false); buttonColorGroupPane.setVisible(false);
//样式设置面板布局,默认背景-按钮颜色 //样式设置面板布局,默认背景-按钮颜色
backgroundPane.add(column(LayoutConstants.VERTICAL_GAP, backgroundPane.add(column(LayoutConstants.VERTICAL_GAP,
row(LayoutConstants.HORIZONTAL_GAP, cell(defaultCheckBox).weight(0.15), cell(bgButton).weight(0.2), flex(0.65)).weight(1), row(LayoutConstants.HORIZONTAL_GAP, cell(defaultCheckBox).weight(0.25), cell(bgButton).weight(0.2), flex(0.55)).weight(1),
cell(buttonColorGroupPane).weight(1) cell(buttonColorGroupPane).weight(1)
).getComponent()); ).getComponent());
@ -762,6 +762,6 @@ public class EditToolBar extends BasicPane {
} }
}; };
bgColorButtonGroup.setPreferredSize(new Dimension(FineUIScale.scale(135), bgColorButtonGroup.getPreferredSize().height)); bgColorButtonGroup.setPreferredSize(new Dimension(FineUIScale.scale(135), bgColorButtonGroup.getPreferredSize().height));
return row(10, cell(headLabel).weight(0.15), cell(bgColorButtonGroup).weight(0.3), flex(0.55)).getComponent(); return row(10, cell(headLabel).weight(0.25), cell(bgColorButtonGroup).weight(0.3), flex(0.45)).getComponent();
} }
} }

3
designer-realize/src/main/java/com/fr/design/webattr/PageWebSettingPane.java

@ -110,7 +110,8 @@ public class PageWebSettingPane extends WebSettingPane<WebPage> {
return column(LayoutConstants.VERTICAL_GAP, return column(LayoutConstants.VERTICAL_GAP,
//报表显示位置 //报表显示位置
row( row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Show_Location"))).weight(0.15), cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Show_Location")))
.with(it -> it.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Show_Location"))).weight(0.15),
row( cell(centerRadioButton), fix(12), cell(leftRadioButton), flex()).weight(0.85) row( cell(centerRadioButton), fix(12), cell(leftRadioButton), flex()).weight(0.85)
), ),

10
designer-realize/src/main/java/com/fr/design/webattr/WriteToolBarPane.java

@ -105,11 +105,11 @@ public class WriteToolBarPane extends AbstractEditToolBarPane {
cell(isAutoStash) cell(isAutoStash)
).getComponent(); ).getComponent();
JPanel northPane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(2); JPanel northPane = column(LayoutConstants.VERTICAL_GAP,
northPane.add(sheetPane); row(cell(sheetPane).weight(1), fix(20), cell(showLocPane).weight(1)),
northPane.add(showLocPane); cell(backgroundPane),
northPane.add(backgroundPane); cell(unloadCheckPane)
northPane.add(unloadCheckPane); ).getComponent();
//工具栏编辑 //工具栏编辑
editToolBarButton.addActionListener(editBtnListener); editToolBarButton.addActionListener(editBtnListener);

Loading…
Cancel
Save