Browse Source

Pull request #14535: REPORT-113994 设计器样式翻新组件翻新

Merge in DESIGN/design from ~RENEKTON/design:newui to newui

* commit 'ad7699e8b7bdfe17a2dfd82ef10670aa68bb34e3':
  修改为缩放border
  超级连接图标问题/面板布局问题;检测器反馈布局;缩放问题;控件选中无法复制、剪切问题;弹窗确定取消按钮距离调整
newui
Renekton-张世豪 4 months ago
parent
commit
cf78239da8
  1. 16
      designer-base/src/main/java/com/fr/design/actions/file/RenameAction.java
  2. 15
      designer-base/src/main/java/com/fr/design/carton/FeedbackToolboxDialog.java
  3. 3
      designer-base/src/main/java/com/fr/design/dialog/UIDialog.java
  4. 4
      designer-base/src/main/java/com/fr/design/formula/TinyFormulaPane.java
  5. 16
      designer-base/src/main/java/com/fr/design/hyperlink/AbstractHyperNorthPane.java
  6. 5
      designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java
  7. 6
      designer-base/src/main/java/com/fr/design/hyperlink/WebHyperNorthPane.java
  8. 3
      designer-base/src/main/java/com/fr/design/hyperlink/WebHyperlinkPane.java
  9. 19
      designer-base/src/main/java/com/fr/design/hyperlink/popup/ContentSettingPane.java
  10. 2
      designer-base/src/main/java/com/fr/design/hyperlink/popup/CustomFontPane.java
  11. 2
      designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupRegularPane.java
  12. 6
      designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupUIUtils.java
  13. 18
      designer-base/src/main/java/com/fr/design/hyperlink/popup/StyleSettingPane.java
  14. 5
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPane.java
  15. 10
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java
  16. 54
      designer-base/src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java
  17. 0
      designer-base/src/main/resources/com/fine/theme/icon/propertiestab/hyperlink_selected.svg
  18. 2
      designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties
  19. 3
      designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java
  20. 5
      designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateFloatLinkPane.java
  21. 2
      designer-form/src/main/java/com/fr/design/designer/beans/actions/FormDeleteAction.java
  22. 20
      designer-form/src/main/java/com/fr/design/form/parameter/FormParaDesigner.java
  23. 7
      designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java

16
designer-base/src/main/java/com/fr/design/actions/file/RenameAction.java

@ -1,6 +1,8 @@
package com.fr.design.actions.file;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.BaseUtils;
import com.fr.chartx.TwoTuple;
import com.fr.design.DesignerEnvManager;
@ -146,7 +148,7 @@ public class RenameAction extends UpdateAction {
"Fine-Design_Basic_Enter_New_Folder_Name" : "Fine-Design_Basic_Enter_New_File_Name")
);
newNameLabel.setHorizontalAlignment(SwingConstants.RIGHT);
newNameLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10));
newNameLabel.setBorder(new ScaledEmptyBorder(0, 0, 0, 10));
//newNameLabel.setPreferredSize(new Dimension(118, 15));
// 重命名输入框
@ -169,10 +171,10 @@ public class RenameAction extends UpdateAction {
}
});
nameField.selectAll();
nameField.setPreferredSize(new Dimension(170, 20));
nameField.setPreferredSize(FineUIScale.scale(new Dimension(170, 20)));
JPanel topPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 5));
topPanel.setBorder(BorderFactory.createEmptyBorder(15, 15, 0, 15));
topPanel.setBorder(new ScaledEmptyBorder(15, 15, 0, 15));
topPanel.add(newNameLabel);
topPanel.add(nameField);
@ -180,14 +182,14 @@ public class RenameAction extends UpdateAction {
nameField.addKeyListener(keyListener);
// 重名提示
warnLabel = new UILabel();
warnLabel.setPreferredSize(new Dimension(300, 50));
warnLabel.setPreferredSize(FineUIScale.scale(new Dimension(300, 50)));
warnLabel.setHorizontalAlignment(SwingConstants.LEFT);
warnLabel.setVerticalAlignment(SwingConstants.TOP);
warnLabel.setForeground(Color.RED);
warnLabel.setVisible(false);
JPanel midPanel = new JPanel(new BorderLayout());
midPanel.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 15));
midPanel.setBorder(new ScaledEmptyBorder(0, 15, 0, 15));
midPanel.add(warnLabel, BorderLayout.WEST);
// 确认按钮
@ -212,7 +214,7 @@ public class RenameAction extends UpdateAction {
JPanel buttonsPane = new JPanel(new FlowLayout(FlowLayout.RIGHT, 10, 0));
buttonsPane.setBorder(BorderFactory.createEmptyBorder(10, 15, 10, 10));
buttonsPane.setBorder(new ScaledEmptyBorder(10, 15, 10, 10));
buttonsPane.add(confirmButton);
buttonsPane.add(cancelButton);
@ -228,7 +230,7 @@ public class RenameAction extends UpdateAction {
),
BorderLayout.CENTER);
this.setSize(340, 200);
this.setSize(FineUIScale.scale(340), FineUIScale.scale(200));
this.setTitle(Toolkit.i18nText("Fine-Design_Basic_Rename"));
this.setResizable(false);
this.setIconImage(BaseUtils.readImage("/com/fr/base/images/oem/logo.png"));

