Browse Source

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

fbp/release
Destiny.Lin 3 months ago
parent
commit
47758f0127
  1. 107
      designer-base/src/main/java/com/fine/theme/light/ui/FineOptionPaneUI.java
  2. 12
      designer-base/src/main/java/com/fine/theme/utils/FineUIScale.java
  3. 1
      designer-base/src/main/java/com/fine/theme/utils/FineUIStyle.java
  4. 13
      designer-base/src/main/java/com/fine/theme/utils/FineUIUtils.java
  5. 5
      designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java
  6. 28
      designer-base/src/main/java/com/fr/design/components/notification/NotificationDialog.java
  7. 2
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java
  8. 2
      designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java
  9. 1
      designer-base/src/main/java/com/fr/design/data/datapane/sqlpane/SQLEditPane.java
  10. 12
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java
  11. 115
      designer-base/src/main/java/com/fr/design/dialog/FineJOptionPane.java
  12. 35
      designer-base/src/main/java/com/fr/design/dialog/UIDetailErrorLinkDialog.java
  13. 2
      designer-base/src/main/java/com/fr/design/editor/ValueEditorPane.java
  14. 44
      designer-base/src/main/java/com/fr/design/formula/DefaultTinyFormulaPane.java
  15. 5
      designer-base/src/main/java/com/fr/design/formula/FormulaPane.java
  16. 2
      designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java
  17. 4
      designer-base/src/main/java/com/fr/design/gui/controlpane/ListControlPaneHelper.java
  18. 6
      designer-base/src/main/java/com/fr/design/gui/frpane/ClosableBubbleFloatPane.java
  19. 125
      designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java
  20. 11
      designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java
  21. 3
      designer-base/src/main/java/com/fr/design/gui/itooltip/MultiLineToolTip.java
  22. 3
      designer-base/src/main/java/com/fr/design/gui/syntax/ui/rtextarea/RTextAreaBase.java
  23. 27
      designer-base/src/main/java/com/fr/design/lock/LockInfoDialog.java
  24. 9
      designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java
  25. 5
      designer-base/src/main/java/com/fr/design/parameter/ParameterInputPane.java
  26. 3
      designer-base/src/main/java/com/fr/design/remote/button/IconButton.java
  27. 21
      designer-base/src/main/java/com/fr/design/remote/ui/AbstractListControlPane.java
  28. 36
      designer-base/src/main/java/com/fr/design/remote/ui/AbstractManagerPane.java
  29. 13
      designer-base/src/main/java/com/fr/design/remote/ui/AuthorityEditorPane.java
  30. 3
      designer-base/src/main/java/com/fr/design/remote/ui/AuthorityListCustomRolePane.java
  31. 3
      designer-base/src/main/java/com/fr/design/remote/ui/AuthorityListUserPane.java
  32. 9
      designer-base/src/main/java/com/fr/design/remote/ui/AuthorityManagerPane.java
  33. 37
      designer-base/src/main/java/com/fr/design/remote/ui/CustomRoleManagerPane.java
  34. 36
      designer-base/src/main/java/com/fr/design/remote/ui/UserManagerPane.java
  35. 15
      designer-base/src/main/java/com/fr/design/remote/ui/list/AddedMemberListCellRender.java
  36. 21
      designer-base/src/main/java/com/fr/design/remote/ui/list/AddingMemberListCellRender.java
  37. 5
      designer-base/src/main/java/com/fr/design/remote/ui/list/AuthorityListCellRenderer.java
  38. 3
      designer-base/src/main/java/com/fr/design/remote/ui/list/cell/AddedCustomRoleListCellRender.java
  39. 3
      designer-base/src/main/java/com/fr/design/remote/ui/list/cell/AddedUserListCellRender.java
  40. 3
      designer-base/src/main/java/com/fr/design/remote/ui/list/cell/AddingCustomRoleListCellRender.java
  41. 3
      designer-base/src/main/java/com/fr/design/remote/ui/list/cell/AddingUserListCellRender.java
  42. 3
      designer-base/src/main/java/com/fr/design/remote/ui/list/cell/AuthorityCustomRoleListCellRender.java
  43. 3
      designer-base/src/main/java/com/fr/design/remote/ui/list/cell/AuthorityUserListCellRender.java
  44. 3
      designer-base/src/main/java/com/fr/design/remote/ui/tree/FileAuthorityTree.java
  45. 52
      designer-base/src/main/java/com/fr/design/style/color/ColorAdjustPane.java
  46. 3
      designer-base/src/main/java/com/fr/design/style/color/ColorButton.java
  47. 12
      designer-base/src/main/java/com/fr/design/utils/DesignerPort.java
  48. 3
      designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java
  49. 11
      designer-base/src/main/resources/com/fine/theme/icon/close/closeTag.svg
  50. 11
      designer-base/src/main/resources/com/fine/theme/icon/close/platform_close_disable.svg
  51. 3
      designer-base/src/main/resources/com/fine/theme/icon/debug.svg
  52. 3
      designer-base/src/main/resources/com/fine/theme/icon/debug_disable.svg
  53. 3
      designer-base/src/main/resources/com/fine/theme/icon/toolbar/member.svg
  54. 3
      designer-base/src/main/resources/com/fine/theme/icon/toolbar/role.svg
  55. 4
      designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json
  56. 7
      designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties
  57. 140
      designer-base/src/main/resources/com/fr/design/data/tabledata/datacenter/web/data-choose.main.js
  58. 5
      designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties
  59. 5
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties
  60. 5
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties
  61. 9
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties
  62. 5
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties
  63. 14
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java
  64. 4
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotReportDataContentPane.java
  65. 4
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldValuePane.java
  66. 6
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java
  67. 3
      designer-chart/src/main/java/com/fr/design/module/ChartPreFillStylePane.java
  68. 30
      designer-chart/src/main/java/com/fr/van/chart/box/data/report/BoxPlotReportDataContentPane.java
  69. 27
      designer-chart/src/main/java/com/fr/van/chart/box/data/report/BoxPlotReportResultDataSeriesPane.java
  70. 13
      designer-chart/src/main/java/com/fr/van/chart/box/data/report/TinyFormulaWithEditLabel.java
  71. 13
      designer-chart/src/main/java/com/fr/van/chart/box/data/table/UIComboBoxWithEditLabel.java
  72. 4
      designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotSelectPane.java
  73. 3
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLabelContentPane.java
  74. 17
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java
  75. 8
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTrendLinePane.java
  76. 13
      designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartLabelConditionPane.java
  77. 19
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java
  78. 3
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/component/VanChartCategoryStylePaneWithCheckBox.java
  79. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeLabelDetailPane.java
  80. 9
      designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java
  81. 4
      designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java
  82. 43
      designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartEffectPane.java
  83. 35
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/GanttReportDataContentPane.java
  84. 26
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/link/GanttLinkReportDataContentPane.java
  85. 1
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/series/VanChartGanttSeriesPane.java
  86. 2
      designer-chart/src/main/java/com/fr/van/chart/gauge/VanChartGaugeSeriesPane.java
  87. 49
      designer-chart/src/main/java/com/fr/van/chart/map/line/VanChartLineMapEffectPane.java
  88. 4
      designer-form/src/main/java/com/fr/design/actions/TemplateParameterAction.java
  89. 3
      designer-form/src/main/java/com/fr/design/actions/file/export/EmbeddedFormExportExportAction.java
  90. 4
      designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/TabMoveCustomAction.java
  91. 4
      designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/TabMoveNextAction.java
  92. 3
      designer-realize/src/main/java/com/fr/design/actions/cell/style/ReportFontNameAction.java
  93. 4
      designer-realize/src/main/java/com/fr/design/actions/cell/style/ReportFontSizeAction.java
  94. 3
      designer-realize/src/main/java/com/fr/design/actions/edit/DeleteAction.java
  95. 2
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java
  96. 1
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/CellDesensitizationGroupsPane.java
  97. 3
      designer-realize/src/main/java/com/fr/poly/actions/DeleteBlockAction.java

107
designer-base/src/main/java/com/fine/theme/light/ui/FineOptionPaneUI.java

@ -1,14 +1,33 @@
package com.fine.theme.light.ui;
import com.fine.swing.ui.layout.Layouts;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIStyle;
import com.formdev.flatlaf.ui.FlatOptionPaneUI;
import com.fr.design.gui.ilable.UILabel;
import sun.swing.DefaultLookup;
import javax.swing.Icon;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.UIManager;
import javax.swing.border.Border;
import javax.swing.plaf.ComponentUI;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
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.flex;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* @author Renekton
@ -35,4 +54,92 @@ public class FineOptionPaneUI extends FlatOptionPaneUI {
}
}
}
protected void installComponents() {
optionPane.setLayout(new BorderLayout());
optionPane.add(createMessageArea());
optionPane.add(createButtonArea(), BorderLayout.SOUTH);
optionPane.applyComponentOrientation(optionPane.getComponentOrientation());
}
protected Container createMessageArea() {
JPanel top = new JPanel();
Border topBorder = (Border) DefaultLookup.get(optionPane, this,
"OptionPane.messageAreaBorder");
if (topBorder != null) {
top.setBorder(topBorder);
}
top.setLayout(new BorderLayout());
/* Fill the body. */
Container body = new JPanel(new GridBagLayout());
Container realBody = new JPanel(new BorderLayout());
body.setName("OptionPane.body");
realBody.setName("OptionPane.realBody");
realBody.add(body, BorderLayout.NORTH);
GridBagConstraints cons = new GridBagConstraints();
cons.gridx = cons.gridy = 0;
cons.gridwidth = GridBagConstraints.REMAINDER;
cons.gridheight = 1;
cons.anchor = DefaultLookup.getInt(optionPane, this,
"OptionPane.messageAnchor", GridBagConstraints.CENTER);
cons.insets = new Insets(0,0,3,0);
addMessageComponents(body, cons, getMessage(),
getMaxCharactersPerLineCount(), false);
top.add(realBody, BorderLayout.CENTER);
addIcon(top);
top.setAlignmentX(Component.CENTER_ALIGNMENT);
return row(flex(), column(flex(), cell(top), flex()), flex()).getComponent();
}
@Override
protected void addIcon(Container top) {
Icon sideIcon = getIcon();
if (sideIcon != null) {
UILabel iconLabel = new UILabel(sideIcon);
iconLabel.setName("OptionPane.iconLabel");
iconLabel.setVerticalAlignment(SwingConstants.TOP);
top.add(row(cell(iconLabel), Layouts.fix(10)).getComponent(), BorderLayout.BEFORE_LINE_BEGINS);
}
}
@Override
protected Icon getIconForType(int messageType) {
String iconId = null;
switch (messageType) {
case 0:
iconId = "error";
break;
case 1:
iconId = "information";
break;
case 2:
iconId = "warning";
break;
case 3:
iconId = "question";
break;
default:
break;
}
if (iconId != null) {
return new LazyIcon(iconId, 20);
}
return null;
}
public Dimension getPreferredSize(JComponent c) {
if (c == optionPane) {
Dimension size = super.getPreferredSize(c);
size.width = Math.max(FineUIScale.scale(360), size.width);
size.height = Math.max(FineUIScale.scale(130), size.height);
return size;
}
return null;
}
}

12
designer-base/src/main/java/com/fine/theme/utils/FineUIScale.java

@ -83,4 +83,16 @@ public class FineUIScale {
public static Insets scale(Insets insets) {
return UIScale.scale(insets);
}
/**
* Creates a scaled {@link Dimension} object based on the specified width and height.
* <p>
* This method uses the current user scale factor to adjust the provided width and height values:
* - If the user scale factor is 1 (no scaling), the original width and height values are returned unchanged.
* - If the user scale factor is different from 1, a new {@link Dimension} instance is created and returned,
* with the width and height values scaled according to the user scale factor.
*/
public static Dimension createScaleDimension(int width, int height) {
return scale(new Dimension(width, height));
}
}

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

@ -28,6 +28,7 @@ public interface FineUIStyle {
String BRAND_COLOR_LABEL = "brandColorLabel";
String BUTTON_TAB_ACTION = "tabAction";
String LABEL_BOLD = "boldLabel";
String LABEL_TIP_WINDOW_TITLE = "tipWindowTitleLabel";
String LABEL_SECONDARY = "secondaryLabel";
String LABEL_TIP = "tipLabel";
String LABEL_WARNING_TIP = "warningTipLabel";

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

@ -6,6 +6,7 @@ import com.fr.design.border.FineBorderFactory;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.stable.os.OperatingSystem;
import com.fr.value.AtomicClearableLazyValue;
@ -16,6 +17,7 @@ import javax.swing.UIManager;
import java.awt.Color;
import java.awt.Component;
import java.awt.Composite;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
@ -435,4 +437,15 @@ public class FineUIUtils {
Font newSizeFont = font.deriveFont(font.getStyle(), scale(size));
c.setFont(newSizeFont);
}
/**
* 获取缩放后的国际化尺寸
*
* @param i18nDimensionKey 国际化key值
* @return 缩放后的国际化尺寸
*/
public static Dimension getScaledI18nDimension(String i18nDimensionKey) {
return FineUIScale.scale(DesignSizeI18nManager.getInstance().i18nDimension(i18nDimensionKey));
}
}

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

