Browse Source

Merge pull request #14754 in DESIGN/design from fbp/release to fbp/feature

* commit 'f4cdd8d55ef8705c672969a241539324f72105b6':
  REPORT-132799 & REPORT-131838 & REPORT-132389 & REPORT-132382 & REPORT-132380 & REPORT-132375 & REPORT-132357 & REPORT-132231 & REPORT-132227【newUI】fix:国际化布局调整及Tab统一修复/fbp回归问题修复
  REPORT-132799 & REPORT-131838 & REPORT-132389 & REPORT-132382 & REPORT-132380 & REPORT-132375 & REPORT-132357 & REPORT-132231 & REPORT-132227【newUI】fix:国际化布局调整及Tab统一修复/fbp回归问题修复
  REPORT-133167 & REPORT-133157 fix:细节缩放问题修复
  REPORT-133198 fix:List面板背景逻辑调整
  模板解密对话框修改
  REPORT-133037 fix:自动刷新面板修复&参数面板移动端显示效果优化
  REPORT-132601 fix:图表标题面板问题修复
  REPORT-132916 fix:仪表盘、气泡图漏翻新面板补充
  REPORT-133106 fix:参数面板遮罩层修复
  fbp回归问题
  关联数据集增加国际化文本和提示
fbp/research
superman 4 months ago
parent
commit
4482be81f4
  1. 11
      designer-base/src/main/java/com/fine/theme/light/ui/FineToggleButtonUI.java
  2. 1
      designer-base/src/main/java/com/fine/theme/utils/FineClientProperties.java
  3. 18
      designer-base/src/main/java/com/fine/theme/utils/FineUIUtils.java
  4. 2
      designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java
  5. 3
      designer-base/src/main/java/com/fr/design/data/datapane/connect/AdvancePane.java
  6. 3
      designer-base/src/main/java/com/fr/design/data/datapane/connect/DBCPAttrPane.java
  7. 6
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java
  8. 8
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java
  9. 10
      designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java
  10. 18
      designer-base/src/main/java/com/fr/design/gui/controlpane/UISimpleListControlPane.java
  11. 48
      designer-base/src/main/java/com/fr/design/gui/frpane/FineTabbedPane.java
  12. 53
      designer-base/src/main/java/com/fr/design/gui/ibutton/FitUIButtonGroup.java
  13. 9
      designer-base/src/main/java/com/fr/design/gui/ibutton/UIButtonGroup.java
  14. 16
      designer-base/src/main/java/com/fr/design/gui/ibutton/UIHeadGroup.java
  15. 2
      designer-base/src/main/java/com/fr/design/gui/icombobox/ColorSchemeComboBox.java
  16. 2
      designer-base/src/main/java/com/fr/design/gui/icombobox/LineComboBox.java
  17. 2
      designer-base/src/main/java/com/fr/design/gui/icontainer/UIModeControlContainer.java
  18. 26
      designer-base/src/main/java/com/fr/design/mainframe/DecodeDialog.java
  19. 3
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/RecycleSettingPane.java
  20. 3
      designer-base/src/main/java/com/fr/design/style/background/BackgroundPane.java
  21. 2
      designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties
  22. 2
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties
  23. 2
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties
  24. 2
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties
  25. 2
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties
  26. 10
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java
  27. 7
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/BubblePlotReportDataContentPane.java
  28. 30
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java
  29. 7
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java
  30. 12
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java
  31. 4
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java
  32. 15
      designer-chart/src/main/java/com/fr/design/module/ChartPreFillStylePane.java
  33. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHeatValueColorPane.java
  34. 18
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPane.java
  35. 10
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPaneWithBackGroundLabel.java
  36. 29
      designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderWithShapePane.java
  37. 26
      designer-chart/src/main/java/com/fr/van/chart/designer/other/AutoRefreshPane.java
  38. 9
      designer-chart/src/main/java/com/fr/van/chart/designer/other/AutoRefreshPaneWithoutTooltip.java
  39. 3
      designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java
  40. 9
      designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java
  41. 9
      designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPieValueLabelDetailPane.java
  42. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java
  43. 10
      designer-chart/src/main/java/com/fr/van/chart/range/component/SectionIntervalConfigPaneWithOutNum.java
  44. 8
      designer-form/src/main/java/com/fr/design/parameter/ParameterPropertyPane.java
  45. 18
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java
  46. 5
      designer-realize/src/main/java/com/fr/design/actions/report/ReportPrintSettingAction.java
  47. 2
      designer-realize/src/main/java/com/fr/design/headerfooter/HFAttributesEditDialog.java
  48. 3
      designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoLabel.java
  49. 3
      designer-realize/src/main/java/com/fr/design/report/freeze/FreezeAndRepeatPane.java
  50. 20
      designer-realize/src/main/java/com/fr/design/webattr/PageToolBarPane.java
  51. 5
      designer-realize/src/main/java/com/fr/design/webattr/ReportWriteAttrPane.java
  52. 40
      designer-realize/src/main/java/com/fr/design/webattr/printsettings/AbstractNativePrintSettingPane.java
  53. 5
      designer-realize/src/main/java/com/fr/design/webattr/printsettings/PrintSettingPane.java

11
designer-base/src/main/java/com/fine/theme/light/ui/FineToggleButtonUI.java

@ -22,6 +22,7 @@ import java.awt.Shape;
import java.awt.Rectangle; import java.awt.Rectangle;
import static com.fine.theme.utils.FineClientProperties.BUTTON_TYPE_GROUP; import static com.fine.theme.utils.FineClientProperties.BUTTON_TYPE_GROUP;
import static com.fine.theme.utils.FineClientProperties.BUTTON_TYPE_GROUP_FIT;
import static com.fine.theme.utils.FineClientProperties.BUTTON_TYPE; import static com.fine.theme.utils.FineClientProperties.BUTTON_TYPE;
import static com.fine.theme.utils.FineClientProperties.BUTTON_TYPE_TAB; import static com.fine.theme.utils.FineClientProperties.BUTTON_TYPE_TAB;
import static com.fine.theme.utils.FineClientProperties.BUTTON_GROUP_POSITION; import static com.fine.theme.utils.FineClientProperties.BUTTON_GROUP_POSITION;
@ -96,12 +97,20 @@ public class FineToggleButtonUI extends FlatToggleButtonUI {
} }
static boolean isGroupButton(Component c) { static boolean isGroupButton(Component c) {
if (!(c instanceof UIButton)) {
return false;
}
String buttonType = getButtonTypeStr((UIButton) c);
return BUTTON_TYPE_GROUP.equals(buttonType) || BUTTON_TYPE_GROUP_FIT.equals(buttonType);
}
static boolean isGroupButtonNotFit(Component c) {
return c instanceof UIButton && BUTTON_TYPE_GROUP.equals(getButtonTypeStr((UIButton) c)); return c instanceof UIButton && BUTTON_TYPE_GROUP.equals(getButtonTypeStr((UIButton) c));
} }
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
if (isGroupButton(c) || isTabButton(c)) { if (isGroupButtonNotFit(c) || isTabButton(c)) {
((AbstractButton)c).setMargin(FineUIUtils.getUIInsets("ToggleButton.compact.margin", "ToggleButton.margin")); ((AbstractButton)c).setMargin(FineUIUtils.getUIInsets("ToggleButton.compact.margin", "ToggleButton.margin"));
} }
super.paint(g, c); super.paint(g, c);

1
designer-base/src/main/java/com/fine/theme/utils/FineClientProperties.java

@ -13,6 +13,7 @@ public interface FineClientProperties extends FlatClientProperties {
//--------------------------- ButtonGroup ----------------------- //--------------------------- ButtonGroup -----------------------
String BUTTON_TYPE_GROUP = "group"; String BUTTON_TYPE_GROUP = "group";
String BUTTON_TYPE_GROUP_FIT = "groupFit";
String BUTTON_BORDER = "buttonBorder"; String BUTTON_BORDER = "buttonBorder";
String BUTTON_BORDER_LEFT_ROUND_RECT = "leftRoundRect"; String BUTTON_BORDER_LEFT_ROUND_RECT = "leftRoundRect";

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

@ -6,7 +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.mainframe.theme.edit.ui.LabelUtils;
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;
@ -15,6 +15,7 @@ import javax.swing.JLabel;
import javax.swing.JLayer; import javax.swing.JLayer;
import javax.swing.ScrollPaneConstants; import javax.swing.ScrollPaneConstants;
import javax.swing.UIManager; import javax.swing.UIManager;
import javax.swing.JTextArea;
import java.awt.Color; import java.awt.Color;
import java.awt.Component; import java.awt.Component;
import java.awt.Composite; import java.awt.Composite;
@ -450,16 +451,11 @@ public class FineUIUtils {
} }
/** /**
* 创建一个支持自动换行的 UILabel并应用指定样式 * 创建一个支持自动换行的提示文本
* * @param text 显示的文本内容
* @param text 要显示的文本内容 * @return 自动换行提示文本
* @param style 样式字符串
* @return 支持自动换行的 UILabel
*/ */
public static UILabel createLineWrapLabel(String text, String style) { public static JTextArea createAutoWrapTipLabel(String text) {
UILabel label = new UILabel(text); return LabelUtils.createAutoWrapLabel(text, FineUIUtils.getUIColor("Label.tipColor", "inactiveCaption"));
FineUIStyle.setStyle(label, style);
UIComponentUtils.setLineWrap(label);
return label;
} }
} }

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

@ -48,7 +48,6 @@ import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.widget.FRWidgetFactory; import com.fr.design.widget.FRWidgetFactory;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.FRFont; import com.fr.general.FRFont;
import com.fr.general.IOUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.general.log.Log4jConfig; import com.fr.general.log.Log4jConfig;
import com.fr.io.attr.ImageExportAttr; import com.fr.io.attr.ImageExportAttr;
@ -347,6 +346,7 @@ public class PreferencePane extends BasicPane {
.addTab(i18nText("Fine-Design_Basic_General"), generalScrollPane) .addTab(i18nText("Fine-Design_Basic_General"), generalScrollPane)
.addTab(i18nText("Fine-Design_Basic_Advanced"), adviceScrollPane) .addTab(i18nText("Fine-Design_Basic_Advanced"), adviceScrollPane)
.addTab(i18nText("Fine-Design_Vcs_Title"), vcsParentPane) .addTab(i18nText("Fine-Design_Vcs_Title"), vcsParentPane)
.withAdaptiveFit()
.build(); .build();
contentPane.add(tabbedPane, BorderLayout.CENTER); contentPane.add(tabbedPane, BorderLayout.CENTER);

3
designer-base/src/main/java/com/fr/design/data/datapane/connect/AdvancePane.java

@ -53,7 +53,8 @@ public class AdvancePane extends BasicPane {
flex(2) flex(2)
), ),
row( row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Test_On_Borrow"), SwingConstants.LEFT)).weight(1), cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Test_On_Borrow"), SwingConstants.LEFT))
.with(it -> it.setToolTipText(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Test_On_Borrow"))).weight(1),
cell(DBCP_TEST_ON_BORROW).weight(1.5), cell(DBCP_TEST_ON_BORROW).weight(1.5),
flex(2) flex(2)
), ),

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

