Browse Source

Pull request #15002: REPORT-135889 & REPORT-136077 & REPORT-136650 fix:NewUI细节问题修复

Merge in DESIGN/design from ~LEVY.XIE/design:fbp/release to fbp/release

* commit '51bfec255c83f56de09ae10ccdbc81ecaf581dcd':
  REPORT-136650 fix:控件自适应按钮交互异常修复
  REPORT-136077 fix:属性面板兼容旧图标
  REPORT-135889 fix:远程失败堆栈页面优化
fbp/release
Levy.Xie-解安森 2 months ago
parent
commit
7d45d1f21a
  1. 5
      designer-base/src/main/java/com/fr/design/dialog/UIDetailErrorLinkDialog.java
  2. 1
      designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java
  3. 50
      designer-realize/src/main/java/com/fr/design/widget/ui/ButtonGroupDictPane.java

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

@ -5,6 +5,7 @@ import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIStyle; import com.fine.theme.utils.FineUIStyle;
import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.GraphHelper; import com.fr.base.GraphHelper;
import com.fr.design.border.FineBorderFactory;
import com.fr.design.dialog.link.MessageWithLink; import com.fr.design.dialog.link.MessageWithLink;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.icontainer.UIScrollPane;
@ -14,7 +15,6 @@ import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.DesignUtils; import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.IOUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color; import java.awt.Color;
@ -30,7 +30,6 @@ import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.io.StringWriter; import java.io.StringWriter;
import javax.swing.BorderFactory;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.SwingUtilities; import javax.swing.SwingUtilities;
@ -179,9 +178,11 @@ public class UIDetailErrorLinkDialog extends UIDialog {
public StackPane(String stack) { public StackPane(String stack) {
setLayout(new BorderLayout()); setLayout(new BorderLayout());
UITextArea textArea = new UITextArea(); UITextArea textArea = new UITextArea();
textArea.setBorder(null);
textArea.setEditable(false); textArea.setEditable(false);
textArea.setText(stack); textArea.setText(stack);
UIScrollPane scrollPane = new UIScrollPane(textArea); UIScrollPane scrollPane = new UIScrollPane(textArea);
scrollPane.setBorder(FineBorderFactory.createWrappedRoundBorder());
add(scrollPane); add(scrollPane);
// 滚动条默认在顶部 // 滚动条默认在顶部
SwingUtilities.invokeLater(new Runnable() { SwingUtilities.invokeLater(new Runnable() {

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

@ -1041,6 +1041,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
button.setIcon(new LazyIcon(getBtnIconId(), ICON_WIDTH)); button.setIcon(new LazyIcon(getBtnIconId(), ICON_WIDTH));
button.setDisabledIcon(new LazyIcon(btnIconName + ICON_SUFFIX_DISABLED, ICON_WIDTH)); button.setDisabledIcon(new LazyIcon(btnIconName + ICON_SUFFIX_DISABLED, ICON_WIDTH));
} else { } else {
iconSuffix = ICON_SUFFIX_NORMAL_DEPRECATED;
button.setIcon(IconUtils.readIcon(getBtnIconUrl())); button.setIcon(IconUtils.readIcon(getBtnIconUrl()));
button.setDisabledIcon(IconUtils.readIcon(getIconBaseDir() + btnIconName + ICON_SUFFIX_DISABLED_DEPRECATED)); button.setDisabledIcon(IconUtils.readIcon(getIconBaseDir() + btnIconName + ICON_SUFFIX_DISABLED_DEPRECATED));
} }

50
designer-realize/src/main/java/com/fr/design/widget/ui/ButtonGroupDictPane.java

@ -1,8 +1,9 @@
package com.fr.design.widget.ui; package com.fr.design.widget.ui;
import com.fine.swing.ui.layout.Row;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.data.Dictionary; import com.fr.data.Dictionary;
import com.fr.design.gui.core.ReactiveCardPane;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UIBasicSpinner; import com.fr.design.gui.ispinner.UIBasicSpinner;
@ -11,11 +12,8 @@ import com.fr.design.mainframe.widget.accessibles.AccessibleDictionaryEditor;
import com.fr.design.widget.FRWidgetFactory; import com.fr.design.widget.FRWidgetFactory;
import com.fr.form.ui.ButtonGroup; import com.fr.form.ui.ButtonGroup;
import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.SpinnerNumberModel; import javax.swing.SpinnerNumberModel;
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.cell;
import static com.fine.swing.ui.layout.Layouts.column; import static com.fine.swing.ui.layout.Layouts.column;
@ -29,7 +27,7 @@ public class ButtonGroupDictPane extends JPanel {
private UICheckBox adaptiveCheckbox; private UICheckBox adaptiveCheckbox;
private UILabel columnLabel; private UILabel columnLabel;
private AccessibleDictionaryEditor dictPane; private AccessibleDictionaryEditor dictPane;
private ReactiveCardPane reactiveCardPane; private Row showColumn;
public ButtonGroupDictPane() { public ButtonGroupDictPane() {
@ -41,51 +39,29 @@ public class ButtonGroupDictPane extends JPanel {
*/ */
public void initComponents() { public void initComponents() {
dictPane = new AccessibleDictionaryEditor(); dictPane = new AccessibleDictionaryEditor();
UILabel dictLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_DS_Dictionary"));
this.columnLabel = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Button_Group_Display_Columns") + ":", dictLabel.getPreferredSize().width);
columnSpinner = new UIBasicSpinner(new SpinnerNumberModel(0, 0, Integer.MAX_VALUE, 1));
showColumn = row(cell(columnLabel).weight(LEFT_WEIGHT), cell(columnSpinner).weight(RIGHT_WEIGHT)).getComponent();
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
adaptiveCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Adaptive"), true); adaptiveCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Adaptive"), true);
adaptiveCheckbox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); adaptiveCheckbox.setBorder(new ScaledEmptyBorder(0, 0, 0, 0));
adaptiveCheckbox.addActionListener(new ActionListener() { adaptiveCheckbox.addActionListener(e -> {
@Override
public void actionPerformed(ActionEvent e) {
boolean selected = adaptiveCheckbox.isSelected(); boolean selected = adaptiveCheckbox.isSelected();
if (selected) { showColumn.setVisible(!selected);
reactiveCardPane.select("adaptive").populate();
} else {
reactiveCardPane.select("inadaptive").populate();
}
}
}); });
UILabel dictLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_DS_Dictionary")); this.add(column(10,
this.columnLabel = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Button_Group_Display_Columns") + ":", dictLabel.getPreferredSize().width);
columnSpinner = new UIBasicSpinner(new SpinnerNumberModel(0, 0, Integer.MAX_VALUE, 1));
reactiveCardPane = ReactiveCardPane.create()
.addSupplier("adaptive", () -> column(
10,
row(cell(dictLabel).weight(LEFT_WEIGHT), cell(dictPane).weight(RIGHT_WEIGHT)), row(cell(dictLabel).weight(LEFT_WEIGHT), cell(dictPane).weight(RIGHT_WEIGHT)),
row(cell(adaptiveCheckbox)), row(cell(adaptiveCheckbox)),
row(cell(columnLabel).weight(LEFT_WEIGHT), cell(columnSpinner).weight(RIGHT_WEIGHT)) cell(showColumn)
).getComponent()
).addSupplier("inadaptive", () -> column(
10,
row(cell(dictLabel).weight(LEFT_WEIGHT), cell(dictPane).weight(RIGHT_WEIGHT)),
row(cell(adaptiveCheckbox))
).getComponent()); ).getComponent());
reactiveCardPane.select("inadaptive").populate();
this.add(reactiveCardPane);
} }
public void populate(ButtonGroup buttonGroup) { public void populate(ButtonGroup buttonGroup) {
dictPane.setValue(buttonGroup.getDictionary()); dictPane.setValue(buttonGroup.getDictionary());
adaptiveCheckbox.setSelected(buttonGroup.isAdaptive()); adaptiveCheckbox.setSelected(buttonGroup.isAdaptive());
boolean selected = adaptiveCheckbox.isSelected(); boolean selected = adaptiveCheckbox.isSelected();
if (selected) { showColumn.setVisible(!selected);
reactiveCardPane.select("adaptive").populate();
} else {
reactiveCardPane.select("inadaptive").populate();
}
columnSpinner.setValue(buttonGroup.getColumnsInRow()); columnSpinner.setValue(buttonGroup.getColumnsInRow());
} }

Loading…
Cancel
Save