Browse Source

REPORT-127437 fix: 视觉问题修复

newui
lemon 5 months ago
parent
commit
0f217212bd
  1. 2
      designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java
  2. 4
      designer-base/src/main/java/com/fr/design/condition/ObjectLiteConditionPane.java
  3. 8
      designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/common/ChooseMark.java
  4. 3
      designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/rule/DesensitizationRuleChoosePane.java
  5. 1
      designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java
  6. 2
      designer-base/src/main/java/com/fr/design/style/AbstractSelectBox.java
  7. 3
      designer-base/src/main/java/com/fr/design/style/color/ColorPicker.java
  8. 4
      designer-base/src/main/java/com/fr/design/style/color/ColorSelectDetailPane.java
  9. 5
      designer-chart/src/main/java/com/fr/van/chart/designer/component/format/VanChartFormatPaneWithCheckBox.java
  10. 8
      designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartFieldListPane.java
  11. 3
      designer-realize/src/main/java/com/fr/design/condition/BackPane.java
  12. 3
      designer-realize/src/main/java/com/fr/design/condition/FontPane.java
  13. 6
      designer-realize/src/main/java/com/fr/design/condition/PaddingPane.java
  14. 19
      designer-realize/src/main/java/com/fr/design/condition/PresentHighlightPane.java

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