@ -15,6 +15,7 @@ import com.fr.design.gui.icombobox.UIComboBox;
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.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.theme.edit.ui.LabelUtils;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -83,7 +84,7 @@ public class DBCPAttrPane extends BasicPane {
row(cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Connection_Pool_Evictionruns_millis"))).weight(1), cell(DBCP_TIMEBETWEENEVICTIONRUNSMILLS).weight(1)), row(cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Connection_Pool_Evictionruns_millis"))).weight(1), cell(DBCP_TIMEBETWEENEVICTIONRUNSMILLS).weight(1)),
row(cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Num_Test_Per_Evction_Run"))).weight(1), cell(DBCP_NUMTESTSPEREVICTIONRUN).weight(1)), row(cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Num_Test_Per_Evction_Run"))).weight(1), cell(DBCP_NUMTESTSPEREVICTIONRUN).weight(1)),
row(cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Connection_Pool_Mix_Evictable_Idle_Time_Millis"))).weight(1), cell(DBCP_MINEVICTABLEIDLETIMEMILLIS).weight(1)), 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)) cell(LabelUtils.createAutoWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Dbcp_Warning"), FineUIUtils.getUIColor("Label.warningColor", "Label.warningColor")))
).getComponent(); ).getComponent();
defaultPane.add(northFlowPane); defaultPane.add(northFlowPane);
this.add(defaultPane); this.add(defaultPane);

6
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java

@ -205,9 +205,9 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
testConnection.addActionListener(testConnectionListener); testConnection.addActionListener(testConnectionListener);
// 提示信息 // 提示信息
tipPanel = column( tipPanel = column(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Type_Parameter_Desc"), FineUIStyle.LABEL_TIP)), cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Type_Parameter"), FineUIStyle.LABEL_TIP)),
cell(new UILabel("reportlets/excel/FineReport${abc}." + "txt", FineUIStyle.LABEL_TIP)), cell(new UILabel("assets/file_dataset/FineReport${abc}." + "txt", FineUIStyle.LABEL_TIP)),
cell(new UILabel("http://192.168.100.120:8080/XXServer/Report/excel${abc}.jsp", FineUIStyle.LABEL_TIP)) cell(new UILabel("http://192.168.100.120:8080/webroot/help/excel${abc}.jsp", FineUIStyle.LABEL_TIP))
).getComponent(); ).getComponent();
return column( return column(
LayoutConstants.VERTICAL_GAP, LayoutConstants.VERTICAL_GAP,

8
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java

@ -102,8 +102,12 @@ public class MultiTDTableDataPane extends AbstractTableDataPane<MultiTDTableData
// 10个正好不会出现滚动条 // 10个正好不会出现滚动条
centerPanel.setLayout(new GridLayout(len < MIN_BAR_NUMBER ? MIN_BAR_NUMBER : len + 1, 1)); centerPanel.setLayout(new GridLayout(len < MIN_BAR_NUMBER ? MIN_BAR_NUMBER : len + 1, 1));
centerPanel.add(row(LayoutConstants.HORIZONTAL_GAP, centerPanel.add(row(LayoutConstants.HORIZONTAL_GAP,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Multi_Dataset_Name"))).weight(0.2), cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Multi_Dataset_Name")))
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Multi_Dataset_Conditions"))).weight(0.2), .with(it -> it.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Multi_Dataset_Name")))
.weight(0.2),
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Multi_Dataset_Conditions")))
.with(it -> it.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Multi_Dataset_Conditions")))
.weight(0.2),
flex(0.6) flex(0.6)
).getComponent()); ).getComponent());

10
designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java

