Browse Source

Pull request #14588: REPORT-127437 Newui

Merge in DESIGN/design from ~ZONGYU.WANG/design:newui to newui

* commit '2d971b36efed0f6124002be1851d77e9c413b501':
  REPORT-127437 fix:数据筛选缩放问题
  REPORT-127437 fix:数据字典增加类型问题修复
  REPORT-127437 fix: 新建 poly sheet 按钮缩放问题
  REPORT-127437 fix: 图表条件属性翻新,视觉问题调整
  REPORT-127437 fix: 视觉问题修复
newui
Zongyu.Wang-王宗雨 4 months ago
parent
commit
465380b516
  1. 10
      designer-base/src/main/java/com/fine/theme/light/ui/FineTableHeaderUI.java
  2. 2
      designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java
  3. 4
      designer-base/src/main/java/com/fr/design/condition/ObjectLiteConditionPane.java
  4. 15
      designer-base/src/main/java/com/fr/design/condition/SingleConditionPane.java
  5. 8
      designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/common/ChooseMark.java
  6. 3
      designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/rule/DesensitizationRuleChoosePane.java
  7. 22
      designer-base/src/main/java/com/fr/design/dialog/NotificationDialog.java
  8. 2
      designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java
  9. 1
      designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java
  10. 8
      designer-base/src/main/java/com/fr/design/gui/frpane/UICorrelationPane.java
  11. 13
      designer-base/src/main/java/com/fr/design/gui/itable/UITable.java
  12. 1
      designer-base/src/main/java/com/fr/design/gui/itable/UITableUI.java
  13. 1
      designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java
  14. 10
      designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java
  15. 11
      designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java
  16. 4
      designer-base/src/main/java/com/fr/design/present/dict/DictionaryPane.java
  17. 2
      designer-base/src/main/java/com/fr/design/style/AbstractSelectBox.java
  18. 4
      designer-base/src/main/java/com/fr/design/style/BorderPane.java
  19. 9
      designer-base/src/main/java/com/fr/design/style/color/ColorChooserPreview.java
  20. 4
      designer-base/src/main/java/com/fr/design/style/color/ColorSelectDetailPane.java
  21. 8
      designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java
  22. 10
      designer-base/src/main/java/com/fr/design/style/color/SwatchChooserPanel.java
  23. 3
      designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java
  24. 9
      designer-base/src/main/java/com/fr/env/VersionCheckMessageDialog.java
  25. 1
      designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties
  26. 2
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties
  27. 20
      designer-chart/src/main/java/com/fr/design/chart/comp/BorderAttriPane.java
  28. 5
      designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java
  29. 12
      designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/LabelAlphaPane.java
  30. 12
      designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/LabelBorderAttrPane.java
  31. 7
      designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/LabelContentsPane.java
  32. 3
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java
  33. 5
      designer-chart/src/main/java/com/fr/van/chart/designer/component/format/VanChartFormatPaneWithCheckBox.java
  34. 8
      designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartFieldListPane.java
  35. 30
      designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/AbstractNormalMultiLineConditionPane.java
  36. 10
      designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartFloatColorConditionPane.java
  37. 4
      designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartLabelConditionPane.java
  38. 13
      designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartSeriesColorConditionPane.java
  39. 5
      designer-realize/src/main/java/com/fr/design/condition/BackPane.java
  40. 2
      designer-realize/src/main/java/com/fr/design/condition/BorderHighlightPane.java
  41. 5
      designer-realize/src/main/java/com/fr/design/condition/FontPane.java
  42. 2
      designer-realize/src/main/java/com/fr/design/condition/ForeGroundPane.java
  43. 2
      designer-realize/src/main/java/com/fr/design/condition/HyperlinkPane.java
  44. 2
      designer-realize/src/main/java/com/fr/design/condition/NewRealValuePane.java
  45. 12
      designer-realize/src/main/java/com/fr/design/condition/PaddingPane.java
  46. 2
      designer-realize/src/main/java/com/fr/design/condition/PagePane.java
  47. 21
      designer-realize/src/main/java/com/fr/design/condition/PresentHighlightPane.java
  48. 2
      designer-realize/src/main/java/com/fr/design/condition/WHPane.java
  49. 2
      designer-realize/src/main/java/com/fr/design/condition/WidgetHighlightPane.java
  50. 5
      designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java
  51. 5
      designer-realize/src/main/java/com/fr/design/mainframe/cell/CellElementEditPane.java

10
designer-base/src/main/java/com/fine/theme/light/ui/FineTableHeaderUI.java