@ -1,6 +1,7 @@
package com.fr.design.actions.file;
import com.fine.swing.ui.layout.Row;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIStyle;
@ -731,10 +732,10 @@ public class PreferencePane extends BasicPane {
private Component createColorSettingPane() {
// Color Setting Pane
gridLineColorTBButton = new UINoThemeColorButton(IOUtils.readIcon("/com/fr/design/images/gui/color/foreground.png"));
gridLineColorTBButton = new UINoThemeColorButton(new LazyIcon("foreground"));
gridLineColorTBButton.setEnabled(this.isEnabled());
paginationLineColorTBButton = new UINoThemeColorButton(IOUtils.readIcon("/com/fr/design/images/gui/color/foreground.png"));
paginationLineColorTBButton = new UINoThemeColorButton(new LazyIcon("foreground"));
paginationLineColorTBButton.setEnabled(this.isEnabled());
JPanel colorPanel = row(10,

28
designer-base/src/main/java/com/fr/design/components/notification/NotificationDialog.java

@ -1,5 +1,8 @@
package com.fr.design.components.notification;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.function.ThrowableRunnable;
import com.fr.base.svg.IconUtils;
import com.fr.design.components.page.PageControlModel;
@ -53,7 +56,7 @@ public class NotificationDialog extends JDialog {
*/
private static final int CONTENT_SCROLL_WIDTH = 280;
private static final int CONTENT_WIDTH = 300;
private static final int CONTENT_WIDTH = 360;
private static final int CONTENT_HEIGHT = 100;
/**
* 通知框的外部宽高
@ -148,21 +151,20 @@ public class NotificationDialog extends JDialog {
protected JPanel createContentPanel() {
JPanel contentPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
contentPanel.setBorder(BorderFactory.createEmptyBorder(8, 10, 8, 10));
contentPanel.setBorder(new ScaledEmptyBorder(8, 10, 8, 10));
contentPanel.setName("contentPanel");
NotificationModel model = getCurrentModel();
UILabel icon = new UILabel(getIconForType(model.getType()));
icon.setPreferredSize(new Dimension(16, 16));
JPanel iconPanel = FRGUIPaneFactory.createBorderLayout_L_Pane();
iconPanel.setBorder(BorderFactory.createEmptyBorder(0, 5, 10, 8));
iconPanel.setBorder(new ScaledEmptyBorder(0, 5, 10, 8));
iconPanel.add(icon, BorderLayout.NORTH);
contentPanel.add(iconPanel, BorderLayout.WEST);
JPanel centerPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
centerPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 5));
centerPanel.setBorder(new ScaledEmptyBorder(0, 0, 5, 5));
NotificationMessage[] messages = model.getMessages();
List<? extends JComponent> messageComponents = Arrays.stream(messages)
@ -213,7 +215,7 @@ public class NotificationDialog extends JDialog {
jScrollPane.setBorder(BorderFactory.createEmptyBorder());
centerPanel.add(jScrollPane, BorderLayout.CENTER);
centerPanel.setPreferredSize(CONTENT_SIZE);
centerPanel.setPreferredSize(FineUIScale.scale(CONTENT_SIZE));
contentPanel.add(centerPanel, BorderLayout.CENTER);
@ -282,7 +284,7 @@ public class NotificationDialog extends JDialog {
NotificationAction action = currentModel.getAction();
if (action != null) {
UIButton actionButton = new UIButton(action.name());
actionButton.setPreferredSize(BUTTON_DIMENSION);
actionButton.setPreferredSize(FineUIScale.scale(BUTTON_DIMENSION));
actionButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -293,7 +295,7 @@ public class NotificationDialog extends JDialog {
}
UIButton knowButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Know"));
knowButton.setPreferredSize(BUTTON_DIMENSION);
knowButton.setPreferredSize(FineUIScale.scale(BUTTON_DIMENSION));
knowButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -359,21 +361,21 @@ public class NotificationDialog extends JDialog {
protected Icon getIconForType(NotificationType type) {
String iconPath;
String iconId;
switch (type) {
case ERROR:
iconPath = "/com/fr/design/standard/reminder/reminder_error.svg";
iconId = "error";
break;
case INFO:
iconPath = "/com/fr/design/standard/reminder/reminder_success.svg";
iconId = "success";
break;
case WARNING:
iconPath = "/com/fr/design/standard/reminder/reminder_warning.svg";
iconId = "warning";
break;
default:
return null;
}
return IconUtils.readIcon(iconPath);
return new LazyIcon(iconId, 20);
}
private void destroy() {

2
designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java

@ -1,6 +1,7 @@
package com.fr.design.data.datapane;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.light.ui.FineRoundBorder;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.TableData;
import com.fr.data.MultiResultTableData;
@ -1117,6 +1118,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
};
basicPane.setLayout(new BorderLayout());
basicPane.add(tips, BorderLayout.NORTH);
scrollPane.setBorder(new FineRoundBorder());
basicPane.add(scrollPane, BorderLayout.CENTER);
BasicDialog basicDialog = basicPane.showSmallWindow(SwingUtilities.getWindowAncestor(TableDataTreePane.this), new DialogActionAdapter() {
@Override

2
designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java

@ -102,7 +102,7 @@ public class PreviewTablePane extends BasicPane {
private PreviewTableDesensitizationPane desensitizationPane;
private static final int PREVIEW_TABLE_MIN_COLUMN_WIDTH = FineUIScale.scale(75);
private static final int PREVIEW_TABLE_WIDTH = FineUIScale.scale(600);
private static final int PREVIEW_TABLE_WIDTH = FineUIScale.scale(610);
/**
* 用于refreshLabel的鼠标监听

1
designer-base/src/main/java/com/fr/design/data/datapane/sqlpane/SQLEditPane.java

@ -57,6 +57,7 @@ public class SQLEditPane extends RSyntaxTextArea {
if (requestDroptarget) {
new SQLPaneDropTarget(this);
}
setBorder(null);
}

12
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java

@ -1,5 +1,6 @@
package com.fr.design.data.tabledata.tabledatapane;
import com.fine.theme.light.ui.FineTableHeaderUI;
import com.fine.theme.utils.FineUIScale;
import com.fr.data.impl.EmbeddedTableData;
import com.fr.design.constants.LayoutConstants;
@ -40,9 +41,9 @@ import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.flex;
public class EmbeddedTableDataPane extends AbstractTableDataPane<EmbeddedTableData> {
private static final int MIN_CELL_WIDTH = 30;
private static final int MIN_CELL_WIDTH = FineUIScale.scale(30);
private static final int PREVIEW_TABLE_MIN_COLUMN_WIDTH = FineUIScale.scale(75);
private static final int PREVIEW_TABLE_WIDTH = FineUIScale.scale(600);
private static final int PREVIEW_TABLE_WIDTH = FineUIScale.scale(860);
private JTable dataJTable ;
private UITableScrollPane scrollPane;
private UILabel coordinatelabel;
@ -68,7 +69,8 @@ public class EmbeddedTableDataPane extends AbstractTableDataPane<EmbeddedTableDa
// 显示double,date类;渲染date类
dataJTable.setDefaultRenderer(Double.class, new DoubleRenderer());
dataJTable.setDefaultRenderer(Date.class, new DateRenderer());
dataJTable.setDefaultRenderer(Date.class, new FineTableHeaderUI.TableRenderer());
dataJTable.setDefaultRenderer(Integer.class, new DateRenderer());
dataJTable.setDefaultEditor(Date.class, new DateEditor(new UIDatePicker(UIDatePicker.STYLE_CN_DATE1)));
tableStructureChanged();
@ -249,14 +251,14 @@ public class EmbeddedTableDataPane extends AbstractTableDataPane<EmbeddedTableDa
tableColumn.setMaxWidth(Math.max(dataJTable.getColumnCount(), MIN_CELL_WIDTH));
}
private class DoubleRenderer extends DefaultTableCellRenderer {
private class DoubleRenderer extends FineTableHeaderUI.TableRenderer {
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
setHorizontalAlignment(RIGHT);
return super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
}
}
private class DateRenderer extends DefaultTableCellRenderer {
private class DateRenderer extends FineTableHeaderUI.TableRenderer {
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
Date date2Format = DateUtils.object2Date(value, true);
return super.getTableCellRendererComponent(table, date2Format == null ? StringUtils.EMPTY : DateUtils.DATEFORMAT1.format(date2Format), isSelected, hasFocus, row,

115
designer-base/src/main/java/com/fr/design/dialog/FineJOptionPane.java

@ -1,5 +1,6 @@
package com.fr.design.dialog;
import com.fine.theme.icon.LazyIcon;
import com.fr.invoke.Reflect;
import com.fr.stable.StringUtils;
@ -31,6 +32,8 @@ public class FineJOptionPane extends JOptionPane {
//选项类型optionType 和 选项字符串数组 一一对应
private final static Map<Integer, String[]> OPTION_MAP = new HashMap<>();
public Icon successMessageIcon;
static {
OPTION_MAP.put(DEFAULT_OPTION, OPTION_DEFAULT);
OPTION_MAP.put(YES_NO_OPTION, OPTION_YES_NO);
@ -42,6 +45,17 @@ public class FineJOptionPane extends JOptionPane {
private final static String CONFIRM_DIALOG_TITLE = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt");
private final static String INPUT_DIALOG_TITLE = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips");
public FineJOptionPane(Object message, int messageType, int optionType,
Icon icon, Object[] options, Object initialValue,
boolean successMessage) {
super(message, messageType, optionType, icon, options, initialValue);
if (successMessage) {
successMessageIcon = new LazyIcon("success", 20);
}
}
/**
* 使用默认 标题 消息类型 的消息提示弹出框
* @param parentComponent 父容器
@ -54,6 +68,34 @@ public class FineJOptionPane extends JOptionPane {
INFORMATION_MESSAGE);
}
/**
* 使用 success 图标 默认 标题 消息类型 的消息提示弹出框
* @param parentComponent 父容器
* @param message 具体的提示消息
* @throws HeadlessException
*/
public static void showSuccessMessageDialog(Component parentComponent, Object message)
throws HeadlessException {
showMessageDialog(parentComponent, message, MESSAGE_DIALOG_TITLE, INFORMATION_MESSAGE, true);
}
/**
* 使用默认 标题 消息类型 的消息提示弹出框
* @param parentComponent 父容器
* @param message 具体的提示消息
* @param title 标题
* @param messageType 消息类型
* @param isSuccessMessage 是否使用 success 图标如果不是则根据消息类型生成图标
* @throws HeadlessException
*/
public static void showMessageDialog(Component parentComponent, Object message,
String title, int messageType, boolean isSuccessMessage)
throws HeadlessException {
showOptionDialog(parentComponent, message, title, DEFAULT_OPTION,
messageType, null, OPTION_DEFAULT, null, isSuccessMessage);
}
/**
* 使用默认 Icon 的消息提示弹出框
* @param parentComponent 父容器
@ -101,7 +143,7 @@ public class FineJOptionPane extends JOptionPane {
Icon icon, Object[] options, Object initialValue)
throws HeadlessException {
showOptionDialog(parentComponent, message, title, optionType,
messageType, icon, options, initialValue);
messageType, icon, options, initialValue, false);
}
/**
@ -182,7 +224,7 @@ public class FineJOptionPane extends JOptionPane {
Object[] options, Object initialValue)
throws HeadlessException {
return showOptionDialog(parentComponent, message, title, optionType,
messageType, icon, options, initialValue);
messageType, icon, options, initialValue, false);
}
/**
@ -199,7 +241,7 @@ public class FineJOptionPane extends JOptionPane {
String title, Icon icon, Object initialValue, ActionListener listener)
throws HeadlessException {
int val = showOptionDialog(parentComponent, message, title, JOptionPane.DEFAULT_OPTION,
FineJOptionPane.WARNING_MESSAGE, icon, OPTION_OK_CANCEL, initialValue);
FineJOptionPane.WARNING_MESSAGE, icon, OPTION_OK_CANCEL, initialValue, false);
if (val == JOptionPane.OK_OPTION && listener!=null) {
listener.actionPerformed(null);
}
@ -315,4 +357,71 @@ public class FineJOptionPane extends JOptionPane {
return value;
}
/**
* 根据 message type 生成 icon
* @return
*/
public Icon getIcon() {
if (successMessageIcon != null) {
return successMessageIcon;
}
switch (messageType) {
case ERROR_MESSAGE:
return new LazyIcon("error", 20);
case WARNING_MESSAGE:
return new LazyIcon("warning", 20);
case INFORMATION_MESSAGE:
return new LazyIcon("information", 20);
case QUESTION_MESSAGE:
return new LazyIcon("question", 20);
default:
return icon;
}
}
/**
* 自定义的确认弹出框
* @param parentComponent 父容器
* @param message 具体的提示消息
* @param title 标题
* @param optionType 选项类型
* @param messageType 消息类型
* @param icon 图标
* @param options 选项
* @param initialValue 初始选项
* @param isSuccessMessage 是否使用 success 图标
*/
public static int showOptionDialog(Component parentComponent, Object message,
String title, int optionType, int messageType,
Icon icon, Object[] options, Object initialValue,
boolean isSuccessMessage) {
FineJOptionPane pane = new FineJOptionPane(message, messageType, optionType, icon, options, initialValue, isSuccessMessage);
pane.setInitialValue(initialValue);
pane.setComponentOrientation(((parentComponent == null) ? getRootFrame() : parentComponent).getComponentOrientation());
JDialog dialog = pane.createDialog(parentComponent, title);
pane.selectInitialValue();
dialog.show();
dialog.dispose();
Object selectedValue = pane.getValue();
if (selectedValue == null){
return CLOSED_OPTION;
}
if (options == null) {
if (selectedValue instanceof Integer) {
return ((Integer) selectedValue).intValue();
}
return CLOSED_OPTION;
}
for(int counter = 0, maxCounter = options.length;
counter < maxCounter; counter++) {
if (options[counter].equals(selectedValue)) {
return counter;
}
}
return CLOSED_OPTION;
}
}

35
designer-base/src/main/java/com/fr/design/dialog/UIDetailErrorLinkDialog.java

@ -1,5 +1,9 @@
package com.fr.design.dialog;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIStyle;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.GraphHelper;
import com.fr.design.dialog.link.MessageWithLink;
import com.fr.design.gui.ibutton.UIButton;
@ -7,6 +11,7 @@ import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextarea.UITextArea;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.IOUtils;
@ -30,6 +35,11 @@ import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
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.fix;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* 带链接的错误详情弹窗
*
@ -40,13 +50,13 @@ import javax.swing.SwingUtilities;
public class UIDetailErrorLinkDialog extends UIDialog {
private static final Color LINK_COLOR = new Color(51, 152, 253);
private static final int GAP_5 = 5;
private static final int GAP_8 = 8;
private static final int GAP_10 = 10;
private static final String TAG_A_START = "<a>";
private static final String TAG_A_END = "</a>";
private static final double SCALE = 1.2;
private final Dimension dimension = new Dimension(300, 180);
private final Dimension dimension = new Dimension(360, 180);
public static Builder newBuilder() {
return new Builder();
@ -65,15 +75,12 @@ public class UIDetailErrorLinkDialog extends UIDialog {
private void init(Builder builder) {
this.setTitle(builder.title);
// 顶部 图标和提示
UILabel errorIcon = new UILabel(IOUtils.readIcon("com/fr/design/images/lookandfeel/Information_Icon_Error_32x32.png"));
UILabel errorIcon = new UILabel(new LazyIcon("error", 20));
UILabel errorInfo= new UILabel(builder.reason);
JPanel topPane = new JPanel(new FlowLayout(FlowLayout.LEFT, GAP_10, GAP_5));
topPane.add(errorIcon);
topPane.add(errorInfo);
FineUIStyle.setStyle(errorInfo, FineUIStyle.LABEL_TIP_WINDOW_TITLE);
// 中部 详细内容
JPanel contentPane = new JPanel(new BorderLayout());
contentPane.setBorder(BorderFactory.createEmptyBorder(0, GAP_5,0,0));
JPanel contentPane = new JPanel(FRGUIPaneFactory.createScaledBorderLayout(GAP_10, GAP_10));
UILabel errorCodeLabel = new UILabel(Toolkit.i18nText("Fine_Design_Basic_Error_Code", builder.errorCode));
UILabel link = new UILabel(Toolkit.i18nText("Fine_Design_Basic_Show_Error_Stack"));
link.setForeground(LINK_COLOR);
@ -92,13 +99,17 @@ public class UIDetailErrorLinkDialog extends UIDialog {
contentPane.add(link, BorderLayout.SOUTH);
// 确定 + 取消
JPanel actionPane = new JPanel(new FlowLayout(FlowLayout.RIGHT, GAP_10, GAP_5));
JPanel actionPane = new JPanel(new FlowLayout(FlowLayout.RIGHT, GAP_10, GAP_8));
actionPane.add(createButton(Toolkit.i18nText("Fine-Design_Report_OK")));
actionPane.add(createButton(Toolkit.i18nText("Fine-Design_Basic_Cancel")));
this.getContentPane().add(topPane, BorderLayout.NORTH);
this.getContentPane().add(contentPane, BorderLayout.CENTER);
this.getContentPane().add(column(10,
row(10, cell(errorIcon), cell(errorInfo)),
row(10, fix(20), cell(contentPane))
).with(it -> it.setBorder(new ScaledEmptyBorder(GAP_10, GAP_10, GAP_10, GAP_10))).getComponent());
this.getContentPane().add(actionPane, BorderLayout.SOUTH);
this.setSize(dimension);
this.setSize(FineUIScale.scale(dimension));
this.setResizable(false);
this.setModal(true);
GUICoreUtils.centerWindow(this);

2
designer-base/src/main/java/com/fr/design/editor/ValueEditorPane.java

@ -58,7 +58,7 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName
}
public ValueEditorPane(Editor[] cards, String popupName, String textEditorValue) {
initComponents(cards, popupName, textEditorValue, 200);
initComponents(cards, popupName, textEditorValue, FineUIScale.scale(200));
}
public ValueEditorPane(Editor[] cards, String popupName, String textEditorValue, int centerPaneWidth) {

44
designer-base/src/main/java/com/fr/design/formula/DefaultTinyFormulaPane.java

@ -1,6 +1,14 @@
package com.fr.design.formula;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.BaseFormula;
import com.fr.design.gui.ilable.UILabel;
import java.awt.Component;
import java.awt.BorderLayout;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.flex;
/**
* @author Carlson
@ -10,8 +18,44 @@ import com.fr.base.BaseFormula;
**/
public class DefaultTinyFormulaPane extends TinyFormulaPane{
/**
* 默认构造方法
* 一个输入框和一个F(x)按钮
*/
public DefaultTinyFormulaPane() {
this.initComponents();
this.initLayout();
}
/**
* 带标题的构造方法
* 当需要显示标题时使用此构造方法
*
* @param title 要在布局中显示的标题
*/
public DefaultTinyFormulaPane(String title) {
this.initComponents();
this.initLayout(title);
}
private void initLayout(String title) {
this.setLayout(new BorderLayout());
this.add(row(cell(new UILabel(title)).weight(1.2), cell(createDefaultTinyFormulaPane()).weight(3)).getComponent());
}
@Override
protected void populateTextField(BaseFormula fm) {
formulaTextField.setText(fm.getContent());
}
@Override
protected void initLayout() {
this.setLayout(new BorderLayout());
formulaTextFieldButton.setPreferredSize(FineUIScale.createScaleDimension(24, 24));
this.add(createDefaultTinyFormulaPane());
}
private Component createDefaultTinyFormulaPane() {
return row(cell(formulaTextField).weight(2), flex(0.1), cell(formulaTextFieldButton).weight(0.4)).getComponent();
}
}

5
designer-base/src/main/java/com/fr/design/formula/FormulaPane.java

@ -41,6 +41,7 @@ import com.fr.design.gui.itextarea.UITextArea;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.syntax.ui.rsyntaxtextarea.RSyntaxTextArea;
import com.fr.design.gui.syntax.ui.rsyntaxtextarea.SyntaxConstants;
import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
@ -743,7 +744,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
}
public BasicDialog showLargeWindow(Window window, DialogActionListener l) {
Dimension dimension = new Dimension(900, 640);
Dimension dimension = DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.formula.FormulaPane");
BasicDialog basicDialog = super.showWindowWithCustomSize(window, l, dimension);
basicDialog.setResizable(true);
return basicDialog;
@ -915,7 +916,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
private void showMessageDialog(String message, boolean formulaValid, boolean calException) {
if (formulaValid && !calException) {
FineJOptionPane.showMessageDialog(
FineJOptionPane.showSuccessMessageDialog(
FormulaPane.this,
message);
} else {

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

@ -383,7 +383,7 @@ public abstract class JListControlPane extends JControlPane implements ListContr
@Override
public Component getListCellRendererComponent(JList list, Object value,
int index, boolean isSelected, boolean cellHasFocus) {
setPreferredSize(FineUIScale.scale(new Dimension(list.getWidth(), 24)));
setPreferredSize(new Dimension(list.getWidth(), FineUIScale.scale(24)));
if (value instanceof ListModelElement) {
ListModelElement element = ((ListModelElement) value);
Nameable nameable = element.wrapper;

4
designer-base/src/main/java/com/fr/design/gui/controlpane/ListControlPaneHelper.java

@ -1,5 +1,6 @@
package com.fr.design.gui.controlpane;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.ilist.JNameEdList;
@ -38,6 +39,7 @@ import java.util.Map;
*/
class ListControlPaneHelper {
private static final int EDIT_RANGE = 25; // 编辑按钮的x坐标范围
private static final int DIALOG_GAP = 25; // 编辑按钮的x坐标范围
private ListControlPaneProvider listControlPane;
@ -160,7 +162,7 @@ class ListControlPaneHelper {
// 不能太低
int maxY = frame.getLocationOnScreen().y + frame.getHeight() - popupEditDialog.getHeight();
if (resultPos.y > maxY) {
resultPos.y = maxY;
resultPos.y = maxY - FineUIScale.scale(DIALOG_GAP);
}
// 也不能太高
int minY = frame.getLocationOnScreen().y + EDIT_RANGE;

6
designer-base/src/main/java/com/fr/design/gui/frpane/ClosableBubbleFloatPane.java

@ -1,10 +1,9 @@
package com.fr.design.gui.frpane;
import com.fr.base.BaseUtils;
import com.fine.theme.icon.LazyIcon;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ilable.UILabel;
import javax.swing.Icon;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Point;
@ -30,8 +29,7 @@ public abstract class ClosableBubbleFloatPane<T> extends UIBubbleFloatPane<T> {
protected JPanel initTopOptionMenu() {
JPanel menu = new JPanel(new BorderLayout());
Icon icon = BaseUtils.readIcon("/com/fr/design/images/buttonicon/close_icon.png");
UILabel label = new UILabel(icon);
UILabel label = new UILabel(new LazyIcon("close"));
label.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {

125
designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java

@ -3,27 +3,26 @@ package com.fr.design.gui.icontainer;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIUtils;
import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.layout.VerticalFlowLayout;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.utils.gui.GUICoreUtils;
import javax.swing.BorderFactory;
import javax.swing.UIManager;
import javax.swing.Icon;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.Icon;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.border.Border;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Container;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.LayoutManager;
import java.awt.Point;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionListener;
@ -34,32 +33,87 @@ import java.awt.event.MouseMotionListener;
public class UIEastResizableContainer extends JPanel {
private static final long serialVersionUID = 1854340560790476907L;
public static final int MAX_CONTAINER_WIDTH = FineUIScale.scale(340);
public static final int MIN_CONTAINER_WIDTH = FineUIScale.scale(286);
public static final int MAX_CONTAINER_WIDTH = FineUIUtils.getScaledI18nDimension(
"com.fr.design.mainframe.EastRegionContainerPane.maximum").width;
public static final int MIN_CONTAINER_WIDTH = FineUIUtils.getScaledI18nDimension(
"com.fr.design.mainframe.EastRegionContainerPane.minimum").width;
public static final int STD_CONTAINER_WIDTH = FineUIUtils.getScaledI18nDimension(
"com.fr.design.mainframe.EastRegionContainerPane.standard").width;
private int containerWidth = STD_CONTAINER_WIDTH;
private int preferredWidth = STD_CONTAINER_WIDTH;
protected final int leftPaneWidth = FineUIScale.scale(42);
protected final int topToolPaneHeight = FineUIScale.scale(40);
private int containerWidth = FineUIScale.scale(240);
private int preferredWidth = FineUIScale.scale(240);
private int topToolPaneHeight = FineUIScale.scale(40);
private int leftPaneWidth = FineUIScale.scale(42);
private static final int ARROW_RANGE = FineUIScale.scale(35);
private JComponent leftPane;
private JComponent rightPane;
private TopToolPane topToolPane;
private static final int ARROW_MARGIN = FineUIScale.scale(15);
private static final int ARROW_RANGE = FineUIScale.scale(35);
private static final int DRAG_GAP_SIZE = 10;
private Point dragPoint;
public UIEastResizableContainer() {
this(new JPanel(), new JPanel());
initMouseListener();
}
private void initMouseListener() {
MouseAdapter mouseAdapter = new MouseAdapter() {
@Override
public void mouseMoved(MouseEvent e) {
updateCursor(e);
}
@Override
public void mousePressed(MouseEvent e) {
if (isEnableDrag(e)) {
dragPoint = e.getPoint();
}
}
@Override
public void mouseDragged(MouseEvent e) {
resizePanel(e);
}
};
addMouseListener(mouseAdapter);
addMouseMotionListener(mouseAdapter);
}
private void updateCursor(MouseEvent e) {
if (isEnableDrag(e)) {
setCursor(Cursor.getPredefinedCursor(Cursor.W_RESIZE_CURSOR));
} else {
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}
}
protected boolean isEnableDrag(MouseEvent e) {
return e.getX() <= DRAG_GAP_SIZE && isRightPaneVisible();
}
protected void resizePanel(MouseEvent e) {
if (!isRightPaneVisible()) {
return;
}
int dx = e.getX() - dragPoint.x;
Dimension size = getSize();
int newWidth = size.width - dx;
// 限制container大小为指定范围
containerWidth = Math.max(MIN_CONTAINER_WIDTH, Math.min(newWidth, MAX_CONTAINER_WIDTH));
SwingUtilities.invokeLater(this::revalidate);
}
/**
* 设置面板宽度
*
* @param width
* @param width 宽度
*/
public void setContainerWidth(int width) {
this.containerWidth = width;
@ -70,8 +124,6 @@ public class UIEastResizableContainer extends JPanel {
return containerWidth > leftPaneWidth;
}
private void setPreferredWidth(int width) {
this.preferredWidth = width;
}
@ -89,38 +141,6 @@ public class UIEastResizableContainer extends JPanel {
add(rightPane);
}
public static void main(String... args) {
JFrame jf = new JFrame("test");
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel content = (JPanel) jf.getContentPane();
content.setLayout(new BorderLayout());
JPanel leftPane = new JPanel();
// leftPane.setBackground(Color.yellow);
JPanel rightPane = new JPanel();
// rightPane.setBackground(Color.green);
UIButton b1, b2;
b1 = new UIButton("b1");
b2 = new UIButton("b2");
b1.setPreferredSize(new Dimension(40, 40));
b2.setPreferredSize(new Dimension(40, 40));
leftPane.add(b1);
leftPane.add(b2);
UIEastResizableContainer bb = new UIEastResizableContainer(leftPane, rightPane);
JPanel cc = new JPanel();
// cc.setBackground(Color.WHITE);
content.add(bb, BorderLayout.EAST);
content.add(cc, BorderLayout.CENTER);
GUICoreUtils.centerWindow(jf);
jf.setSize(500, 500);
jf.setVisible(true);
}
/**
* 将面板设置成最佳的宽度
*/
@ -156,7 +176,6 @@ public class UIEastResizableContainer extends JPanel {
@Override
public void removeLayoutComponent(Component comp) {
// TODO Auto-generated method stub
}
@ -182,7 +201,7 @@ public class UIEastResizableContainer extends JPanel {
@Override
public void addLayoutComponent(String name, Component comp) {
// do nothing
}
};

11
designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java

@ -391,17 +391,6 @@ public class UIResizableContainer extends JPanel {
repaint();
}
@Override
public void mouseClicked(MouseEvent e) {
if (e.getX() <= ARROW_RANGE) {
toolPaneY = 0;
} else if (e.getX() >= getWidth() - ARROW_RANGE) {
toolPaneY = UIResizableContainer.this.getHeight() - toolPaneHeight - getParameterPaneHeight();
} else {
return;
}
refreshContainer();
}
});
}

3
designer-base/src/main/java/com/fr/design/gui/itooltip/MultiLineToolTip.java

@ -1,10 +1,11 @@
package com.fr.design.gui.itooltip;
import com.fine.theme.light.ui.FineTooltipUI;
import javax.swing.JToolTip;
public class MultiLineToolTip extends JToolTip {
public MultiLineToolTip() {
setUI(new MultiLineToolTipUI());
setUI(new FineTooltipUI());
}
}

3
designer-base/src/main/java/com/fr/design/gui/syntax/ui/rtextarea/RTextAreaBase.java

@ -24,6 +24,7 @@ import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import javax.swing.JTextArea;
import javax.swing.UIManager;
import javax.swing.event.CaretEvent;
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.TextUI;
@ -73,7 +74,7 @@ int currentCaretY; // Used to know when to rehighlight current line.
private RTAMouseListener mouseListener;
private static final Color DEFAULT_CARET_COLOR = new ColorUIResource(255,51,51);
private static final Color DEFAULT_CURRENT_LINE_HIGHLIGHT_COLOR = new Color(255,255,170);
private static final Color DEFAULT_CURRENT_LINE_HIGHLIGHT_COLOR = UIManager.getColor("TextArea.currentLineHighlightColor");
private static final Color DEFAULT_MARGIN_LINE_COLOR = new Color(255,224,224);
private static final int DEFAULT_TAB_SIZE = 4;
private static final int DEFAULT_MARGIN_LINE_POSITION = 80;

27
designer-base/src/main/java/com/fr/design/lock/LockInfoDialog.java

@ -1,7 +1,11 @@
package com.fr.design.lock;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.file.TemplateTreePane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.design.i18n.Toolkit;
@ -39,12 +43,12 @@ public class LockInfoDialog extends JDialog {
super(DesignerContext.getDesignerFrame());
this.saveEnum = saveEnum;
JPanel panel = new JPanel(new BorderLayout());
panel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0));
panel.setBorder(new ScaledEmptyBorder(0, 10, 0, 0));
panel.add(createContentPane(userInfo), BorderLayout.CENTER);
panel.add(createControlPane(), BorderLayout.SOUTH);
this.getContentPane().add(panel);
this.setTitle(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Title_Hint"));
this.setSize(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.lock.LockInfoDialog"));
this.setSize(FineUIScale.scale(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.lock.LockInfoDialog")));
this.setResizable(false);
this.setModal(true);
GUICoreUtils.centerWindow(this);
@ -53,40 +57,37 @@ public class LockInfoDialog extends JDialog {
private JPanel createContentPane(UserInfo userInfo) {
JPanel contentPanel = new JPanel(new BorderLayout());
contentPanel.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 0));
JPanel messagePane = new JPanel(new BorderLayout(13, 0));
UILabel iconLabel = new UILabel(IOUtils.readIcon("/com/fr/design/images/warnings/warning32.png"));
iconLabel.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 0));
contentPanel.setBorder(new ScaledEmptyBorder(10, 0, 10, 10));
JPanel messagePane = FRGUIPaneFactory.createScaledBorderLayout_S_Pane(10, 0);
UILabel iconLabel = new UILabel(new LazyIcon("warning", 20));
messagePane.add(iconLabel, BorderLayout.WEST);
UILabel tipLabel = new UILabel(Toolkit.i18nText("Fine-Design_Template_Lock_And_SaveAs_Tip"));
tipLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
messagePane.add(tipLabel, BorderLayout.CENTER);
contentPanel.add(messagePane, BorderLayout.NORTH);
JPanel detailInfoPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
detailInfoPane.setBorder(BorderFactory.createEmptyBorder(0, 45, 0,0));
detailInfoPane.setBorder(new ScaledEmptyBorder(0, 30, 0,0));
if (userInfo != null && StringUtils.isNotEmpty(userInfo.getUserName())) {
UILabel label = createLabel(Toolkit.i18nText("Fine-Design_Template_Lock_Holder", userInfo.getUserName()));
label .setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
detailInfoPane.add(label);
}
if (userInfo != null && StringUtils.isNotEmpty(userInfo.getIp())) {
detailInfoPane.add(createLabel(Toolkit.i18nText("Fine-Design_Template_Lock_Holder_Ip", userInfo.getIp()) ));
}
detailInfoPane.add(createLabel(Toolkit.i18nText("Fine-Design_Template_Lock_Get_Time", FORMATTER.format(LocalDateTime.now()))));
contentPanel.add(detailInfoPane, BorderLayout.CENTER);
contentPanel.add(new UIScrollPane(detailInfoPane), BorderLayout.CENTER);
return contentPanel;
}
private UILabel createLabel(String text) {
UILabel label = new UILabel(text);
label.setForeground(Color.GRAY);
label.setBorder(BorderFactory.createEmptyBorder(8, 0, 0, 0));
label.setBorder(new ScaledEmptyBorder(10, 0, 0, 0));
return label;
}
private JPanel createControlPane() {
JPanel controlPane = new JPanel(new FlowLayout(FlowLayout.RIGHT, 10, 5));
controlPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0,5));
JPanel controlPane = new JPanel(new FlowLayout(FlowLayout.RIGHT, FineUIScale.scale(10), 0));
controlPane.setBorder(new ScaledEmptyBorder(0, 0, 10,10));
UIButton saveAsButton = new UIButton(Toolkit.i18nText("Fine_Design_Template_Lock_Save_As"));
UIButton cancelButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Button_Cancel"));
saveAsButton.addActionListener(new ActionListener() {

9
designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java

@ -142,10 +142,13 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private static int containerWidth() {
if (FRContext.isChineseEnv()) {
return UIEastResizableContainer.MIN_CONTAINER_WIDTH;
return UIEastResizableContainer.STD_CONTAINER_WIDTH;
}
return UIEastResizableContainer.MAX_CONTAINER_WIDTH;
@Override
protected boolean isEnableDrag(MouseEvent e) {
return super.isEnableDrag(e)
&& e.getY() > topToolPaneHeight + leftPane.getPreferredSize().height;
}
/**

5
designer-base/src/main/java/com/fr/design/parameter/ParameterInputPane.java

@ -3,6 +3,7 @@
*/
package com.fr.design.parameter;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.BaseFormula;
import com.fr.base.StoreProcedureParameter;
import com.fr.base.Utils;
@ -75,8 +76,8 @@ public class ParameterInputPane extends BasicPane {
//Content Pane.
JPanel contentPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
this.add(new JScrollPane(contentPane), BorderLayout.CENTER);
contentPane.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameters") + ":"));
this.add(FineUIUtils.wrapComponentWithTitle(new JScrollPane(
contentPane), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameters")), BorderLayout.CENTER);
flowTableLayoutHelper = new FlowTableLayoutHelper();

3
designer-base/src/main/java/com/fr/design/remote/button/IconButton.java

@ -1,5 +1,6 @@
package com.fr.design.remote.button;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.BaseUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.StringUtils;
@ -26,7 +27,7 @@ public final class IconButton extends JButton {
}
public IconButton() {
this(BaseUtils.readIcon("com/fr/design/remote/images/icon_tab_close_normal.png"));
this(new LazyIcon("close"));
}
@Override

21
designer-base/src/main/java/com/fr/design/remote/ui/AbstractListControlPane.java

@ -1,8 +1,12 @@
package com.fr.design.remote.ui;
import com.fine.theme.icon.LazyIcon;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.BaseUtils;
import com.fr.design.actions.UpdateAction;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.border.FineBorderFactory;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter;
@ -35,8 +39,7 @@ import javax.swing.ListSelectionModel;
import javax.swing.SwingUtilities;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.util.ArrayList;
import java.util.List;
@ -100,7 +103,6 @@ public abstract class AbstractListControlPane extends BasicPane {
// 左右分割布局
JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, leftPane, cardPane);
mainSplitPane.setBorder(BorderFactory.createLineBorder(GUICoreUtils.getTitleLineBorderColor()));
mainSplitPane.setOneTouchExpandable(true);
add(mainSplitPane, BorderLayout.CENTER);
mainSplitPane.setDividerLocation(shortCuts.length * SHORT_WIDTH);
@ -120,6 +122,12 @@ public abstract class AbstractListControlPane extends BasicPane {
toolbarDef.addShortCut(sj.getShortCut());
}
toolBar = ToolBarDef.createJToolBar();
toolBar.setBackground(FlatUIUtils.getUIColor("background.normal", Color.WHITE));
toolBar.setBorder(BorderFactory.createCompoundBorder(
FineBorderFactory.createUnderlineBorder(FlatUIUtils.getUIColor("defaultBorderColor", Color.GRAY)),
new ScaledEmptyBorder(3, 0, 3, 0)
));
toolBar.setBorderPainted(true);
toolbarDef.updateToolBar(toolBar);
leftPane.add(toolBar, BorderLayout.NORTH);
}
@ -128,7 +136,9 @@ public abstract class AbstractListControlPane extends BasicPane {
private void initLeftList(JPanel leftPane) {
authorityList = createList();
authorityList.setName(LIST_NAME);
authorityList.setBackground(FlatUIUtils.getUIColor("background.normal", Color.WHITE));
leftPane.add(new UIScrollPane(authorityList), BorderLayout.CENTER);
leftPane.setBorder(FineBorderFactory.createWrappedRoundBorder());
authorityList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
@ -503,7 +513,7 @@ public abstract class AbstractListControlPane extends BasicPane {
AddItemUpdateAction() {
this.setName(Toolkit.i18nText("Fine-Design_Basic_Action_Choose"));
this.setMnemonic('A');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png"));
this.setSmallIcon(new LazyIcon("add_popup"));
}
@Override
@ -572,8 +582,7 @@ public abstract class AbstractListControlPane extends BasicPane {
RemoveItemAction() {
this.setName(Toolkit.i18nText("Fine-Design_Basic_Action_Remove"));
this.setMnemonic('R');
this.setSmallIcon(BaseUtils
.readIcon(IconPathConstants.TD_REMOVE_ICON_PATH));
this.setSmallIcon(new LazyIcon("remove"));
}
@Override

36
designer-base/src/main/java/com/fr/design/remote/ui/AbstractManagerPane.java

@ -1,5 +1,11 @@
package com.fr.design.remote.ui;
import com.fine.theme.light.ui.FineRoundBorder;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIStyle;
import com.fine.theme.utils.FineUIUtils;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.BaseUtils;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicPane;
@ -46,6 +52,9 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* 选择设计角色用户面板的基类
@ -197,7 +206,7 @@ public abstract class AbstractManagerPane extends BasicPane {
public AbstractManagerPane() {
this.setBorder(BorderFactory.createEmptyBorder(0, 4, 0, 4));
this.setBorder(new ScaledEmptyBorder(10, 10, 10, 10));
this.setLayout(new BorderLayout());
this.add(
TableLayoutHelper.createCommonTableLayoutPane(
@ -235,22 +244,19 @@ public abstract class AbstractManagerPane extends BasicPane {
}
protected abstract JPanel leftPanel();
protected abstract String leftPanelTitle();
private JPanel createLeftPanel() {
JPanel content = leftPanel();
// 搜索
JPanel searchPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 5));
searchPanel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
keyField.setPreferredSize(new Dimension(270, 20));
JPanel searchPanel = new JPanel(new BorderLayout());
keyField.requestFocus();
keyField.addKeyListener(keyFieldKeyListener);
keyField.getDocument().addDocumentListener(documentListener);
keyButton.setIcon(BaseUtils.readIcon("com/fr/design/images/buttonicon/user_search_normal.png"));
keyButton.setToolTipText(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Search"));
keyButton.setText(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Search"));
keyButton.addActionListener(keyButtonActionListener);
searchPanel.add(keyField);
searchPanel.add(keyButton);
searchPanel.add(row(10, cell(keyField).weight(0.45), cell(keyButton).weight(0.1)).getComponent());
// 内容列表
addingListModel = new DefaultListModel<>();
@ -283,7 +289,10 @@ public abstract class AbstractManagerPane extends BasicPane {
content.add(searchPanel, BorderLayout.NORTH);
content.add(listPane, BorderLayout.CENTER);
return content;
JPanel pane = new JPanel(new BorderLayout());
pane.add(FineUIUtils.wrapComponentWithTitle(content, leftPanelTitle()));
return pane;
}
protected abstract AddingMemberListCellRender getAddingMemberListCellRender();
@ -291,6 +300,7 @@ public abstract class AbstractManagerPane extends BasicPane {
protected abstract AddedMemberListCellRender getAddedMemberListCellRender();
protected abstract JPanel rightPanel();
protected abstract String rightPanelTitle();
private JPanel createRightPanel() {
JPanel content = rightPanel();
@ -301,8 +311,8 @@ public abstract class AbstractManagerPane extends BasicPane {
Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Selected_Member_Count",
String.valueOf(addedMembers.size()))
);
countLabel.setBorder(BorderFactory.createEmptyBorder(7, 12, 8, 0));
countLabel.setForeground(new Color(0x8F8F92));
FineUIStyle.setStyle(countLabel, FineUIStyle.LABEL_TIP);
countLabel.setPreferredSize(new Dimension((int) countLabel.getPreferredSize().getWidth(), FineUIScale.scale(20)));
addedListModel = new DefaultListModel<>();
addedList = new AddedMemberList(addedListModel);
@ -316,7 +326,9 @@ public abstract class AbstractManagerPane extends BasicPane {
content.add(countLabel, BorderLayout.NORTH);
content.add(listPane, BorderLayout.CENTER);
return content;
JPanel pane = new JPanel(new BorderLayout());
pane.add(FineUIUtils.wrapComponentWithTitle(content, rightPanelTitle()));
return pane;
}

13
designer-base/src/main/java/com/fr/design/remote/ui/AuthorityEditorPane.java

@ -1,5 +1,7 @@
package com.fr.design.remote.ui;
import com.fine.theme.utils.FineUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.border.UITitledBorder;
import com.fr.design.gui.icontainer.UIScrollPane;
@ -30,20 +32,13 @@ public class AuthorityEditorPane extends BasicBeanPane<DesignAuthority> {
// 模板设计权限配置
public AuthorityEditorPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(
BorderFactory.createCompoundBorder(
new EmptyBorder(6, 0, 6, 6),
UITitledBorder.createBorderWithTitle(
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Template_Authority_Config")
)
)
);
IOFileNodeFilter filter = new IOFileNodeFilter(new String[]{".cptx", ".cpt", ".class", ".frm", ".form"});
tree.setDigIn(true);
tree.setFileNodeFilter(filter);
UIScrollPane scrollPane = new UIScrollPane(tree);
scrollPane.setBorder(BorderFactory.createEmptyBorder());
this.add(scrollPane, BorderLayout.CENTER);
this.add(FineUIUtils.wrapComponentWithTitle(scrollPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Template_Authority_Config")), BorderLayout.CENTER);
this.setBorder(new ScaledEmptyBorder(0, 15, 0, 0));
tree.refreshEnv();
}

3
designer-base/src/main/java/com/fr/design/remote/ui/AuthorityListCustomRolePane.java

@ -1,5 +1,6 @@
package com.fr.design.remote.ui;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.BaseUtils;
import com.fr.design.i18n.Toolkit;
import com.fr.design.remote.RemoteDesignAuthorityCreator;
@ -15,7 +16,7 @@ public class AuthorityListCustomRolePane extends AbstractListControlPane {
new RemoteDesignAuthorityCreator(
// 远程设计用户
Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Custom"),
BaseUtils.readIcon("com/fr/design/remote/images/icon_Member_normal@1x.png"),
new LazyIcon("member"),
DesignAuthority.class,
AuthorityEditorPane.class)
};

3
designer-base/src/main/java/com/fr/design/remote/ui/AuthorityListUserPane.java

@ -1,5 +1,6 @@
package com.fr.design.remote.ui;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.BaseUtils;
import com.fr.design.i18n.Toolkit;
import com.fr.design.remote.RemoteDesignAuthorityCreator;
@ -15,7 +16,7 @@ public class AuthorityListUserPane extends AbstractListControlPane {
new RemoteDesignAuthorityCreator(
// 远程设计用户
Toolkit.i18nText("Fine-Design_Basic_Remote_Design_User"),
BaseUtils.readIcon("com/fr/design/remote/images/icon_Member_normal@1x.png"),
new LazyIcon("member"),
DesignAuthority.class,
AuthorityEditorPane.class)
};

9
designer-base/src/main/java/com/fr/design/remote/ui/AuthorityManagerPane.java

@ -1,6 +1,7 @@
package com.fr.design.remote.ui;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.frpane.FineTabbedPane;
import com.fr.design.gui.frpane.UITabbedPane;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
@ -18,12 +19,12 @@ public class AuthorityManagerPane extends BasicPane {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
//Tabbed Pane
UITabbedPane tabbedPane = new UITabbedPane();
FineTabbedPane tabbedPane = FineTabbedPane.builder()
.addTab(Toolkit.i18nText("Fine-Design_Basic_User"), userList)
.addTab(Toolkit.i18nText("Fine-Design_Basic_Role"), roleList)
.withHeadRatio(0.2f).build();
this.add(tabbedPane, BorderLayout.CENTER);
tabbedPane.addTab(Toolkit.i18nText("Fine-Design_Basic_User"), userList);
tabbedPane.addTab(Toolkit.i18nText("Fine-Design_Basic_Role"), roleList);
}
@Override

37
designer-base/src/main/java/com/fr/design/remote/ui/CustomRoleManagerPane.java

@ -1,7 +1,9 @@
package com.fr.design.remote.ui;
import com.fine.theme.utils.FineUIUtils;
import com.fr.design.border.UITitledBorder;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.remote.ui.list.AddedMemberListCellRender;
import com.fr.design.remote.ui.list.AddingMemberListCellRender;
import com.fr.design.remote.ui.list.cell.AddedCustomRoleListCellRender;
@ -30,37 +32,26 @@ public class CustomRoleManagerPane extends AbstractManagerPane {
@Override
protected JPanel rightPanel(){
JPanel content = new JPanel(new BorderLayout());
content.setBorder(
BorderFactory.createCompoundBorder(
new EmptyBorder(6, 0, 0, 0),
UITitledBorder.createBorderWithTitle(
// 已选择的设计角色
Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Selected_Custom"),
4
)
)
);
JPanel content = new JPanel(FRGUIPaneFactory.createScaledBorderLayout(0, 10));
return content;
}
@Override
protected JPanel leftPanel(){
JPanel content = new JPanel(new BorderLayout());
protected String rightPanelTitle() {
return Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Selected_Custom");
}
content.setBorder(
BorderFactory.createCompoundBorder(
new EmptyBorder(6, 0, 0, 0),
UITitledBorder.createBorderWithTitle(
// 决策系统角色
Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Decision_Custom"),
4)
)
);
@Override
protected JPanel leftPanel(){
JPanel content = new JPanel(FRGUIPaneFactory.createScaledBorderLayout(0, 10));
return content;
}
@Override
protected String leftPanelTitle() {
return Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Decision_Custom");
}
@Override
protected AddingMemberListCellRender getAddingMemberListCellRender() {
return new AddingCustomRoleListCellRender();

36
designer-base/src/main/java/com/fr/design/remote/ui/UserManagerPane.java

@ -2,6 +2,7 @@ package com.fr.design.remote.ui;
import com.fr.design.border.UITitledBorder;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.remote.ui.list.AddedMemberListCellRender;
import com.fr.design.remote.ui.list.AddingMemberListCellRender;
import com.fr.design.remote.ui.list.cell.AddedUserListCellRender;
@ -30,37 +31,26 @@ public class UserManagerPane extends AbstractManagerPane {
@Override
protected JPanel rightPanel(){
JPanel content = new JPanel(new BorderLayout());
content.setBorder(
BorderFactory.createCompoundBorder(
new EmptyBorder(6, 0, 0, 0),
UITitledBorder.createBorderWithTitle(
// 已选择的设计用户
Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Selected_User"),
4
)
)
);
JPanel content = new JPanel(FRGUIPaneFactory.createScaledBorderLayout(0, 10));
return content;
}
@Override
protected JPanel leftPanel(){
JPanel content = new JPanel(new BorderLayout());
protected String rightPanelTitle() {
return Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Selected_User");
}
content.setBorder(
BorderFactory.createCompoundBorder(
new EmptyBorder(6, 0, 0, 0),
UITitledBorder.createBorderWithTitle(
// 决策系统用户
Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Decision_User"),
4)
)
);
@Override
protected JPanel leftPanel(){
JPanel content = new JPanel(FRGUIPaneFactory.createScaledBorderLayout(0, 10));
return content;
}
@Override
protected String leftPanelTitle() {
return Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Decision_User");
}
@Override
protected AddingMemberListCellRender getAddingMemberListCellRender() {
return new AddingUserListCellRender();

15
designer-base/src/main/java/com/fr/design/remote/ui/list/AddedMemberListCellRender.java

@ -1,5 +1,8 @@
package com.fr.design.remote.ui.list;
import com.fine.swing.ui.layout.Layouts;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.remote.button.IconButton;
import com.fr.workspace.server.authority.RemoteDesignMember;
@ -9,9 +12,9 @@ import javax.swing.Icon;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.ListCellRenderer;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
public abstract class AddedMemberListCellRender extends JPanel implements ListCellRenderer<RemoteDesignMember> {
@ -19,16 +22,14 @@ public abstract class AddedMemberListCellRender extends JPanel implements ListCe
private UILabel label;
public AddedMemberListCellRender() {
this.setBorder(BorderFactory.createEmptyBorder());
this.setLayout(new FlowLayout(FlowLayout.LEFT));
this.setBorder(new ScaledEmptyBorder(0, 4, 0, 0));
this.setLayout(new BorderLayout());
label = new UILabel();
label.setPreferredSize(new Dimension(264, 20));
this.setPreferredSize(new Dimension(this.getPreferredSize().width, 25));
label.setIcon(getMemberIcon());
this.add(label);
this.add(new IconButton());
this.add(Layouts.row(Layouts.cell(label), Layouts.flex(), Layouts.cell(new IconButton()))
.with(it -> it.setPreferredSize(new Dimension((int) it.getPreferredSize().getWidth(), FineUIScale.scale( 20)))).getComponent());
}
@Override

21
designer-base/src/main/java/com/fr/design/remote/ui/list/AddingMemberListCellRender.java

@ -1,7 +1,11 @@
package com.fr.design.remote.ui.list;
import com.fine.swing.ui.layout.Layouts;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.remote.button.IconButton;
import com.fr.workspace.server.authority.RemoteDesignMember;
import javax.swing.BorderFactory;
@ -10,9 +14,7 @@ import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.ListCellRenderer;
import javax.swing.SwingConstants;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.*;
public abstract class AddingMemberListCellRender extends JPanel implements ListCellRenderer<RemoteDesignMember> {
@ -21,20 +23,21 @@ public abstract class AddingMemberListCellRender extends JPanel implements ListC
public AddingMemberListCellRender() {
this.setBorder(BorderFactory.createEmptyBorder());
this.setLayout(new FlowLayout(FlowLayout.LEFT));
this.setBorder(new ScaledEmptyBorder(0, 4, 0, 0));
this.setLayout(new BorderLayout());
label = new UILabel();
label.setPreferredSize(new Dimension(260, 20));
this.setPreferredSize(new Dimension(this.getPreferredSize().width, 25));
label.setIcon(getMemberIcon());
check = new UICheckBox();
check.setSelected(false);
check.setEnabled(true);
this.add(label);
this.add(check);
label = new UILabel();
label.setIcon(getMemberIcon());
this.add(Layouts.row(Layouts.cell(label), Layouts.flex(), Layouts.cell(check))
.with(it -> it.setPreferredSize(new Dimension((int) it.getPreferredSize().getWidth(), FineUIScale.scale( 20)))).getComponent());
}

5
designer-base/src/main/java/com/fr/design/remote/ui/list/AuthorityListCellRenderer.java

@ -1,5 +1,7 @@
package com.fr.design.remote.ui.list;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.report.DesignAuthority;
import sun.swing.DefaultLookup;
@ -9,8 +11,7 @@ import javax.swing.JList;
import javax.swing.ListCellRenderer;
import javax.swing.border.Border;
import javax.swing.border.EmptyBorder;
import java.awt.Color;
import java.awt.Component;
import java.awt.*;
public abstract class AuthorityListCellRenderer extends
JLabel implements ListCellRenderer<DesignAuthority> {

3
designer-base/src/main/java/com/fr/design/remote/ui/list/cell/AddedCustomRoleListCellRender.java

@ -1,5 +1,6 @@
package com.fr.design.remote.ui.list.cell;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.BaseUtils;
import com.fr.design.remote.constants.MemberIcon;
import com.fr.design.remote.ui.list.AddedMemberListCellRender;
@ -15,7 +16,7 @@ import javax.swing.Icon;
public class AddedCustomRoleListCellRender extends AddedMemberListCellRender {
@Override
protected Icon getMemberIcon() {
return BaseUtils.readIcon(MemberIcon.CUSTOM_ROLE_ICON);
return new LazyIcon("role");
}
@Override

3
designer-base/src/main/java/com/fr/design/remote/ui/list/cell/AddedUserListCellRender.java

@ -1,5 +1,6 @@
package com.fr.design.remote.ui.list.cell;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.BaseUtils;
import com.fr.design.remote.constants.MemberIcon;
import com.fr.design.remote.ui.list.AddedMemberListCellRender;
@ -15,7 +16,7 @@ import javax.swing.Icon;
public class AddedUserListCellRender extends AddedMemberListCellRender {
@Override
protected Icon getMemberIcon() {
return BaseUtils.readIcon(MemberIcon.USER_ICON);
return new LazyIcon("member");
}
@Override

3
designer-base/src/main/java/com/fr/design/remote/ui/list/cell/AddingCustomRoleListCellRender.java

@ -1,5 +1,6 @@
package com.fr.design.remote.ui.list.cell;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.BaseUtils;
import com.fr.design.remote.constants.MemberIcon;
import com.fr.design.remote.ui.list.AddingMemberListCellRender;
@ -15,7 +16,7 @@ import javax.swing.Icon;
public class AddingCustomRoleListCellRender extends AddingMemberListCellRender {
@Override
protected Icon getMemberIcon() {
return BaseUtils.readIcon(MemberIcon.CUSTOM_ROLE_ICON);
return new LazyIcon("role");
}
@Override

3
designer-base/src/main/java/com/fr/design/remote/ui/list/cell/AddingUserListCellRender.java

@ -1,5 +1,6 @@
package com.fr.design.remote.ui.list.cell;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.BaseUtils;
import com.fr.design.remote.constants.MemberIcon;
import com.fr.design.remote.ui.list.AddingMemberListCellRender;
@ -15,7 +16,7 @@ import javax.swing.Icon;
public class AddingUserListCellRender extends AddingMemberListCellRender {
@Override
protected Icon getMemberIcon() {
return BaseUtils.readIcon(MemberIcon.USER_ICON);
return new LazyIcon("member");
}
@Override

3
designer-base/src/main/java/com/fr/design/remote/ui/list/cell/AuthorityCustomRoleListCellRender.java

@ -1,5 +1,6 @@
package com.fr.design.remote.ui.list.cell;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.BaseUtils;
import com.fr.design.remote.constants.MemberIcon;
import com.fr.design.remote.ui.list.AuthorityListCellRenderer;
@ -15,7 +16,7 @@ import javax.swing.Icon;
public class AuthorityCustomRoleListCellRender extends AuthorityListCellRenderer {
@Override
protected Icon getMemberIcon() {
return BaseUtils.readIcon(MemberIcon.CUSTOM_ROLE_ICON);
return new LazyIcon("role");
}
@Override

3
designer-base/src/main/java/com/fr/design/remote/ui/list/cell/AuthorityUserListCellRender.java

@ -1,5 +1,6 @@
package com.fr.design.remote.ui.list.cell;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.BaseUtils;
import com.fr.design.remote.constants.MemberIcon;
import com.fr.design.remote.ui.list.AuthorityListCellRenderer;
@ -15,7 +16,7 @@ import javax.swing.Icon;
public class AuthorityUserListCellRender extends AuthorityListCellRenderer {
@Override
protected Icon getMemberIcon() {
return BaseUtils.readIcon(MemberIcon.USER_ICON);
return new LazyIcon("member");
}
@Override

3
designer-base/src/main/java/com/fr/design/remote/ui/tree/FileAuthorityTree.java

@ -32,6 +32,9 @@ public class FileAuthorityTree extends TemplateFileTree {
for (int i = 0, len = treeNode.getChildCount(); i < len; i++) {
ExpandMutableTreeNode childTreeNode = (ExpandMutableTreeNode) treeNode.getChildAt(i);
for (String path : paths) {
if (path == null) {
continue;
}
TreePath tPath = getSelectingPath(childTreeNode, StringUtils.EMPTY, path, model);
if (tPath != null) {
res.add(tPath);

52
designer-base/src/main/java/com/fr/design/style/color/ColorAdjustPane.java

@ -14,7 +14,6 @@ import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
@ -27,6 +26,8 @@ import java.awt.image.BufferedImage;
import java.util.ArrayList;
import java.util.List;
import static com.fine.theme.utils.FineUIScale.scale;
/**
* 配色方案选择组合色之后可以调整颜色的组件
*
@ -38,7 +39,11 @@ public class ColorAdjustPane extends JPanel implements UIObserver {
public static final Color[] DEFAULT_COLORS = ChartConstants.NEW_FEATURES;
private static final int COUNT_OF_ROW = 12;
private int defaultMaxCountOfRow = 8;
private int maxCountOfRow = defaultMaxCountOfRow;
public static final int WIDTH = scale(20);
private static final int MAX_BUTTON = 40;
@ -53,6 +58,12 @@ public class ColorAdjustPane extends JPanel implements UIObserver {
this(DEFAULT_COLORS);
}
public ColorAdjustPane(int maxCountOfRow) {
this(DEFAULT_COLORS);
this.defaultMaxCountOfRow = maxCountOfRow;
this.maxCountOfRow = maxCountOfRow;
}
public ColorAdjustPane(Color[] colors) {
iniListener();
createColorButton(colors);
@ -80,22 +91,49 @@ public class ColorAdjustPane extends JPanel implements UIObserver {
this.repaint();
}
/**
* 如果颜色块长度超过当前区域则重绘 contentPane
*/
public void repaint() {
adjustCountOfRowAndRepaint();
super.repaint();
}
private void adjustCountOfRowAndRepaint() {
int size = super.getSize().width;
if (size == 0) {
return;
}
int preferSize = (colorButtons.size() + 1) * WIDTH;
int oldMaxCountOfRow = maxCountOfRow;
if (preferSize > size) {
maxCountOfRow = size / WIDTH;
} else {
maxCountOfRow = defaultMaxCountOfRow;
}
if (oldMaxCountOfRow != maxCountOfRow) {
this.removeAll();
createContentPane();
}
}
private void createContentPane() {
VerticalFlowLayout layout = new VerticalFlowLayout(0, 0, 0);
layout.setAlignLeft(true);
this.setLayout(layout);
for (int i = 0, size = colorButtons.size(); i < size; i += COUNT_OF_ROW) {
JPanel panel = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(2, 2);
int count = i + COUNT_OF_ROW > colorButtons.size() ? colorButtons.size() : i + COUNT_OF_ROW;
for (int i = 0, size = colorButtons.size(); i < size; i += maxCountOfRow) {
JPanel panel = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(scale(2), scale(2));
int count = Math.min(i + maxCountOfRow, colorButtons.size());
for (int j = i; j < count; j++) {
colorButtons.get(j).setLastButton(false);
panel.add(colorButtons.get(j));
}
if (i + COUNT_OF_ROW > colorButtons.size()) {
if (i + maxCountOfRow > colorButtons.size()) {
panel.add(new AddColorButton());
this.add(panel);
} else if (i + COUNT_OF_ROW == colorButtons.size() && colorButtons.size() != MAX_BUTTON) {
} else if (i + maxCountOfRow == colorButtons.size() && colorButtons.size() != MAX_BUTTON) {
this.add(panel);
this.add(new AddColorButton());
} else {

3
designer-base/src/main/java/com/fr/design/style/color/ColorButton.java

@ -1,5 +1,6 @@
package com.fr.design.style.color;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.BaseUtils;
import com.fr.design.DesignerEnvManager;
import com.fr.design.mainframe.DesignerContext;
@ -25,7 +26,7 @@ public class ColorButton extends JComponent implements ColorSelectable {
private static final double DEL_WIDTH = 7;
public static final int WIDTH = 18;
public static final int WIDTH = FineUIScale.scale(18);
private BufferedImage closeIcon = BaseUtils.readImageWithCache("com/fr/design/images/toolbarbtn/chartChangeClose.png");

12
designer-base/src/main/java/com/fr/design/utils/DesignerPort.java

@ -1,5 +1,7 @@
package com.fr.design.utils;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIScale;
import com.fr.common.report.ReportState;
import com.fr.design.DesignerEnvManager;
import com.fr.design.RestartHelper;
@ -13,7 +15,6 @@ import com.fr.design.port.DesignerPortContext;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.exit.DesignerExiter;
import com.fr.general.ComparatorUtils;
import com.fr.general.IOUtils;
import com.fr.process.engine.core.CarryMessageEvent;
import com.fr.process.engine.core.FineProcessContext;
import com.fr.stable.StringUtils;
@ -29,11 +30,12 @@ import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import static com.fine.theme.utils.FineUIScale.scale;
/**
* 为的就是能替换 DesignPort.class 实现多开,因此避免编译器常量编译展开优化
*/
@ -128,7 +130,7 @@ public class DesignerPort implements XMLReadable, XMLWriter {
this.setLayout(new BorderLayout());
this.setModal(true);
this.portFiled = new UITextField();
this.portFiled.setPreferredSize(new Dimension(180, 20));
this.portFiled.setPreferredSize(FineUIScale.createScaleDimension(180, 20));
this.portFiled.getDocument().addDocumentListener(new DocumentListener() {
@Override
public void insertUpdate(DocumentEvent e) {
@ -147,7 +149,7 @@ public class DesignerPort implements XMLReadable, XMLWriter {
});
JPanel iconPanel = new JPanel();
UILabel iconLabel = new UILabel();
iconLabel.setIcon(IOUtils.readIcon("com/fr/design/images/edit/edit_typing.png"));
iconLabel.setIcon(new LazyIcon("edit"));
iconPanel.add(iconLabel);
iconPanel.add(iconLabel);
JPanel textPane = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEADING, 0, 10);
@ -194,7 +196,7 @@ public class DesignerPort implements XMLReadable, XMLWriter {
this.add(northPane, BorderLayout.NORTH);
this.add(centerPane, BorderLayout.CENTER);
this.add(southPane, BorderLayout.SOUTH);
this.setSize(300, 150);
this.setSize(scale(300), scale(150));
this.setTitle(Toolkit.i18nText("Fine-Design_Modify_Designer_Port"));
this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
this.setResizable(false);

3
designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java

@ -1,5 +1,6 @@
package com.fr.design.versioncheck;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager;
import com.fr.design.dialog.NotificationDialog;
@ -146,7 +147,7 @@ public class VersionCheckUtils {
CheckServiceDialog checkServiceDialog = new CheckServiceDialog(DesignerContext.getDesignerFrame(), GeneralUtils.readFullBuildNO(), getRemoteBranch(envName), getNoExistServiceDescription(envName));
checkServiceDialog.setVisible(true);
}
},DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.version.check.dialog"));
}, FineUIScale.scale(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.version.check.dialog")));
notificationDialog.setVisible(true);
}

11
designer-base/src/main/resources/com/fine/theme/icon/close/closeTag.svg

@ -0,0 +1,11 @@
<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_6051_60709)">
<path d="M0 0H8C9.10457 0 10 0.895431 10 2V10H2C0.89543 10 0 9.10457 0 8V0Z" fill="#0A1C38" fill-opacity="0.66"/>
<path d="M4.55806 4.99999L2.34835 7.20969C2.22631 7.33173 2.22631 7.5296 2.34835 7.65164C2.47039 7.77368 2.66825 7.77368 2.79029 7.65164L5 5.44193L7.20971 7.65164C7.33175 7.77368 7.52961 7.77368 7.65165 7.65164C7.77369 7.5296 7.77369 7.33173 7.65165 7.2097L5.44194 4.99999L7.65165 2.79028C7.77369 2.66824 7.77369 2.47037 7.65165 2.34834C7.52961 2.2263 7.33175 2.2263 7.20971 2.34834L5 4.55804L2.79029 2.34834C2.66825 2.2263 2.47039 2.2263 2.34835 2.34834C2.22631 2.47038 2.22631 2.66824 2.34835 2.79028L4.55806 4.99999Z" fill="white"/>
</g>
<defs>
<clipPath id="clip0_6051_60709">
<path d="M0 0H8C9.10457 0 10 0.895431 10 2V10H2C0.89543 10 0 9.10457 0 8V0Z" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 949 B

11
designer-base/src/main/resources/com/fine/theme/icon/close/platform_close_disable.svg

@ -0,0 +1,11 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_6669_103730)">
<circle cx="16" cy="16" r="16" fill="#0A1C38" fill-opacity="0.29"/>
<path d="M7.51451 7.51479C7.08493 7.94436 7.08493 8.64085 7.51451 9.07042L14.4442 16.0001L7.51457 22.9296C7.085 23.3592 7.085 24.0557 7.51457 24.4853C7.94415 24.9149 8.64063 24.9149 9.07021 24.4853L15.9998 17.5557L22.9294 24.4854C23.359 24.9149 24.0555 24.9149 24.4851 24.4854C24.9146 24.0558 24.9146 23.3593 24.4851 22.9297L17.5554 16.0001L24.4851 9.07035C24.9147 8.64077 24.9147 7.94429 24.4851 7.51471C24.0556 7.08514 23.3591 7.08514 22.9295 7.51471L15.9998 14.4444L9.07014 7.51479C8.64057 7.08521 7.94409 7.08521 7.51451 7.51479Z" fill="white"/>
</g>
<defs>
<clipPath id="clip0_6669_103730">
<rect width="32" height="32" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 871 B

3
designer-base/src/main/resources/com/fine/theme/icon/debug.svg

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 4H28V28H4V4ZM2 4C2 2.89543 2.89543 2 4 2H28C29.1046 2 30 2.89543 30 4V28C30 29.1046 29.1046 30 28 30H4C2.89543 30 2 29.1046 2 28V4ZM22 13C20.8954 13 20 12.1046 20 11C20 9.89543 20.8954 9 22 9C23.1046 9 24 9.89543 24 11C24 12.1046 23.1046 13 22 13ZM18.126 10L7 10C6.44772 10 6 10.4477 6 11C6 11.5523 6.44772 12 7 12H18.126C18.5701 13.7252 20.1362 15 22 15C24.2091 15 26 13.2091 26 11C26 8.79086 24.2091 7 22 7C20.1362 7 18.5701 8.27477 18.126 10ZM10 23C11.1046 23 12 22.1046 12 21C12 19.8954 11.1046 19 10 19C8.89543 19 8 19.8954 8 21C8 22.1046 8.89543 23 10 23ZM13.874 20C13.4299 18.2748 11.8638 17 10 17C7.79086 17 6 18.7909 6 21C6 23.2091 7.79086 25 10 25C11.8638 25 13.4299 23.7252 13.874 22H25C25.5523 22 26 21.5523 26 21C26 20.4477 25.5523 20 25 20H13.874Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 954 B

3
designer-base/src/main/resources/com/fine/theme/icon/debug_disable.svg

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 4H28V28H4V4ZM2 4C2 2.89543 2.89543 2 4 2H28C29.1046 2 30 2.89543 30 4V28C30 29.1046 29.1046 30 28 30H4C2.89543 30 2 29.1046 2 28V4ZM22 13C20.8954 13 20 12.1046 20 11C20 9.89543 20.8954 9 22 9C23.1046 9 24 9.89543 24 11C24 12.1046 23.1046 13 22 13ZM18.126 10L7 10C6.44772 10 6 10.4477 6 11C6 11.5523 6.44772 12 7 12H18.126C18.5701 13.7252 20.1362 15 22 15C24.2091 15 26 13.2091 26 11C26 8.79086 24.2091 7 22 7C20.1362 7 18.5701 8.27477 18.126 10ZM10 23C11.1046 23 12 22.1046 12 21C12 19.8954 11.1046 19 10 19C8.89543 19 8 19.8954 8 21C8 22.1046 8.89543 23 10 23ZM13.874 20C13.4299 18.2748 11.8638 17 10 17C7.79086 17 6 18.7909 6 21C6 23.2091 7.79086 25 10 25C11.8638 25 13.4299 23.7252 13.874 22H25C25.5523 22 26 21.5523 26 21C26 20.4477 25.5523 20 25 20H13.874Z" fill="#0A1C38" fill-opacity="0.29"/>
</svg>

After

Width:  |  Height:  |  Size: 955 B

3
designer-base/src/main/resources/com/fine/theme/icon/toolbar/member.svg

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M22.5003 10.5C22.5003 14.0899 19.5902 17 16.0003 17C12.4105 17 9.50031 14.0899 9.50031 10.5C9.50031 6.91015 12.4105 4 16.0003 4C19.5902 4 22.5003 6.91015 22.5003 10.5ZM20.4603 17.7373C22.8847 16.2401 24.5003 13.5587 24.5003 10.5C24.5003 5.80558 20.6947 2 16.0003 2C11.3059 2 7.50031 5.80558 7.50031 10.5C7.50031 13.5483 9.1049 16.2218 11.5155 17.7219C6.59805 19.3691 2.89784 23.6715 2.11765 28.9264C2.03196 29.5035 2.49632 30 3.0798 30C3.60332 30 4.0348 29.5968 4.11792 29.0799C5.03694 23.3652 9.99126 19 15.9651 19C21.939 19 26.8933 23.3652 27.8124 29.0799C27.8955 29.5968 28.327 30 28.8505 30C29.434 30 29.8983 29.5035 29.8126 28.9264C29.0348 23.6878 25.3551 19.3957 20.4603 17.7373Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 875 B

3
designer-base/src/main/resources/com/fine/theme/icon/toolbar/role.svg

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.0003 17C19.5902 17 22.5003 14.0899 22.5003 10.5C22.5003 6.91015 19.5902 4 16.0003 4C12.4105 4 9.50031 6.91015 9.50031 10.5C9.50031 14.0899 12.4105 17 16.0003 17ZM24.5003 10.5C24.5003 13.5587 22.8847 16.2401 20.4603 17.7373C25.3551 19.3957 29.0348 23.6878 29.8126 28.9264C29.8983 29.5035 29.434 30 28.8505 30C28.327 30 27.8955 29.5968 27.8124 29.0799C26.9716 23.8516 22.7531 19.7528 17.4665 19.093L18.9349 25.1019C18.9754 25.2679 18.9284 25.4431 18.8102 25.5665L16.3611 28.1231C16.1642 28.3286 15.8358 28.3286 15.6389 28.1231L13.1898 25.5665C13.0716 25.4431 13.0246 25.2679 13.0651 25.1019L14.5357 19.0843C9.21541 19.7158 4.96252 23.828 4.11792 29.0799C4.0348 29.5968 3.60332 30 3.0798 30C2.49632 30 2.03196 29.5035 2.11765 28.9264C2.89784 23.6715 6.59805 19.3691 11.5155 17.7219C9.1049 16.2218 7.50031 13.5483 7.50031 10.5C7.50031 5.80558 11.3059 2 16.0003 2C20.6947 2 24.5003 5.80558 24.5003 10.5Z" fill="#23334C"/>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

4
designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json

@ -288,6 +288,8 @@
"templateStore": "toolbar/templateStore.svg",
"bug": "toolbar/bug.svg",
"need": "toolbar/need.svg",
"member": "toolbar/member.svg",
"role": "toolbar/role.svg",
"workOrderCenter": "toolbar/workOrderCenter.svg",
"actCenter": "toolbar/actCenter.svg",
"sign": "toolbar/sign.svg",
@ -322,7 +324,9 @@
"nosort": "sort/nosort.svg",
"close": "close/close.svg",
"close_round": "close/close_round.svg",
"closeTag": "close/closeTag.svg",
"platform_close": "close/platform_close.svg",
"platform_close_disabled": "close/platform_close_disable.svg",
"add_parenthesis": "font/add_parenthesis.svg",
"remove_parenthesis": "font/remove_parenthesis.svg",
"shadow": "font/shadow.svg",

7
designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties

@ -33,14 +33,17 @@
# font weights
# Windows
[win]defaultFont = "Microsoft YaHei", "Microsoft JhengHei", MingLiU, Arial
[win]titleFont = 14, "Microsoft YaHei", "Microsoft JhengHei", MingLiU, Arial
[win]light.font = "Microsoft YaHei", "Microsoft JhengHei", MingLiU, "Arial
[win]semibold.font = "Microsoft YaHei", "Microsoft JhengHei", MingLiU, Arial
# macOS
[mac]defaultFont = 12 "PingFang SC", "Apple LiGothic", "Apple LiSun", Arial
[mac]titleFont = 14 "PingFang SC", "Apple LiGothic", "Apple LiSun", Arial
[mac]light.font = "PingFang SC", "Apple LiGothic", "Apple LiSun", Arial
[mac]semibold.font = "PingFang SC", "Apple LiGothic", "Apple LiSun", Arial
# Linux
[linux]defaultFont = 12 "Noto SansCJK", SimHei, Arial, Ubuntu
[linux]titleFont = 14 "Noto SansCJK", SimHei, Arial, Ubuntu
[linux]light.font = "Noto SansCJK", SimHei, Arial, Ubuntu
[linux]semibold.font = "Noto SansCJK", SimHei, Arial, Ubuntu
@ -944,6 +947,7 @@ TextArea.selectionBackground=$color.brand4
TextArea.selectionForeground=$text.white
TextArea.inactiveForeground=fade(@foreground, 29%)
TextArea.disabledBackground=$fill.disabled
TextArea.currentLineHighlightColor=#fffae8
#---- TextComponent ----
@ -1336,6 +1340,9 @@ chart.selectedBorderColor = #2576EF
[style]Label.boldLabel = \
font: bold $defaultFont
[style]Label.tipWindowTitleLabel = \
font: bold $titleFont
[style]Label.tipLabel = \
foreground: $Label.tipColor

140
designer-base/src/main/resources/com/fr/design/data/tabledata/datacenter/web/data-choose.main.js

File diff suppressed because one or more lines are too long

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

@ -25,8 +25,11 @@ com.fr.design.plugin.remind.PluginInvalidateRemindDialog.centerPane=580*369
com.fr.design.report.WatermarkSettingPane=720*600
com.fr.design.file.MultiTemplateTabPane.popUpMenu=350*65
com.fr.design.data.datapane.preview.desensitization.view.rule.DesensitizationRuleChoosePane.ruleEditPane=800*600
com.fr.design.formula.FormulaPane=900*600
com.fr.design.formula.FormulaPane=1200*640
com.fr.design.formula.FormulaPaneWhenReserveFormula=1200*600
com.fr.design.mainframe.mobile.ui.MobileStyleDefinePane.configLabel=130*20
com.fr.design.mainframe.mobile.utils.DesignerUtils.configLabel=140*20
com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=100*24
com.fr.design.mainframe.EastRegionContainerPane.maximum=600*400
com.fr.design.mainframe.EastRegionContainerPane.minimum=340*400
com.fr.design.mainframe.EastRegionContainerPane.standard=480*400

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

@ -24,8 +24,11 @@ com.fr.design.plugin.remind.PluginInvalidateRemindDialog.centerPane=580*369
com.fr.design.report.WatermarkSettingPane=720*600
com.fr.design.file.MultiTemplateTabPane.popUpMenu=240*65
com.fr.design.data.datapane.preview.desensitization.view.rule.DesensitizationRuleChoosePane.ruleEditPane=800*600
com.fr.design.formula.FormulaPane=900*600
com.fr.design.formula.FormulaPane=900*640
com.fr.design.formula.FormulaPaneWhenReserveFormula=900*600
com.fr.design.mainframe.mobile.ui.MobileStyleDefinePane.configLabel=100*20
com.fr.design.mainframe.mobile.utils.DesignerUtils.configLabel=130*20
com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=160*24
com.fr.design.mainframe.EastRegionContainerPane.maximum=600*400
com.fr.design.mainframe.EastRegionContainerPane.minimum=340*400
com.fr.design.mainframe.EastRegionContainerPane.standard=480*400

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

@ -24,8 +24,11 @@ com.fr.design.plugin.remind.PluginInvalidateRemindDialog.centerPane=580*369
com.fr.design.report.WatermarkSettingPane=720*600
com.fr.design.file.MultiTemplateTabPane.popUpMenu=240*65
com.fr.design.data.datapane.preview.desensitization.view.rule.DesensitizationRuleChoosePane.ruleEditPane=800*600
com.fr.design.formula.FormulaPane=900*600
com.fr.design.formula.FormulaPane=900*640
com.fr.design.formula.FormulaPaneWhenReserveFormula=900*600
com.fr.design.mainframe.mobile.ui.MobileStyleDefinePane.configLabel=75*20
com.fr.design.mainframe.mobile.utils.DesignerUtils.configLabel=100*20
com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=80*24
com.fr.design.mainframe.EastRegionContainerPane.maximum=500*400
com.fr.design.mainframe.EastRegionContainerPane.minimum=340*400
com.fr.design.mainframe.EastRegionContainerPane.standard=340*400

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

@ -4,7 +4,7 @@ com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=360*185
com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=325*31
com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=360*280
com.fr.env.RemoteEnvPane.dialog=308*132
com.fr.design.version.check.dialog=230*95
com.fr.design.version.check.dialog=360*160
com.fr.design.version.detail.label=450*30
com.fr.design.version.detail.dialog=600*500
com.fr.env.SyncFailedPluginsDialog.messageWithLink=316*20
@ -13,7 +13,7 @@ com.fr.design.actions.server.dialog=660*600
com.fr.design.report.fit.templatePane.dialog=600*400
com.fr.design.report.fit.firstColumn=80*20
com.fr.design.report.fit.column=100*20
com.fr.design.lock.LockInfoDialog=400*180
com.fr.design.lock.LockInfoDialog=360*160
com.fr.design.mainframe.ForbiddenPane.refreshButton=68*24
com.fr.start.common.DesignerOpenEmptyPanel.createButton=70*24
com.fr.design.cell.expand.sort.pane=227*155
@ -24,8 +24,11 @@ com.fr.design.plugin.remind.PluginInvalidateRemindDialog.dialog=600*500
com.fr.design.plugin.remind.PluginInvalidateRemindDialog.centerPane=580*369
com.fr.design.report.WatermarkSettingPane=660*600
com.fr.design.file.MultiTemplateTabPane.popUpMenu=170*65
com.fr.design.formula.FormulaPane=900*600
com.fr.design.formula.FormulaPane=900*640
com.fr.design.formula.FormulaPaneWhenReserveFormula=900*600
com.fr.design.mainframe.mobile.ui.MobileStyleDefinePane.configLabel=75*20
com.fr.design.mainframe.mobile.utils.DesignerUtils.configLabel=100*20
com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=80*24
com.fr.design.mainframe.EastRegionContainerPane.maximum=400*400
com.fr.design.mainframe.EastRegionContainerPane.minimum=286*400
com.fr.design.mainframe.EastRegionContainerPane.standard=286*400

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

@ -23,8 +23,11 @@ com.fr.design.plugin.remind.PluginInvalidateRemindDialog.dialog=600*500
com.fr.design.plugin.remind.PluginInvalidateRemindDialog.centerPane=580*369
com.fr.design.report.WatermarkSettingPane=720*600
com.fr.design.file.MultiTemplateTabPane.popUpMenu=170*65
com.fr.design.formula.FormulaPane=900*600
com.fr.design.formula.FormulaPane=900*640
com.fr.design.formula.FormulaPaneWhenReserveFormula=900*600
com.fr.design.mainframe.mobile.ui.MobileStyleDefinePane.configLabel=75*20
com.fr.design.mainframe.mobile.utils.DesignerUtils.configLabel=100*20
com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=80*24
com.fr.design.mainframe.EastRegionContainerPane.maximum=400*400
com.fr.design.mainframe.EastRegionContainerPane.minimum=286*400
com.fr.design.mainframe.EastRegionContainerPane.standard=286*400

14
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java

@ -4,7 +4,6 @@ import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIConstants;
import com.fine.theme.utils.FineUIStyle;
import com.fr.base.BaseUtils;
import com.fr.chart.base.AttrChangeConfig;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.charttypes.ChartTypeManager;
@ -29,12 +28,12 @@ import com.fr.stable.StringUtils;
import com.fr.van.chart.config.DefaultStyleHelper4Van;
import javax.swing.JPanel;
import javax.swing.Icon;
import javax.swing.SwingUtilities;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@ -44,7 +43,6 @@ import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
@ -56,6 +54,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.flex;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.theme.utils.FineUIScale.scale;
/**
* 图表 类型 增删 控制按钮界面.
@ -458,8 +457,8 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen
private class ChartChangeButton extends UIToggleButton {
private static final double DEL_WIDTH = 10;
private BufferedImage closeIcon = BaseUtils.readImageWithCache("com/fr/design/images/toolbarbtn/chartChangeClose.png");
private static final double DEL_WIDTH = 9;
private Icon closeIcon = new LazyIcon("closeTag", 8);
private boolean isMoveOn = false;
private String buttonName = "";
@ -506,11 +505,8 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen
private void paintDeleteButton(Graphics g2d) {
Rectangle2D bounds = this.getBounds();
int x = (int) (bounds.getWidth() - DEL_WIDTH);
int y = (int) (1);
g2d.drawImage((Image) closeIcon, x, y, closeIcon.getWidth(), closeIcon.getHeight(), null);
closeIcon.paintIcon(this, g2d, scale(x), scale(1));
}
@Override

4
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotReportDataContentPane.java

@ -41,6 +41,8 @@ public class CategoryPlotReportDataContentPane extends AbstractReportDataContent
filterPane = new ChartDataFilterPane(new Bar2DPlot(), parent);
this.add(column(
cell(categoryName),
fix(10),
cell(getSeriesPane()),
fix(10).with(it -> it.setBorder(FineBorderFactory.createDefaultUnderlineBorder())),
cell(new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Data_Filter"),filterPane))
).getComponent());
@ -53,7 +55,7 @@ public class CategoryPlotReportDataContentPane extends AbstractReportDataContent
UILabel label = new UILabel(leftLabel);
this.setLayout(new BorderLayout());
this.add(row(
cell(label).weight(1.2), cell(formulaTextField).weight(2), flex(0.1), cell(formulaTextFieldButton).weight(0.4)
cell(label).weight(1.2), row(cell(formulaTextField).weight(2), flex(0.1), cell(formulaTextFieldButton).weight(0.4)).weight(3)
).getComponent());
}

4
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldValuePane.java

@ -99,10 +99,10 @@ public class SeriesNameUseFieldValuePane extends FurtherBasicBeanPane<ChartColle
UILabel label2 = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Series_Value"));
centerPane = column(10,
row(
cell(label1).weight(1), cell(seriesName).weight(2)
cell(label1).weight(1.2), cell(seriesName).weight(3)
),
row(
cell(label2).weight(1), cell(seriesValue).weight(2)
cell(label2).weight(1.2), cell(seriesValue).weight(3)
),
fix(1).with(it -> it.setBorder(FineBorderFactory.createDefaultUnderlineBorder()))
).getComponent();

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

@ -1,6 +1,7 @@
package com.fr.design.mainframe.chart.gui.style.series;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.BaseFormula;
import com.fr.chart.base.AreaColor;
import com.fr.chart.base.ChartBaseUtils;
@ -44,6 +45,7 @@ import java.awt.event.MouseEvent;
import java.util.ArrayList;
import java.util.List;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.theme.utils.FineUIScale.scale;
public class UIColorPickerPane extends BasicPane implements UIObserver {
@ -55,7 +57,7 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
private static final int COLOR_REC_WIDTH = scale(30);
protected static final int TEXTFIELD_HEIGHT = scale(20);
protected static final int TEXTFIELD_WIDTH = scale(130);
protected static final int UPCONTROLPANE_WIDTH = scale(218);
protected static final int UPCONTROLPANE_WIDTH = scale(224);
private static final int LAYOUR_DET = scale(6);
public static final double VALUE = 100;
@ -652,7 +654,7 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
};
protected int getBoundX() {
return MARGIN_LEFT;
return 0;
}
protected int getBoundY() {

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

@ -50,6 +50,7 @@ public class ChartPreFillStylePane extends BasicBeanPane<ChartColorMatching> {
private final Integer COLOR_ADJUST_PANE_WIDTH = 240;
private final Integer COLOR_ADJUST_PANE_HEIGHT = 88;
private final Integer MAX_COLOR_COUNT_OF_ROW = 12;
public ChartPreFillStylePane() {
initComponents();
@ -62,7 +63,7 @@ public class ChartPreFillStylePane extends BasicBeanPane<ChartColorMatching> {
groupButton.setSelectedIndex(0);
changeColorSetPane = new JPanel(cardLayout = new CardLayout());
changeColorSetPane.add(colorGradient = new FixedGradientBarNoTheme(4, 150), "gradient");
changeColorSetPane.add(colorAdjustPane = new ColorAdjustPane(), "acc");
changeColorSetPane.add(colorAdjustPane = new ColorAdjustPane(MAX_COLOR_COUNT_OF_ROW), "acc");
cardLayout.show(changeColorSetPane, "acc");
colorGradient.getSelectColorPointBtnP1().setColorInner(Color.WHITE);

30
designer-chart/src/main/java/com/fr/van/chart/box/data/report/BoxPlotReportDataContentPane.java

@ -1,24 +1,25 @@
package com.fr.van.chart.box.data.report;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.Plot;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.plugin.chart.box.VanChartBoxPlot;
import com.fr.plugin.chart.box.data.VanBoxReportDefinition;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
public class BoxPlotReportDataContentPane extends AbstractReportDataContentPane {
private UIButtonGroup dataType;
@ -30,37 +31,20 @@ public class BoxPlotReportDataContentPane extends AbstractReportDataContentPane
public BoxPlotReportDataContentPane(Plot plot, ChartDataPane parent) {
this.initplot = plot;
this.setLayout(new BorderLayout());
this.add(createDataTypePane(), BorderLayout.NORTH);
this.add(createSeriesPane(parent), BorderLayout.CENTER);
this.add(column(LayoutConstants.VERTICAL_GAP, cell(createDataTypePane()), cell(createSeriesPane(parent))).getComponent());
initDataTypeListener();
checkDataPaneVisible();
}
private JPanel createDataTypePane() {
JPanel pane = new JPanel(new BorderLayout(4, 0));
pane.setBorder(BorderFactory.createMatteBorder(0, 0, 6, 1, getBackground()));
UILabel label = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Data_Form"));
label.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH, ChartDataPane.LABEL_HEIGHT));
String[] names = new String[]{
Toolkit.i18nText("Fine-Design_Chart_Detailed_Data"),
Toolkit.i18nText("Fine-Design_Chart_Result_Data")
};
dataType = new UIButtonGroup(names);
dataType.setSelectedIndex(0);
dataType.setPreferredSize(new Dimension(100, 20));
pane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{dataType, null, null, label, null}));
pane.setPreferredSize(new Dimension(246, 30));
pane.setBorder(BorderFactory.createEmptyBorder(0, 18, 10, 15));
return pane;
return FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3}, new UILabel(Toolkit.i18nText("Fine-Design_Chart_Data_Form")), dataType);
}
private JPanel createSeriesPane(ChartDataPane parent) {

27
designer-chart/src/main/java/com/fr/van/chart/box/data/report/BoxPlotReportResultDataSeriesPane.java

@ -3,7 +3,6 @@ package com.fr.van.chart.box.data.report;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
@ -11,11 +10,9 @@ import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPa
import com.fr.plugin.chart.box.data.VanBoxReportDefinition;
import com.fr.plugin.chart.box.data.VanBoxReportResultDefinition;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
public class BoxPlotReportResultDataSeriesPane extends AbstractReportDataContentPane {
@ -34,16 +31,13 @@ public class BoxPlotReportResultDataSeriesPane extends AbstractReportDataContent
initContentComponents();
JPanel panel = createContentPane();
panel.setBorder(BorderFactory.createEmptyBorder(0, 24, 0, 15));
this.add(panel, BorderLayout.CENTER);
}
private void initContentComponents() {
category = createTinyFormulaPaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Category"));
seriesName = createTinyFormulaPaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Series_Name"));
category = new DefaultTinyFormulaPane(Toolkit.i18nText("Fine-Design_Chart_Category"));
seriesName = new DefaultTinyFormulaPane(Toolkit.i18nText("Fine-Design_Chart_Series_Name"));
max = createTinyFormulaWithEditLabel(Toolkit.i18nText("Fine-Design_Chart_Data_Max"));
q3 = createTinyFormulaWithEditLabel(Toolkit.i18nText("Fine-Design_Chart_Data_Q3"));
@ -71,23 +65,6 @@ public class BoxPlotReportResultDataSeriesPane extends AbstractReportDataContent
return TableLayoutHelper.createTableLayoutPane(components, row, col);
}
private TinyFormulaPane createTinyFormulaPaneWithTitle(final String title) {
return new DefaultTinyFormulaPane() {
protected void initLayout() {
this.setLayout(new BorderLayout(4, 0));
UILabel label = new UILabel(title);
label.setPreferredSize(new Dimension(75, 20));
this.add(label, BorderLayout.WEST);
formulaTextField.setPreferredSize(new Dimension(100, 20));
this.add(formulaTextField, BorderLayout.CENTER);
this.add(formulaTextFieldButton, BorderLayout.EAST);
}
};
}
private TinyFormulaWithEditLabel createTinyFormulaWithEditLabel(String title) {
return new TinyFormulaWithEditLabel(title) {

13
designer-chart/src/main/java/com/fr/van/chart/box/data/report/TinyFormulaWithEditLabel.java

@ -9,7 +9,9 @@ import com.fr.design.mainframe.chart.gui.UIEditLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.awt.BorderLayout;
import java.awt.Dimension;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
public abstract class TinyFormulaWithEditLabel extends JPanel implements UIObserver {
@ -23,18 +25,13 @@ public abstract class TinyFormulaWithEditLabel extends JPanel implements UIObser
protected void doAfterMousePress() {
clearAllBackground();
}
protected boolean appendOriginalLabel() {
return false;
}
};
editLabel.setPreferredSize(new Dimension(75, 20));
tinyFormulaPane = new DefaultTinyFormulaPane();
this.setLayout(new BorderLayout(4, 0));
this.add(editLabel, BorderLayout.WEST);
this.add(tinyFormulaPane, BorderLayout.CENTER);
this.setLayout(new BorderLayout(0, 10));
this.add(row(cell(editLabel).weight(1.2), cell(tinyFormulaPane).weight(3)).getComponent());
}
protected abstract void clearAllBackground();

13
designer-chart/src/main/java/com/fr/van/chart/box/data/table/UIComboBoxWithEditLabel.java

@ -8,9 +8,11 @@ import com.fr.design.mainframe.chart.gui.UIEditLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ItemListener;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
public abstract class UIComboBoxWithEditLabel extends JPanel implements UIObserver {
private UIEditLabel editLabel;
@ -28,14 +30,9 @@ public abstract class UIComboBoxWithEditLabel extends JPanel implements UIObserv
return false;
}
};
editLabel.setPreferredSize(new Dimension(80, 20));
comboBox = new UIComboBox();
comboBox.setPreferredSize(new Dimension(100, 20));
this.setLayout(new BorderLayout(4, 0));
this.add(editLabel, BorderLayout.WEST);
this.add(comboBox, BorderLayout.CENTER);
this.setLayout(new BorderLayout(0, 10));
this.add(row(cell(editLabel).weight(1.2), cell(comboBox).weight(3)).getComponent());
}
public UIComboBox getComboBox() {

4
designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotSelectPane.java

@ -1,5 +1,6 @@
package com.fr.van.chart.custom.component;
import com.fine.theme.utils.FineUIScale;
import com.fr.chart.base.ChartThemeStyleProvider;
import com.fr.chart.chartattr.Chart;
import com.fr.design.beans.BasicBeanPane;
@ -20,7 +21,6 @@ import com.fr.van.chart.custom.CustomPlotDesignerPaneFactory;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
@ -87,7 +87,7 @@ public class VanChartCustomPlotSelectPane extends BasicBeanPane<Chart> {
content = FRGUIPaneFactory.createNColumnGridInnerContainer_Pane(CUSTOM_TYPE_NUM, 0, 0);
for (int i = 0; i < customTypeList.size(); i++){
customTypeList.get(i).setPreferredSize(new Dimension(REC_WIDTH,REC_HEIGHT));
customTypeList.get(i).setPreferredSize(FineUIScale.createScaleDimension(REC_WIDTH, REC_HEIGHT));
//是否画右边线
boolean isRightLine = (i == customTypeList.size() - 1) ? true : ((i + 1)%CUSTOM_TYPE_NUM == 0) ? true : false;

3
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLabelContentPane.java

@ -34,7 +34,8 @@ public class VanChartLabelContentPane extends VanChartTooltipContentPane {
if (isInCondition() || !ChartEditContext.supportTheme()) {
return super.createCommonStylePane();
}
setTextAttrPane(new LabelAttrPaneWithThemeStyle());
// 颜色图标统一使用UIColorButton
setTextAttrPane(new ChartTextAttrPaneWithThemeStyle());
JPanel stylePanel = new JPanel(new BorderLayout());
stylePanel.add(getTextAttrPane(), BorderLayout.CENTER);

17
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java

@ -1,7 +1,9 @@
package com.fr.van.chart.designer.component;
import com.fine.swing.ui.layout.Layouts;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
@ -52,10 +54,6 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
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.row;
/**
* 数据点提示内容界面含有通用设置富文本编辑器自定义JS界面
*/
@ -300,7 +298,8 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
new Component[]{new UILabel(getLabelContentTitle()), formatContent}
};
return FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1.2, 3});
return Layouts.cell(FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1.2, 3}))
.with(it ->it.setBorder(new ScaledEmptyBorder(0, 0, 10, 0))).getComponent();
}
public JPanel createCommonStylePane() {
@ -310,11 +309,11 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
});
textAttrPane = createChartTextAttrPane();
stylePanel = column(10,
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Chart_Widget_Style"))).weight(1.2), cell(styleButton).weight(3)
stylePanel = Layouts.column(10,
Layouts.row(
Layouts.cell(new UILabel(Toolkit.i18nText("Fine-Design_Chart_Widget_Style"))).weight(1.2), Layouts.cell(styleButton).weight(3)
),
cell(textAttrPane)
Layouts.cell(textAttrPane)
).getComponent();
initStyleButtonListener();

8
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTrendLinePane.java

@ -1,6 +1,7 @@
package com.fr.van.chart.designer.component;
import com.fine.theme.utils.FineLayoutBuilder;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.chart.base.AttrColor;
import com.fr.chart.base.AttrLineStyle;
import com.fr.chart.base.LineStyleInfo;
@ -69,14 +70,15 @@ public class VanChartTrendLinePane extends BasicPane{
afterPeriod = new UISpinner(0, Integer.MAX_VALUE, 1, 0);
double[] r = {p, p};
double[] c = {f, p, f, p};
double[] c = {p, f, p};
Component[][] periodComps = new Component[][]{
new Component[]{prePeriod, new UILabel(Toolkit.i18nText("Fine-Design_Chart_Cycle")), afterPeriod, new UILabel(Toolkit.i18nText("Fine-Design_Chart_Cycle"))},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_TrendLine_Forward")), null, new UILabel(Toolkit.i18nText("Fine-Design_Chart_After_Period")), null},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_TrendLine_Forward")), prePeriod, new UILabel(Toolkit.i18nText("Fine-Design_Chart_Cycle"))},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_After_Period")), afterPeriod, new UILabel(Toolkit.i18nText("Fine-Design_Chart_Cycle"))},
};
JPanel periodPane = TableLayoutHelper.createTableLayoutPane(periodComps, r, c);
UILabel label = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Period"));
label.setBorder(new ScaledEmptyBorder(3, 0, 3, 0));
label.setVerticalAlignment(SwingConstants.TOP);
Component[][] components = new Component[][]{

13
designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartLabelConditionPane.java

@ -3,14 +3,11 @@ package com.fr.van.chart.designer.other.condition.item;
import com.fr.chart.base.DataSeriesCondition;
import com.fr.chart.chartattr.Plot;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.plugin.chart.base.AttrLabel;
import com.fr.van.chart.designer.PlotFactory;
import com.fr.van.chart.designer.style.label.VanChartPlotLabelPane;
import javax.swing.JPanel;
import java.awt.Component;
public class VanChartLabelConditionPane extends AbstractNormalMultiLineConditionPane {
@ -25,15 +22,7 @@ public class VanChartLabelConditionPane extends AbstractNormalMultiLineCondition
@Override
protected JPanel initContentPane() {
dataLabelContentsPane = createLabelPane();
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = 220;
Component[][] components = new Component[][]{
new Component[]{dataLabelContentsPane}
};
return TableLayoutHelper.createTableLayoutPane(components, new double[]{p}, new double[]{e});
return dataLabelContentsPane;
}
protected VanChartPlotLabelPane createLabelPane() {

19
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java

@ -10,6 +10,7 @@ import com.fr.chart.base.TextAttr;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Title;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane;
@ -269,10 +270,15 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
}
}
};
// 显示逻辑-整体显示
labelStylePane.add(wholeDisplayLabelPanel, WHOLE_DISPLAY);
// 显示逻辑-分层显示
labelStylePane.add(createCategoryStylePane(), LAYER_DISPLAY);
showLogicPane.add(TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Axis_Label_Show_Logic"), showLogic), BorderLayout.NORTH);
showLogicPane.add(labelStylePane, BorderLayout.CENTER);
showLogicPane.add(column(LayoutConstants.VERTICAL_GAP,
cell(FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3}, new UILabel(Toolkit.i18nText("Fine-Design_Chart_Axis_Label_Show_Logic")), showLogic)),
cell(labelStylePane)
).getComponent());
showLogicPane.setVisible(false);
labelContentPane.add(labelPane, BorderLayout.NORTH);
labelContentPane.add(showLogicPane, BorderLayout.CENTER);
@ -654,18 +660,11 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
private JPanel createCateLableStylePanel() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] row = getCateLableStylePaneRow();
double[] column = {f, p};
JPanel content = TableLayoutHelper.createTableLayoutPane(getCateLabelStyleComponents(), row, column);
Component[][] components = new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Style_Category")), content}
};
return TableLayoutHelper.createTableLayoutPane(components, new double[]{p, p}, new double[]{f, e});
return FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3}, new UILabel(Toolkit.i18nText("Fine-Design_Chart_Style_Category")), content);
}
private Component[][] getCateLabelStyleComponents() {

3
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/component/VanChartCategoryStylePaneWithCheckBox.java

@ -1,5 +1,6 @@
package com.fr.van.chart.designer.style.axis.component;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.design.gui.frpane.ClosableBubbleFloatPane;
import com.fr.design.gui.ibutton.UIButton;
@ -68,7 +69,7 @@ public class VanChartCategoryStylePaneWithCheckBox extends JPanel {
Point comPoint = settingButton.getLocationOnScreen();
Point arrowPoint = new Point(comPoint.x +settingButton.getWidth() - 25, comPoint.y + settingButton.getHeight());
Dimension size = settingPane.getPreferredSize();
ClosableBubbleFloatPane<VanChartAxisLabelStyle> pane = new ClosableBubbleFloatPane(Constants.LEFT, arrowPoint, settingPane, size.width, 240) {
ClosableBubbleFloatPane<VanChartAxisLabelStyle> pane = new ClosableBubbleFloatPane(Constants.LEFT, arrowPoint, settingPane, size.width, FineUIScale.scale(240)) {
@Override
public void updateContentPane() {

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

@ -31,7 +31,6 @@ import java.awt.event.ActionListener;
*/
public class VanChartGaugeLabelDetailPane extends VanChartPlotLabelDetailPane {
private static final int TEXT_FONT_PANE_HEIGHT = 50;
private GaugeStyle gaugeStyle;
private UIButtonGroup<Integer> align;
private JPanel alignPane;
@ -210,7 +209,6 @@ public class VanChartGaugeLabelDetailPane extends VanChartPlotLabelDetailPane {
protected void checkStyleUse() {
textFontPane.setVisible(true);
textFontPane.setPreferredSize(new Dimension(0, TEXT_FONT_PANE_HEIGHT));
}
protected boolean hasLabelAlign() {

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

@ -9,12 +9,10 @@ import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.BasicPane;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.design.style.color.ColorSelectBox;
import com.fr.general.ComparatorUtils;
@ -241,10 +239,12 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
column.add(positionPane);
if (hasLabelOrientationPane()) {
// 文本方向
column.add(createLabelOrientationPane());
}
if (plot.isSupportLeadLine()) {
// 牵引线
tractionLine = new UICheckBox(Toolkit.i18nText("Fine-Design_Chart_Show_Guideline"));
Component[][] comps = new Component[1][2];
comps[0] = new Component[]{new UILabel(), tractionLine};
@ -255,6 +255,7 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
column.add(getLabelPositionPane(comps, row, col));
initPositionListener();
} else if (PlotFactory.plotAutoAdjustLabelPosition(plot)) {
// 重叠调整
column.add(FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(Toolkit.i18nText("Fine-Design_Chart_Auto_Adjust")), autoAdjust));
}
@ -281,8 +282,8 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
checkOrientation();
}
});
return TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Text_Orientation"), orientation);
return FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(Toolkit.i18nText("Fine-Design_Chart_Text_Orientation")), orientation);
}
protected void checkPositionPane(String title) {

4
designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java

@ -278,13 +278,13 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
protected JPanel createStackedAndAxisPane() {
stackAndAxisEditPane = new VanChartStackedAndAxisListControlPane();
stackAndAxisEditExpandablePane = new UIExpandablePane(stackAndAxisEditPane.getPaneTitle(), stackAndAxisEditPane, true);
stackAndAxisEditExpandablePane.setVisible(true);
return stackAndAxisEditExpandablePane;
}
//界面上删除堆积和坐标轴设置
protected void removeStackWholePane() {
contentPane.remove(stackAndAxisEditExpandablePane);
contentPane.repaint();
stackAndAxisEditExpandablePane.setVisible(false);
}
/**

43
designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartEffectPane.java

@ -1,19 +1,23 @@
package com.fr.van.chart.designer.style.series;
import com.fine.theme.utils.FineLayoutBuilder;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.i18n.Toolkit;
import com.fr.plugin.chart.base.AttrEffect;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
import java.awt.Dimension;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.fix;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* Created by shine on 2016/12/13.
@ -40,33 +44,32 @@ public class VanChartEffectPane extends BasicBeanPane<AttrEffect> {
period = new UISpinner(0, Double.MAX_VALUE, 0.1, 0);
content = createContentPane();
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Flash_Animation"),enabledButton);
this.setLayout(new BorderLayout(0, 5));
JPanel panel = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3}, new UILabel(Toolkit.i18nText("Fine-Design_Chart_Flash_Animation")), enabledButton);
panel.setBorder(new ScaledEmptyBorder(0, 0, 10,0));
this.setLayout(new BorderLayout());
if(hasEnabledChoose) {
this.add(panel, BorderLayout.NORTH);
setContentPaneBorder();
}
this.add(content, BorderLayout.CENTER);
}
protected void setContentPaneBorder() {
content.setBorder(BorderFactory.createEmptyBorder(10,25,0,15));
}
/**
* 闪烁动画
* @return contentPane
*/
protected JPanel createContentPane() {
JPanel panel = createPeriodPane();
return panel;
return createPeriodPane();
}
/**
* 运动周期
* @return periodPane
*/
protected JPanel createPeriodPane(){
JPanel periodPane = new JPanel();
periodPane.setLayout(new BorderLayout(5, 0));
UILabel label1= new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Flash_Period"));
label1.setPreferredSize(new Dimension((int)TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH, 20));
periodPane.add(label1, BorderLayout.WEST);
periodPane.add(period, BorderLayout.CENTER);
periodPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Time_Second")), BorderLayout.EAST);
return periodPane;
JPanel panel = new JPanel(new BorderLayout());
panel.add(row(cell(period).weight(1), fix(4),cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Time_Second")))).getComponent());
return FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(Toolkit.i18nText("Fine-Design_Chart_Flash_Period")), panel);
}
@Override

35
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/GanttReportDataContentPane.java

@ -6,7 +6,6 @@ import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
import com.fr.plugin.chart.gantt.data.VanGanttReportDefinition;
import com.fr.van.chart.gantt.designer.data.data.GanttDataPaneHelper;
@ -15,10 +14,6 @@ import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* Created by hufan on 2017/1/11.
*/
@ -40,30 +35,12 @@ public class GanttReportDataContentPane extends AbstractReportDataContentPane{
}
private void initAllComponent() {
seriesName = createTinyFormulaPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Series_Name"));
startTime = createTinyFormulaPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Start_Time"));
endTime = createTinyFormulaPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_End_Time"));
markerTime = createTinyFormulaPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Marker_Time"));
progress = createTinyFormulaPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Process"));
linkID = createTinyFormulaPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Task_ID"));
}
private TinyFormulaPane createTinyFormulaPaneWithTitle(final String title) {
return new DefaultTinyFormulaPane() {
@Override
protected void initLayout() {
this.setLayout(new BorderLayout());
UILabel label = new UILabel(title);
this.add(row(
cell(label).weight(1.2), cell(formulaTextField).weight(2.4), flex(0.1), cell(formulaTextFieldButton).weight(0.5)
).getComponent());
}
};
seriesName = new DefaultTinyFormulaPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Series_Name"));
startTime = new DefaultTinyFormulaPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Start_Time"));
endTime = new DefaultTinyFormulaPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_End_Time"));
markerTime = new DefaultTinyFormulaPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Marker_Time"));
progress = new DefaultTinyFormulaPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Process"));
linkID = new DefaultTinyFormulaPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Task_ID"));
}
private JPanel getContentPane(){

26
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/link/GanttLinkReportDataContentPane.java

@ -5,7 +5,6 @@ import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
import com.fr.plugin.chart.gantt.data.VanGanttLinkReportDefinition;
import com.fr.van.chart.gantt.designer.data.data.GanttDataPaneHelper;
@ -14,10 +13,6 @@ import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* Created by hufan on 2017/1/12.
*/
@ -33,24 +28,9 @@ public class GanttLinkReportDataContentPane extends AbstractReportDataContentPan
this.add(panel, BorderLayout.CENTER); }
private void initAllComponent() {
startTaskID = createTinyFormulaPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Start_Task_ID"));
endTaskID = createTinyFormulaPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_End_Task_ID"));
linkType = createTinyFormulaPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Link_Type"));
}
private TinyFormulaPane createTinyFormulaPaneWithTitle(final String title) {
return new DefaultTinyFormulaPane() {
@Override
protected void initLayout() {
this.setLayout(new BorderLayout());
UILabel label = new UILabel(title);
this.add(row(
cell(label).weight(1.2), cell(formulaTextField).weight(2.4), flex(0.1), cell(formulaTextFieldButton).weight(0.5)
).getComponent());
}
};
startTaskID = new DefaultTinyFormulaPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Start_Task_ID"));
endTaskID = new DefaultTinyFormulaPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_End_Task_ID"));
linkType = new DefaultTinyFormulaPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Link_Type"));
}
private JPanel getContentPane(){

1
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/series/VanChartGanttSeriesPane.java

@ -42,6 +42,7 @@ public class VanChartGanttSeriesPane extends VanChartAbstractPlotSeriesPane {
contentPane = FineLayoutBuilder.createVerticalLayout(0,
createGanntStylePane(),
createLinkLinePane(),
createMarkerPane(),
createLargeDataModelPane(),
createGuideLinePane()
);

2
designer-chart/src/main/java/com/fr/van/chart/gauge/VanChartGaugeSeriesPane.java

@ -115,7 +115,7 @@ public class VanChartGaugeSeriesPane extends VanChartMultiColorSeriesPane {
}
protected JPanel createColorDividePane() {
JPanel panel = new JPanel(new BorderLayout(0, 0));
JPanel panel = new JPanel(new BorderLayout(0, FineUIScale.scale(10)));
valueFillStylePane = getVanChartFillStylePane();
JPanel stylePane = valueFillStylePane == null ? new JPanel() : valueFillStylePane;

49
designer-chart/src/main/java/com/fr/van/chart/map/line/VanChartLineMapEffectPane.java

@ -1,7 +1,11 @@
package com.fr.van.chart.map.line;
import com.fine.theme.utils.FineLayoutBuilder;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.general.ComparatorUtils;
import com.fr.plugin.chart.base.AttrEffect;
@ -11,7 +15,6 @@ import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.marker.VanChartImageMarkerPane;
import com.fr.van.chart.designer.style.series.VanChartEffectPane;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.CardLayout;
@ -20,6 +23,9 @@ import java.awt.Dimension;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
/**
* Created by hufan on 2016/12/20.
*/
@ -32,39 +38,34 @@ public class VanChartLineMapEffectPane extends VanChartEffectPane {
public VanChartLineMapEffectPane() {
super(true);
this.add(TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Line_Map_Animation"), enabledButton), BorderLayout.NORTH);
JPanel panel = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(Toolkit.i18nText("Fine-Design_Chart_Line_Map_Animation")), enabledButton);
panel.setBorder(new ScaledEmptyBorder(0, 0, 10,0));
this.add(panel, BorderLayout.NORTH);
}
/**
* 流向动画
* @return contentPane
*/
protected JPanel createContentPane() {
JPanel panel = new JPanel(new BorderLayout(0, 5));
JPanel panel = new JPanel(new BorderLayout());
// 运动周期
JPanel periodPane = createPeriodPane();
// 运动方式
animationType = new UIComboBox(LineMapAnimationType.getTypes());
initTypeContentPane();
JPanel animationTypePane = new JPanel(new BorderLayout(0, 5));
animationTypePane.add(createAnimationSelectPane(), BorderLayout.NORTH);
animationTypePane.add(typeContentPane, BorderLayout.CENTER);
panel.add(periodPane, BorderLayout.CENTER);
panel.add(animationTypePane, BorderLayout.SOUTH);
panel.setBorder(BorderFactory.createEmptyBorder(0, 12, 0, 0));
panel.add(column(LayoutConstants.VERTICAL_GAP, cell(periodPane), cell(createAnimationSelectPane()), cell(typeContentPane)).getComponent());
return panel;
}
protected void setContentPaneBorder() {
return;
}
/**
* 运动方式
* @return animationSelectPane
*/
private Component createAnimationSelectPane() {
JPanel panel = new JPanel(new BorderLayout(5, 0));
UILabel label1 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Animation_Type"));
label1.setPreferredSize(new Dimension((int) TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH, 20));
panel.add(label1, BorderLayout.WEST);
panel.add(animationType, BorderLayout.CENTER);
return panel;
return FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(Toolkit.i18nText("Fine-Design_Chart_Animation_Type")), animationType);
}
private void initTypeContentPane() {

4
designer-form/src/main/java/com/fr/design/actions/TemplateParameterAction.java

@ -1,6 +1,6 @@
package com.fr.design.actions;
import com.fr.base.BaseUtils;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.Parameter;
import com.fr.design.DesignModelAdapter;
import com.fr.design.dialog.BasicDialog;
@ -22,7 +22,7 @@ public class TemplateParameterAction extends JTemplateAction<JForm> {
this.setMenuKeySet(KeySetUtils.REPORT_PARAMETER_ATTR);
this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_report/p.png"));
this.setSmallIcon(new LazyIcon("param"));
}
@Override

3
designer-form/src/main/java/com/fr/design/actions/file/export/EmbeddedFormExportExportAction.java

@ -1,5 +1,6 @@
package com.fr.design.actions.file.export;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.BaseUtils;
import com.fr.base.Parameter;
import com.fr.base.extension.FileExtension;
@ -30,7 +31,7 @@ public class EmbeddedFormExportExportAction extends AbstractExportAction<JForm>
this.setMenuKeySet(KeySetUtils.EMBEDDED_EXPORT);
this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/base/images/oem/logo.png"));
this.setSmallIcon(new LazyIcon("logo"));
}
@Override

4
designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/TabMoveCustomAction.java

@ -1,7 +1,7 @@
package com.fr.design.designer.creator.cardlayout;
import com.fine.theme.icon.LazyIcon;
import com.fr.design.mainframe.FormDesigner;
import com.fr.general.IOUtils;
/**
* Created by zhouping on 2017/2/9.
@ -11,7 +11,7 @@ public class TabMoveCustomAction extends TabMoveAction {
public TabMoveCustomAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) {
super(t, xCardSwitchButton);
this.setName("");
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/control/refresh.png"));
this.setSmallIcon(new LazyIcon("refresh"));
}
}

4
designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/TabMoveNextAction.java

@ -1,9 +1,9 @@
package com.fr.design.designer.creator.cardlayout;
import com.fine.theme.icon.LazyIcon;
import com.fr.design.mainframe.FormDesigner;
import com.fr.form.ui.CardSwitchButton;
import com.fr.form.ui.container.cardlayout.WTabFitLayout;
import com.fr.general.IOUtils;
/**
@ -14,7 +14,7 @@ public class TabMoveNextAction extends TabMoveAction {
public TabMoveNextAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) {
super(t, xCardSwitchButton);
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Move_Tab_Next"));
this.setSmallIcon(IOUtils.readIcon("com/fr/design/images/control/tab/next.png"));
this.setSmallIcon(new LazyIcon("triangle_right"));
}
@Override

3
designer-realize/src/main/java/com/fr/design/actions/cell/style/ReportFontNameAction.java

@ -3,7 +3,6 @@
*/
package com.fr.design.actions.cell.style;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.utils.DesignUtils;
import com.fr.stable.os.OperatingSystem;
import java.awt.Dimension;
@ -84,7 +83,7 @@ public class ReportFontNameAction extends AbstractStyleAction {
UIComboBox itemComponent = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report());
this.putValue(UIComboBox.class.getName(), itemComponent);
//设置最佳宽度.
itemComponent.setPreferredSize(FineUIScale.scale(new Dimension(140, 24)));
itemComponent.setPreferredSize(new Dimension(150, 24));
itemComponent.setEnabled(this.isEnabled());
itemComponent.addActionListener(this);

4
designer-realize/src/main/java/com/fr/design/actions/cell/style/ReportFontSizeAction.java

@ -95,8 +95,8 @@ public class ReportFontSizeAction extends AbstractStyleAction {
UIComboBox itemComponent = new UIComboBox(integerList);
this.putValue(UIComboBox.class.getName(), itemComponent);
itemComponent.setMinimumSize(new Dimension(50, 20));
itemComponent.setPreferredSize(new Dimension(50, 20));
itemComponent.setMinimumSize(new Dimension(70, 24));
itemComponent.setPreferredSize(new Dimension(70, 24));
itemComponent.setEnabled(this.isEnabled());
itemComponent.addActionListener(this);
//需求字体大小可编辑

3
designer-realize/src/main/java/com/fr/design/actions/edit/DeleteAction.java

@ -4,6 +4,7 @@
package com.fr.design.actions.edit;
import com.fine.theme.icon.LazyIcon;
import com.fr.design.actions.ElementCaseAction;
import com.fr.design.mainframe.ElementCasePane;
@ -20,7 +21,7 @@ public class DeleteAction extends ElementCaseAction {
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_M_Edit_Delete"));
this.setMnemonic('D');
//Richie:删除菜单图标
this.setSmallIcon("/com/fr/design/images/m_report/delete");
this.setSmallIcon(new LazyIcon("remove"));
// this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, 0));
}

2
designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java

@ -360,7 +360,7 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
).getComponent())
.addSupplier("showChar", () -> column(LayoutConstants.VERTICAL_GAP,
cell(textOverflowCheckBox),
row(cell(showPartLabel).weight(1.2), cell(showPartComboBox).weight(1.6), flex(0.1), cell(numberLabel).weight(0.5), cell(showCharNums).weight(0.8)),
row(cell(showPartLabel).weight(1.2), cell(showPartComboBox).weight(1.4), flex(0.1), cell(numberLabel).weight(0.5), cell(showCharNums).weight(1.0)),
row(cell(hideTypeLabel).weight(1.2), cell(textOverflowTypeComboBox).weight(3.0))
).getComponent())
.addSupplier("showCell", () -> column(LayoutConstants.VERTICAL_GAP,

1
designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/CellDesensitizationGroupsPane.java

@ -62,6 +62,7 @@ public class CellDesensitizationGroupsPane extends JPanel {
private JPanel initAddPane(CellDesensitizationTableModel model) {
UIButton addButton = new UIButton(model.getAction());
UILabel addLabel = new UILabel(Toolkit.i18nText("Fine-Design_Report_Desensitization_Setting"));
addLabel.setToolTipText(Toolkit.i18nText("Fine-Design_Report_Desensitization_Setting"));
return Layouts.row(
cell(addLabel).weight(1.2),
cell(addButton).weight(3.0)

3
designer-realize/src/main/java/com/fr/poly/actions/DeleteBlockAction.java

@ -3,6 +3,7 @@
*/
package com.fr.poly.actions;
import com.fine.theme.icon.LazyIcon;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
@ -26,7 +27,7 @@ public class DeleteBlockAction extends UpdateAction implements TemplateComponent
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_M_Edit_Delete"));
this.setMnemonic('D');
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0));
this.setSmallIcon("/com/fr/design/images/m_report/delete");
this.setSmallIcon(new LazyIcon("remove"));
}
@Override

Loading…
Cancel
Save