15
designer-base/src/main/java/com/fr/design/carton/FeedbackToolboxDialog.java

@ -1,6 +1,8 @@
package com.fr.design.carton;
import com.fine.swing.ui.layout.Layouts;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.decision.webservice.v10.log.download.utils.LogZipUtils;
import com.fr.design.DesignerEnvManager;
import com.fr.design.constants.UIConstants;
@ -54,6 +56,7 @@ import static com.fr.design.carton.CartonConstants.JOURNAL_FILE_PATH;
public class FeedbackToolboxDialog extends JDialog {
private static final int HORIZONTAL_GAP = 8;
private UIDatePicker uiDatePicker;
private JPanel generalSettingPanel = null;
private UICheckBox easyCheckerButton = null;
@ -71,6 +74,7 @@ public class FeedbackToolboxDialog extends JDialog {
setResizable(false);
this.setLayout(FRGUIPaneFactory.createBorderLayout());
createBodyPanel();
body.setBorder(new ScaledEmptyBorder(10, 10, 10, 10));
add(body);
setSize(body.getPreferredSize());
setSwitches(!StringUtils.isEmpty(GeneralUtils.objectToString(uiDatePicker.getSelectedItem())));
@ -95,9 +99,9 @@ public class FeedbackToolboxDialog extends JDialog {
}
private JPanel createInfoPane() {
JPanel northPane = FRGUIPaneFactory.createNColumnGridInnerContainer_Pane(2, 10, 10);
JPanel northPane = FRGUIPaneFactory.createNColumnGridInnerContainer_Pane(2, 0, 0);
UILabel title = new UILabel();
title.setText(" " + Toolkit.i18nText("Fine-Design_Basic_Carton_Record_Lag_Time") + ": ");
title.setText(Toolkit.i18nText("Fine-Design_Basic_Carton_Record_Lag_Time") + ": ");
//判断一下当天是否有卡顿日志记录,如果有将日期设置为当天,如果没有设置为空
boolean cartonExists = SwitchForSwingChecker.isCartonExists();
if (cartonExists) {
@ -162,8 +166,7 @@ public class FeedbackToolboxDialog extends JDialog {
private JPanel createTailPane() {
JPanel tailPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
tailPanel.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, lineColor));
JPanel actionsPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
actionsPanel.setLayout(FRGUIPaneFactory.createM_BorderLayout());
JPanel actionsPanel = Layouts.row(HORIZONTAL_GAP).getComponent();
{
uploadButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Carton_Upload_Carton_Log"));
uploadButton.addActionListener((e) -> {
@ -179,7 +182,7 @@ public class FeedbackToolboxDialog extends JDialog {
}
});
actionsPanel.add(uploadButton, BorderLayout.WEST);
actionsPanel.add(uploadButton);
UIButton cancelButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Cancel"));
cancelButton.addActionListener((e) -> {
@ -188,7 +191,7 @@ public class FeedbackToolboxDialog extends JDialog {
envDetectorDialog.setVisible(true);
dispose();
});
actionsPanel.add(cancelButton, BorderLayout.EAST);
actionsPanel.add(cancelButton);
}
UIButton currencySetButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Carton_General_Settings"));
currencySetButton.addActionListener((e -> {

3
designer-base/src/main/java/com/fr/design/dialog/UIDialog.java

@ -34,6 +34,7 @@ import java.util.ArrayList;
public abstract class UIDialog extends JDialog {
public static final String OK_BUTTON = "basic_ok";
public static final String CANCEL_BUTTON = "basic_cancel";
private static final int HORIZONTAL_GAP = 8;
private UIButton okButton, cancelButton;
private BasicPane pane;
private java.util.List<DialogActionListener> listeners = new ArrayList<DialogActionListener>();
@ -98,7 +99,7 @@ public abstract class UIDialog extends JDialog {
private JPanel createControlButtonPane() {
JPanel controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
JPanel buttonsPane = Layouts.row(LayoutConstants.HORIZONTAL_GAP).getComponent();
JPanel buttonsPane = Layouts.row(HORIZONTAL_GAP).getComponent();
controlPane.add(buttonsPane, BorderLayout.EAST);
//增加一个自定义按钮, 可以用于eg: 设为全局配置

4
designer-base/src/main/java/com/fr/design/formula/TinyFormulaPane.java

@ -73,8 +73,8 @@ public class TinyFormulaPane extends BasicBeanPane<String> implements UIObserver
protected void initLayout() {
this.setLayout(new BorderLayout());
this.add(row(
cell(formulaTextField).weight(2.4), flex(0.1), cell(formulaTextFieldButton).weight(0.5)
this.add(row(8,
cell(formulaTextField).weight(2.4), cell(formulaTextFieldButton).weight(0.5)
).getComponent()) ;
}

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

@ -5,8 +5,6 @@ import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.itextfield.UINumberField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.js.Hyperlink;
import javax.swing.DefaultListCellRenderer;
@ -14,15 +12,10 @@ import javax.swing.JList;
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.column;
import static com.fine.swing.ui.layout.Layouts.row;
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.fix;
public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicBeanPane<T> {
public static final int NEW_WINDOW = 0;
@ -50,8 +43,8 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
}
protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createM_BorderLayout());
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
this.setLayout(new BorderLayout());
JPanel centerPane = new JPanel(new BorderLayout());
JPanel headerPane = this.setHeaderPanel();
targetFrameComboBox = new UIComboBox(getTargetFrames());
@ -77,8 +70,7 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
JPanel centerPanel = new JPanel(new BorderLayout());
centerPanel.add(column(
10,
centerPanel.add(column(10,
row(cell(targetFrameLabel).weight(0.13), cell(targetFrameComboBox).weight(0.87)),
cell(newWindowConfPane)
).getComponent());
@ -87,7 +79,7 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
centerPane.add(centerPanel);
targetFrameComboBox.addActionListener(e -> newWindowConfPane.setVisible(DIALOG == targetFrameComboBox.getSelectedIndex()));
this.add(column(
this.add(column(10,
cell(headerPane),
cell(centerPane),
cell(this.setFootPanel())

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

@ -1,5 +1,6 @@
package com.fr.design.hyperlink;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.BaseFormula;
import com.fr.design.actions.UpdateAction;
import com.fr.design.dialog.BasicDialog;
@ -112,7 +113,7 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
@Override
protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createM_BorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
this.setBorder(new ScaledEmptyBorder(0, 0, 10, 0));
final List<Component[]> dialogComponents = new ArrayList<>();
final List<Component[]> othersComponents = new ArrayList<>();
@ -132,7 +133,7 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
bindListener(dialogComponents, othersComponents);
// 创建内容面板
JPanel content = TableLayoutHelper.createTableLayoutPane(dialogComponents.toArray(new Component[dialogComponents.size()][]), TableLayoutHelper.FILL_LASTCOL_AND_ROW);
JPanel content = TableLayoutHelper.createGapTableLayoutPane(dialogComponents.toArray(new Component[dialogComponents.size()][]), TableLayoutHelper.FILL_LASTCOL_AND_ROW, 10, 10);
this.add(content, BorderLayout.CENTER);
}

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

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

3
designer-base/src/main/java/com/fr/design/hyperlink/WebHyperlinkPane.java

@ -1,6 +1,7 @@
package com.fr.design.hyperlink;
import com.fine.theme.utils.FineUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.Parameter;
import com.fr.design.gui.frpane.ReportletParameterViewPane;
import com.fr.design.gui.icheckbox.UICheckBox;
@ -38,7 +39,7 @@ public class WebHyperlinkPane extends AbstractHyperLinkPane<WebHyperlink> {
protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH));
this.setBorder(new ScaledEmptyBorder(10, 10, 10, 10));
northPane = new WebHyperNorthPane(needRenamePane());
extendParametersCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Extends_Report_Parameters"));

19
designer-base/src/main/java/com/fr/design/hyperlink/popup/ContentSettingPane.java

@ -1,6 +1,7 @@
package com.fr.design.hyperlink.popup;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.BaseFormula;
import com.fr.base.Parameter;
@ -99,9 +100,9 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
popupButtonsPanel.add(textPopupButton);
UILabel popupLabel = new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Target"));
popupButtonsPanel.add(row(40,
popupButtonsPanel.add(row(44,
cell(popupLabel),
row(20, cell(templatePopupButton),
row(44, cell(templatePopupButton),
cell(textPopupButton))
).getComponent());
return popupButtonsPanel;
@ -144,7 +145,7 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
// 选择路径按钮
UIButton templateSelectButton = new UIButton(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Select"));
templateSelectButton.setPreferredSize(new Dimension(templateSelectButton.getPreferredSize().width, 20));
templateSelectButton.setPreferredSize(new Dimension(templateSelectButton.getPreferredSize().width, FineUIScale.scale(20)));
templateSelectButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
@ -162,11 +163,11 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
}
});
UILabel templateLabel = new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Template"));
templatePanel.add(row(40,
templatePanel.add(row(44,
cell(templateLabel),
row(
cell(templatePathTextField),
cell(templateSelectButton)).weight(1.0)
row(8,
cell(templatePathTextField).weight(1.0),
cell(templateSelectButton))
).getComponent());
return templatePanel;
}
@ -194,9 +195,9 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
fontPane = new CustomFontPane();
textSettingPanel.add(column(10,
row(40, cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Text"))),
row(44, cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Text"))),
cell(textContentPane).weight(0.8)),
row(40, cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Style"))),
row(44, cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Style"))),
cell(fontPane).weight(0.9))
).getComponent());

2
designer-base/src/main/java/com/fr/design/hyperlink/popup/CustomFontPane.java

@ -58,7 +58,7 @@ public class CustomFontPane extends JPanel {
JPanel buttonPane = new JPanel(new BorderLayout());
buttonPane.add(row(10,
buttonPane.add(row(8,
cell(fontSizeComboBox).weight(0.76),
cell(colorSelectPane).weight(0.06),
cell(bold).weight(0.06),

2
designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupRegularPane.java

@ -55,7 +55,7 @@ public class MobilePopupRegularPane extends BasicPane {
radiosPane.add(customRadio);
radiosPane.add(autoRadio);
return MobilePopupUIUtils.createLeftTileRightContentPanel(this.label, radiosPane, Color.GRAY);
return MobilePopupUIUtils.createLeftTileRightContentPanel(this.label, radiosPane, Color.GRAY, 20);
}
private ActionListener radioActionListener = new ActionListener() {

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

@ -19,7 +19,7 @@ public class MobilePopupUIUtils {
static public int Left_Title_width = 80;
static public JPanel createLeftTileRightContentPanel(String title, JComponent contentPanel) {
return createLeftTileRightContentPanel(title, contentPanel, null);
return createLeftTileRightContentPanel(title, contentPanel, null, 20);
}
/**
@ -29,7 +29,7 @@ public class MobilePopupUIUtils {
* @param color 子标题颜色默认黑色
* @return JPanel
*/
static public JPanel createLeftTileRightContentPanel(String title, JComponent contentPanel, Color color) {
static public JPanel createLeftTileRightContentPanel(String title, JComponent contentPanel, Color color, int space) {
JPanel jp = new JPanel();
jp.setLayout(new BorderLayout());
UILabel titleLabel = new UILabel(title);
@ -37,7 +37,7 @@ public class MobilePopupUIUtils {
titleLabel.setForeground(color);
}
titleLabel.setForeground(color);
jp.add(row(10,
jp.add(row(space,
cell(titleLabel),
cell(contentPanel).weight(1.0)
).getComponent());

18
designer-base/src/main/java/com/fr/design/hyperlink/popup/StyleSettingPane.java

@ -57,7 +57,7 @@ public class StyleSettingPane extends BasicBeanPane<MobilePopupHyperlink> {
JPanel typePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
popupTypeLabel = new UILabel("");
UILabel typeLabel = new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Type"));
typePane.add(row(40,
typePane.add(row(44,
cell(typeLabel),
cell(popupTypeLabel)
).getComponent());
@ -82,14 +82,14 @@ public class StyleSettingPane extends BasicBeanPane<MobilePopupHyperlink> {
borderColor = new NewColorSelectBox(100);
borderRadiusSpinner = new UISpinner(0, maxBorderRadius, 1, 20);
UILabel borderLabel = new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Border"));
borderPane.add(row(40,
borderPane.add(row(44,
column(10,
cell(borderLabel).weight(0.3),
flex().weight(0.7)),
column(10,
cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Line"), borderType, Color.GRAY)),
cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Colors"), borderColor, Color.GRAY)),
cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Radius"), borderRadiusSpinner, Color.GRAY)))
cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Line"), borderType, Color.GRAY, 64)),
cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Colors"), borderColor, Color.GRAY, 64)),
cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Radius"), borderRadiusSpinner, Color.GRAY, 64)))
).getComponent());
return borderPane;
}
@ -105,13 +105,13 @@ public class StyleSettingPane extends BasicBeanPane<MobilePopupHyperlink> {
transparencyPane.add(numberDragPane, BorderLayout.CENTER);
transparencyPane.add(new UILabel(" %"), BorderLayout.EAST);
JLabel bgLabel = new JLabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Background"));
bgPane.add(row(40,
bgPane.add(row(44,
column(10,
cell(bgLabel).weight(0.6),
flex().weight(0.4)),
column(10,
cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Colors"), bgColor, Color.GRAY)),
cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Opacity"), transparencyPane, Color.GRAY))
cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Colors"), bgColor, Color.GRAY, 64)),
cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Opacity"), transparencyPane, Color.GRAY, 64))
)
).getComponent());
return bgPane;
@ -124,7 +124,7 @@ public class StyleSettingPane extends BasicBeanPane<MobilePopupHyperlink> {
padRegularPane = new MobilePopupRegularPane(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Pad_Rules"));
JLabel sizeLabel = new JLabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Size"));
sizePane.add(row(14,
sizePane.add(row(20,
column(10,
cell(sizeLabel).weight(0.16),
flex().weight(0.84)),

5
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPane.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.theme;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.theme.TemplateTheme;
import com.fr.base.theme.TemplateThemeConfig;
import com.fr.design.designer.IntervalConstants;
@ -34,9 +35,9 @@ import java.util.Map;
public class TemplateThemeGridPane<T extends TemplateTheme> extends BasicPane {
public static final int BLOCK_COUNT_ROW_LINE = 3;
public static final int BLOCK_GAP = IntervalConstants.INTERVAL_L1;
public static final int CONTENT_WIDTH = TemplateThemeBlock.CONTENT_WIDTH * BLOCK_COUNT_ROW_LINE + BLOCK_GAP * (BLOCK_COUNT_ROW_LINE - 1) + 10;
public static final int CONTENT_WIDTH = FineUIScale.scale(TemplateThemeBlock.CONTENT_WIDTH * BLOCK_COUNT_ROW_LINE + BLOCK_GAP * (BLOCK_COUNT_ROW_LINE - 1) + 10);
public static final int BLOCK_ROWS_PER_PAGE = 3;
public static final int CONTENT_HEIGHT = Math.min(527, TemplateThemeBlock.CONTENT_HEIGHT * BLOCK_ROWS_PER_PAGE + BLOCK_GAP * (BLOCK_ROWS_PER_PAGE + 1));
public static final int CONTENT_HEIGHT = FineUIScale.scale(Math.min(527, TemplateThemeBlock.CONTENT_HEIGHT * BLOCK_ROWS_PER_PAGE + BLOCK_GAP * (BLOCK_ROWS_PER_PAGE + 1)));
public static final int ASYNC_FETCH_THEME_THREAD_COUNT = 10;
private final AsyncThemeFetcher<T> asyncThemeFetcher;

10
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java

@ -1,5 +1,7 @@
package com.fr.design.mainframe.theme;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.theme.TemplateTheme;
import com.fr.base.theme.TemplateThemeConfig;
import com.fr.base.theme.settings.ThemeThumbnail;
@ -71,8 +73,8 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends
}
private void initializePane() {
setLayout(new BorderLayout(5, 0));
setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 6));
setLayout(new BorderLayout(FineUIScale.scale(5), 0));
setBorder(new ScaledEmptyBorder(10, 10, 0, 10));
add(createLeftPane(), BorderLayout.CENTER);
add(createRightPane(), BorderLayout.EAST);
}
@ -84,14 +86,14 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends
private JPanel createLeftPane() {
JPanel titleContainer = FRGUIPaneFactory.createBorderLayout_S_Pane();
titleContainer.setPreferredSize(new Dimension(LEFT_TITLE_PANE_WIDTH, LEFT_TITLE_PANE_HEIGHT));
titleContainer.setPreferredSize(FineUIScale.scale(new Dimension(LEFT_TITLE_PANE_WIDTH, LEFT_TITLE_PANE_HEIGHT)));
JPanel previewContainer = FRGUIPaneFactory.createBorderLayout_S_Pane();
previewContainer.setBorder(BorderFactory.createEmptyBorder(5, 4, 10, 4));
titleContainer.add(createTitlePane(), BorderLayout.NORTH);
titleContainer.add(previewContainer, BorderLayout.CENTER);
themePreviewPane = createThemePreviewPane();
themePreviewPane.setPreferredSize(new Dimension(PREVIEW_PANE_WIDTH, PREVIEW_PANE_HEIGHT));
themePreviewPane.setPreferredSize(FineUIScale.scale(new Dimension(PREVIEW_PANE_WIDTH, PREVIEW_PANE_HEIGHT)));
previewContainer.add(themePreviewPane, BorderLayout.CENTER);
return titleContainer;

54
designer-base/src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java vendored

@ -1,19 +1,15 @@
package com.fr.env.detect.ui;
import com.fine.theme.light.ui.FineRoundBorder;
import com.fine.swing.ui.layout.Layouts;
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.svg.IconUtils;
import com.fr.design.components.notification.NotificationDialog;
import com.fr.design.components.notification.NotificationDialogProperties;
import com.fr.design.components.notification.NotificationModel;
import com.fr.design.components.table.TablePanel;
import com.fr.design.constants.DesignerColor;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIButtonUI;
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;
@ -21,7 +17,6 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.ui.util.UIUtil;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.utils.gui.GUIPaintUtils;
import com.fr.env.detect.base.DetectorBridge;
import com.fr.env.detect.base.DetectorUtil;
import com.fr.env.detect.base.EnvDetectorConfig;
@ -30,8 +25,6 @@ import com.fr.env.detect.bean.DetectorStatus;
import com.fr.env.detect.bean.DetectorType;
import com.fr.log.FineLoggerFactory;
import com.fr.design.carton.FeedbackToolboxDialog;
import com.fr.stable.ProductConstantsBase;
import com.fr.stable.StableUtils;
import org.jetbrains.annotations.NotNull;
import javax.swing.BorderFactory;
@ -39,18 +32,15 @@ import javax.swing.ImageIcon;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.SwingWorker;
import javax.swing.plaf.ButtonUI;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Frame;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.Cursor;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.File;
import java.net.URL;
import java.util.List;
import java.util.Map;
@ -66,6 +56,7 @@ public class EnvDetectorDialog extends JDialog {
private static final ImageIcon LOADING_ICON = getLoadingIcon();
private static final int TIMEOUT = 1000;
private static final int HORIZONTAL_GAP = 8;
private static final Color SUCCESS_COLOR = new Color(22, 193, 83);
private static final Color DETAIL_FONT_COLOR = new Color(65, 155, 249);
@ -127,6 +118,7 @@ public class EnvDetectorDialog extends JDialog {
/* tailPanel*/
this.tailPanel = createTailPanel();
body.add(tailPanel, BorderLayout.SOUTH);
body.setBorder(new ScaledEmptyBorder(10, 10, 10, 10));
add(body);
@ -145,7 +137,7 @@ public class EnvDetectorDialog extends JDialog {
private JPanel createHeaderPanel() {
JPanel headerPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
headerPanel.setBorder(BorderFactory.createEmptyBorder(5, 0, 12, 0));
headerPanel.setBorder(new ScaledEmptyBorder(0, 0, 10, 0));
this.detectButton = new UIButton(buttonStatus.getDesc());
FineUIStyle.setStyle(detectButton, FineUIStyle.STYLE_PRIMARY);
detectButton.setToolTipText(buttonStatus.getDesc());
@ -418,7 +410,7 @@ public class EnvDetectorDialog extends JDialog {
private JPanel createTailPanel() {
JPanel tailPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
tailPanel.setBorder(BorderFactory.createEmptyBorder(20, 0, 0, 0));
tailPanel.setBorder(new ScaledEmptyBorder(10, 0, 0, 0));
JPanel configPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
{
@ -434,25 +426,23 @@ public class EnvDetectorDialog extends JDialog {
}
tailPanel.add(configPanel, BorderLayout.WEST);
JPanel actionsPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
actionsPanel.setLayout(FRGUIPaneFactory.createM_BorderLayout());
{
UIButton confirmButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Confirm"));
confirmButton.addActionListener((e) -> {
setVisible(false);
dispose();
// 配置处理
EnvDetectorConfig.getInstance().setEnabled(this.detectOpen);
});
actionsPanel.add(confirmButton, BorderLayout.WEST);
JPanel actionsPanel = Layouts.row(HORIZONTAL_GAP).getComponent();
UIButton cancelButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Cancel"));
cancelButton.addActionListener((e) -> {
setVisible(false);
dispose();
});
actionsPanel.add(cancelButton, BorderLayout.EAST);
}
UIButton confirmButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Confirm"));
confirmButton.addActionListener((e) -> {
setVisible(false);
dispose();
// 配置处理
EnvDetectorConfig.getInstance().setEnabled(this.detectOpen);
});
actionsPanel.add(confirmButton);
UIButton cancelButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Cancel"));
cancelButton.addActionListener((e) -> {
setVisible(false);
dispose();
});
actionsPanel.add(cancelButton);
tailPanel.add(actionsPanel, BorderLayout.EAST);
return tailPanel;
}

0
designer-base/src/main/resources/com/fine/theme/icon/propertiestab/hyperLink_selected.svg → designer-base/src/main/resources/com/fine/theme/icon/propertiestab/hyperlink_selected.svg

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

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

@ -500,7 +500,7 @@ MenuItem.acceleratorSelectionForeground=@foreground
[mac]MenuItem.acceleratorDelimiter = ""
MenuItem.selectionInsets=0,4,0,4
MenuItem.selectionArc=4
MenuItem.selectionBackground=$fill.hover
MenuItem.selectionBackground=#E6E9EF
MenuItem.selectionForeground=@foreground
MenuItem.disabledForeground=fade(@foreground,29%)

3
designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java

@ -2,6 +2,7 @@ package com.fr.design.chart.series.SeriesCondition.impl;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.Utils;
import com.fr.chart.web.ChartHyperRelateCellLink;
import com.fr.design.gui.columnrow.ColumnRowVerticalPane;
@ -50,7 +51,7 @@ public class ChartHyperRelateCellLinkPane extends AbstractHyperLinkPane<ChartHyp
this.add(GUICoreUtils.createNamedPane(itemNameTextField, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Name") + ":"), BorderLayout.NORTH);
}
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
JPanel centerPane = new JPanel(new BorderLayout());
colRowPane = new ColumnRowVerticalPane();
centerPane.add(colRowPane, BorderLayout.NORTH);

5
designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateFloatLinkPane.java

@ -2,6 +2,7 @@ package com.fr.design.chart.series.SeriesCondition.impl;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.Utils;
import com.fr.chart.web.ChartHyperRelateFloatLink;
import com.fr.design.DesignModelAdapter;
@ -49,8 +50,9 @@ public class ChartHyperRelateFloatLinkPane extends AbstractHyperLinkPane<ChartHy
private void initComponent() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(new ScaledEmptyBorder(10, 10, 10, 10));
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
JPanel centerPane = new JPanel(new BorderLayout());
if (needRenamePane()) {
itemNameTextField = new UITextField();
@ -61,7 +63,6 @@ public class ChartHyperRelateFloatLinkPane extends AbstractHyperLinkPane<ChartHy
floatNameBox.setPreferredSize(new Dimension(FineUIScale.scale(160), FineUIScale.scale(24)));
JPanel pane = new JPanel(new BorderLayout());
pane.setBorder(BorderFactory.createEmptyBorder(4, 0, 4, 0));
UILabel floatLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_M_Insert-Float"));
pane.add(row(20,
cell(floatLabel),

2
designer-form/src/main/java/com/fr/design/designer/beans/actions/FormDeleteAction.java

@ -9,6 +9,7 @@ import javax.swing.JComponent;
import javax.swing.KeyStroke;
import com.fine.theme.icon.LazyIcon;
import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.designer.beans.actions.behavior.DeletableEnable;
import com.fr.design.mainframe.FormDesigner;
@ -27,6 +28,7 @@ public class FormDeleteAction extends FormWidgetEditAction {
this.setSmallIcon(new LazyIcon("remove"));
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, 0));
this.setUpdateBehavior(new DeletableEnable());
this.setEnabled(false);
}
@Override

20
designer-form/src/main/java/com/fr/design/form/parameter/FormParaDesigner.java

@ -86,6 +86,8 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP
private static final int PARA_IMAGE_SHIFT_X = -4;
private static final int FORM_AREA_PADDING_LEFT = 13;
private UpdateAction[] mainActions;
private static Image paraImage = BaseUtils.readImage("/com/fr/design/images/form/parameter.png");
public FormParaDesigner() {
@ -342,6 +344,16 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP
return designerActions.toArray(new UpdateAction[designerActions.size()]);
}
public UpdateAction[] getMainActions() {
if (mainActions == null) {
mainActions = new UpdateAction[]{new CutAction(this), new CopyAction(this), new PasteAction(this),
new FormDeleteAction(this)};
}
return mainActions;
}
private boolean searchQueryCreators(XLayoutContainer rootContainer) {
boolean b = false;
for (int i = 0; i < rootContainer.getXCreatorCount(); i++) {
@ -736,8 +748,12 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP
* @return 按钮组 a
*/
public JComponent[] toolBarButton4Form() {
return new JComponent[]{new CutAction(this).createToolBarComponent(), new CopyAction(this).createToolBarComponent(), new PasteAction(this).createToolBarComponent(),
new FormDeleteAction(this).createToolBarComponent()};
UpdateAction[] actions = getMainActions();
JComponent[] components = new JComponent[actions.length];
for (int i = 0; i < actions.length; i++) {
components[i] = actions[i].createToolBarComponent();
}
return components;
}
@Override

7
designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java

@ -776,6 +776,9 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
for (UpdateAction action : getActions()) {
action.update();
}
for (UpdateAction action : getMainActions()) {
action.update();
}
}
}
@ -1479,6 +1482,10 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
return designerActions.toArray(new UpdateAction[designerActions.size()]);
}
public UpdateAction[] getMainActions() {
return new UpdateAction[]{};
}
private List<UpdateAction> getBasicActions(){
if (basicActions == null) {
basicActions = new ArrayList<UpdateAction>();

Loading…
Cancel
Save