@ -15,6 +15,7 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.UIResource;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.JTableHeader;
import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics;
@ -26,6 +27,7 @@ import java.awt.Graphics;
* Created on
*/
public class FineTableHeaderUI extends FlatTableHeaderUI {
protected static Color selectionBackground = UIManager.getColor("Table.background");
@Override
public void installUI(JComponent c) {
@ -83,6 +85,7 @@ public class FineTableHeaderUI extends FlatTableHeaderUI {
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
Class<?> columnClass = table.getColumnClass(0);
Border border;
if (column == table.getColumnCount() - 1) {
border = BorderFactory.createCompoundBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, UIManager.getColor("defaultBorderColor")),
@ -91,7 +94,12 @@ public class FineTableHeaderUI extends FlatTableHeaderUI {
border = BorderFactory.createCompoundBorder(BorderFactory.createMatteBorder(0, 0, 1, 1, UIManager.getColor("defaultBorderColor")),
UIManager.getBorder("Table.cellNoFocusBorder"));
}
setBackground(UIManager.getColor("Table.background"));
if (isSelected && columnClass != Boolean.class) {
selectionBackground = UIManager.getColor( "Table.selectionBackground");
} else {
selectionBackground = UIManager.getColor("Table.background");
}
setBackground(selectionBackground);
setText(value == null ? StringUtils.BLANK : String.valueOf(value));
setBorder(border);
return this;

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++) {

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

@ -1,8 +1,7 @@
package com.fr.design.condition;
import java.awt.Color;
import java.awt.Insets;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@ -25,7 +24,7 @@ public abstract class SingleConditionPane<T> extends BasicPane {
}
public SingleConditionPane(boolean isRemove) {
this.setLayout(FRGUIPaneFactory.createLabelFlowLayout());
this.setLayout(FRGUIPaneFactory.createScaledBorderLayout(10, 0));
if (isRemove) {
if(cancel == null) {
@ -33,12 +32,20 @@ public abstract class SingleConditionPane<T> extends BasicPane {
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, 20));
cancel.setBorder(new ScaledEmptyBorder(0, 0, 0, 10));
cancel.setBackground(FlatUIUtils.getUIColor("default.background", new Color(246, 248, 250, 255)));
}
addCancel();
}
}
/**
* 添加删除按钮
*/
public void addCancel() {
this.add(cancel, BorderLayout.EAST);
}
ActionListener cancleListener = new ActionListener() {
public void actionPerformed(ActionEvent e) {
doCancel();

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

22
designer-base/src/main/java/com/fr/design/dialog/NotificationDialog.java

@ -1,9 +1,11 @@
package com.fr.design.dialog;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.concurrent.NamedThreadFactory;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
@ -42,7 +44,7 @@ public class NotificationDialog extends JDialog {
private UILabel messageText;
private NotificationDialogAction notificationDialogAction;
private ScheduledExecutorService TIMER;
private Dimension dialogSize = new Dimension(230, 95);
private Dimension dialogSize = FineUIScale.scale(new Dimension(230, 95));
public NotificationDialog(Frame owner, String title, boolean isModal, int messageType, String message, NotificationDialogAction action) {
this(owner, title, isModal, messageType, message, action, null);
@ -71,19 +73,19 @@ public class NotificationDialog extends JDialog {
setAutoRequestFocus(false);
setResizable(false);
JPanel body = FRGUIPaneFactory.createBorderLayout_L_Pane();
body.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
body.setBorder(new ScaledEmptyBorder(0, 0, 0, 0));
//消息内容
UILabel icon = new UILabel(getIconForType(messageType));
JPanel iconPanel = FRGUIPaneFactory.createBorderLayout_L_Pane();
iconPanel.setBorder(BorderFactory.createEmptyBorder(0, 5, 10, 8));
iconPanel.setBorder(new ScaledEmptyBorder(0, 10, 10, 10));
iconPanel.add(icon);
body.add(iconPanel, BorderLayout.WEST);
messageText = new UILabel(HTML_TAG_1 + message + HTML_TAG_2);
messageText.setForeground(new Color(51, 51, 52));
JPanel centerPanel = FRGUIPaneFactory.createBorderLayout_L_Pane();
centerPanel.setBorder(BorderFactory.createEmptyBorder(8, 0, 5, 20));
centerPanel.setBorder(new ScaledEmptyBorder(10, 0, 10, 10));
JScrollPane jScrollPane = new JScrollPane(messageText, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
jScrollPane.setBorder(BorderFactory.createEmptyBorder());
centerPanel.add(jScrollPane, BorderLayout.CENTER);
@ -161,21 +163,21 @@ public class NotificationDialog extends JDialog {
}
protected Icon getIconForType(int messageType) {
String propertyName;
String id;
switch (messageType) {
case 0:
propertyName = "OptionPane.circularErrorIcon";
id = "error";
break;
case 1:
propertyName = "OptionPane.newMessageIcon";
id = "new_information";
break;
case 2:
propertyName = "OptionPane.circularWarningIcon";
id = "warning";
break;
default:
return null;
}
return UIManager.getIcon(propertyName);
return new LazyIcon(id, 20);
}
public static Builder Builder() {

2
designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java

@ -710,7 +710,7 @@ public class MultiTemplateTabPane extends Row {
private boolean isOverListDown(int evtX) {
int maxWidth = getWidth() - scale(leadingWidth);
int maxWidth = getWidth() - scale(TRAILING_WIDTH);
return evtX >= (maxWidth + SMALLGAP) && evtX <= (getWidth() - SMALLGAP);
}

1
designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java

@ -151,6 +151,7 @@ public abstract class UIControlPane extends JControlPane {
cell(FRWidgetFactory.createLineWrapLabel(getAddItemText())),
cell(topToolBar).with(it -> {
it.setBorderPainted(true);
it.setPreferredSize(FineUIScale.scale(new Dimension(160, 24)));
it.setBorder(FineBorderFactory.createWrappedRoundBorder());
it.setBackground(FlatUIUtils.getUIColor("fill.normal", Color.WHITE));
}).weight(1.0)

8
designer-base/src/main/java/com/fr/design/gui/frpane/UICorrelationPane.java

@ -146,6 +146,7 @@ public class UICorrelationPane extends JPanel implements UIObserver {
@Override
public void actionPerformed(ActionEvent e) {
tablePane.addBlankLine();
tablePane.doParentRepaintEvent();
fireTargetChanged();
}
};
@ -154,13 +155,12 @@ public class UICorrelationPane extends JPanel implements UIObserver {
protected void initLayout() {
this.setLayout(new BorderLayout(0, scale(4)));
Column tableContent = column(
cell(header), cell(tablePane).with(it ->
it.setBorder(BorderFactory.createMatteBorder(0, 1, 0, 1,
cell(header), cell(tablePane).weight(1).with(it ->
it.setBorder(BorderFactory.createMatteBorder(0, 1, 1, 1,
FlatUIUtils.getUIColor("defaultBorderColor", Color.BLACK)
)))
).getComponent();
this.add(tableContent, BorderLayout.CENTER);
this.add(addButton, BorderLayout.SOUTH);
this.add(column(4, cell(tableContent), cell(addButton)).getComponent());
}
protected void initComponents() {

13
designer-base/src/main/java/com/fr/design/gui/itable/UITable.java

@ -18,6 +18,7 @@ import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableColumn;
import java.awt.AWTEvent;
import java.awt.Component;
import java.awt.Container;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.Toolkit;
@ -283,6 +284,18 @@ public class UITable extends JTable implements UIObserver {
return new UIDefaultTableCellEditor(new UITextField());
}
/**
* repaint 所有父类避免滚动条没有跟随 添加/删除 事件响应
*/
public void doParentRepaintEvent() {
Container parent = this.getParent();
while (parent != null) {
parent.revalidate();
parent.repaint();
parent = parent.getParent();
}
}
@Override
/**
*

1
designer-base/src/main/java/com/fr/design/gui/itable/UITableUI.java

@ -143,6 +143,7 @@ public class UITableUI extends BasicTableUI {
((UITable) table).removeLine(table.rowAtPoint(e.getPoint()));
((UITable) table).fireTargetChanged();
((UITable) table).getParent().doLayout();
((UITable) table).doParentRepaintEvent();
return;
}
}

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));
}

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

@ -1,5 +1,6 @@
package com.fr.design.hyperlink;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.BaseFormula;
import com.fr.design.actions.UpdateAction;
@ -41,9 +42,10 @@ import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
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.swing.ui.layout.Layouts.cell;
/**
* 热点链接部分 上方 定义特征 样式 报表 等属性的界面.
@ -152,7 +154,7 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
// 选择路径按钮
browserButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Select"));
browserButton.setPreferredSize(new Dimension(browserButton.getPreferredSize().width, 20));
browserButton.setPreferredSize(new Dimension(browserButton.getPreferredSize().width, FineUIScale.scale(20)));
browserButton.addActionListener(new ActionListener() {
@Override
@ -292,8 +294,8 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
showParameterInterface = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Parameter_UI_Display"));
content.add(row(4,
cell(postComboBox).weight(0.8),
cell(showParameterInterface).weight(0.2)
cell(postComboBox).weight(0.75),
cell(showParameterInterface).weight(0.25)
).getComponent());
return content;
}

11
designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java

@ -67,14 +67,13 @@ public class CheckFontInfoDialog extends JDialog implements ActionListener {
super(parent,true);
//提示信息
JPanel imagePanel = new JPanel();
imageLabel = new UILabel(new LazyIcon("warning"));
imageLabel = new UILabel(new LazyIcon("warning", 20));
imagePanel.add(imageLabel);
String link = LocaleLinkProvider.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT);
JPanel messagePanel = new JPanel(new FlowLayout());
JPanel messagePanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
MessageWithLink linkMessage = new MessageWithLink(Toolkit.i18nText("Fine_Designer_Check_Font_Message"),
Toolkit.i18nText("Fine_Designer_Check_Font_Install_Font"),
link);
linkMessage.setBorder(new ScaledEmptyBorder(0, 0, 0, 10));
messagePanel.add(linkMessage);
// 查看详情按钮
@ -84,8 +83,10 @@ public class CheckFontInfoDialog extends JDialog implements ActionListener {
detailLabel.setText(Toolkit.i18nText("Fine_Designer_Look_Detail"));
upInTopPanel = row(
column(flex(), cell(imageLabel), flex()).with(it -> it.setPreferredSize(new Dimension(FineUIScale.scale(30), it.getHeight()))),
cell(messagePanel)).getComponent();
10,
column(cell(imageLabel), flex()),
column(cell(messagePanel))).getComponent();
upInTopPanel.setBorder(new ScaledEmptyBorder(10, 10, 10, 10));
downInTopPanel = row(fix(30), row(cell(directUiLabel), cell(detailLabel), flex())).getComponent();
topPanel = column(cell(upInTopPanel), cell(downInTopPanel)).getComponent();

4
designer-base/src/main/java/com/fr/design/present/dict/DictionaryPane.java

@ -37,8 +37,8 @@ public class DictionaryPane extends UIComboBoxPane<Dictionary> implements DataCr
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Type_Set"), UILabel.LEFT)).weight(1),
cell(jcb).weight(2)
),
cell(cardPane)
).getComponent());
cell(cardPane).weight(1)
).weight(1).getComponent());
}
@Override

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);

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

@ -333,9 +333,9 @@ public class BorderPane extends BasicPane {
private BorderButton(int border) {
this.border = border;
if (border == BorderPane.EXTERNAL_BORDERS) {
this.setIcon(BaseUtils.readIcon("com/fr/design/images/m_format/out.png"));
this.setIcon(new LazyIcon("out"));
} else if(border == BorderPane.INSIDE_BORDERS) {
this.setIcon(BaseUtils.readIcon("com/fr/design/images/m_format/in.png"));
this.setIcon(new LazyIcon("in"));
}
this.setPreferredSize(FineUIScale.scale(new Dimension(40, 24)));
this.addActionListener(this);

9
designer-base/src/main/java/com/fr/design/style/color/ColorChooserPreview.java

@ -4,6 +4,7 @@ import javax.swing.*;
import java.awt.*;
import com.fine.theme.utils.FineUIScale;
import sun.swing.SwingUtilities2;
/**
@ -11,17 +12,17 @@ import sun.swing.SwingUtilities2;
*/
public class ColorChooserPreview extends JPanel {
private static final int SQUARE_SIZE = 25;
private static final int SQUARE_GAP = 5;
private static final int SQUARE_SIZE = FineUIScale.scale(25);
private static final int SQUARE_GAP = FineUIScale.scale(5);
/**
* 方形预览框三层嵌套框之间的间隔
*/
private static final int INNER_GAP = 5;
private static final int INNER_GAP = FineUIScale.scale(5);
private static final int INNER_GAP2 = (INNER_GAP * 2);
private static final int INNER_GAP3 = (INNER_GAP * 4);
private static final int TEXT_GAP = 5;
private static final int TEXT_GAP = FineUIScale.scale(5);
private static final int PREFERSIZE_TEXT_GAP = (TEXT_GAP * 3);
private static final int PREFERSIZE_SQUARE_GAP = (SQUARE_GAP * 2);

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() {

8
designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java

@ -638,7 +638,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
private JPanel createGradientPanel() {
return new JPanel() {
public Dimension getPreferredSize() {
return new Dimension(IMG_WIDTH, IMG_HEIGHT);
return FineUIScale.scale(new Dimension(IMG_WIDTH, IMG_HEIGHT));
}
public void paint(Graphics g) {
@ -657,7 +657,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
private JPanel createTrackPanel() {
return new JPanel() {
public Dimension getPreferredSize() {
return new Dimension(TRACK_WIDTH, IMG_HEIGHT);
return FineUIScale.scale(new Dimension(TRACK_WIDTH, IMG_HEIGHT));
}
public void paint(Graphics g) {
@ -718,7 +718,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
BUTTON_SPINNER_GAP,
row(fix((int) hRadio.getPreferredSize().getHeight()), cell(new UILabel("#")), flex()).with(it -> it.setPreferredSize(hRadio.getPreferredSize())),
cell(field),
cell(pane)
cell(pane).with(it -> it.setPreferredSize(new Dimension((int) pickColorButton.getPreferredSize().getWidth(), (int) pickColorButton.getPreferredSize().getHeight())))
)
).getComponent());
@ -790,7 +790,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
TextDocumentListener listen = new TextDocumentListener();
field = new UITextField();
field.setPreferredSize(FineUIScale.scale(new Dimension(hSpinner.getPreferredSize())));
field.setPreferredSize(new Dimension(hSpinner.getPreferredSize()));
field.getDocument().addDocumentListener(listen);
return column(

10
designer-base/src/main/java/com/fr/design/style/color/SwatchChooserPanel.java

@ -1,5 +1,7 @@
package com.fr.design.style.color;
import com.fine.theme.utils.FineUIScale;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
@ -68,8 +70,8 @@ public class SwatchChooserPanel extends AbstractColorChooserPanel{
int width = numCols * cellWidth + (numCols - 1) * gap;
Insets insets = getInsets();
return new Dimension(width + insets.left + insets.right,
height + insets.top + insets.bottom);
return FineUIScale.scale(new Dimension(width + insets.left + insets.right,
height + insets.top + insets.bottom));
}
/**
@ -509,8 +511,8 @@ public class SwatchChooserPanel extends AbstractColorChooserPanel{
Insets insets = parent.getInsets();
return new Dimension(insets.left + insets.right + xmax,
insets.top + insets.bottom + ymax);
return FineUIScale.scale(new Dimension(insets.left + insets.right + xmax,
insets.top + insets.bottom + ymax));
}

3
designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java

@ -33,6 +33,7 @@ import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.icombobox.UIComboBoxRenderer;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.icontainer.UIVerticalScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ilist.CheckBoxList;
import com.fr.design.gui.itable.FineUITable;
@ -171,7 +172,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
Dimension editTableDimension = createEditTablePreferredSize();
editTablePane.setBounds(0, 0, editTableDimension.width, editTableDimension.height);
keyColumnValuesTable = new KeyColumnNameValueTable();
editTablePane.add(new UIScrollPane(keyColumnValuesTable), BorderLayout.CENTER);
editTablePane.add(new UIVerticalScrollPane(keyColumnValuesTable), BorderLayout.CENTER);
keyColumnValuesTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
keyColumnValuesTable.setPreferredScrollableViewportSize(FineUIScale.scale(new Dimension(280, 150)));
keyColumnValuesTable.setShowHorizontalLines(true);

9
designer-base/src/main/java/com/fr/env/VersionCheckMessageDialog.java vendored

@ -1,5 +1,8 @@
package com.fr.env;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.versioncheck.VersionCheckUtils;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
@ -46,7 +49,7 @@ public class VersionCheckMessageDialog extends JDialog implements ActionListener
private void init(String message) {
JPanel imagePanel = new JPanel();
imageLabel = new UILabel(IOUtils.readIcon("com/fr/design/images/warnings/warning32.png"));
imageLabel = new UILabel(new LazyIcon("warning"));
imagePanel.add(imageLabel);
JPanel messagePanel = FRGUIPaneFactory.createVerticalFlowLayout_S_Pane(true);
UILabel messageText = new UILabel();
@ -54,7 +57,7 @@ public class VersionCheckMessageDialog extends JDialog implements ActionListener
messagePanel.add(messageText);
centerPanel = FRGUIPaneFactory.createBorderLayout_L_Pane();
centerPanel.setBorder(BorderFactory.createEmptyBorder(15, 10, 10, 10));
centerPanel.setBorder(new ScaledEmptyBorder(10, 10, 10, 10));
centerPanel.add(imagePanel, BorderLayout.WEST);
centerPanel.add(messagePanel, BorderLayout.CENTER);
@ -90,7 +93,7 @@ public class VersionCheckMessageDialog extends JDialog implements ActionListener
this.setTitle(Toolkit.i18nText("Fine-Design_Basic_Sync_Prompt"));
this.setResizable(false);
this.add(body, BorderLayout.NORTH);
this.setSize(new Dimension(GeneralContext.getLocale().equals(Locale.US) ? 300 : 280, 135));
this.setSize(FineUIScale.scale(new Dimension(GeneralContext.getLocale().equals(Locale.US) ? 300 : 280, 135)));
GUICoreUtils.centerWindow(this);
}

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

@ -911,6 +911,7 @@ Table.focusCellForeground = $Table.foreground
Table.background = $fill.normal
Table.selectionInactiveBackground = @selectionInactiveBackground
Table.selectionInactiveForeground = @selectionInactiveForeground
Table.selectionBackground = fade(#2576EF,12%)
Table.dropCellBackground = @dropCellBackground
Table.dropCellForeground = @dropCellForeground
Table.dropLineColor = @dropLineColor

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

@ -2,7 +2,7 @@
com.fr.design.mainframe.check.CheckButton=250*118
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=385*280
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.detail.label=450*30

20
designer-chart/src/main/java/com/fr/design/chart/comp/BorderAttriPane.java

@ -1,5 +1,6 @@
package com.fr.design.chart.comp;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.gui.ilable.UILabel;
import com.fr.stable.Constants;
@ -10,6 +11,9 @@ import com.fr.design.style.color.ColorSelectBox;
import java.awt.*;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
public class BorderAttriPane extends BasicPane {
private LineComboBox lineCombo;
@ -20,16 +24,14 @@ public class BorderAttriPane extends BasicPane {
}
public BorderAttriPane(String lineString, String colorSting) {
this.setLayout(new FlowLayout(FlowLayout.LEFT, 2, 0));
this.add(new UILabel(lineString + ":"));
this.add(lineCombo = new LineComboBox(CoreConstants.STRIKE_LINE_STYLE_ARRAY_4_CHART));
lineCombo.setPreferredSize(new Dimension(60, 18));
this.add(new UILabel(colorSting + ":"));
this.add(colorSelectBox = new ColorSelectBox(80));
colorSelectBox.setPreferredSize(new Dimension(60, 18));
this.setLayout(new BorderLayout());
lineCombo = new LineComboBox(CoreConstants.STRIKE_LINE_STYLE_ARRAY_4_CHART);
colorSelectBox = new ColorSelectBox(80);
colorSelectBox.setPreferredSize(FineUIScale.scale(new Dimension(60, 24)));
colorSelectBox.setSelectObject(null);
this.add(row(10, row(cell(new UILabel(lineString + ":")), cell(lineCombo)),
row(cell(new UILabel(colorSting + ":"))), cell(colorSelectBox)).getComponent(), BorderLayout.WEST);
}
public void setLineColor(Color color) {

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

@ -18,7 +18,6 @@ import javax.swing.JPanel;
import javax.swing.JScrollPane;
import java.util.Iterator;
import java.awt.BorderLayout;
import java.awt.Dimension;
/**
* Created by IntelliJ IDEA.
@ -68,8 +67,6 @@ public class DataSeriesConditionPane extends ConditionAttributesPane<ConditionAt
// 条件界面
pane.add(liteConditionPane = createListConditionPane(), BorderLayout.CENTER);
// kunsnat_size 加载属性之后 被遮挡, 最少的高度为300, 5个按钮
liteConditionPane.setPreferredSize(new Dimension(300, 300));
}
protected ChartConditionPane createListConditionPane() {
@ -163,6 +160,7 @@ public class DataSeriesConditionPane extends ConditionAttributesPane<ConditionAt
ConditionAttr ca = new ConditionAttr();
updateBeanInvoked(ca);
checkConditionPane();
return ca;
}
@ -170,6 +168,7 @@ public class DataSeriesConditionPane extends ConditionAttributesPane<ConditionAt
public void updateBean(ConditionAttr condition) {
condition.removeAll();
updateBeanInvoked(condition);
checkConditionPane();
}
@Override

12
designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/LabelAlphaPane.java

@ -1,5 +1,7 @@
package com.fr.design.chart.series.SeriesCondition;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.chart.base.AttrAlpha;
import com.fr.chart.base.DataSeriesCondition;
import com.fr.design.condition.ConditionAttrSingleConditionPane;
@ -12,6 +14,9 @@ import com.fr.design.gui.ilable.UILabel;
import javax.swing.*;
import java.awt.*;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* @author richie
* @date 2015-03-26
@ -39,10 +44,11 @@ public class LabelAlphaPane extends ConditionAttrSingleConditionPane<DataSeriesC
panel.add(label, BorderLayout.WEST);
panel.add(alphaPane, BorderLayout.CENTER);
panel.setPreferredSize(new Dimension(PANEL_WIDTH, PANEL_HIGHT));
panel.setPreferredSize(FineUIScale.scale(new Dimension(PANEL_WIDTH, PANEL_HIGHT)));
this.add(row(cell(nameLabel).weight(0.2), cell(panel).weight(0.8))
.with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent());
this.add(nameLabel);
this.add(panel);
}
@Override

12
designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/LabelBorderAttrPane.java

@ -1,5 +1,6 @@
package com.fr.design.chart.series.SeriesCondition;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.chart.base.DataSeriesCondition;
import com.fr.design.chart.comp.BorderAttriPane;
import com.fr.design.condition.ConditionAttrSingleConditionPane;
@ -7,6 +8,9 @@ import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.stable.StringUtils;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* @author richie
* @date 2015-03-26
@ -25,12 +29,16 @@ public abstract class LabelBorderAttrPane extends ConditionAttrSingleConditionPa
super(conditionAttributesPane, isRemove);
nameLabel = new UILabel(label);
linePane = initBorderAttrPane();
nameLabel.setVisible(false);
if (isRemove) {
this.add(nameLabel);
nameLabel.setVisible(true);
}
this.add(linePane);
this.labelName = label;
this.add(row(cell(nameLabel).weight(0.2), cell(linePane).weight(0.8))
.with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent());
}
protected BorderAttriPane initBorderAttrPane(){

7
designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/LabelContentsPane.java

@ -54,6 +54,13 @@ public class LabelContentsPane extends ConditionAttrSingleConditionPane<DataSeri
this.add(pane);
}
/**
* 添加删除按钮
*/
public void addCancel() {
}
@Override
public String nameForPopupMenuItem() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Label_Content");

3
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.chart.gui.data;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.Utils;
import com.fr.base.chart.chartdata.TopDefinitionProvider;
@ -355,7 +356,7 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
@Override
public Dimension getPreferredSize() {
Dimension dim = super.getPreferredSize();
dim.height = FIL_HEIGHT;
dim.height = FineUIScale.scale(FIL_HEIGHT);
return dim;
}

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);
}

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

@ -1,5 +1,6 @@
package com.fr.van.chart.designer.other.condition.item;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.chart.base.DataSeriesCondition;
import com.fr.chart.chartattr.Plot;
import com.fr.design.condition.ConditionAttrSingleConditionPane;
@ -13,6 +14,12 @@ import javax.swing.JPanel;
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.column;
import static com.fine.swing.ui.layout.Layouts.fix;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* Created by Mitisky on 16/5/23.
* 标签等有多行设置的条件属性,需要重新布局,使标签位于左上方
@ -35,23 +42,18 @@ public abstract class AbstractNormalMultiLineConditionPane extends ConditionAttr
super(conditionAttributesPane, true);
this.plot = (VanChartPlot) plot;
UILabel nameLabel = new UILabel(getItemLabelString());
JPanel pane = FRGUIPaneFactory.createBorderLayout_S_Pane();
pane.add(initContentPane());
this.removeAll();
this.setLayout(FRGUIPaneFactory.createBorderLayout());
// 重新布局
JPanel northPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
northPane.setPreferredSize(new Dimension(100, 30));
this.add(northPane, BorderLayout.NORTH);
northPane.add(cancel);
northPane.add(nameLabel);
pane.setBorder(BorderFactory.createEmptyBorder(6, 50, 0, 300));
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());
pane.add(initContentPane());
}
this.add(pane);
/**
* 添加删除按钮
*/
public void addCancel() {
this.add(column(fix(5), cell(cancel), flex()).getComponent(), BorderLayout.EAST);
}
}

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

@ -1,5 +1,6 @@
package com.fr.van.chart.designer.other.condition.item;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.chart.base.DataSeriesCondition;
import com.fr.design.condition.ConditionAttrSingleConditionPane;
import com.fr.design.condition.ConditionAttributesPane;
@ -8,6 +9,9 @@ import com.fr.design.style.color.ColorSelectBox;
import com.fr.plugin.chart.base.AttrFloatColor;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* 条件属性 悬浮颜色
*/
@ -26,10 +30,12 @@ public class VanChartFloatColorConditionPane extends ConditionAttrSingleConditio
UILabel nameLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Float_Color"));
colorSelectionPane = new ColorSelectBox(80);
nameLabel.setVisible(false);
if (isRemove) {
this.add(nameLabel);
nameLabel.setVisible(true);
}
this.add(colorSelectionPane);
this.add(row(cell(nameLabel).weight(0.2), cell(colorSelectionPane).weight(0.8))
.with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent());
}
/**

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

@ -30,10 +30,10 @@ public class VanChartLabelConditionPane extends AbstractNormalMultiLineCondition
double e = 220;
Component[][] components = new Component[][]{
new Component[]{null, dataLabelContentsPane}
new Component[]{dataLabelContentsPane}
};
return TableLayoutHelper.createTableLayoutPane(components, new double[]{p}, new double[]{f, e});
return TableLayoutHelper.createTableLayoutPane(components, new double[]{p}, new double[]{e});
}
protected VanChartPlotLabelPane createLabelPane() {

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

@ -1,5 +1,6 @@
package com.fr.van.chart.designer.other.condition.item;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.background.ColorBackground;
import com.fr.chart.base.AttrBackground;
import com.fr.chart.base.DataSeriesCondition;
@ -8,6 +9,11 @@ import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.style.color.ColorSelectBox;
import java.awt.*;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* 条件属性 配色系列背景色
@ -27,11 +33,12 @@ public class VanChartSeriesColorConditionPane extends ConditionAttrSingleConditi
super(conditionAttributesPane, isRemove);
nameLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Match_Color"));
colorSelectionPane = new ColorSelectBox(80);
nameLabel.setVisible(false);
if (isRemove) {
this.add(nameLabel);
nameLabel.setVisible(true);
}
this.add(colorSelectionPane);
this.add(row(cell(nameLabel).weight(0.2), cell(colorSelectionPane).weight(0.8))
.with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent());
}

5
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,16 +59,15 @@ 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());
this.add(row(10, cell(backgroundLabel).weight(0.2), row(
10,
cell(backgroundPreviewPane),
cell(editBackgroundButton),
cell(backScopeComboBox)).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
this.add(cancel, BorderLayout.EAST);
}
@Override

2
designer-realize/src/main/java/com/fr/design/condition/BorderHighlightPane.java

@ -79,12 +79,10 @@ public class BorderHighlightPane extends ConditionAttrSingleConditionPane<Highli
UILabel borderLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Border"));
this.setLayout(new BorderLayout());
this.add(row(10, cell(borderLabel).weight(0.2), row(
10,
cell(borderButton)).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
this.add(cancel, BorderLayout.EAST);
}
@Override

5
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,16 +63,15 @@ 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());
this.add(row(10, cell(fontLabel).weight(0.2), row(
10,
cell(frFontPreviewPane),
cell(editFRFontButton),
cell(fontScopeComboBox)).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
this.add(cancel, BorderLayout.EAST);
}
@Override

2
designer-realize/src/main/java/com/fr/design/condition/ForeGroundPane.java

@ -39,13 +39,11 @@ public class ForeGroundPane extends ConditionAttrSingleConditionPane<HighlightAc
this.foreScopeComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX);
this.foregroundColorPane.setSelectObject(Color.black);
this.setLayout(new BorderLayout());
this.add(row(10, cell(foregroundLabel).weight(0.2), row(
10,
cell(foregroundColorPane),
cell(foreScopeComboBox)).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
this.add(cancel, BorderLayout.EAST);
}
@Override

2
designer-realize/src/main/java/com/fr/design/condition/HyperlinkPane.java

@ -68,14 +68,12 @@ public class HyperlinkPane extends ConditionAttrSingleConditionPane<HighlightAct
useHyperlink = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Use_Links"));
useHyperlink.addActionListener(l);
this.setLayout(new BorderLayout());
this.add(row(10, cell(hyperlinkLabel).weight(0.2), row(
10,
cell(typeField),
cell(hyperlinkButton),
cell(useHyperlink)).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
this.add(cancel, BorderLayout.EAST);
}
@Override

2
designer-realize/src/main/java/com/fr/design/condition/NewRealValuePane.java

@ -26,12 +26,10 @@ public class NewRealValuePane extends ConditionAttrSingleConditionPane<Highlight
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_New_Value") + ":");
valueEditor = ValueEditorPaneFactory.createBasicValueEditorPane();
this.setLayout(new BorderLayout());
this.add(row(10, cell(label).weight(0.2), row(
10,
cell(valueEditor)).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
this.add(cancel, BorderLayout.EAST);
}
@Override

12
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;
@ -70,14 +71,19 @@ public class PaddingPane extends ConditionAttrSingleConditionPane<HighlightActio
refreshIndentationUnit();
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)),
column(5, cell(paddingScopeComboBox).weight(0.5), flex(0.5))).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent());
}
/**
* 添加删除按钮
*/
public void addCancel() {
this.add(column(5, cell(cancel).weight(0.5), flex(0.5)).getComponent(), BorderLayout.EAST);
}

2
designer-realize/src/main/java/com/fr/design/condition/PagePane.java

@ -35,12 +35,10 @@ public class PagePane extends ConditionAttrSingleConditionPane<HighlightAction>
this.pageComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX);
this.pageComboBox.setSelectedIndex(0);
this.setLayout(new BorderLayout());
this.add(row(10, cell(pageLabel).weight(0.2), row(
10,
cell(pageComboBox)).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
this.add(cancel, BorderLayout.EAST);
}
@Override

21
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,36 +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);
}
@Override

2
designer-realize/src/main/java/com/fr/design/condition/WHPane.java

@ -38,13 +38,11 @@ public abstract class WHPane extends ConditionAttrSingleConditionPane<HighlightA
this.spinner.setValue(new Integer(0));
this.locString = locString;
this.setLayout(new BorderLayout());
this.add(row(10, cell(label).weight(0.2), row(
10,
cell(spinner),
cell(unitLabel)).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
this.add(cancel, BorderLayout.EAST);
}
@Override

2
designer-realize/src/main/java/com/fr/design/condition/WidgetHighlightPane.java

@ -100,14 +100,12 @@ public class WidgetHighlightPane extends ConditionAttrSingleConditionPane<Highli
});
this.setLayout(new BorderLayout());
this.add(row(10, cell(widgetLabel).weight(0.2), row(
10,
cell(box),
cell(widgetButton),
cell(useWidget)).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
this.add(cancel, BorderLayout.EAST);
}
@Override

5
designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java

@ -55,6 +55,7 @@ import java.awt.geom.RoundRectangle2D;
import java.util.ArrayList;
import java.util.List;
import static com.fine.theme.utils.FineUIScale.scale;
import static com.fine.theme.utils.FineUIStyle.LIGHT_GREY;
@ -579,9 +580,9 @@ public class SheetNameTabPane extends JPanel implements MouseListener, MouseMoti
}
private void processLeftMouseButton(int evtX){
if (evtX > iconLocation && evtX < iconLocation + GRID_TOSHEET_RIGHT) {
if (evtX > iconLocation && evtX < iconLocation + scale(GRID_TOSHEET_RIGHT)) {
firstInsertActionPerformed();
} else if (evtX > iconLocation + POLY_TOSHEET_LEFT && evtX < iconLocation + POLY_TOSHEET_RIGHT) {
} else if (evtX > iconLocation + scale(POLY_TOSHEET_LEFT) && evtX < iconLocation + scale(POLY_TOSHEET_RIGHT)) {
new PolyReportInsertAction().actionPerformed(null);
}

5
designer-realize/src/main/java/com/fr/design/mainframe/cell/CellElementEditPane.java

@ -40,6 +40,7 @@ import static com.fine.swing.ui.layout.Layouts.cell;
*/
public class CellElementEditPane extends BasicPane {
private static final int LEFT_BORDER = 10;
private static final int BOTTOM_BORDER = 10;
private static final int RIGHT_BORDER = 10;
private List<AbstractCellAttrPane> paneList;
private TemplateCellElement cellelement;
@ -77,8 +78,8 @@ public class CellElementEditPane extends BasicPane {
this.setLayout(new BorderLayout());
this.add(Layouts.column(
cell(tabsHeaderIconPane),
cell(center)
).with(it -> it.setBorder(new ScaledEmptyBorder(0,LEFT_BORDER,0,RIGHT_BORDER))).getComponent());
cell(center).weight(1)
).with(it -> it.setBorder(new ScaledEmptyBorder(0,LEFT_BORDER, BOTTOM_BORDER, RIGHT_BORDER))).getComponent());
}

Loading…
Cancel
Save