@ -33,7 +33,7 @@ import static com.fine.swing.ui.layout.Layouts.row;
@Open
public abstract class ConditionAttributesPane<T> extends BasicBeanPane<T> {
private static final int MAT_HEIGHT = 120;
private static final int MAT_HEIGHT = FineUIScale.scale(120);
protected CellHighlightAddMenuDef menuDef;
protected JPanel selectedItemPane;

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

@ -25,6 +25,9 @@ import com.fr.design.editor.ValueEditorPaneFactory;
import com.fr.stable.StringUtils;
import static com.fine.theme.utils.FineClientProperties.ADAPTIVE_COMBO_BOX;
import static com.fine.theme.utils.FineClientProperties.COMBO_BOX_TYPE;
public class ObjectLiteConditionPane extends LiteConditionPane<ObjectCondition> {
@Override
@ -60,6 +63,7 @@ public class ObjectLiteConditionPane extends LiteConditionPane<ObjectCondition>
this.setLayout(FRGUIPaneFactory.createBorderLayout());
// condition operation
conditionOPComboBox = new UIComboBox();
conditionOPComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX);
DefaultComboBoxModel opComboBoxModel = (DefaultComboBoxModel) conditionOPComboBox.getModel();
int[] allOperators = Compare.getAllOperators();
for (int i = 0; i < allOperators.length; i++) {

8
designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/common/ChooseMark.java

@ -14,6 +14,10 @@ import java.awt.BorderLayout;
import java.awt.Color;
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;
/**
* 标记选中的CellEditor
*
@ -36,7 +40,7 @@ public class ChooseMark extends AbstractCellEditor implements TableCellEditor, T
@Override
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
selectedButton.setSelected(isSelected);
pane.add(this.selectedButton);
pane.add(row(flex(), cell(selectedButton), flex()).getComponent());
return pane;
}
@ -50,7 +54,7 @@ public class ChooseMark extends AbstractCellEditor implements TableCellEditor, T
pane.removeAll();
selectedButton = new UIRadioButton();
selectedButton.setSelected(isSelected);
pane.add(this.selectedButton);
pane.add(row(flex(), cell(selectedButton), flex()).getComponent());
return pane;
}
}

3
designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/rule/DesensitizationRuleChoosePane.java

@ -1,6 +1,7 @@
package com.fr.design.data.datapane.preview.desensitization.view.rule;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.fr.base.svg.IconUtils;
import com.fr.data.desensitize.rule.DesensitizationRuleManager;
@ -134,7 +135,7 @@ public class DesensitizationRuleChoosePane extends JPanel {
this.setDefaultRenderer(ChooseMark.class, new ChooseMark());
this.setDefaultEditor(DesensitizationRuleStatusPane.class, new DesensitizationRuleStatusPane());
this.setDefaultRenderer(DesensitizationRuleStatusPane.class, new DesensitizationRuleStatusPane());
this.createTable().getColumnModel().getColumn(0).setMaxWidth(20);
this.createTable().getColumnModel().getColumn(0).setMaxWidth(FineUIScale.scale(28));
}
@Override

1
designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java

@ -76,7 +76,6 @@ public class UITableEditorPane<T> extends BasicPane {
controlPane.add(content == null ? l : content, BorderLayout.WEST);
pane.add(Layouts.column(LayoutConstants.HGAP_LARGE, Layouts.cell(controlPane), Layouts.cell(scrollPane).weight(1)).getComponent());
pane.add(Layouts.column(10, Layouts.cell(controlPane), Layouts.cell(scrollPane).weight(1)).getComponent());
this.editTable.setRowHeight(FineUIScale.scale(24));
}

2
designer-base/src/main/java/com/fr/design/style/AbstractSelectBox.java

@ -47,7 +47,7 @@ public abstract class AbstractSelectBox<T> extends AbstractPopBox implements Mou
displayPane.setBorder(null);
displayPane.setOpaque(false);
displayPane.add(displayComponent, BorderLayout.CENTER);
displayComponent.setSize(new Dimension(preWidth, displayPane.getPreferredSize().height));
displayComponent.setSize(new Dimension(FineUIScale.scale(preWidth), displayPane.getPreferredSize().height));
// 添加事件监听
displayComponent.addMouseListener(mouseListener);
triggerButton.addMouseListener(mouseListener);

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

@ -4,6 +4,7 @@ package com.fr.design.style.color;
* Created by plough on 2016/12/22.
*/
import com.fine.theme.utils.FineUIScale;
import com.fr.design.DesignerEnvManager;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.IOUtils;
@ -25,7 +26,7 @@ public class ColorPicker extends JDialog implements ActionListener {
private Container container = getContentPane(); // 主容器
private int setCoordinateX; // 取色框x坐标
private int setCoordinateY; // 取色框y坐标
private int colorPickerSize = 190; // 取色框尺寸
private int colorPickerSize = FineUIScale.scale(190); // 取色框尺寸
private int scaleFactor = 16; // 放大倍数
private ColorPickerPanel colorPickerPanel = new ColorPickerPanel(scaleFactor); // 取色框内容面板

4
designer-base/src/main/java/com/fr/design/style/color/ColorSelectDetailPane.java

@ -104,7 +104,9 @@ public class ColorSelectDetailPane extends BasicPane {
column(flex(), cell(colorChooserPreview), flex()),
flex()
).getComponent());
add(initCenterPane());
JPanel center = initCenterPane();
center.setBorder(new ScaledEmptyBorder(10, 0, 0, 0));
add(center);
}
private FineTabbedPane buildTabbedPane() {

5
designer-chart/src/main/java/com/fr/van/chart/designer/component/format/VanChartFormatPaneWithCheckBox.java

@ -1,5 +1,6 @@
package com.fr.van.chart.designer.component.format;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.Style;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.design.gui.frpane.UIBubbleFloatPane;
@ -79,8 +80,8 @@ public abstract class VanChartFormatPaneWithCheckBox extends JPanel{
formatPane = createFormatPane();
}
Point comPoint = formatButton.getLocationOnScreen();
Point arrowPoint = new Point(comPoint.x +formatButton.getWidth() - 25, comPoint.y + formatButton.getHeight());
UIBubbleFloatPane<Style> pane = new UIBubbleFloatPane(Constants.LEFT, arrowPoint, formatPane, 258, 255) {
Point arrowPoint = new Point(comPoint.x +formatButton.getWidth() - FineUIScale.scale(25), comPoint.y + formatButton.getHeight());
UIBubbleFloatPane<Style> pane = new UIBubbleFloatPane(Constants.LEFT, arrowPoint, formatPane, FineUIScale.scale(258), FineUIScale.scale(255)) {
@Override
public void updateContentPane() {

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

@ -1,5 +1,7 @@
package com.fr.van.chart.designer.component.richText;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.data.util.function.AbstractDataFunction;
import com.fr.data.util.function.DataFunction;
import com.fr.design.event.UIObserverListener;
@ -113,8 +115,8 @@ public class VanChartFieldListPane extends JPanel {
addDefaultFieldButton(fieldPane);
fieldPane.setPreferredSize(new Dimension(FIELD_ADD_W, getDefaultFieldButtonList().size() * FIELD_ADD_H));
fieldPane.setBorder(BorderFactory.createEmptyBorder(5, 5, 0, 0));
fieldPane.setPreferredSize(FineUIScale.scale(new Dimension(FIELD_ADD_W, getDefaultFieldButtonList().size() * FIELD_ADD_H)));
fieldPane.setBorder(new ScaledEmptyBorder(5, 5, 0, 0));
return fieldPane;
}
@ -160,7 +162,7 @@ public class VanChartFieldListPane extends JPanel {
tableFieldButtonList.add(fieldButton);
}
tableField.setPreferredSize(new Dimension(FIELD_ADD_W, tableFieldNameList.size() * FIELD_ADD_H));
tableField.setPreferredSize(FineUIScale.scale(new Dimension(FIELD_ADD_W, tableFieldNameList.size() * FIELD_ADD_H)));
return TableLayout4VanChartHelper.createExpandablePaneWithTitleTopGap(Toolkit.i18nText("Fine-Design_Report_Table_Field"), tableField);
}

3
designer-realize/src/main/java/com/fr/design/condition/BackPane.java

@ -21,6 +21,8 @@ import java.awt.event.ActionListener;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.theme.utils.FineClientProperties.ADAPTIVE_COMBO_BOX;
import static com.fine.theme.utils.FineClientProperties.COMBO_BOX_TYPE;
/**
* @author richie
@ -57,6 +59,7 @@ public class BackPane extends ConditionAttrSingleConditionPane<HighlightAction>
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Current_Cell"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Current_Row"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Current_Column") });
this.backScopeComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX);
this.backgroundPreviewPane.setBackgroundObject(ColorBackground.getInstance(Color.WHITE));
this.setLayout(new BorderLayout());

3
designer-realize/src/main/java/com/fr/design/condition/FontPane.java

@ -22,6 +22,8 @@ import java.awt.event.ActionListener;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.theme.utils.FineClientProperties.ADAPTIVE_COMBO_BOX;
import static com.fine.theme.utils.FineClientProperties.COMBO_BOX_TYPE;
/**
* @author richie
@ -61,6 +63,7 @@ public class FontPane extends ConditionAttrSingleConditionPane<HighlightAction>
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Current_Cell"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Current_Row"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Current_Column") });
this.fontScopeComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX);
this.frFontPreviewPane.setFontObject(DesignUtils.getDefaultGUIFont());
this.setLayout(new BorderLayout());

6
designer-realize/src/main/java/com/fr/design/condition/PaddingPane.java

@ -1,5 +1,6 @@
package com.fr.design.condition;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.fun.IndentationUnitProcessor;
@ -17,7 +18,7 @@ import com.fr.report.cell.cellattr.highlight.HighlightAction;
import com.fr.report.cell.cellattr.highlight.PaddingHighlightAction;
import javax.swing.SpinnerNumberModel;
import java.awt.BorderLayout;
import java.awt.*;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
@ -71,7 +72,8 @@ public class PaddingPane extends ConditionAttrSingleConditionPane<HighlightActio
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Sytle_Indentation"));
this.setLayout(new BorderLayout());
this.add(row(10, column(cell(label).weight(0.5), flex(0.5)).weight(0.2), row(
this.add(row(10, column(5, cell(label).weight(0.5), flex(0.5)).weight(0.2)
.with(it -> it.setPreferredSize(new Dimension(-1, FineUIScale.scale(53)))), row(
10,
column(5, cell(paddingLeftSpinner).weight(0.5),cell(paddingLeft).weight(0.5)),
column(5, cell(paddingRightSpinner).weight(0.5),cell(paddingRight).weight(0.5)),

19
designer-realize/src/main/java/com/fr/design/condition/PresentHighlightPane.java

@ -24,6 +24,8 @@ import java.awt.event.ItemListener;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.theme.utils.FineClientProperties.ADAPTIVE_COMBO_BOX;
import static com.fine.theme.utils.FineClientProperties.COMBO_BOX_TYPE;
/**
* @author richie
@ -64,34 +66,37 @@ public class PresentHighlightPane extends ConditionAttrSingleConditionPane<Highl
}
});
// this.valueTextField.setText("");
JPanel type = new JPanel(new BorderLayout());
valueEditor = ValueEditorPaneFactory.createBasicValueEditorPane();
type.add(valueEditor);
presentComboBox.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
if (presentComboBox.getSelectedIndex() == 1){
if (valueEditor.getParent() == PresentHighlightPane.this) {
PresentHighlightPane.this.remove(valueEditor);
if (valueEditor.getParent() == type) {
type.remove(valueEditor);
}
PresentHighlightPane.this.add(editButton);
type.add(editButton);
PresentHighlightPane.this.validate();
PresentHighlightPane.this.repaint();
} else {
if (editButton.getParent() == PresentHighlightPane.this) {
PresentHighlightPane.this.remove(editButton);
if (editButton.getParent() == type) {
type.remove(editButton);
}
PresentHighlightPane.this.add(valueEditor);
type.add(valueEditor);
PresentHighlightPane.this.validate();
PresentHighlightPane.this.repaint();
}
}
});
presentComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX);
this.setLayout(new BorderLayout());
this.add(row(10, cell(label).weight(0.2), row(
10,
cell(presentComboBox),
cell(valueEditor)).weight(0.8)
cell(type)).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
this.add(cancel, BorderLayout.EAST);
}

Loading…
Cancel
Save