@ -374,10 +374,8 @@ public abstract class JListControlPane extends JControlPane implements ListContr
this.iconLabel.setBorder(new ScaledEmptyBorder(0, 4, 0, 0)); this.iconLabel.setBorder(new ScaledEmptyBorder(0, 4, 0, 0));
add(this.textLabel, BorderLayout.CENTER); add(this.textLabel, BorderLayout.CENTER);
add(this.iconLabel, BorderLayout.WEST); add(this.iconLabel, BorderLayout.WEST);
this.iconLabel.setBackground(FlatUIUtils.getUIColor("List.cellRender.background", Color.WHITE)); this.textLabel.setOpaque(false);
//iconLabel和textLabel的背景颜色不会被JList背景颜色覆盖,开发者自定义 this.iconLabel.setOpaque(false);
this.textLabel.setOpaque(true);
this.iconLabel.setOpaque(true);
} }
@Override @Override
@ -390,9 +388,9 @@ public abstract class JListControlPane extends JControlPane implements ListContr
this.textLabel.setText(nameable.getName()); this.textLabel.setText(nameable.getName());
boolean iconSet = false; boolean iconSet = false;
if(isSelected) { if(isSelected) {
this.textLabel.setBackground(FlatUIUtils.getUIColor("List.selectionInactiveBackground", Color.GRAY)); setBackground(FlatUIUtils.getUIColor("List.selectionInactiveBackground", Color.GRAY));
} else { } else {
this.textLabel.setBackground(FlatUIUtils.getUIColor("List.cellRender.background", Color.WHITE)); setBackground(FlatUIUtils.getUIColor("List.cellRender.background", Color.WHITE));
} }
for (NameableCreator creator : JListControlPane.this.creators()) { for (NameableCreator creator : JListControlPane.this.creators()) {
if (creator.menuIcon() != null && creator.acceptObject2Populate(nameable) != null) { if (creator.menuIcon() != null && creator.acceptObject2Populate(nameable) != null) {

18
designer-base/src/main/java/com/fr/design/gui/controlpane/UISimpleListControlPane.java

@ -2,13 +2,13 @@ package com.fr.design.gui.controlpane;
import com.fine.theme.icon.LazyIcon; import com.fine.theme.icon.LazyIcon;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.border.FineBorderFactory;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
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.gui.ilist.ListModelElement; import com.fr.design.gui.ilist.ListModelElement;
import com.fr.design.gui.ilist.UIList; import com.fr.design.gui.ilist.UIList;
import com.fr.design.gui.itoolbar.UIToolBarUI;
import com.fr.design.gui.itoolbar.UIToolbar; import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.menu.ShortCut; import com.fr.design.menu.ShortCut;
@ -22,7 +22,6 @@ import sun.swing.DefaultLookup;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.DefaultListModel; import javax.swing.DefaultListModel;
import javax.swing.JComponent;
import javax.swing.JList; import javax.swing.JList;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.ListCellRenderer; import javax.swing.ListCellRenderer;
@ -33,8 +32,6 @@ import javax.swing.event.ListSelectionListener;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color; import java.awt.Color;
import java.awt.Component; import java.awt.Component;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Point; import java.awt.Point;
import java.awt.Toolkit; import java.awt.Toolkit;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
@ -89,22 +86,14 @@ public class UISimpleListControlPane extends BasicPane {
toolbarDef.addShortCut(sj.getShortCut()); toolbarDef.addShortCut(sj.getShortCut());
} }
toolBar = ToolBarDef.createJToolBar(); toolBar = ToolBarDef.createJToolBar();
toolBar.setUI(new UIToolBarUI(){
@Override
public void paint(Graphics g, JComponent c) {
Graphics2D g2 = (Graphics2D) g;
g2.setColor(Color.WHITE);
g2.fillRect(0, 0, c.getWidth(), c.getHeight());
}
});
toolbarDef.updateToolBar(toolBar); toolbarDef.updateToolBar(toolBar);
// 封装一层,加边框 // 封装一层,加边框
JPanel toolBarPane = new JPanel(new BorderLayout()); JPanel toolBarPane = new JPanel(new BorderLayout());
toolBarPane.add(toolBar, BorderLayout.CENTER); toolBarPane.add(toolBar, BorderLayout.CENTER);
toolBarPane.setBorder(BorderFactory.createMatteBorder(1, 1, 0, 1, UIConstants.RULER_LINE_COLOR)); toolBarPane.setBorder(FineBorderFactory.createDefaultUnderlineBorder());
listPane.add(toolBarPane, BorderLayout.NORTH); listPane.add(toolBarPane, BorderLayout.NORTH);
contentPane.setBorder(FineBorderFactory.createWrappedRoundBorder());
return contentPane; return contentPane;
} }
@ -420,7 +409,6 @@ public class UISimpleListControlPane extends BasicPane {
private void initComponents() { private void initComponents() {
label = new UILabel(); label = new UILabel();
// label.setBorder(BorderFactory.createEmptyBorder(3, 10, 3, 0));
initialLabelForeground = label.getForeground(); initialLabelForeground = label.getForeground();
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(label, BorderLayout.CENTER); this.add(label, BorderLayout.CENTER);

48
designer-base/src/main/java/com/fr/design/gui/frpane/FineTabbedPane.java

@ -4,9 +4,14 @@ import com.fine.swing.ui.layout.Box;
import com.fine.theme.utils.FineUIUtils; import com.fine.theme.utils.FineUIUtils;
import com.formdev.flatlaf.ui.FlatUIUtils; import com.formdev.flatlaf.ui.FlatUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.gui.ibutton.FitUIButtonGroup;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.utils.ColorUtils; import com.fr.design.utils.ColorUtils;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.List;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
@ -42,15 +47,15 @@ public class FineTabbedPane extends Box {
private final UIButtonGroup<String> tabGroup; private final UIButtonGroup<String> tabGroup;
private final Map<String, JComponent> tabComponents; private final Map<String, JComponent> tabComponents;
private final int[] tabLayout; private final int[] tabLayout;
private final boolean useFitTab ;
private FineTabbedPane(Map<String, JComponent> tabComponents, float headRatio, int[] tabLayout) { private FineTabbedPane(Map<String, JComponent> tabComponents, float headRatio, int[] tabLayout, boolean useFitTab) {
this.headRatio = headRatio; this.headRatio = headRatio;
this.tabComponents = tabComponents; this.tabComponents = tabComponents;
this.tabLayout = tabLayout; this.tabLayout = tabLayout;
this.useFitTab = useFitTab;
String[] titleArray = tabComponents.keySet().toArray(new String[0]); String[] titleArray = tabComponents.keySet().toArray(new String[0]);
this.tabGroup = new UIButtonGroup<>(titleArray, titleArray, tabLayout); this.tabGroup = useFitTab ? new FitUIButtonGroup<>(titleArray, titleArray, tabLayout) : new UIButtonGroup<>(titleArray, titleArray, tabLayout);
initLayout(); initLayout();
initListeners(); initListeners();
} }
@ -71,6 +76,7 @@ public class FineTabbedPane extends Box {
private int[] tabLayout; private int[] tabLayout;
private float headRatio = 0.5f; private float headRatio = 0.5f;
private final Map<String, JComponent> tabComponents = new LinkedHashMap<>(); private final Map<String, JComponent> tabComponents = new LinkedHashMap<>();
private boolean useFitTab = false;
/** /**
* 设置头部居中比例0-1之间 * 设置头部居中比例0-1之间
@ -94,6 +100,16 @@ public class FineTabbedPane extends Box {
return this; return this;
} }
/**
* 设置使用自适应文本Tab
*
* @return TabPaneBuilder
*/
public TabPaneBuilder withAdaptiveFit() {
this.useFitTab = true;
return this;
}
/** /**
* 添加tab标签 * 添加tab标签
* *
@ -122,7 +138,7 @@ public class FineTabbedPane extends Box {
} else if (Arrays.stream(tabLayout).sum() != tabComponents.size()) { } else if (Arrays.stream(tabLayout).sum() != tabComponents.size()) {
throw new IllegalArgumentException("illegal tab layout argument!"); throw new IllegalArgumentException("illegal tab layout argument!");
} }
return new FineTabbedPane(tabComponents, headRatio, tabLayout); return new FineTabbedPane(tabComponents, headRatio, tabLayout, useFitTab);
} }
} }
@ -131,11 +147,10 @@ public class FineTabbedPane extends Box {
setMatchParentSize(true); setMatchParentSize(true);
float flexRatio = (1 - headRatio) / 2; float flexRatio = (1 - headRatio) / 2;
int headHeight = FlatUIUtils.getUIInt("Component.defaultHeight",24) * tabLayout.length / 2; int headHeight = FlatUIUtils.getUIInt("Component.defaultHeight",24) * tabLayout.length / 2;
Component component = useFitTab ? row(flex(), cell(tabGroup), flex()).getComponent() : row(flex(flexRatio), cell(tabGroup).weight(headRatio), flex(flexRatio)).getComponent();
add( add(
column( column(
row( cell(component),
flex(flexRatio), cell(tabGroup).weight(headRatio), flex(flexRatio)
),
flex() flex()
), ),
column( column(
@ -170,6 +185,23 @@ public class FineTabbedPane extends Box {
}); });
tabGroup.setSelectedIndex(0); tabGroup.setSelectedIndex(0);
cards.show(centerPane, String.valueOf(tabGroup.getSelectedItem())); cards.show(centerPane, String.valueOf(tabGroup.getSelectedItem()));
if (!useFitTab) {
initTabListeners();
}
}
private void initTabListeners() {
List<UIToggleButton> tabs = tabGroup.getLabelButtonList();
for (UIToggleButton tab : tabs) {
tab.addMouseListener(new MouseAdapter() {
@Override
public void mouseEntered(MouseEvent e) {
if (tab.getPreferredSize().width > tab.getWidth()) {
tab.setToolTipText(tab.getText());
}
}
});
}
} }
private void fireStateChanged() { private void fireStateChanged() {

53
designer-base/src/main/java/com/fr/design/gui/ibutton/FitUIButtonGroup.java

@ -0,0 +1,53 @@
package com.fr.design.gui.ibutton;
import com.fine.swing.ui.layout.Row;
import java.util.List;
import static com.fine.theme.utils.FineClientProperties.BUTTON_GROUP_POSITION;
import static com.fine.theme.utils.FineClientProperties.BUTTON_TYPE_GROUP_FIT;
import static com.formdev.flatlaf.FlatClientProperties.BUTTON_TYPE;
/**
* 自适应文案宽度的ButtonGroup
*
* @author Levy.Xie
* @since 11.0
* Created on 2024/08/28
*/
public class FitUIButtonGroup<T> extends UIButtonGroup<T> {
public FitUIButtonGroup(String[] textArray) {
super(textArray);
}
public FitUIButtonGroup(String[] textArray, T[] objects) {
super(textArray, objects);
}
public FitUIButtonGroup(String[] textArray, T[] objects, int[] customCols) {
super(textArray, objects, customCols);
}
@Override
protected void initLayout(int[] cols, boolean inToolbar) {
Row row = new Row();
List<UIToggleButton> buttonList = getLabelButtonList();
for (int i = 0; i < buttonList.size(); i++) {
row.add(buttonList.get(i));
if (i != buttonList.size() - 1 && !inToolbar) {
row.add(createDivider());
}
}
add(row);
}
@Override
protected void initButton(UIToggleButton labelButton, int index) {
labelButton.setBorderPainted(false);
labelButton.putClientProperty(BUTTON_TYPE, BUTTON_TYPE_GROUP_FIT);
labelButton.putClientProperty(BUTTON_GROUP_POSITION, getGroupButtonPosition(index));
labelButtonList.add(labelButton);
}
}

9
designer-base/src/main/java/com/fr/design/gui/ibutton/UIButtonGroup.java

@ -1,6 +1,7 @@
package com.fr.design.gui.ibutton; package com.fr.design.gui.ibutton;
import com.fine.swing.ui.layout.Column; import com.fine.swing.ui.layout.Column;
import com.fine.swing.ui.layout.Layouts;
import com.fine.swing.ui.layout.Row; import com.fine.swing.ui.layout.Row;
import com.fine.swing.ui.layout.Spacer; import com.fine.swing.ui.layout.Spacer;
import com.fine.theme.light.ui.FineRoundBorder; import com.fine.theme.light.ui.FineRoundBorder;
@ -213,24 +214,24 @@ public class UIButtonGroup<T> extends Column implements GlobalNameObserver, UIOb
int col = cols[row]; int col = cols[row];
Row rowContainer = new Row(); Row rowContainer = new Row();
for (int j = 0; j < col; j++) { for (int j = 0; j < col; j++) {
rowContainer.add(cell(getLabelButtonList().get(currentIndex)).weight(1.0)); Layouts.populate(rowContainer, cell(getLabelButtonList().get(currentIndex)).weight(1.0));
currentIndex++; currentIndex++;
if (j != col - 1 && !inToolbar) { if (j != col - 1 && !inToolbar) {
rowContainer.add(createDivider()); rowContainer.add(createDivider());
} }
} }
add(rowContainer); Layouts.populate(this, cell(rowContainer).weight(1.0));
if (row != cols.length - 1) { if (row != cols.length - 1) {
add(createDivider()); add(createDivider());
} }
} }
} }
private List<UIToggleButton> getLabelButtonList() { public List<UIToggleButton> getLabelButtonList() {
return labelButtonList; return labelButtonList;
} }
private Spacer createDivider() { protected Spacer createDivider() {
Spacer spacer = new Spacer(FineUIScale.scale(1)); Spacer spacer = new Spacer(FineUIScale.scale(1));
spacer.setBorder(new LineBorder(FineUIUtils.getUIColor("defaultBorderColor", "Component.borderColor"))); spacer.setBorder(new LineBorder(FineUIUtils.getUIColor("defaultBorderColor", "Component.borderColor")));
return spacer; return spacer;

16
designer-base/src/main/java/com/fr/design/gui/ibutton/UIHeadGroup.java

@ -5,6 +5,8 @@ import com.fine.swing.ui.layout.Row;
import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.third.guava.collect.Streams; import com.fr.third.guava.collect.Streams;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.AbstractButton; import javax.swing.AbstractButton;
import javax.swing.ButtonGroup; import javax.swing.ButtonGroup;
import javax.swing.Icon; import javax.swing.Icon;
@ -72,6 +74,20 @@ public class UIHeadGroup extends Row {
add(buttonGroup()); add(buttonGroup());
setSelectedIndex(0); setSelectedIndex(0);
setBorder(new ScaledEmptyBorder(2, 2, 2, 2)); setBorder(new ScaledEmptyBorder(2, 2, 2, 2));
initButtonListeners();
}
private void initButtonListeners() {
for (AbstractButton tab : btns) {
tab.addMouseListener(new MouseAdapter() {
@Override
public void mouseEntered(MouseEvent e) {
if (tab.getPreferredSize().width > tab.getWidth()) {
tab.setToolTipText(tab.getText());
}
}
});
}
} }
private Layouts.Cell<?>[] buttonGroup() { private Layouts.Cell<?>[] buttonGroup() {

2
designer-base/src/main/java/com/fr/design/gui/icombobox/ColorSchemeComboBox.java

@ -233,7 +233,7 @@ public class ColorSchemeComboBox extends UIComboBox {
@Override @Override
public Dimension getPreferredSize() { public Dimension getPreferredSize() {
Dimension preferredSize = super.getPreferredSize(); Dimension preferredSize = super.getPreferredSize();
preferredSize.setSize(super.getPreferredSize().getWidth(), FineUIScale.scale(HEIGHT)); preferredSize.setSize(ColorSchemeComboBox.this.getPreferredSize().width, FineUIScale.scale(HEIGHT));
return preferredSize; return preferredSize;
} }

2
designer-base/src/main/java/com/fr/design/gui/icombobox/LineComboBox.java

@ -129,7 +129,7 @@ public class LineComboBox extends UIComboBox {
} }
public Dimension getPreferredSize() { public Dimension getPreferredSize() {
return new Dimension(getWidth(), FineUIScale.scale(LINE_HEIGHT)); return new Dimension(super.getPreferredSize().width, FineUIScale.scale(LINE_HEIGHT));
} }
public Dimension getMinimumSize() { public Dimension getMinimumSize() {

2
designer-base/src/main/java/com/fr/design/gui/icontainer/UIModeControlContainer.java

@ -123,6 +123,8 @@ public class UIModeControlContainer extends JLayeredPane {
horizontToolPane = new JPanel() { horizontToolPane = new JPanel() {
@Override @Override
public void paint(Graphics g) { public void paint(Graphics g) {
g.setColor(FineUIUtils.getUIColor("fill.normal", "fill.normal"));
g.fillRect(0, 0, getWidth(), getHeight());
if (upEditMode) { if (upEditMode) {
g.drawImage(UIConstants.DRAG_DOT, (getWidth() - toolPaneHeight) / 2, 3, toolPaneHeight, 8, null); g.drawImage(UIConstants.DRAG_DOT, (getWidth() - toolPaneHeight) / 2, 3, toolPaneHeight, 8, null);
} }

26
designer-base/src/main/java/com/fr/design/mainframe/DecodeDialog.java

@ -1,11 +1,15 @@
package com.fr.design.mainframe; package com.fr.design.mainframe;
import java.awt.BorderLayout;
import java.awt.Color; import java.awt.Color;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import javax.swing.JDialog; import javax.swing.JDialog;
import javax.swing.JPanel;
import com.fine.theme.utils.FineUIStyle;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.io.XMLEncryptUtils; import com.fr.base.io.XMLEncryptUtils;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
@ -19,6 +23,9 @@ import com.fr.stable.CodeUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
public class DecodeDialog { public class DecodeDialog {
private UITextField jt; private UITextField jt;
@ -32,22 +39,18 @@ public class DecodeDialog {
this.file = file; this.file = file;
jd = new JDialog(); jd = new JDialog();
jd.setLayout(null); jd.setLayout(new BorderLayout());
UILabel newNameLable = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ECP_Input_Pwd")); UILabel newNameLable = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ECP_Input_Pwd"));
newNameLable.setBounds(20, 10, 130, 30);
jt = new UITextField(StringUtils.EMPTY); jt = new UITextField(StringUtils.EMPTY);
jt.selectAll(); jt.selectAll();
jt.setBounds(130, 15, 150, 20); jd.add(row(20, cell(newNameLable), cell(jt)).getComponent(), BorderLayout.NORTH);
jd.add(newNameLable);
jd.add(jt);
hintsLabel = new UILabel(); hintsLabel = new UILabel();
hintsLabel.setBounds(20, 50, 250, 30);
hintsLabel.setForeground(Color.RED); hintsLabel.setForeground(Color.RED);
hintsLabel.setVisible(false); hintsLabel.setVisible(false);
confirmButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Confirm")); confirmButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Confirm"));
confirmButton.setBounds(180, 90, 60, 25); FineUIStyle.setStyle(confirmButton, FineUIStyle.PLAIN_BUTTON);
confirmButton.addActionListener(new ActionListener() { confirmButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
String key = jt.getText(); String key = jt.getText();
@ -64,16 +67,17 @@ public class DecodeDialog {
}); });
UIButton cancelButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cancel")); UIButton cancelButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cancel"));
cancelButton.setBounds(250, 90, 60, 25);
cancelButton.addActionListener(new ActionListener() { cancelButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
jd.dispose(); jd.dispose();
} }
}); });
jd.add(cancelButton); JPanel buttonPane = new JPanel(new BorderLayout());
jd.add(confirmButton); buttonPane.setBorder(new ScaledEmptyBorder(10, 10, 10, 10));
jd.add(hintsLabel); buttonPane.add(row(8, cell(confirmButton), cell(cancelButton)).getComponent(), BorderLayout.EAST);
jd.add(buttonPane, BorderLayout.SOUTH);
jd.add(hintsLabel, BorderLayout.CENTER);
jd.setSize(340, 180); jd.setSize(340, 180);
jd.setModal(true); jd.setModal(true);
jd.setTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ECP_Decode")); jd.setTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ECP_Decode"));

3
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/RecycleSettingPane.java

@ -10,7 +10,6 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.ispinner.UISpinner;
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.VerticalFlowLayout;
import com.fr.design.mainframe.vcs.VcsRecycleSettingHelper; import com.fr.design.mainframe.vcs.VcsRecycleSettingHelper;
import com.fr.workspace.server.vcs.VcsConfig; import com.fr.workspace.server.vcs.VcsConfig;
@ -63,7 +62,7 @@ public class RecycleSettingPane extends BasicPane {
FineTabbedPane tabbedPane = FineTabbedPane.builder() FineTabbedPane tabbedPane = FineTabbedPane.builder()
.addTab(Toolkit.i18nText("Fine-Design_Vcs_Recycle_Content"), recycleScrollPane) .addTab(Toolkit.i18nText("Fine-Design_Vcs_Recycle_Content"), recycleScrollPane)
.addTab(Toolkit.i18nText("Fine-Design_Basic_Carton_General_Settings"), settingScrollPane) .addTab(Toolkit.i18nText("Fine-Design_Basic_Carton_General_Settings"), settingScrollPane)
.withHeadRatio(0.3f).build(); .withAdaptiveFit().build();
this.add(tabbedPane, BorderLayout.CENTER); this.add(tabbedPane, BorderLayout.CENTER);
} }

3
designer-base/src/main/java/com/fr/design/style/background/BackgroundPane.java

@ -24,7 +24,6 @@ import com.fr.general.Background;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
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;
public class BackgroundPane extends BasicPane { public class BackgroundPane extends BasicPane {
@ -47,7 +46,7 @@ public class BackgroundPane extends BasicPane {
protected void initComponents() { protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
initTabPane(); initTabPane();
tabbedPane = tabbedPaneBuilder.withHeadRatio(0.65f).build(); tabbedPane = tabbedPaneBuilder.withAdaptiveFit().build();
add(cell(tabbedPane).weight(1).getComponent()); add(cell(tabbedPane).weight(1).getComponent());
} }

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

@ -35,4 +35,6 @@ 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.ds.column.cellEditor.pane=900*600
com.fr.design.actions.reportWebAttr.dialog=800*630 com.fr.design.actions.reportWebAttr.dialog=800*630
com.fr.design.actions.printingSetting.dialog=800*600

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

@ -34,4 +34,6 @@ 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.ds.column.cellEditor.pane=900*600
com.fr.design.actions.reportWebAttr.dialog=700*630 com.fr.design.actions.reportWebAttr.dialog=700*630
com.fr.design.actions.printingSetting.dialog=700*600

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

@ -34,4 +34,6 @@ 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.ds.column.cellEditor.pane=900*600
com.fr.design.actions.reportWebAttr.dialog=700*630 com.fr.design.actions.reportWebAttr.dialog=700*630
com.fr.design.actions.printingSetting.dialog=700*600

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

@ -34,4 +34,6 @@ 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.ds.column.cellEditor.pane=700*600
com.fr.design.actions.reportWebAttr.dialog=660*600 com.fr.design.actions.reportWebAttr.dialog=660*600
com.fr.design.actions.printingSetting.dialog=660*600

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

@ -33,4 +33,6 @@ 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.ds.column.cellEditor.pane=700*600
com.fr.design.actions.reportWebAttr.dialog=700*630 com.fr.design.actions.reportWebAttr.dialog=700*630
com.fr.design.actions.printingSetting.dialog=700*600

10
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java

@ -1,6 +1,5 @@
package com.fr.design.mainframe.chart.gui.data; package com.fr.design.mainframe.chart.gui.data;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.base.chart.chartdata.TopDefinitionProvider; import com.fr.base.chart.chartdata.TopDefinitionProvider;
@ -26,6 +25,7 @@ import java.awt.Dimension;
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.FineUIScale.scale;
/** /**
* 图表数据 分类 系列 过滤界面. * 图表数据 分类 系列 过滤界面.
@ -60,7 +60,7 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
} }
protected void initLayout() { protected void initLayout() {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout(0, scale(10)));
if (!paneList.isEmpty()) { if (!paneList.isEmpty()) {
if (nameArray.length > 1) { if (nameArray.length > 1) {
this.add(tabPane, BorderLayout.NORTH); this.add(tabPane, BorderLayout.NORTH);
@ -251,7 +251,7 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
cell(preDataNumPane), cell(preDataNumPane),
cell(notShowNull), cell(notShowNull),
cell(presentPane) cell(presentPane)
).with(it -> it.setBorder(new ScaledEmptyBorder(10, 0, 0, 0))).getComponent(); ).getComponent();
} }
@ -356,7 +356,7 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
@Override @Override
public Dimension getPreferredSize() { public Dimension getPreferredSize() {
Dimension dim = super.getPreferredSize(); Dimension dim = super.getPreferredSize();
dim.height = FineUIScale.scale(FIL_HEIGHT); dim.height = scale(FIL_HEIGHT);
return dim; return dim;
} }
@ -410,7 +410,7 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
cell(preDataNumPane), cell(preDataNumPane),
cell(notShowNull), cell(notShowNull),
cell(presentPane) cell(presentPane)
).with(it -> it.setBorder(new ScaledEmptyBorder(10, 0, 0, 0))).getComponent(); ).getComponent();
} }

7
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/BubblePlotReportDataContentPane.java

@ -5,11 +5,10 @@ import com.fr.chart.chartattr.BubblePlot;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartdata.BubbleReportDefinition; import com.fr.chart.chartdata.BubbleReportDefinition;
import com.fr.chart.chartdata.BubbleSeriesValue; import com.fr.chart.chartdata.BubbleSeriesValue;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -26,9 +25,7 @@ public class BubblePlotReportDataContentPane extends AbstractReportDataContentPa
public BubblePlotReportDataContentPane(ChartDataPane parent) { public BubblePlotReportDataContentPane(ChartDataPane parent) {
initEveryPane(); initEveryPane();
filterPane = new ChartDataFilterPane(new BubblePlot(), parent); filterPane = new ChartDataFilterPane(new BubblePlot(), parent);
JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Filter"),filterPane); JPanel panel = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), filterPane);
panel.setBorder(getSidesBorder());
filterPane.setBorder(getFilterPaneBorder());
this.add(panel, "0,6,2,4"); this.add(panel, "0,6,2,4");
} }

30
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java

@ -1,18 +1,20 @@
package com.fr.design.mainframe.chart.gui.data.report; package com.fr.design.mainframe.chart.gui.data.report;
import com.fine.theme.utils.FineLayoutBuilder;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.chart.chartdata.TopDefinitionProvider; import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.MeterPlot; import com.fr.chart.chartattr.MeterPlot;
import com.fr.chart.chartdata.MeterReportDefinition; import com.fr.chart.chartdata.MeterReportDefinition;
import com.fr.design.border.FineBorderFactory;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.formula.DefaultTinyFormulaPane; import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
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.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -37,31 +39,15 @@ public class MeterPlotReportDataContentPane extends AbstractReportDataContentPan
private ChartDataFilterPane filterPane; private ChartDataFilterPane filterPane;
public MeterPlotReportDataContentPane(ChartDataPane parent) { public MeterPlotReportDataContentPane(ChartDataPane parent) {
// initEveryPane();
//
// List list = new ArrayList();
// list.add(new Object[] { singCateName, "" });
// list.add(new Object[] { singNeedleValue, "" });
// seriesPane.populateBean(list);
//
// seriesPane.noAddUse();
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = getRowSize();
Component[][] components = getShowComponents(); Component[][] components = getShowComponents();
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 24, 6); JPanel panel = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
panel.setBorder(BorderFactory.createEmptyBorder(0, 24, 5, 8)); panel.setBorder(BorderFactory.createCompoundBorder(FineBorderFactory.createDefaultUnderlineBorder(),
new ScaledEmptyBorder(0, 0, 10, 0)));
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(panel, BorderLayout.NORTH); this.add(panel, BorderLayout.NORTH);
filterPane = new ChartDataFilterPane(new MeterPlot(), parent); filterPane = new ChartDataFilterPane(new MeterPlot(), parent);
JPanel pane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), filterPane); JPanel pane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), filterPane);
pane.setBorder(getSidesBorder());
filterPane.setBorder(getFilterPaneBorder());
this.add(pane, BorderLayout.CENTER); this.add(pane, BorderLayout.CENTER);
} }

7
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java

@ -48,7 +48,7 @@ public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane
private Column boxPane; private Column boxPane;
public MeterPlotTableDataContentPane(ChartDataPane parent) { public MeterPlotTableDataContentPane(ChartDataPane parent) {
this.setLayout(new BorderLayout(0, FineUIScale.scale(10))); this.setLayout(new BorderLayout());
nameBox = new UIComboBoxWithNone(); nameBox = new UIComboBoxWithNone();
nameBox.setSelectedIndex(nameBox.getItemCount() -1); nameBox.setSelectedIndex(nameBox.getItemCount() -1);
@ -59,6 +59,7 @@ public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane
boxPane = new Column(); boxPane = new Column();
boxPane.setSpacing(10); boxPane.setSpacing(10);
boxPane.add(getJSeparator());
JPanel namePane = createPaneWithLabel(Toolkit.i18nText(METER_NAME), getNameComponent()); JPanel namePane = createPaneWithLabel(Toolkit.i18nText(METER_NAME), getNameComponent());
boxPane.add(namePane); boxPane.add(namePane);
@ -71,6 +72,7 @@ public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane
final JPanel customPane = createPaneWithLabel(StringUtils.EMPTY, custom); final JPanel customPane = createPaneWithLabel(StringUtils.EMPTY, custom);
boxPane.add(customPane); boxPane.add(customPane);
boxPane.add(getJSeparator());
customPane.setVisible(false); customPane.setVisible(false);
@ -86,9 +88,8 @@ public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane
} }
}); });
JPanel jPanel = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), filterPane, true); JPanel jPanel = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), filterPane);
this.add(getJSeparator(), BorderLayout.NORTH);
this.add(boxPane, BorderLayout.CENTER); this.add(boxPane, BorderLayout.CENTER);
this.add(jPanel, BorderLayout.SOUTH); this.add(jPanel, BorderLayout.SOUTH);

12
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java

@ -4,7 +4,6 @@ import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineLayoutBuilder; import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.chart.base.TextAttr; import com.fr.chart.base.TextAttr;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.ibutton.UIColorButton; import com.fr.design.gui.ibutton.UIColorButton;
@ -15,7 +14,6 @@ import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.design.mainframe.chart.mode.ChartEditContext;
import com.fr.design.utils.DesignUtils; import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.FRFont; import com.fr.general.FRFont;
import com.fr.general.GeneralUtils; import com.fr.general.GeneralUtils;
@ -23,9 +21,10 @@ import javax.swing.JPanel;
import javax.swing.SwingConstants; import javax.swing.SwingConstants;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Component; import java.awt.Component;
import java.awt.FlowLayout;
import java.awt.Font; import java.awt.Font;
import static com.fine.theme.utils.FineUIScale.scale;
public class ChartTextAttrPane extends BasicPane { public class ChartTextAttrPane extends BasicPane {
private static final long serialVersionUID = 6731679928019436869L; private static final long serialVersionUID = 6731679928019436869L;
public static final int FONT_START = 6; public static final int FONT_START = 6;
@ -202,12 +201,9 @@ public class ChartTextAttrPane extends BasicPane {
} }
protected void initComponents() { protected void initComponents() {
Component[] components1 = new Component[]{ JPanel buttonPane = new JPanel(new BorderLayout(scale(10), 0));
fontColor, italic, bold
};
JPanel buttonPane = new JPanel(new BorderLayout());
buttonPane.add(fontSizeComboBox, BorderLayout.CENTER); buttonPane.add(fontSizeComboBox, BorderLayout.CENTER);
buttonPane.add(GUICoreUtils.createFlowPane(components1, FlowLayout.LEFT, LayoutConstants.HGAP_LARGE), BorderLayout.EAST); buttonPane.add(FineLayoutBuilder.createHorizontalLayout(10, fontColor, italic, bold), BorderLayout.EAST);
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(getContentPane(buttonPane), BorderLayout.CENTER); this.add(getContentPane(buttonPane), BorderLayout.CENTER);

4
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java

@ -1,7 +1,6 @@
package com.fr.design.mainframe.chart.gui.style.series; package com.fr.design.mainframe.chart.gui.style.series;
import com.fine.theme.utils.FineLayoutBuilder; import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.BaseFormula; import com.fr.base.BaseFormula;
import com.fr.chart.base.AreaColor; import com.fr.chart.base.AreaColor;
import com.fr.chart.base.ChartBaseUtils; import com.fr.chart.base.ChartBaseUtils;
@ -45,13 +44,12 @@ import java.awt.event.MouseEvent;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.theme.utils.FineUIScale.scale; import static com.fine.theme.utils.FineUIScale.scale;
public class UIColorPickerPane extends BasicPane implements UIObserver { public class UIColorPickerPane extends BasicPane implements UIObserver {
private static final int MARGIN_TOP = scale(7); private static final int MARGIN_TOP = scale(7);
private static final int MARGIN_LEFT = scale(5); private static final int MARGIN_LEFT = scale(5);
private static final int COLORGROUP_MARGIN_LEFT = scale(20); private static final int COLORGROUP_MARGIN_LEFT = scale(15);
private static final int OFF_HEIGHT = scale(6); private static final int OFF_HEIGHT = scale(6);
private static final int COLOR_REC_HEIGHT = scale(40); private static final int COLOR_REC_HEIGHT = scale(40);
private static final int COLOR_REC_WIDTH = scale(30); private static final int COLOR_REC_WIDTH = scale(30);

15
designer-chart/src/main/java/com/fr/design/module/ChartPreFillStylePane.java

@ -3,17 +3,13 @@ package com.fr.design.module;
import com.fine.theme.utils.FineUIScale; import com.fine.theme.utils.FineUIScale;
import com.fr.base.ChartColorMatching; import com.fr.base.ChartColorMatching;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.FitUIButtonGroup;
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.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.style.background.gradient.FixedGradientBarNoTheme; import com.fr.design.style.background.gradient.FixedGradientBarNoTheme;
import com.fr.design.style.color.ColorAdjustPane; import com.fr.design.style.color.ColorAdjustPane;
import com.fr.design.style.background.gradient.FixedGradientBar; import com.fr.design.style.background.gradient.FixedGradientBar;
import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
@ -21,7 +17,6 @@ import java.util.List;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.CardLayout; import java.awt.CardLayout;
import java.awt.Color; import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
@ -43,7 +38,7 @@ public class ChartPreFillStylePane extends BasicBeanPane<ChartColorMatching> {
private JPanel changeColorSetPane; private JPanel changeColorSetPane;
private CardLayout cardLayout; private CardLayout cardLayout;
private UIButtonGroup groupButton; private FitUIButtonGroup groupButton;
private ColorAdjustPane colorAdjustPane; private ColorAdjustPane colorAdjustPane;
private FixedGradientBar colorGradient; private FixedGradientBar colorGradient;
@ -59,7 +54,7 @@ public class ChartPreFillStylePane extends BasicBeanPane<ChartColorMatching> {
} }
private void initComponents() { private void initComponents() {
groupButton = new UIButtonGroup<>(new String[]{Toolkit.i18nText("Fine-Design_Chart_Custom_Color"), Toolkit.i18nText("Fine-Design_Chart_Gradient_Color")}); groupButton = new FitUIButtonGroup<>(new String[]{Toolkit.i18nText("Fine-Design_Chart_Custom_Color"), Toolkit.i18nText("Fine-Design_Chart_Gradient_Color")});
groupButton.setSelectedIndex(0); groupButton.setSelectedIndex(0);
changeColorSetPane = new JPanel(cardLayout = new CardLayout()); changeColorSetPane = new JPanel(cardLayout = new CardLayout());
changeColorSetPane.add(colorGradient = new FixedGradientBarNoTheme(4, 150), "gradient"); changeColorSetPane.add(colorGradient = new FixedGradientBarNoTheme(4, 150), "gradient");
@ -76,8 +71,8 @@ public class ChartPreFillStylePane extends BasicBeanPane<ChartColorMatching> {
10, 10,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Color_Match"))), cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Color_Match"))),
row( row(
cell(groupButton).weight(0.1), cell(groupButton),
flex(0.2) flex()
), ),
row( row(
cell(changeColorSetPane).with(it -> it.setPreferredSize(FineUIScale.scale(new Dimension(COLOR_ADJUST_PANE_WIDTH, COLOR_ADJUST_PANE_HEIGHT)))), cell(changeColorSetPane).with(it -> it.setPreferredSize(FineUIScale.scale(new Dimension(COLOR_ADJUST_PANE_WIDTH, COLOR_ADJUST_PANE_HEIGHT)))),

2
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHeatValueColorPane.java

@ -51,7 +51,7 @@ public class VanChartHeatValueColorPane extends VanChartValueColorPane {
@Override @Override
protected MapColorPickerPaneWithFormula createSectionIntervalConfigPane(AbstractAttrNoScrollPane parent) { protected MapColorPickerPaneWithFormula createSectionIntervalConfigPane(AbstractAttrNoScrollPane parent) {
return new SectionIntervalConfigPaneWithOutNum(parent) { return new SectionIntervalConfigPaneWithOutNum(parent) {
private final int WIDTH = FineUIScale.scale(227); private final int WIDTH = FineUIScale.scale(218);
@Override @Override
protected int getBoundX() { protected int getBoundX() {

18
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPane.java

@ -1,5 +1,6 @@
package com.fr.van.chart.designer.component; package com.fr.van.chart.designer.component;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.constants.KeyWords; import com.fr.design.constants.KeyWords;
import com.fr.design.gui.autocomplete.AutoCompletion; import com.fr.design.gui.autocomplete.AutoCompletion;
@ -13,11 +14,8 @@ import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.syntax.ui.rsyntaxtextarea.RSyntaxTextArea; import com.fr.design.gui.syntax.ui.rsyntaxtextarea.RSyntaxTextArea;
import com.fr.design.gui.syntax.ui.rsyntaxtextarea.SyntaxConstants; import com.fr.design.gui.syntax.ui.rsyntaxtextarea.SyntaxConstants;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.utils.gui.UIComponentUtils; import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.plugin.chart.base.VanChartHtmlLabel; import com.fr.plugin.chart.base.VanChartHtmlLabel;
import com.fr.van.chart.designer.style.VanChartStylePane;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -63,18 +61,13 @@ public class VanChartHtmlLabelPane extends JPanel {
UIComponentUtils.setLineWrap(useHtml); UIComponentUtils.setLineWrap(useHtml);
useHtml.addChangeListener(e -> checkWidthAndHeightPane()); useHtml.addChangeListener(e -> checkWidthAndHeightPane());
widthAndHeightPane = createWidthAndHeightPane(); widthAndHeightPane = createWidthAndHeightPane();
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f};
double[] rowSize = {p, p, p, p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{createJSContentPane()}, new Component[]{createJSContentPane()},
new Component[]{useHtml}, new Component[]{useHtml},
new Component[]{null, null},
}; };
JPanel contentPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); JPanel contentPane = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1});
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(contentPane, BorderLayout.NORTH); this.add(contentPane, BorderLayout.NORTH);
@ -152,17 +145,12 @@ public class VanChartHtmlLabelPane extends JPanel {
checkHeight(); checkHeight();
} }
}); });
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = {p, p, p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{isCustomWidth, customWidth}, new Component[]{isCustomWidth, customWidth},
new Component[]{isCustomHeight, customHeight}, new Component[]{isCustomHeight, customHeight},
new Component[]{null, null}
}; };
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
} }
private void checkWidth() { private void checkWidth() {

10
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPaneWithBackGroundLabel.java

@ -1,10 +1,8 @@
package com.fr.van.chart.designer.component; package com.fr.van.chart.designer.component;
import com.fine.theme.utils.FineLayoutBuilder;
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.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.Component; import java.awt.Component;
@ -12,16 +10,12 @@ import java.awt.Component;
public class VanChartHtmlLabelPaneWithBackGroundLabel extends VanChartHtmlLabelPane { public class VanChartHtmlLabelPaneWithBackGroundLabel extends VanChartHtmlLabelPane {
protected JPanel createWidthAndHeightPane() { protected JPanel createWidthAndHeightPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH;
JPanel panel = super.createWidthAndHeightPane(); JPanel panel = super.createWidthAndHeightPane();
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Background")), panel}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Background")), panel},
}; };
return TableLayoutHelper.createTableLayoutPane(components, new double[]{p, p}, new double[]{d, f}); return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
} }
} }

29
designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderWithShapePane.java

@ -1,5 +1,6 @@
package com.fr.van.chart.designer.component.border; package com.fr.van.chart.designer.component.border;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.chartglyph.Marker; import com.fr.chart.chartglyph.Marker;
import com.fr.chart.chartglyph.MarkerFactory; import com.fr.chart.chartglyph.MarkerFactory;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
@ -112,28 +113,16 @@ public class VanChartBorderWithShapePane extends BasicPane {
} }
protected JPanel createLineTypePane() { protected JPanel createLineTypePane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p, p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{null, null}, new Component[]{null, null},
new Component[]{FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_Line_Style")), new Component[]{FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_Line_Style")),
UIComponentUtils.wrapWithBorderLayoutPane(lineTypeBox)}}; UIComponentUtils.wrapWithBorderLayoutPane(lineTypeBox)}};
return TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
} }
private JPanel createDetailPane() { private JPanel createDetailPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p, p, p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{null, null}, new Component[]{null, null},
@ -143,7 +132,8 @@ public class VanChartBorderWithShapePane extends BasicPane {
}; };
JPanel center = createLineColorPane(); JPanel center = createLineColorPane();
JPanel south = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); JPanel south = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
JPanel panel = new JPanel(new BorderLayout()); JPanel panel = new JPanel(new BorderLayout());
@ -154,12 +144,6 @@ public class VanChartBorderWithShapePane extends BasicPane {
} }
private JPanel createLineColorPane() { private JPanel createLineColorPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p, p};
Component[][] center = new Component[][]{ Component[][] center = new Component[][]{
new Component[]{null, null}, new Component[]{null, null},
@ -171,11 +155,12 @@ public class VanChartBorderWithShapePane extends BasicPane {
new Component[]{null, lineColorBox} new Component[]{null, lineColorBox}
}; };
colorBoxPane = TableLayout4VanChartHelper.createGapTableLayoutPane(south, rowSize, columnSize); colorBoxPane = FineLayoutBuilder.compatibleTableLayout(10, south, new double[]{1.2, 3});
JPanel panel = new JPanel(new BorderLayout()); JPanel panel = new JPanel(new BorderLayout());
panel.add(TableLayout4VanChartHelper.createGapTableLayoutPane(center, rowSize, columnSize), BorderLayout.CENTER); panel.add(FineLayoutBuilder.compatibleTableLayout(10, center, new double[]{1.2, 3}), BorderLayout.CENTER);
panel.add(colorBoxPane, BorderLayout.SOUTH); panel.add(colorBoxPane, BorderLayout.SOUTH);
return panel; return panel;

26
designer-chart/src/main/java/com/fr/van/chart/designer/other/AutoRefreshPane.java

@ -18,6 +18,7 @@ import com.fr.plugin.chart.base.RefreshMoreLabel;
import com.fr.plugin.chart.vanchart.VanChart; import com.fr.plugin.chart.vanchart.VanChart;
import com.fr.van.chart.designer.PlotFactory; import com.fr.van.chart.designer.PlotFactory;
import com.fr.van.chart.designer.style.tooltip.VanChartPlotTooltipPane; import com.fr.van.chart.designer.style.tooltip.VanChartPlotTooltipPane;
import org.jetbrains.annotations.Nullable;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.SwingUtilities; import javax.swing.SwingUtilities;
@ -82,28 +83,22 @@ public class AutoRefreshPane extends BasicBeanPane<RefreshMoreLabel> {
initTooltipSet(); initTooltipSet();
JPanel jPanel = new JPanel(new BorderLayout()); JPanel tipPane = getTooltipPane();
jPanel.add(autoTooltip, BorderLayout.CENTER);
jPanel.add(tooltipSet, BorderLayout.EAST);
JPanel moreLabelPane = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3}, JPanel moreLabelPane = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_More_Label")), moreLabel); new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_More_Label")), moreLabel);
Component[][] components = initComponent(jPanel); Component[][] components = initComponent(tipPane);
JPanel panel1 = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
contentPane = new JPanel(new BorderLayout()); contentPane = new JPanel(new BorderLayout());
contentPane.add(panel1, BorderLayout.CENTER); contentPane.add(FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3}), BorderLayout.CENTER);
Component[][] AutoTooltipComponent = initAutoTooltipComponent();
JPanel panel2 = FineLayoutBuilder.compatibleTableLayout(10, AutoTooltipComponent, new double[]{1.2, 2, 1});
contentPane.add(panel2, BorderLayout.SOUTH);
return FineLayoutBuilder.createVerticalLayout(10, moreLabelPane, contentPane); return FineLayoutBuilder.createVerticalLayout(10, moreLabelPane, contentPane);
} }
protected Component[][] initComponent(JPanel autoTooltipPane){ protected Component[][] initComponent(JPanel autoTooltipPane){
Column toolTipPane = column(10, Column centerPane = column(10,
row( row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Time_Interval"))), cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Time_Interval"))),
flex(), flex(),
@ -114,11 +109,20 @@ public class AutoRefreshPane extends BasicBeanPane<RefreshMoreLabel> {
).getComponent(); ).getComponent();
return new Component[][]{ return new Component[][]{
new Component[]{null, toolTipPane} new Component[]{null, centerPane}
}; };
} }
@Nullable
protected JPanel getTooltipPane() {
JPanel tipPane = new JPanel(new BorderLayout());
tipPane.add(autoTooltip, BorderLayout.CENTER);
tipPane.add(tooltipSet, BorderLayout.EAST);
return tipPane;
}
@Deprecated
protected Component[][] initAutoTooltipComponent () { protected Component[][] initAutoTooltipComponent () {
return new Component[][]{ return new Component[][]{

9
designer-chart/src/main/java/com/fr/van/chart/designer/other/AutoRefreshPaneWithoutTooltip.java

@ -3,7 +3,7 @@ package com.fr.van.chart.designer.other;
import com.fr.plugin.chart.base.RefreshMoreLabel; import com.fr.plugin.chart.base.RefreshMoreLabel;
import com.fr.plugin.chart.vanchart.VanChart; import com.fr.plugin.chart.vanchart.VanChart;
import java.awt.Component; import javax.swing.JPanel;
/** /**
* Created by mengao on 2017/6/21. * Created by mengao on 2017/6/21.
@ -14,10 +14,9 @@ public class AutoRefreshPaneWithoutTooltip extends AutoRefreshPane {
super(chart, isLargeModel); super(chart, isLargeModel);
} }
protected Component[][] initAutoTooltipComponent () { @Override
return new Component[][]{ protected JPanel getTooltipPane() {
new Component[]{null, null}, return null;
};
} }
protected void updateAutoTooltip(RefreshMoreLabel refreshMoreLabel) { protected void updateAutoTooltip(RefreshMoreLabel refreshMoreLabel) {

3
designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java

@ -281,7 +281,8 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
//图表缩放新设计 恢复用注释。删除下面八个方法getzoomTypePane createZoomPaneContent //图表缩放新设计 恢复用注释。删除下面八个方法getzoomTypePane createZoomPaneContent
// checkZoomEnabled getNameArray getValueArray checkZoomPane populateChartZoom updateChartZoom。 // checkZoomEnabled getNameArray getValueArray checkZoomPane populateChartZoom updateChartZoom。
protected JPanel getZoomTypePane(UIButtonGroup zoomType) { protected JPanel getZoomTypePane(UIButtonGroup zoomType) {
return TableLayout4VanChartHelper.createGapTableLayoutPaneWithoutTop(Toolkit.i18nText("Fine-Design_Chart_Zoom_Direction"), zoomType); return FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(Toolkit.i18nText("Fine-Design_Chart_Zoom_Direction")), zoomType);
} }
protected JPanel createZoomPaneContent(JPanel zoomWidgetPane, JPanel zoomGesturePane, VanChartPlot plot) { protected JPanel createZoomPaneContent(JPanel zoomWidgetPane, JPanel zoomGesturePane, VanChartPlot plot) {

9
designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java

@ -1,7 +1,6 @@
package com.fr.van.chart.designer.style; package com.fr.van.chart.designer.style;
import com.fine.theme.utils.FineComponentsFactory; import com.fine.theme.utils.FineComponentsFactory;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIStyle; import com.fine.theme.utils.FineUIStyle;
import com.fr.base.BaseFormula; import com.fr.base.BaseFormula;
import com.fr.base.Utils; import com.fr.base.Utils;
@ -46,6 +45,7 @@ import java.awt.event.MouseEvent;
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.fix; import static com.fine.swing.ui.layout.Layouts.fix;
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.theme.utils.FineUIScale.scale; import static com.fine.theme.utils.FineUIScale.scale;
@ -139,7 +139,12 @@ public class VanChartTitlePane extends AbstractVanChartScrollPane<VanChart> {
row( row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Text"), SwingConstants.LEFT)).weight(1.2), cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Text"), SwingConstants.LEFT)).weight(1.2),
cell(titleContent).weight(3) cell(titleContent).weight(3)
)).getComponent(); ),
row(
flex(1.2),
cell(useHtml).weight(3)
)
).getComponent();
return new UIExpandablePane( return new UIExpandablePane(
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Content"), titleContentPane); com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Content"), titleContentPane);
} }

9
designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPieValueLabelDetailPane.java

@ -1,5 +1,6 @@
package com.fr.van.chart.designer.style.label; package com.fr.van.chart.designer.style.label;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
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;
@ -47,18 +48,12 @@ public class VanChartPieValueLabelDetailPane extends VanChartPlotLabelDetailPane
VanChartBorderWithShapePane borderPane = new VanChartBorderWithShapePane() { VanChartBorderWithShapePane borderPane = new VanChartBorderWithShapePane() {
@Override @Override
protected JPanel createLineTypePane() { protected JPanel createLineTypePane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_Border")), new Component[]{FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_Border")),
UIComponentUtils.wrapWithBorderLayoutPane(getLineTypeBox())}}; UIComponentUtils.wrapWithBorderLayoutPane(getLineTypeBox())}};
return TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
} }
}; };
setBorderPane(borderPane); setBorderPane(borderPane);

2
designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java

@ -126,7 +126,7 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
double[] rowSize = getLabelPaneRowSize(plot, p); double[] rowSize = getLabelPaneRowSize(plot, p);
Component[][] components = getLabelPaneComponents(plot, p, columnSize); Component[][] components = getLabelPaneComponents(plot, p, columnSize);
return FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1, 0}); return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1, 0});
} }
protected Component[][] getLabelPaneComponents(Plot plot, double p, double[] columnSize) { protected Component[][] getLabelPaneComponents(Plot plot, double p, double[] columnSize) {

10
designer-chart/src/main/java/com/fr/van/chart/range/component/SectionIntervalConfigPaneWithOutNum.java

@ -9,7 +9,6 @@ import com.fr.design.mainframe.chart.gui.style.series.MapColorPickerPaneWithForm
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import java.awt.Component; import java.awt.Component;
import java.awt.Dimension;
/** /**
* Created by Mitisky on 16/10/20. * Created by Mitisky on 16/10/20.
@ -44,21 +43,12 @@ public class SectionIntervalConfigPaneWithOutNum extends MapColorPickerPaneWithF
@Override @Override
protected Component[][] createComponents() { protected Component[][] createComponents() {
numLabel = new BoldFontTextLabel(Toolkit.i18nText("Fine-Design_Chart_Value_Divided_Stage")); numLabel = new BoldFontTextLabel(Toolkit.i18nText("Fine-Design_Chart_Value_Divided_Stage"));
setRegionVisible(false);
return new Component[][]{ return new Component[][]{
new Component[]{new BoldFontTextLabel(getNameOfSubRange()), getDesignTypeButtonGroup()}, new Component[]{new BoldFontTextLabel(getNameOfSubRange()), getDesignTypeButtonGroup()},
new Component[]{numLabel, getRegionNumPane()}, new Component[]{numLabel, getRegionNumPane()},
}; };
} }
@Override
public Dimension getPreferredSize() {
Dimension dim = super.getPreferredSize();
return new Dimension((int) dim.getWidth(), (int) dim.getHeight() - (numLabel.isVisible() ? 0 : 30));
}
@Override @Override
public void populateBean(MapHotAreaColor hotAreaColor) { public void populateBean(MapHotAreaColor hotAreaColor) {
super.populateBean(hotAreaColor); super.populateBean(hotAreaColor);

8
designer-form/src/main/java/com/fr/design/parameter/ParameterPropertyPane.java

@ -1,5 +1,6 @@
package com.fr.design.parameter; package com.fr.design.parameter;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.Parameter; import com.fr.base.Parameter;
import com.fr.design.border.FineBorderFactory; import com.fr.design.border.FineBorderFactory;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
@ -23,6 +24,8 @@ import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import static com.fine.theme.utils.FineUIScale.scale;
public class ParameterPropertyPane extends JPanel{ public class ParameterPropertyPane extends JPanel{
private ParameterToolBarPane toolbarPane; private ParameterToolBarPane toolbarPane;
private ParaDefinitePane paraPane; private ParaDefinitePane paraPane;
@ -32,8 +35,7 @@ public class ParameterPropertyPane extends JPanel{
private static ParameterPropertyPane THIS; private static ParameterPropertyPane THIS;
private boolean isEditing = false; private boolean isEditing = false;
private static final int PADDING_MIDDLE = 10; private static final int ADD_PARA_PANE_MAX_HEIGHT = scale(120);
private static final int ADD_PARA_PANE_MAX_HEIGHT = 95;
public static final ParameterPropertyPane getInstance() { public static final ParameterPropertyPane getInstance() {
if (THIS == null) { if (THIS == null) {
@ -138,7 +140,7 @@ public class ParameterPropertyPane extends JPanel{
private void setEditor(FormDesigner editor) { private void setEditor(FormDesigner editor) {
if (formHierarchyTreePaneWrapper == null) { if (formHierarchyTreePaneWrapper == null) {
formHierarchyTreePaneWrapper = new JPanel(new BorderLayout()); formHierarchyTreePaneWrapper = new JPanel(new BorderLayout());
formHierarchyTreePaneWrapper.setBorder(BorderFactory.createEmptyBorder(0, PADDING_MIDDLE, 0, 0)); formHierarchyTreePaneWrapper.setBorder(new ScaledEmptyBorder(0, 10, 0, 0));
this.add(formHierarchyTreePaneWrapper, BorderLayout.CENTER); this.add(formHierarchyTreePaneWrapper, BorderLayout.CENTER);
} }
formHierarchyTreePaneWrapper.remove(FormHierarchyTreePane.getInstance()); formHierarchyTreePaneWrapper.remove(FormHierarchyTreePane.getInstance());

18
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java

@ -1,7 +1,7 @@
package com.fr.design.widget.ui.designer.mobile; package com.fr.design.widget.ui.designer.mobile;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.designer.beans.events.DesignerEvent; import com.fr.design.designer.beans.events.DesignerEvent;
import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.properties.PropertyTab; import com.fr.design.designer.properties.PropertyTab;
@ -10,8 +10,6 @@ import com.fr.design.fun.ParameterExpandablePaneUIProvider;
import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
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.FormDesigner; import com.fr.design.mainframe.FormDesigner;
import com.fr.design.mainframe.MobileWidgetListPane; import com.fr.design.mainframe.MobileWidgetListPane;
import com.fr.design.mainframe.WidgetPropertyPane; import com.fr.design.mainframe.WidgetPropertyPane;
@ -22,7 +20,6 @@ import com.fr.form.ui.container.WSortLayout;
import com.fr.form.ui.mobile.MobileParamStyle; import com.fr.form.ui.mobile.MobileParamStyle;
import com.fr.report.mobile.EmptyMobileParamStyle; import com.fr.report.mobile.EmptyMobileParamStyle;
import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Component; import java.awt.Component;
@ -68,25 +65,16 @@ public class ParaMobileDefinePane extends MobileWidgetDefinePane {
// 手机属性 // 手机属性
private UIExpandablePane getMobilePropertyPane() { private UIExpandablePane getMobilePropertyPane() {
mobileParamEditor = new AccessibleMobileParamEditor(new MobileParamSettingPane()); mobileParamEditor = new AccessibleMobileParamEditor(new MobileParamSettingPane());
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
double[] rowSize = {p, p};
double[] columnSize = {p, f};
int[][] rowCount = {{1, 1}, {1, 1}};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Param_Style")), mobileParamEditor}, new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Param_Style")), mobileParamEditor},
}; };
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W0, IntervalConstants.INTERVAL_L1); JPanel panel = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Properties_Mobile"), 280, 20, panel);
panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
jPanel.add(panel);
return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Properties_Mobile"), 280, 20, jPanel);
} }
// 控件顺序 // 控件顺序
private UIExpandablePane getMobileWidgetListPane() { private UIExpandablePane getMobileWidgetListPane() {
mobileWidgetListPane = new MobileWidgetListPane(designer, (WSortLayout) paraCreator.toData()); mobileWidgetListPane = new MobileWidgetListPane(designer, (WSortLayout) paraCreator.toData());
mobileWidgetListPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 5, 0));
JPanel panelWrapper = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel panelWrapper = FRGUIPaneFactory.createBorderLayout_S_Pane();
panelWrapper.add(mobileWidgetListPane, BorderLayout.CENTER); panelWrapper.add(mobileWidgetListPane, BorderLayout.CENTER);

5
designer-realize/src/main/java/com/fr/design/actions/report/ReportPrintSettingAction.java

@ -5,6 +5,7 @@ import com.fr.base.print.PrintSettingsAttrMark;
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.MenuKeySet; import com.fr.design.menu.MenuKeySet;
@ -44,14 +45,14 @@ public class ReportPrintSettingAction extends JWorkBookAction {
final ReportPrintSettingPane reportPrintSettingPane = new ReportPrintSettingPane(); final ReportPrintSettingPane reportPrintSettingPane = new ReportPrintSettingPane();
reportPrintSettingPane.populate(printSettings); reportPrintSettingPane.populate(printSettings);
BasicDialog dialog = reportPrintSettingPane.showWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() { BasicDialog dialog = reportPrintSettingPane.showWindowWithCustomSize(DesignerContext.getDesignerFrame(), new DialogActionAdapter() {
@Override @Override
public void doOk() { public void doOk() {
PrintSettingsAttrMark newPrintSettings = reportPrintSettingPane.updateBean(); PrintSettingsAttrMark newPrintSettings = reportPrintSettingPane.updateBean();
wbTpl.addAttrMark(newPrintSettings); wbTpl.addAttrMark(newPrintSettings);
jwb.fireTargetModified(); jwb.fireTargetModified();
} }
}); }, DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.actions.printingSetting.dialog"));
dialog.setVisible(true); dialog.setVisible(true);
} }

2
designer-realize/src/main/java/com/fr/design/headerfooter/HFAttributesEditDialog.java

@ -213,7 +213,7 @@ public class HFAttributesEditDialog extends BasicPane {
this.revalidate(); this.revalidate();
add(column( add(column(
cell(centerPane), cell(centerPane),
cell(tabbedPaneBuilder.withHeadRatio(0.13f).build()).weight(1) cell(tabbedPaneBuilder.withAdaptiveFit().build()).weight(1)
).getComponent()); ).getComponent());
if (isInsert) { if (isInsert) {
this.moveLeftButton.setEnabled(false); this.moveLeftButton.setEnabled(false);

3
designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoLabel.java

@ -49,6 +49,7 @@ import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import static com.fine.theme.utils.FineUIScale.scale;
import static com.fine.theme.utils.FineUIStyle.BRAND_COLOR_LABEL; import static com.fine.theme.utils.FineUIStyle.BRAND_COLOR_LABEL;
/** /**
@ -65,7 +66,7 @@ public class UserInfoLabel extends UILabel {
private static final String MESSAGE_KEY = "messageCount"; private static final String MESSAGE_KEY = "messageCount";
private static final int MIN_MESSAGE_COUNT = 1; private static final int MIN_MESSAGE_COUNT = 1;
private static final int MENU_HEIGHT = 20; private static final int MENU_HEIGHT = scale(24);
private static final int DEFAULT_BBS_UID = 0; private static final int DEFAULT_BBS_UID = 0;

3
designer-realize/src/main/java/com/fr/design/report/freeze/FreezeAndRepeatPane.java

@ -1,5 +1,6 @@
package com.fr.design.report.freeze; package com.fr.design.report.freeze;
import com.fine.theme.utils.FineUIScale;
import java.awt.Dimension; import java.awt.Dimension;
import javax.swing.JComponent; import javax.swing.JComponent;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
@ -26,7 +27,7 @@ public abstract class FreezeAndRepeatPane extends BasicBeanPane<FT> {
protected boolean isEnalbed; protected boolean isEnalbed;
protected void initComponent() { protected void initComponent() {
Dimension size = new Dimension(50, 21); Dimension size = FineUIScale.createScaleDimension(50, 21);
if (start instanceof UISpinner) { if (start instanceof UISpinner) {
start.setPreferredSize(size); start.setPreferredSize(size);
((UISpinner) start).addChangeListener(new ChangeListener() { ((UISpinner) start).addChangeListener(new ChangeListener() {

20
designer-realize/src/main/java/com/fr/design/webattr/PageToolBarPane.java

@ -1,7 +1,6 @@
package com.fr.design.webattr; package com.fr.design.webattr;
import com.fine.theme.utils.FineUIStyle; import com.fine.theme.utils.FineUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.ConfigManager; import com.fr.base.ConfigManager;
import com.fr.config.Configuration; import com.fr.config.Configuration;
import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.LayoutConstants;
@ -104,25 +103,22 @@ public class PageToolBarPane extends AbstractEditToolBarPane {
pageFixedRowCountTextField.addKeyListener(rowCountKeyListener); pageFixedRowCountTextField.addKeyListener(rowCountKeyListener);
pageFixedRowCountTextField.addInputMethodListener(rowCountInputMethodListener); pageFixedRowCountTextField.addInputMethodListener(rowCountInputMethodListener);
UILabel tipLabel = new UILabel(Toolkit.i18nText("Fine-Design_Report_Page_Fixed_Row_Tip"));
FineUIStyle.setStyle(tipLabel, FineUIStyle.LABEL_TIP);
JPanel northPanel = column(LayoutConstants.VERTICAL_GAP, JPanel northPanel = column(LayoutConstants.VERTICAL_GAP,
//报表显示位置:居中展示-左展示 //报表显示位置:居中展示-左展示
row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Show_Location"))).weight(0.15), row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Show_Location"))).weight(0.2),
row(cell(centerRadioButton), fix(12), cell(leftRadioButton), flex()).weight(0.85) row(cell(centerRadioButton), fix(12), cell(leftRadioButton), flex()).weight(0.8)
), ),
//页面:以图片方式显示-iframe嵌入时自动缩放-重方式输出格子 //页面:以图片方式显示-iframe嵌入时自动缩放-重方式输出格子
row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_PageSetup_Page"))).weight(0.15), row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_PageSetup_Page"))).weight(0.2),
row(cell(isShowAsImageBox), fix(12), cell(isAutoScaleBox), fix(12), cell(isTDHeavyBox),flex()).weight(0.85) row(cell(isShowAsImageBox), fix(12), cell(isAutoScaleBox), fix(12), cell(isTDHeavyBox),flex()).weight(0.8)
), ),
//分页设置:按行分页-每页显示行数 //分页设置:按行分页-每页显示行数
row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Paging_Settings"))).weight(0.15), row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Paging_Settings"))).weight(0.2),
row(cell(isPageFixedRowBox), fix(20), cell(new UILabel(Toolkit.i18nText("Fine-Design_Report_Rows_Per_Page"))), row(cell(isPageFixedRowBox), fix(20), cell(new UILabel(Toolkit.i18nText("Fine-Design_Report_Rows_Per_Page"))),
fix(10), cell(pageFixedRowCountTextField),flex()).weight(0.85) fix(10), cell(pageFixedRowCountTextField),flex()).weight(0.8)
), ),
//提示 //提示
cell(tipLabel), cell(FineUIUtils.createAutoWrapTipLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Page_Fixed_Row_Tip"))),
//使用工具栏-编辑 //使用工具栏-编辑
row(LayoutConstants.HORIZONTAL_GAP, cell(isUseToolBarCheckBox), cell(editToolBarButton)) row(LayoutConstants.HORIZONTAL_GAP, cell(isUseToolBarCheckBox), cell(editToolBarButton))
).getComponent(); ).getComponent();

5
designer-realize/src/main/java/com/fr/design/webattr/ReportWriteAttrPane.java

@ -2,7 +2,6 @@ package com.fr.design.webattr;
import com.fr.design.gui.frpane.FineTabbedPane; import com.fr.design.gui.frpane.FineTabbedPane;
import com.fr.design.gui.frpane.LoadingBasicPane; import com.fr.design.gui.frpane.LoadingBasicPane;
import com.fr.design.gui.frpane.UITabbedPane;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.report.VerifierListPane; import com.fr.design.report.VerifierListPane;
@ -13,8 +12,6 @@ import com.fr.report.worksheet.WorkSheet;
import com.fr.report.write.ReportWriteAttr; import com.fr.report.write.ReportWriteAttr;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.SwingConstants;
import java.awt.BorderLayout; import java.awt.BorderLayout;
@ -56,7 +53,7 @@ public class ReportWriteAttrPane extends LoadingBasicPane {
.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Submit"), submiterListPane) .addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Submit"), submiterListPane)
.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Verify_Data_Verify"), verifierListPane) .addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Verify_Data_Verify"), verifierListPane)
.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Writer_ShortCuts_Setting"), writeShortCutsPane) .addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Writer_ShortCuts_Setting"), writeShortCutsPane)
.withHeadRatio(0.5f) .withAdaptiveFit()
.build(); .build();
container.setPreferredSize(this.getPreferredSize()); container.setPreferredSize(this.getPreferredSize());
container.add(tabbedPane, BorderLayout.CENTER); container.add(tabbedPane, BorderLayout.CENTER);

40
designer-realize/src/main/java/com/fr/design/webattr/printsettings/AbstractNativePrintSettingPane.java

@ -14,7 +14,6 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UIBasicSpinner; import com.fr.design.gui.ispinner.UIBasicSpinner;
import com.fr.design.gui.itextfield.UINumberField; import com.fr.design.gui.itextfield.UINumberField;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.report.UnitFieldPane; import com.fr.design.report.UnitFieldPane;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
@ -44,6 +43,7 @@ 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.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;
import static com.fine.theme.utils.FineUIUtils.wrapComponentWithTitle; import static com.fine.theme.utils.FineUIUtils.wrapComponentWithTitle;
/** /**
@ -199,29 +199,29 @@ public abstract class AbstractNativePrintSettingPane extends JPanel {
JPanel scaleCheckPane = GUICoreUtils.createCheckboxAndDynamicPane(fitPaperSizeCheck, scalePane, true); JPanel scaleCheckPane = GUICoreUtils.createCheckboxAndDynamicPane(fitPaperSizeCheck, scalePane, true);
// 整体布局 // 整体布局
centerPane = column(LayoutConstants.VERTICAL_GAP, centerPane = column(LayoutConstants.VERTICAL_GAP,
row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Printer"))).weight(0.1), row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Printer"))).weight(0.15),
cell(printerComboBox).weight(0.35), cell(printerComboBox).weight(0.5),
flex(0.55)), flex(0.35)),
row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Copy_Number"))).weight(0.1), row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Copy_Number"))).weight(0.15),
cell(copySpinner).weight(0.15), cell(copySpinner).weight(0.2),
flex(0.75)), flex(0.65)),
row(cell(getTopAlignLabelPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Page_Number"))) row(cell(getTopAlignLabelPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Page_Number")))
.weight(0.1).with(it -> it.setBorder(new ScaledEmptyBorder(2, 0, 0, 0))), .weight(0.15).with(it -> it.setBorder(new ScaledEmptyBorder(2, 0, 0, 0))),
cell(getPrintAreaPane()).weight(0.7), cell(getPrintAreaPane()).weight(0.7),
flex(0.2)), flex(0.15)),
row(cell(getTopAlignLabelPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Paper"))) row(cell(getTopAlignLabelPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Paper")))
.weight(0.1).with(it -> it.setBorder(new ScaledEmptyBorder(2, 0, 0, 0))), .weight(0.15).with(it -> it.setBorder(new ScaledEmptyBorder(2, 0, 0, 0))),
cell(paperSettingCheckPane).weight(0.5), cell(paperSettingCheckPane).weight(0.5),
flex(0.4)), flex(0.35)),
row(cell(getTopAlignLabelPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Layout"))).weight(0.1), row(cell(getTopAlignLabelPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Layout"))).weight(0.15),
cell(layoutSettingCheckPane).weight(0.2), cell(layoutSettingCheckPane).weight(0.5),
flex(0.7)), flex(0.35)),
row(cell(getTopAlignLabelPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Margin"))).weight(0.1), row(cell(getTopAlignLabelPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Margin"))).weight(0.15),
cell(pageMarginCheckPane).weight(0.5), cell(pageMarginCheckPane).weight(0.5),
flex(0.4)), flex(0.35)),
row(cell(getTopAlignLabelPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Scale_EnlargeOrReduce"))).weight(0.1), row(cell(getTopAlignLabelPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Scale_EnlargeOrReduce"))).weight(0.15),
cell(scaleCheckPane).weight(0.3), cell(scaleCheckPane).weight(0.3),
flex(0.6)) flex(0.55))
).getComponent(); ).getComponent();
} }
@ -353,8 +353,8 @@ public abstract class AbstractNativePrintSettingPane extends JPanel {
return column(LayoutConstants.VERTICAL_GAP, return column(LayoutConstants.VERTICAL_GAP,
cell(allPageRadioButton), cell(allPageRadioButton),
cell(currentPageRadioButton), cell(currentPageRadioButton),
row(cell(customPageRadioButton).weight(0.1), cell(specifiedAreaField).weight(0.3), cell(areaFieldTip).weight(0.1)), row(cell(customPageRadioButton).weight(0.11), cell(specifiedAreaField).weight(0.29), fix(4), cell(areaFieldTip).weight(0.1)),
row(cell(doublePrintRadioButton).weight(0.1),cell(doublePrintComboBox).weight(0.3), flex(0.1)) row(cell(doublePrintRadioButton).weight(0.11),cell(doublePrintComboBox).weight(0.29), fix(4), flex(0.1))
).getComponent(); ).getComponent();
} }

5
designer-realize/src/main/java/com/fr/design/webattr/printsettings/PrintSettingPane.java

@ -11,6 +11,7 @@ import com.fr.design.layout.FRGUIPaneFactory;
import javax.swing.ButtonGroup; import javax.swing.ButtonGroup;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.ScrollPaneConstants;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.CardLayout; import java.awt.CardLayout;
import java.awt.Dimension; import java.awt.Dimension;
@ -55,8 +56,8 @@ public class PrintSettingPane extends BasicPane {
printPane.setLayout(printCard); printPane.setLayout(printCard);
printPane.add(noClientPrintRadioButton.getText(), noClientPrintSettingPane); printPane.add(noClientPrintRadioButton.getText(), noClientPrintSettingPane);
UIScrollPane scrollPane = new UIScrollPane(nativePrintSettingPane); UIScrollPane scrollPane = new UIScrollPane(nativePrintSettingPane, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
scrollPane.setPreferredSize(FineUIScale.scale(new Dimension(600, 400))); scrollPane.setPreferredSize(new Dimension(super.getPreferredSize().width, FineUIScale.scale(400)));
printPane.add(nativePrintRadioButton.getText(), scrollPane); printPane.add(nativePrintRadioButton.getText(), scrollPane);
JPanel allPanel = column(LayoutConstants.VERTICAL_GAP, cell(north), cell(printPane)) JPanel allPanel = column(LayoutConstants.VERTICAL_GAP, cell(north), cell(printPane))

Loading…
Cancel
Save