Browse Source

Pull request #14816: REPORT-134491 & REPORT-134365 & REPORT-134062 & REPORT-132393 fix: NewUI细节问题修复

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

* commit 'b641c84a2adf2b633d664c92f46fe64ecb313086':
  REPORT-132393 fix: 图表区域布局修复
  REPORT-134062 fix: 版本管理注释弹窗windows显示不全
  REPORT-134365 fix: 模板目录树选中打开逻辑优化
  REPORT-134491 fix: NewUI刷新面板逻辑修复
fbp/merge
Levy.Xie-解安森 4 months ago
parent
commit
2923ee7e9e
  1. 4
      designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java
  2. 5
      designer-base/src/main/java/com/fr/design/condition/SingleConditionPane.java
  3. 4
      designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java
  4. 2
      designer-base/src/main/java/com/fr/design/mainframe/DesktopCardPane.java
  5. 2
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/EditFileVersionDialog.java
  6. 28
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java
  7. 3
      designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnConditionPane.java
  8. 10
      designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/AbstractNormalMultiLineConditionPane.java
  9. 21
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/radar/RadarTableContentPane.java
  10. 5
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/radar/VanChartRadarYAxisPane.java

4
designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java

@ -84,7 +84,7 @@ public abstract class ConditionAttributesPane<T> extends BasicBeanPane<T> {
selectedItemPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
// 选中的添加Itempane
// 选中的添加ItemPane
selectedItemScrollPane.setViewportView(selectedItemPane);
selectedItemScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
@ -93,7 +93,7 @@ public abstract class ConditionAttributesPane<T> extends BasicBeanPane<T> {
this.add(FineUIUtils.wrapComponentWithTitle(column(
10,
row(cell(addItemPane), flex()),
cell(selectedItemScrollPane).with(it -> it.setBorder(new FineRoundBorder())),
cell(selectedItemScrollPane).weight(1).with(it -> it.setBorder(new FineRoundBorder())),
fix(10)
).getComponent(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property")), BorderLayout.NORTH);
}

5
designer-base/src/main/java/com/fr/design/condition/SingleConditionPane.java

@ -7,8 +7,6 @@ import java.awt.event.ActionListener;
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.gui.ibutton.UIButton;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.dialog.BasicPane;
@ -31,9 +29,8 @@ public abstract class SingleConditionPane<T> extends BasicPane {
cancel = new UIButton(new LazyIcon("remove"));
cancel.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Action_Remove"));
cancel.addActionListener(cancleListener);
cancel.setMargin(new Insets(0, 0, 0, 0));
cancel.setBorder(new ScaledEmptyBorder(0, 0, 0, 10));
cancel.setBackground(FlatUIUtils.getUIColor("default.background", new Color(246, 248, 250, 255)));
cancel.setBorder(null);
}
addCancel();
}

4
designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java

@ -3,7 +3,6 @@
*/
package com.fr.design.file;
import com.fr.base.FRContext;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.cache.DesignCacheManager;
import com.fr.design.dialog.FineJOptionPane;
@ -35,7 +34,6 @@ import com.fr.stable.StableUtils;
import com.fr.stable.project.ProjectConstants;
import com.fr.workspace.WorkContext;
import com.fr.report.lock.LockInfoOperator;
import java.util.UUID;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
@ -112,7 +110,7 @@ public class TemplateTreePane extends JPanel implements FileOperations {
@Override
public void mousePressed(MouseEvent evt) {
if (reportletsTree.getPathForLocation(evt.getX(), evt.getY()) != null && evt.getClickCount() == 2) {
if (evt.getClickCount() == 2) {
DesignCacheManager.processByCacheTableData(() -> openFile());
}
}

2
designer-base/src/main/java/com/fr/design/mainframe/DesktopCardPane.java

@ -148,6 +148,7 @@ public class DesktopCardPane extends BasicPane implements TargetModifiedListener
public void showForbiddenStatus() {
component.setVisible(false);
forbiddenPane.setVisible(true);
layeredPane.moveToFront(forbiddenPane);
forbidToolBar();
EastRegionContainerPane.getInstance().updateAllPropertyPane();
@ -156,6 +157,7 @@ public class DesktopCardPane extends BasicPane implements TargetModifiedListener
public void hideCover() {
recoverToolBar();
transparentPane.stop();
forbiddenPane.setVisible(false);
layeredPane.moveToFront(component);
EastRegionContainerPane.getInstance().updateAllPropertyPane();
JComponent downPane = WestRegionContainerPane.getInstance().getDownPane();

2
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/EditFileVersionDialog.java

@ -80,7 +80,7 @@ public class EditFileVersionDialog extends UIDialog {
new Component[]{fontPane, scrollPane}
};
double[] rowSizes = new double[]{25, 100};
double[] columnSizes = new double[]{70, 200};
double[] columnSizes = new double[]{70, 180};
JPanel pane = TableLayoutHelper.createTableLayoutPane(components, rowSizes, columnSizes);

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

@ -47,16 +47,15 @@ import java.util.List;
import static com.fine.theme.utils.FineUIScale.scale;
public class UIColorPickerPane extends BasicPane implements UIObserver {
private static final int MARGIN_TOP = scale(7);
private static final int MARGIN_LEFT = scale(5);
private static final int MARGIN_TOP = scale(10);
private static final int COLORGROUP_MARGIN_LEFT = scale(15);
private static final int OFF_HEIGHT = scale(6);
private static final int OFF_HEIGHT = scale(10);
private static final int COLOR_REC_HEIGHT = scale(40);
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(224);
private static final int LAYOUR_DET = scale(6);
private static final int LAYOUR_DET = scale(10);
public static final double VALUE = 100;
@ -610,10 +609,14 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
@Override
public void layoutContainer(Container parent) {
upControlPane.setBounds(getBoundX(), getBoundY(), UPCONTROLPANE_WIDTH, upControlPane.getPreferredSize().height + MARGIN_TOP);
stagePanel.setBounds(getBoundX(), upControlPane.getPreferredSize().height + scale(8) + getBoundY(), UPCONTROLPANE_WIDTH, stagePanel.getPreferredSize().height);
colorGroup.setBounds( getColorgroupMarginLeft (), 2 * getBoundY() + upControlPane.getPreferredSize().height + stagePanel.getPreferredSize().height + 2 * LAYOUR_DET, colorGroup.getPreferredSize().width, colorGroup.getPreferredSize().height + upControlPane.getPreferredSize().height);
textGroup.setBounds(colorGroup.getPreferredSize().width + getColorgroupMarginLeft (), upControlPane.getPreferredSize().height + stagePanel.getPreferredSize().height + 2 * LAYOUR_DET + getBoundY(), textGroup.getPreferredSize().width, textGroup.getPreferredSize().height);
upControlPane.setBounds(getBoundX(), getBoundY(),
getParent().getWidth(), upControlPane.getPreferredSize().height + LAYOUR_DET);
stagePanel.setBounds(getBoundX(), upControlPane.getPreferredSize().height + LAYOUR_DET + getBoundY(),
getParent().getWidth(), stagePanel.getPreferredSize().height);
colorGroup.setBounds( getColorgroupMarginLeft(), 2 * getBoundY() + upControlPane.getPreferredSize().height + stagePanel.getPreferredSize().height + 2 * LAYOUR_DET,
colorGroup.getPreferredSize().width, colorGroup.getPreferredSize().height + upControlPane.getPreferredSize().height);
textGroup.setBounds(colorGroup.getPreferredSize().width + getColorgroupMarginLeft(), upControlPane.getPreferredSize().height + stagePanel.getPreferredSize().height + 2 * LAYOUR_DET + getBoundY(),
textGroup.getPreferredSize().width, textGroup.getPreferredSize().height);
}
@Override
@ -640,9 +643,12 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
@Override
public void layoutContainer(Container parent) {
upControlPane.setBounds(getBoundX(), getBoundY(), getBoundWidth(), upControlPane.getPreferredSize().height);
colorGroup.setBounds(COLORGROUP_MARGIN_LEFT, 2 * MARGIN_TOP + upControlPane.getPreferredSize().height + LAYOUR_DET, colorGroup.getPreferredSize().width, colorGroup.getPreferredSize().height + upControlPane.getPreferredSize().height);
textGroup.setBounds(colorGroup.getPreferredSize().width + COLORGROUP_MARGIN_LEFT, MARGIN_TOP + upControlPane.getPreferredSize().height + LAYOUR_DET, textGroup.getPreferredSize().width, textGroup.getPreferredSize().height);
upControlPane.setBounds(getBoundX(), getBoundY(), getParent().getWidth(),
upControlPane.getPreferredSize().height);
colorGroup.setBounds(COLORGROUP_MARGIN_LEFT, 2 * MARGIN_TOP + upControlPane.getPreferredSize().height + LAYOUR_DET,
colorGroup.getPreferredSize().width, colorGroup.getPreferredSize().height + upControlPane.getPreferredSize().height);
textGroup.setBounds(colorGroup.getPreferredSize().width + COLORGROUP_MARGIN_LEFT, MARGIN_TOP + upControlPane.getPreferredSize().height + LAYOUR_DET,
textGroup.getPreferredSize().width, textGroup.getPreferredSize().height);
}
@Override

3
designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnConditionPane.java

@ -1,5 +1,6 @@
package com.fr.van.chart.column;
import com.fine.theme.utils.FineUIScale;
import com.fr.chart.base.AttrAlpha;
import com.fr.chart.base.AttrBackground;
import com.fr.chart.base.AttrBorder;
@ -41,7 +42,7 @@ public class VanChartColumnConditionPane extends DataSeriesConditionPane{
protected void initComponents() {
super.initComponents();
//添加全部条件属性后被遮挡
liteConditionPane.setPreferredSize(new Dimension(300, 400));
liteConditionPane.setPreferredSize(FineUIScale.scale(new Dimension(300, 400)));
}
@Override

10
designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/AbstractNormalMultiLineConditionPane.java

@ -45,15 +45,17 @@ public abstract class AbstractNormalMultiLineConditionPane extends ConditionAttr
JPanel pane = FRGUIPaneFactory.createBorderLayout_S_Pane();
pane.add(initContentPane());
this.add(row(column(cell(nameLabel), flex()).weight(0.2),
row(cell(initContentPane()).weight(1), flex()).weight(0.8)).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent());
this.add(row(
column(cell(nameLabel), flex()).weight(0.2),
cell(initContentPane()).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 5))
).getComponent(), BorderLayout.CENTER);
}
/**
* 添加删除按钮
*/
public void addCancel() {
this.add(column(fix(5), cell(cancel), flex()).getComponent(), BorderLayout.EAST);
this.add(column(cell(cancel), flex()).getComponent(), BorderLayout.EAST);
}
}

21
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/radar/RadarTableContentPane.java

@ -1,19 +1,16 @@
package com.fr.van.chart.designer.style.axis.radar;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.plugin.chart.radar.data.RadarYAxisTableDefinition;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.util.List;
public class RadarTableContentPane extends AbstractTableDataContentPane {
@ -29,13 +26,10 @@ public class RadarTableContentPane extends AbstractTableDataContentPane {
private void initAllComponent() {
categoryNameComboBox = new UIComboBox();
categoryNameComboBox.setPreferredSize(new Dimension(100, 20));
minValueComboBox = new UIComboBox();
minValueComboBox.setPreferredSize(new Dimension(100, 20));
maxValueComboBox = new UIComboBox();
maxValueComboBox.setPreferredSize(new Dimension(100, 20));
addAutoItem();
@ -47,18 +41,13 @@ public class RadarTableContentPane extends AbstractTableDataContentPane {
}
private JPanel getContentPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] row = {p, p, p};
double[] col = {p, f};
Component[][] components = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Category") + ":", SwingConstants.RIGHT), categoryNameComboBox},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Min_Value") + ":", SwingConstants.RIGHT), minValueComboBox},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Max_Value") + ":", SwingConstants.RIGHT), maxValueComboBox}
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Category")), categoryNameComboBox},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Min_Value")), minValueComboBox},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Max_Value")), maxValueComboBox}
};
return TableLayoutHelper.createTableLayoutPane(components, row, col);
return FineLayoutBuilder.commonLeftRightLayout(components);
}
@Override

5
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/radar/VanChartRadarYAxisPane.java

@ -6,6 +6,7 @@ import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icombobox.LineComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.plugin.chart.attr.axis.VanChartAxis;
import com.fr.plugin.chart.attr.axis.VanChartValueAxis;
import com.fr.stable.CoreConstants;
@ -38,7 +39,7 @@ public class VanChartRadarYAxisPane extends VanChartValueAxisPane {
new Component[]{createValueStylePane(), null},
};
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
return FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1, 0});
}
protected LineComboBox createLineComboBox() {
@ -57,7 +58,7 @@ public class VanChartRadarYAxisPane extends VanChartValueAxisPane {
centerPane.add(commenPane, Toolkit.i18nText("Fine-Design_Chart_Axis_Unified_Count"));
centerPane.add(tableDataPane, Toolkit.i18nText("Fine-Design_Chart_Respectively_Specified"));
JPanel contentPane = new JPanel(new BorderLayout());
JPanel contentPane = new JPanel(FRGUIPaneFactory.createScaledBorderLayout(0, 10));
contentPane.add(valueStyle, BorderLayout.NORTH);
contentPane.add(centerPane, BorderLayout.CENTER);
valueStyle.addActionListener(new ActionListener() {

Loading…
Cancel
Save