diff --git a/designer-base/src/main/java/com/fine/theme/utils/FineUIScale.java b/designer-base/src/main/java/com/fine/theme/utils/FineUIScale.java
index 6297166c78..ddde68539b 100644
--- a/designer-base/src/main/java/com/fine/theme/utils/FineUIScale.java
+++ b/designer-base/src/main/java/com/fine/theme/utils/FineUIScale.java
@@ -83,4 +83,16 @@ public class FineUIScale {
public static Insets scale(Insets insets) {
return UIScale.scale(insets);
}
+
+ /**
+ * Creates a scaled {@link Dimension} object based on the specified width and height.
+ *
+ * This method uses the current user scale factor to adjust the provided width and height values:
+ * - If the user scale factor is 1 (no scaling), the original width and height values are returned unchanged.
+ * - If the user scale factor is different from 1, a new {@link Dimension} instance is created and returned,
+ * with the width and height values scaled according to the user scale factor.
+ */
+ public static Dimension createScaleDimension(int width, int height) {
+ return scale(new Dimension(width, height));
+ }
}
diff --git a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java
index 6324f32b9f..4de6ab6045 100644
--- a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java
+++ b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java
@@ -1,6 +1,7 @@
package com.fr.design.actions.file;
import com.fine.swing.ui.layout.Row;
+import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIStyle;
@@ -731,10 +732,10 @@ public class PreferencePane extends BasicPane {
private Component createColorSettingPane() {
// Color Setting Pane
- gridLineColorTBButton = new UINoThemeColorButton(IOUtils.readIcon("/com/fr/design/images/gui/color/foreground.png"));
+ gridLineColorTBButton = new UINoThemeColorButton(new LazyIcon("foreground"));
gridLineColorTBButton.setEnabled(this.isEnabled());
- paginationLineColorTBButton = new UINoThemeColorButton(IOUtils.readIcon("/com/fr/design/images/gui/color/foreground.png"));
+ paginationLineColorTBButton = new UINoThemeColorButton(new LazyIcon("foreground"));
paginationLineColorTBButton.setEnabled(this.isEnabled());
JPanel colorPanel = row(10,
diff --git a/designer-base/src/main/java/com/fr/design/editor/ValueEditorPane.java b/designer-base/src/main/java/com/fr/design/editor/ValueEditorPane.java
index 5822570e1a..cbfe35b0ff 100644
--- a/designer-base/src/main/java/com/fr/design/editor/ValueEditorPane.java
+++ b/designer-base/src/main/java/com/fr/design/editor/ValueEditorPane.java
@@ -58,7 +58,7 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName
}
public ValueEditorPane(Editor[] cards, String popupName, String textEditorValue) {
- initComponents(cards, popupName, textEditorValue, 200);
+ initComponents(cards, popupName, textEditorValue, FineUIScale.scale(200));
}
public ValueEditorPane(Editor[] cards, String popupName, String textEditorValue, int centerPaneWidth) {
diff --git a/designer-base/src/main/java/com/fr/design/formula/DefaultTinyFormulaPane.java b/designer-base/src/main/java/com/fr/design/formula/DefaultTinyFormulaPane.java
index 05053eec4f..7b69f306d5 100644
--- a/designer-base/src/main/java/com/fr/design/formula/DefaultTinyFormulaPane.java
+++ b/designer-base/src/main/java/com/fr/design/formula/DefaultTinyFormulaPane.java
@@ -1,6 +1,14 @@
package com.fr.design.formula;
+import com.fine.theme.utils.FineUIScale;
import com.fr.base.BaseFormula;
+import com.fr.design.gui.ilable.UILabel;
+import java.awt.Component;
+import java.awt.BorderLayout;
+
+import static com.fine.swing.ui.layout.Layouts.cell;
+import static com.fine.swing.ui.layout.Layouts.row;
+import static com.fine.swing.ui.layout.Layouts.flex;
/**
* @author Carlson
@@ -10,8 +18,44 @@ import com.fr.base.BaseFormula;
**/
public class DefaultTinyFormulaPane extends TinyFormulaPane{
+ /**
+ * 默认构造方法
+ * 一个输入框和一个F(x)按钮。
+ */
+ public DefaultTinyFormulaPane() {
+ this.initComponents();
+ this.initLayout();
+ }
+
+ /**
+ * 带标题的构造方法
+ * 当需要显示标题时使用此构造方法。
+ *
+ * @param title 要在布局中显示的标题
+ */
+ public DefaultTinyFormulaPane(String title) {
+ this.initComponents();
+ this.initLayout(title);
+ }
+
+ private void initLayout(String title) {
+ this.setLayout(new BorderLayout());
+ this.add(row(cell(new UILabel(title)).weight(1.2), cell(createDefaultTinyFormulaPane()).weight(3)).getComponent());
+ }
+
@Override
protected void populateTextField(BaseFormula fm) {
formulaTextField.setText(fm.getContent());
}
+
+ @Override
+ protected void initLayout() {
+ this.setLayout(new BorderLayout());
+ formulaTextFieldButton.setPreferredSize(FineUIScale.createScaleDimension(24, 24));
+ this.add(createDefaultTinyFormulaPane());
+ }
+
+ private Component createDefaultTinyFormulaPane() {
+ return row(cell(formulaTextField).weight(2), flex(0.1), cell(formulaTextFieldButton).weight(0.4)).getComponent();
+ }
}
diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/ClosableBubbleFloatPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/ClosableBubbleFloatPane.java
index 41a4471daa..7f6a7a59f0 100644
--- a/designer-base/src/main/java/com/fr/design/gui/frpane/ClosableBubbleFloatPane.java
+++ b/designer-base/src/main/java/com/fr/design/gui/frpane/ClosableBubbleFloatPane.java
@@ -1,10 +1,9 @@
package com.fr.design.gui.frpane;
-import com.fr.base.BaseUtils;
+import com.fine.theme.icon.LazyIcon;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ilable.UILabel;
-import javax.swing.Icon;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Point;
@@ -30,8 +29,7 @@ public abstract class ClosableBubbleFloatPane extends UIBubbleFloatPane {
protected JPanel initTopOptionMenu() {
JPanel menu = new JPanel(new BorderLayout());
- Icon icon = BaseUtils.readIcon("/com/fr/design/images/buttonicon/close_icon.png");
- UILabel label = new UILabel(icon);
+ UILabel label = new UILabel(new LazyIcon("close"));
label.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
diff --git a/designer-base/src/main/java/com/fr/design/gui/itooltip/MultiLineToolTip.java b/designer-base/src/main/java/com/fr/design/gui/itooltip/MultiLineToolTip.java
index b644ae4db6..f5ad495dfa 100644
--- a/designer-base/src/main/java/com/fr/design/gui/itooltip/MultiLineToolTip.java
+++ b/designer-base/src/main/java/com/fr/design/gui/itooltip/MultiLineToolTip.java
@@ -1,10 +1,11 @@
package com.fr.design.gui.itooltip;
+import com.fine.theme.light.ui.FineTooltipUI;
import javax.swing.JToolTip;
public class MultiLineToolTip extends JToolTip {
public MultiLineToolTip() {
- setUI(new MultiLineToolTipUI());
+ setUI(new FineTooltipUI());
}
}
\ No newline at end of file
diff --git a/designer-base/src/main/java/com/fr/design/utils/DesignerPort.java b/designer-base/src/main/java/com/fr/design/utils/DesignerPort.java
index b57c54fbcd..cebbcf655b 100644
--- a/designer-base/src/main/java/com/fr/design/utils/DesignerPort.java
+++ b/designer-base/src/main/java/com/fr/design/utils/DesignerPort.java
@@ -1,5 +1,7 @@
package com.fr.design.utils;
+import com.fine.theme.icon.LazyIcon;
+import com.fine.theme.utils.FineUIScale;
import com.fr.common.report.ReportState;
import com.fr.design.DesignerEnvManager;
import com.fr.design.RestartHelper;
@@ -13,7 +15,6 @@ import com.fr.design.port.DesignerPortContext;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.exit.DesignerExiter;
import com.fr.general.ComparatorUtils;
-import com.fr.general.IOUtils;
import com.fr.process.engine.core.CarryMessageEvent;
import com.fr.process.engine.core.FineProcessContext;
import com.fr.stable.StringUtils;
@@ -29,11 +30,12 @@ import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import java.awt.BorderLayout;
import java.awt.Color;
-import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
+import static com.fine.theme.utils.FineUIScale.scale;
+
/**
* 为的就是能替换 DesignPort.class 实现多开,因此避免编译器常量编译展开优化
*/
@@ -128,7 +130,7 @@ public class DesignerPort implements XMLReadable, XMLWriter {
this.setLayout(new BorderLayout());
this.setModal(true);
this.portFiled = new UITextField();
- this.portFiled.setPreferredSize(new Dimension(180, 20));
+ this.portFiled.setPreferredSize(FineUIScale.createScaleDimension(180, 20));
this.portFiled.getDocument().addDocumentListener(new DocumentListener() {
@Override
public void insertUpdate(DocumentEvent e) {
@@ -147,7 +149,7 @@ public class DesignerPort implements XMLReadable, XMLWriter {
});
JPanel iconPanel = new JPanel();
UILabel iconLabel = new UILabel();
- iconLabel.setIcon(IOUtils.readIcon("com/fr/design/images/edit/edit_typing.png"));
+ iconLabel.setIcon(new LazyIcon("edit"));
iconPanel.add(iconLabel);
iconPanel.add(iconLabel);
JPanel textPane = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEADING, 0, 10);
@@ -194,7 +196,7 @@ public class DesignerPort implements XMLReadable, XMLWriter {
this.add(northPane, BorderLayout.NORTH);
this.add(centerPane, BorderLayout.CENTER);
this.add(southPane, BorderLayout.SOUTH);
- this.setSize(300, 150);
+ this.setSize(scale(300), scale(150));
this.setTitle(Toolkit.i18nText("Fine-Design_Modify_Designer_Port"));
this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
this.setResizable(false);
diff --git a/designer-base/src/main/resources/com/fine/theme/icon/close/closeTag.svg b/designer-base/src/main/resources/com/fine/theme/icon/close/closeTag.svg
new file mode 100644
index 0000000000..fa060d003f
--- /dev/null
+++ b/designer-base/src/main/resources/com/fine/theme/icon/close/closeTag.svg
@@ -0,0 +1,11 @@
+
diff --git a/designer-base/src/main/resources/com/fine/theme/icon/debug.svg b/designer-base/src/main/resources/com/fine/theme/icon/debug.svg
new file mode 100644
index 0000000000..3e7608a5be
--- /dev/null
+++ b/designer-base/src/main/resources/com/fine/theme/icon/debug.svg
@@ -0,0 +1,3 @@
+
diff --git a/designer-base/src/main/resources/com/fine/theme/icon/debug_disable.svg b/designer-base/src/main/resources/com/fine/theme/icon/debug_disable.svg
new file mode 100644
index 0000000000..442f87ac0c
--- /dev/null
+++ b/designer-base/src/main/resources/com/fine/theme/icon/debug_disable.svg
@@ -0,0 +1,3 @@
+
diff --git a/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json b/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json
index 019af2e7f8..2ca12a1468 100644
--- a/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json
+++ b/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json
@@ -322,6 +322,7 @@
"nosort": "sort/nosort.svg",
"close": "close/close.svg",
"close_round": "close/close_round.svg",
+ "closeTag": "close/closeTag.svg",
"platform_close": "close/platform_close.svg",
"add_parenthesis": "font/add_parenthesis.svg",
"remove_parenthesis": "font/remove_parenthesis.svg",
diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java
index 57ad71a50d..7f3324a2c3 100644
--- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java
+++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java
@@ -4,7 +4,6 @@ import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIConstants;
import com.fine.theme.utils.FineUIStyle;
-import com.fr.base.BaseUtils;
import com.fr.chart.base.AttrChangeConfig;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.charttypes.ChartTypeManager;
@@ -29,12 +28,12 @@ import com.fr.stable.StringUtils;
import com.fr.van.chart.config.DefaultStyleHelper4Van;
import javax.swing.JPanel;
+import javax.swing.Icon;
import javax.swing.SwingUtilities;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Graphics;
-import java.awt.Image;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@@ -44,7 +43,6 @@ import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.geom.Rectangle2D;
-import java.awt.image.BufferedImage;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
@@ -56,6 +54,7 @@ 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.theme.utils.FineUIScale.scale;
/**
* 图表 类型 增删 控制按钮界面.
@@ -458,8 +457,8 @@ public class ChartTypeButtonPane extends BasicBeanPane implemen
private class ChartChangeButton extends UIToggleButton {
- private static final double DEL_WIDTH = 10;
- private BufferedImage closeIcon = BaseUtils.readImageWithCache("com/fr/design/images/toolbarbtn/chartChangeClose.png");
+ private static final double DEL_WIDTH = 9;
+ private Icon closeIcon = new LazyIcon("closeTag", 8);
private boolean isMoveOn = false;
private String buttonName = "";
@@ -506,11 +505,8 @@ public class ChartTypeButtonPane extends BasicBeanPane implemen
private void paintDeleteButton(Graphics g2d) {
Rectangle2D bounds = this.getBounds();
-
int x = (int) (bounds.getWidth() - DEL_WIDTH);
- int y = (int) (1);
-
- g2d.drawImage((Image) closeIcon, x, y, closeIcon.getWidth(), closeIcon.getHeight(), null);
+ closeIcon.paintIcon(this, g2d, scale(x), scale(1));
}
@Override
diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotReportDataContentPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotReportDataContentPane.java
index 944f7d2825..020433d28e 100644
--- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotReportDataContentPane.java
+++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotReportDataContentPane.java
@@ -41,6 +41,8 @@ public class CategoryPlotReportDataContentPane extends AbstractReportDataContent
filterPane = new ChartDataFilterPane(new Bar2DPlot(), parent);
this.add(column(
cell(categoryName),
+ fix(10),
+ cell(getSeriesPane()),
fix(10).with(it -> it.setBorder(FineBorderFactory.createDefaultUnderlineBorder())),
cell(new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Data_Filter"),filterPane))
).getComponent());
@@ -53,7 +55,7 @@ public class CategoryPlotReportDataContentPane extends AbstractReportDataContent
UILabel label = new UILabel(leftLabel);
this.setLayout(new BorderLayout());
this.add(row(
- cell(label).weight(1.2), cell(formulaTextField).weight(2), flex(0.1), cell(formulaTextFieldButton).weight(0.4)
+ cell(label).weight(1.2), row(cell(formulaTextField).weight(2), flex(0.1), cell(formulaTextFieldButton).weight(0.4)).weight(3)
).getComponent());
}
diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldValuePane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldValuePane.java
index f3d326f8dc..f9ef234f8a 100644
--- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldValuePane.java
+++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldValuePane.java
@@ -99,10 +99,10 @@ public class SeriesNameUseFieldValuePane extends FurtherBasicBeanPane it.setBorder(FineBorderFactory.createDefaultUnderlineBorder()))
).getComponent();
diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/data/report/BoxPlotReportDataContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/data/report/BoxPlotReportDataContentPane.java
index 037c0aa70b..583d6d8936 100644
--- a/designer-chart/src/main/java/com/fr/van/chart/box/data/report/BoxPlotReportDataContentPane.java
+++ b/designer-chart/src/main/java/com/fr/van/chart/box/data/report/BoxPlotReportDataContentPane.java
@@ -1,24 +1,25 @@
package com.fr.van.chart.box.data.report;
+import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.Plot;
+import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
-import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.plugin.chart.box.VanChartBoxPlot;
import com.fr.plugin.chart.box.data.VanBoxReportDefinition;
-import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
-import java.awt.Component;
-import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
+import static com.fine.swing.ui.layout.Layouts.cell;
+import static com.fine.swing.ui.layout.Layouts.column;
+
public class BoxPlotReportDataContentPane extends AbstractReportDataContentPane {
private UIButtonGroup dataType;
@@ -30,37 +31,20 @@ public class BoxPlotReportDataContentPane extends AbstractReportDataContentPane
public BoxPlotReportDataContentPane(Plot plot, ChartDataPane parent) {
this.initplot = plot;
-
this.setLayout(new BorderLayout());
-
- this.add(createDataTypePane(), BorderLayout.NORTH);
- this.add(createSeriesPane(parent), BorderLayout.CENTER);
-
+ this.add(column(LayoutConstants.VERTICAL_GAP, cell(createDataTypePane()), cell(createSeriesPane(parent))).getComponent());
initDataTypeListener();
checkDataPaneVisible();
}
private JPanel createDataTypePane() {
- JPanel pane = new JPanel(new BorderLayout(4, 0));
- pane.setBorder(BorderFactory.createMatteBorder(0, 0, 6, 1, getBackground()));
-
- UILabel label = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Data_Form"));
- label.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH, ChartDataPane.LABEL_HEIGHT));
-
String[] names = new String[]{
Toolkit.i18nText("Fine-Design_Chart_Detailed_Data"),
Toolkit.i18nText("Fine-Design_Chart_Result_Data")
};
-
dataType = new UIButtonGroup(names);
dataType.setSelectedIndex(0);
- dataType.setPreferredSize(new Dimension(100, 20));
-
- pane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{dataType, null, null, label, null}));
- pane.setPreferredSize(new Dimension(246, 30));
- pane.setBorder(BorderFactory.createEmptyBorder(0, 18, 10, 15));
-
- return pane;
+ return FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3}, new UILabel(Toolkit.i18nText("Fine-Design_Chart_Data_Form")), dataType);
}
private JPanel createSeriesPane(ChartDataPane parent) {
diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/data/report/BoxPlotReportResultDataSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/data/report/BoxPlotReportResultDataSeriesPane.java
index 6bf2a9ef28..9f5f3e4ec5 100644
--- a/designer-chart/src/main/java/com/fr/van/chart/box/data/report/BoxPlotReportResultDataSeriesPane.java
+++ b/designer-chart/src/main/java/com/fr/van/chart/box/data/report/BoxPlotReportResultDataSeriesPane.java
@@ -3,7 +3,6 @@ package com.fr.van.chart.box.data.report;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane;
-import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
@@ -11,11 +10,9 @@ import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPa
import com.fr.plugin.chart.box.data.VanBoxReportDefinition;
import com.fr.plugin.chart.box.data.VanBoxReportResultDefinition;
-import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
-import java.awt.Dimension;
public class BoxPlotReportResultDataSeriesPane extends AbstractReportDataContentPane {
@@ -34,16 +31,13 @@ public class BoxPlotReportResultDataSeriesPane extends AbstractReportDataContent
initContentComponents();
JPanel panel = createContentPane();
-
- panel.setBorder(BorderFactory.createEmptyBorder(0, 24, 0, 15));
-
this.add(panel, BorderLayout.CENTER);
}
private void initContentComponents() {
- category = createTinyFormulaPaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Category"));
- seriesName = createTinyFormulaPaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Series_Name"));
+ category = new DefaultTinyFormulaPane(Toolkit.i18nText("Fine-Design_Chart_Category"));
+ seriesName = new DefaultTinyFormulaPane(Toolkit.i18nText("Fine-Design_Chart_Series_Name"));
max = createTinyFormulaWithEditLabel(Toolkit.i18nText("Fine-Design_Chart_Data_Max"));
q3 = createTinyFormulaWithEditLabel(Toolkit.i18nText("Fine-Design_Chart_Data_Q3"));
@@ -71,23 +65,6 @@ public class BoxPlotReportResultDataSeriesPane extends AbstractReportDataContent
return TableLayoutHelper.createTableLayoutPane(components, row, col);
}
- private TinyFormulaPane createTinyFormulaPaneWithTitle(final String title) {
-
- return new DefaultTinyFormulaPane() {
- protected void initLayout() {
- this.setLayout(new BorderLayout(4, 0));
-
- UILabel label = new UILabel(title);
- label.setPreferredSize(new Dimension(75, 20));
- this.add(label, BorderLayout.WEST);
-
- formulaTextField.setPreferredSize(new Dimension(100, 20));
- this.add(formulaTextField, BorderLayout.CENTER);
- this.add(formulaTextFieldButton, BorderLayout.EAST);
- }
- };
- }
-
private TinyFormulaWithEditLabel createTinyFormulaWithEditLabel(String title) {
return new TinyFormulaWithEditLabel(title) {
diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/data/report/TinyFormulaWithEditLabel.java b/designer-chart/src/main/java/com/fr/van/chart/box/data/report/TinyFormulaWithEditLabel.java
index 300de5f618..f48a3c1c09 100644
--- a/designer-chart/src/main/java/com/fr/van/chart/box/data/report/TinyFormulaWithEditLabel.java
+++ b/designer-chart/src/main/java/com/fr/van/chart/box/data/report/TinyFormulaWithEditLabel.java
@@ -9,7 +9,9 @@ import com.fr.design.mainframe.chart.gui.UIEditLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
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.row;
public abstract class TinyFormulaWithEditLabel extends JPanel implements UIObserver {
@@ -23,18 +25,13 @@ public abstract class TinyFormulaWithEditLabel extends JPanel implements UIObser
protected void doAfterMousePress() {
clearAllBackground();
}
-
protected boolean appendOriginalLabel() {
return false;
}
};
-
- editLabel.setPreferredSize(new Dimension(75, 20));
tinyFormulaPane = new DefaultTinyFormulaPane();
-
- this.setLayout(new BorderLayout(4, 0));
- this.add(editLabel, BorderLayout.WEST);
- this.add(tinyFormulaPane, BorderLayout.CENTER);
+ this.setLayout(new BorderLayout(0, 10));
+ this.add(row(cell(editLabel).weight(1.2), cell(tinyFormulaPane).weight(3)).getComponent());
}
protected abstract void clearAllBackground();
diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/data/table/UIComboBoxWithEditLabel.java b/designer-chart/src/main/java/com/fr/van/chart/box/data/table/UIComboBoxWithEditLabel.java
index 7b51fc5647..6cd9a0216d 100644
--- a/designer-chart/src/main/java/com/fr/van/chart/box/data/table/UIComboBoxWithEditLabel.java
+++ b/designer-chart/src/main/java/com/fr/van/chart/box/data/table/UIComboBoxWithEditLabel.java
@@ -8,9 +8,11 @@ import com.fr.design.mainframe.chart.gui.UIEditLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.awt.BorderLayout;
-import java.awt.Dimension;
import java.awt.event.ItemListener;
+import static com.fine.swing.ui.layout.Layouts.cell;
+import static com.fine.swing.ui.layout.Layouts.row;
+
public abstract class UIComboBoxWithEditLabel extends JPanel implements UIObserver {
private UIEditLabel editLabel;
@@ -28,14 +30,9 @@ public abstract class UIComboBoxWithEditLabel extends JPanel implements UIObserv
return false;
}
};
-
- editLabel.setPreferredSize(new Dimension(80, 20));
comboBox = new UIComboBox();
- comboBox.setPreferredSize(new Dimension(100, 20));
-
- this.setLayout(new BorderLayout(4, 0));
- this.add(editLabel, BorderLayout.WEST);
- this.add(comboBox, BorderLayout.CENTER);
+ this.setLayout(new BorderLayout(0, 10));
+ this.add(row(cell(editLabel).weight(1.2), cell(comboBox).weight(3)).getComponent());
}
public UIComboBox getComboBox() {
diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotSelectPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotSelectPane.java
index 589b03cad3..f73d23671b 100644
--- a/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotSelectPane.java
+++ b/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotSelectPane.java
@@ -1,5 +1,6 @@
package com.fr.van.chart.custom.component;
+import com.fine.theme.utils.FineUIScale;
import com.fr.chart.base.ChartThemeStyleProvider;
import com.fr.chart.chartattr.Chart;
import com.fr.design.beans.BasicBeanPane;
@@ -20,7 +21,6 @@ import com.fr.van.chart.custom.CustomPlotDesignerPaneFactory;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import java.awt.BorderLayout;
-import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
@@ -87,7 +87,7 @@ public class VanChartCustomPlotSelectPane extends BasicBeanPane {
content = FRGUIPaneFactory.createNColumnGridInnerContainer_Pane(CUSTOM_TYPE_NUM, 0, 0);
for (int i = 0; i < customTypeList.size(); i++){
- customTypeList.get(i).setPreferredSize(new Dimension(REC_WIDTH,REC_HEIGHT));
+ customTypeList.get(i).setPreferredSize(FineUIScale.createScaleDimension(REC_WIDTH, REC_HEIGHT));
//是否画右边线
boolean isRightLine = (i == customTypeList.size() - 1) ? true : ((i + 1)%CUSTOM_TYPE_NUM == 0) ? true : false;
diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLabelContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLabelContentPane.java
index 54200fcdee..87605db336 100644
--- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLabelContentPane.java
+++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLabelContentPane.java
@@ -34,7 +34,8 @@ public class VanChartLabelContentPane extends VanChartTooltipContentPane {
if (isInCondition() || !ChartEditContext.supportTheme()) {
return super.createCommonStylePane();
}
- setTextAttrPane(new LabelAttrPaneWithThemeStyle());
+ // 颜色图标统一使用UIColorButton
+ setTextAttrPane(new ChartTextAttrPaneWithThemeStyle());
JPanel stylePanel = new JPanel(new BorderLayout());
stylePanel.add(getTextAttrPane(), BorderLayout.CENTER);
diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartLabelConditionPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartLabelConditionPane.java
index 9640662456..115bdb9480 100644
--- a/designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartLabelConditionPane.java
+++ b/designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartLabelConditionPane.java
@@ -3,14 +3,11 @@ package com.fr.van.chart.designer.other.condition.item;
import com.fr.chart.base.DataSeriesCondition;
import com.fr.chart.chartattr.Plot;
import com.fr.design.condition.ConditionAttributesPane;
-import com.fr.design.layout.TableLayout;
-import com.fr.design.layout.TableLayoutHelper;
import com.fr.plugin.chart.base.AttrLabel;
import com.fr.van.chart.designer.PlotFactory;
import com.fr.van.chart.designer.style.label.VanChartPlotLabelPane;
import javax.swing.JPanel;
-import java.awt.Component;
public class VanChartLabelConditionPane extends AbstractNormalMultiLineConditionPane {
@@ -25,15 +22,7 @@ public class VanChartLabelConditionPane extends AbstractNormalMultiLineCondition
@Override
protected JPanel initContentPane() {
dataLabelContentsPane = createLabelPane();
- double p = TableLayout.PREFERRED;
- double f = TableLayout.FILL;
- double e = 220;
-
- Component[][] components = new Component[][]{
- new Component[]{dataLabelContentsPane}
- };
-
- return TableLayoutHelper.createTableLayoutPane(components, new double[]{p}, new double[]{e});
+ return dataLabelContentsPane;
}
protected VanChartPlotLabelPane createLabelPane() {
diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java
index 7a7d767eec..1c02408a3f 100644
--- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java
+++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java
@@ -10,6 +10,7 @@ import com.fr.chart.base.TextAttr;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Title;
import com.fr.design.beans.FurtherBasicBeanPane;
+import com.fr.design.constants.LayoutConstants;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane;
@@ -269,10 +270,15 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane {
}
}
};
+ // 显示逻辑-整体显示
labelStylePane.add(wholeDisplayLabelPanel, WHOLE_DISPLAY);
+ // 显示逻辑-分层显示
labelStylePane.add(createCategoryStylePane(), LAYER_DISPLAY);
- showLogicPane.add(TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Axis_Label_Show_Logic"), showLogic), BorderLayout.NORTH);
- showLogicPane.add(labelStylePane, BorderLayout.CENTER);
+ showLogicPane.add(column(LayoutConstants.VERTICAL_GAP,
+ cell(FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3}, new UILabel(Toolkit.i18nText("Fine-Design_Chart_Axis_Label_Show_Logic")), showLogic)),
+ cell(labelStylePane)
+ ).getComponent());
+
showLogicPane.setVisible(false);
labelContentPane.add(labelPane, BorderLayout.NORTH);
labelContentPane.add(showLogicPane, BorderLayout.CENTER);
@@ -654,18 +660,11 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane {
private JPanel createCateLableStylePanel() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
- double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] row = getCateLableStylePaneRow();
double[] column = {f, p};
JPanel content = TableLayoutHelper.createTableLayoutPane(getCateLabelStyleComponents(), row, column);
-
- Component[][] components = new Component[][]{
- new Component[]{null, null},
- new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Style_Category")), content}
- };
-
- return TableLayoutHelper.createTableLayoutPane(components, new double[]{p, p}, new double[]{f, e});
+ return FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3}, new UILabel(Toolkit.i18nText("Fine-Design_Chart_Style_Category")), content);
}
private Component[][] getCateLabelStyleComponents() {
diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/component/VanChartCategoryStylePaneWithCheckBox.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/component/VanChartCategoryStylePaneWithCheckBox.java
index 79e4aad9bd..d723fb422b 100644
--- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/component/VanChartCategoryStylePaneWithCheckBox.java
+++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/component/VanChartCategoryStylePaneWithCheckBox.java
@@ -1,5 +1,6 @@
package com.fr.van.chart.designer.style.axis.component;
+import com.fine.theme.utils.FineUIScale;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.design.gui.frpane.ClosableBubbleFloatPane;
import com.fr.design.gui.ibutton.UIButton;
@@ -68,7 +69,7 @@ public class VanChartCategoryStylePaneWithCheckBox extends JPanel {
Point comPoint = settingButton.getLocationOnScreen();
Point arrowPoint = new Point(comPoint.x +settingButton.getWidth() - 25, comPoint.y + settingButton.getHeight());
Dimension size = settingPane.getPreferredSize();
- ClosableBubbleFloatPane pane = new ClosableBubbleFloatPane(Constants.LEFT, arrowPoint, settingPane, size.width, 240) {
+ ClosableBubbleFloatPane pane = new ClosableBubbleFloatPane(Constants.LEFT, arrowPoint, settingPane, size.width, FineUIScale.scale(240)) {
@Override
public void updateContentPane() {
diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java
index fc69b85f25..ae862a170b 100644
--- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java
+++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java
@@ -9,12 +9,10 @@ import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.BasicPane;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ibutton.UIButtonGroup;
-import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
-import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.design.style.color.ColorSelectBox;
import com.fr.general.ComparatorUtils;
@@ -241,10 +239,12 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
column.add(positionPane);
if (hasLabelOrientationPane()) {
+ // 文本方向
column.add(createLabelOrientationPane());
}
if (plot.isSupportLeadLine()) {
+ // 牵引线
tractionLine = new UICheckBox(Toolkit.i18nText("Fine-Design_Chart_Show_Guideline"));
Component[][] comps = new Component[1][2];
comps[0] = new Component[]{new UILabel(), tractionLine};
@@ -255,6 +255,7 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
column.add(getLabelPositionPane(comps, row, col));
initPositionListener();
} else if (PlotFactory.plotAutoAdjustLabelPosition(plot)) {
+ // 重叠调整
column.add(FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(Toolkit.i18nText("Fine-Design_Chart_Auto_Adjust")), autoAdjust));
}
@@ -281,8 +282,8 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
checkOrientation();
}
});
-
- return TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Text_Orientation"), orientation);
+ return FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
+ new UILabel(Toolkit.i18nText("Fine-Design_Chart_Text_Orientation")), orientation);
}
protected void checkPositionPane(String title) {
diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java
index df6c0415d0..cc234a7be7 100644
--- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java
+++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java
@@ -278,13 +278,13 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
protected JPanel createStackedAndAxisPane() {
stackAndAxisEditPane = new VanChartStackedAndAxisListControlPane();
stackAndAxisEditExpandablePane = new UIExpandablePane(stackAndAxisEditPane.getPaneTitle(), stackAndAxisEditPane, true);
+ stackAndAxisEditExpandablePane.setVisible(true);
return stackAndAxisEditExpandablePane;
}
//界面上删除堆积和坐标轴设置
protected void removeStackWholePane() {
- contentPane.remove(stackAndAxisEditExpandablePane);
- contentPane.repaint();
+ stackAndAxisEditExpandablePane.setVisible(false);
}
/**
diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartEffectPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartEffectPane.java
index c3bf0bc159..d9b70d38d1 100644
--- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartEffectPane.java
+++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartEffectPane.java
@@ -1,19 +1,23 @@
package com.fr.van.chart.designer.style.series;
+import com.fine.theme.utils.FineLayoutBuilder;
+import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
+import com.fr.design.i18n.Toolkit;
import com.fr.plugin.chart.base.AttrEffect;
-import com.fr.van.chart.designer.TableLayout4VanChartHelper;
-import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
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.fix;
+import static com.fine.swing.ui.layout.Layouts.row;
/**
* Created by shine on 2016/12/13.
@@ -40,33 +44,32 @@ public class VanChartEffectPane extends BasicBeanPane {
period = new UISpinner(0, Double.MAX_VALUE, 0.1, 0);
content = createContentPane();
- JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Flash_Animation"),enabledButton);
- this.setLayout(new BorderLayout(0, 5));
+ JPanel panel = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3}, new UILabel(Toolkit.i18nText("Fine-Design_Chart_Flash_Animation")), enabledButton);
+ panel.setBorder(new ScaledEmptyBorder(0, 0, 10,0));
+ this.setLayout(new BorderLayout());
if(hasEnabledChoose) {
this.add(panel, BorderLayout.NORTH);
- setContentPaneBorder();
}
this.add(content, BorderLayout.CENTER);
}
- protected void setContentPaneBorder() {
- content.setBorder(BorderFactory.createEmptyBorder(10,25,0,15));
- }
-
+ /**
+ * 闪烁动画
+ * @return contentPane
+ */
protected JPanel createContentPane() {
- JPanel panel = createPeriodPane();
- return panel;
+ return createPeriodPane();
}
+ /**
+ * 运动周期
+ * @return periodPane
+ */
protected JPanel createPeriodPane(){
- JPanel periodPane = new JPanel();
- periodPane.setLayout(new BorderLayout(5, 0));
- UILabel label1= new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Flash_Period"));
- label1.setPreferredSize(new Dimension((int)TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH, 20));
- periodPane.add(label1, BorderLayout.WEST);
- periodPane.add(period, BorderLayout.CENTER);
- periodPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Time_Second")), BorderLayout.EAST);
- return periodPane;
+ JPanel panel = new JPanel(new BorderLayout());
+ panel.add(row(cell(period).weight(1), fix(4),cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Time_Second")))).getComponent());
+ return FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
+ new UILabel(Toolkit.i18nText("Fine-Design_Chart_Flash_Period")), panel);
}
@Override
diff --git a/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/GanttReportDataContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/GanttReportDataContentPane.java
index 398e59fbed..2533c9d3e9 100644
--- a/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/GanttReportDataContentPane.java
+++ b/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/GanttReportDataContentPane.java
@@ -6,7 +6,6 @@ import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane;
-import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
import com.fr.plugin.chart.gantt.data.VanGanttReportDefinition;
import com.fr.van.chart.gantt.designer.data.data.GanttDataPaneHelper;
@@ -15,10 +14,6 @@ import javax.swing.JPanel;
import java.awt.BorderLayout;
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;
-
/**
* Created by hufan on 2017/1/11.
*/
@@ -40,30 +35,12 @@ public class GanttReportDataContentPane extends AbstractReportDataContentPane{
}
private void initAllComponent() {
- seriesName = createTinyFormulaPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Series_Name"));
-
- startTime = createTinyFormulaPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Start_Time"));
-
- endTime = createTinyFormulaPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_End_Time"));
-
- markerTime = createTinyFormulaPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Marker_Time"));
-
- progress = createTinyFormulaPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Process"));
-
- linkID = createTinyFormulaPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Task_ID"));
- }
-
- private TinyFormulaPane createTinyFormulaPaneWithTitle(final String title) {
- return new DefaultTinyFormulaPane() {
- @Override
- protected void initLayout() {
- this.setLayout(new BorderLayout());
- UILabel label = new UILabel(title);
- this.add(row(
- cell(label).weight(1.2), cell(formulaTextField).weight(2.4), flex(0.1), cell(formulaTextFieldButton).weight(0.5)
- ).getComponent());
- }
- };
+ seriesName = new DefaultTinyFormulaPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Series_Name"));
+ startTime = new DefaultTinyFormulaPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Start_Time"));
+ endTime = new DefaultTinyFormulaPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_End_Time"));
+ markerTime = new DefaultTinyFormulaPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Marker_Time"));
+ progress = new DefaultTinyFormulaPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Process"));
+ linkID = new DefaultTinyFormulaPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Task_ID"));
}
private JPanel getContentPane(){
diff --git a/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/link/GanttLinkReportDataContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/link/GanttLinkReportDataContentPane.java
index d254e15997..1e5efb7cfd 100644
--- a/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/link/GanttLinkReportDataContentPane.java
+++ b/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/link/GanttLinkReportDataContentPane.java
@@ -5,7 +5,6 @@ import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane;
-import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
import com.fr.plugin.chart.gantt.data.VanGanttLinkReportDefinition;
import com.fr.van.chart.gantt.designer.data.data.GanttDataPaneHelper;
@@ -14,10 +13,6 @@ import javax.swing.JPanel;
import java.awt.BorderLayout;
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;
-
/**
* Created by hufan on 2017/1/12.
*/
@@ -33,24 +28,9 @@ public class GanttLinkReportDataContentPane extends AbstractReportDataContentPan
this.add(panel, BorderLayout.CENTER); }
private void initAllComponent() {
- startTaskID = createTinyFormulaPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Start_Task_ID"));
-
- endTaskID = createTinyFormulaPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_End_Task_ID"));
-
- linkType = createTinyFormulaPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Link_Type"));
- }
-
- private TinyFormulaPane createTinyFormulaPaneWithTitle(final String title) {
- return new DefaultTinyFormulaPane() {
- @Override
- protected void initLayout() {
- this.setLayout(new BorderLayout());
- UILabel label = new UILabel(title);
- this.add(row(
- cell(label).weight(1.2), cell(formulaTextField).weight(2.4), flex(0.1), cell(formulaTextFieldButton).weight(0.5)
- ).getComponent());
- }
- };
+ startTaskID = new DefaultTinyFormulaPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Start_Task_ID"));
+ endTaskID = new DefaultTinyFormulaPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_End_Task_ID"));
+ linkType = new DefaultTinyFormulaPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Link_Type"));
}
private JPanel getContentPane(){
diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/line/VanChartLineMapEffectPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/line/VanChartLineMapEffectPane.java
index ee6368917b..395388b2bb 100644
--- a/designer-chart/src/main/java/com/fr/van/chart/map/line/VanChartLineMapEffectPane.java
+++ b/designer-chart/src/main/java/com/fr/van/chart/map/line/VanChartLineMapEffectPane.java
@@ -1,7 +1,11 @@
package com.fr.van.chart.map.line;
+import com.fine.theme.utils.FineLayoutBuilder;
+import com.formdev.flatlaf.util.ScaledEmptyBorder;
+import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
+import com.fr.design.i18n.Toolkit;
import com.fr.general.ComparatorUtils;
import com.fr.plugin.chart.base.AttrEffect;
@@ -11,7 +15,6 @@ import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.marker.VanChartImageMarkerPane;
import com.fr.van.chart.designer.style.series.VanChartEffectPane;
-import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.CardLayout;
@@ -20,6 +23,9 @@ import java.awt.Dimension;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
+import static com.fine.swing.ui.layout.Layouts.cell;
+import static com.fine.swing.ui.layout.Layouts.column;
+
/**
* Created by hufan on 2016/12/20.
*/
@@ -32,39 +38,34 @@ public class VanChartLineMapEffectPane extends VanChartEffectPane {
public VanChartLineMapEffectPane() {
super(true);
- this.add(TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Line_Map_Animation"), enabledButton), BorderLayout.NORTH);
+ JPanel panel = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
+ new UILabel(Toolkit.i18nText("Fine-Design_Chart_Line_Map_Animation")), enabledButton);
+ panel.setBorder(new ScaledEmptyBorder(0, 0, 10,0));
+ this.add(panel, BorderLayout.NORTH);
}
+ /**
+ * 流向动画
+ * @return contentPane
+ */
protected JPanel createContentPane() {
- JPanel panel = new JPanel(new BorderLayout(0, 5));
+ JPanel panel = new JPanel(new BorderLayout());
+ // 运动周期
JPanel periodPane = createPeriodPane();
-
+ // 运动方式
animationType = new UIComboBox(LineMapAnimationType.getTypes());
initTypeContentPane();
-
- JPanel animationTypePane = new JPanel(new BorderLayout(0, 5));
-
- animationTypePane.add(createAnimationSelectPane(), BorderLayout.NORTH);
- animationTypePane.add(typeContentPane, BorderLayout.CENTER);
-
- panel.add(periodPane, BorderLayout.CENTER);
- panel.add(animationTypePane, BorderLayout.SOUTH);
- panel.setBorder(BorderFactory.createEmptyBorder(0, 12, 0, 0));
-
+ panel.add(column(LayoutConstants.VERTICAL_GAP, cell(periodPane), cell(createAnimationSelectPane()), cell(typeContentPane)).getComponent());
return panel;
}
- protected void setContentPaneBorder() {
- return;
- }
-
+ /**
+ * 运动方式
+ * @return animationSelectPane
+ */
private Component createAnimationSelectPane() {
- JPanel panel = new JPanel(new BorderLayout(5, 0));
- UILabel label1 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Animation_Type"));
- label1.setPreferredSize(new Dimension((int) TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH, 20));
- panel.add(label1, BorderLayout.WEST);
- panel.add(animationType, BorderLayout.CENTER);
- return panel;
+ return FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
+ new UILabel(Toolkit.i18nText("Fine-Design_Chart_Animation_Type")), animationType);
}
private void initTypeContentPane() {
diff --git a/designer-form/src/main/java/com/fr/design/actions/TemplateParameterAction.java b/designer-form/src/main/java/com/fr/design/actions/TemplateParameterAction.java
index 99e432eee1..3514ffd29b 100644
--- a/designer-form/src/main/java/com/fr/design/actions/TemplateParameterAction.java
+++ b/designer-form/src/main/java/com/fr/design/actions/TemplateParameterAction.java
@@ -1,6 +1,6 @@
package com.fr.design.actions;
-import com.fr.base.BaseUtils;
+import com.fine.theme.icon.LazyIcon;
import com.fr.base.Parameter;
import com.fr.design.DesignModelAdapter;
import com.fr.design.dialog.BasicDialog;
@@ -22,7 +22,7 @@ public class TemplateParameterAction extends JTemplateAction {
this.setMenuKeySet(KeySetUtils.REPORT_PARAMETER_ATTR);
this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setMnemonic(getMenuKeySet().getMnemonic());
- this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_report/p.png"));
+ this.setSmallIcon(new LazyIcon("param"));
}
@Override
diff --git a/designer-form/src/main/java/com/fr/design/actions/file/export/EmbeddedFormExportExportAction.java b/designer-form/src/main/java/com/fr/design/actions/file/export/EmbeddedFormExportExportAction.java
index 6d0fe9aa52..8b8f1c723d 100644
--- a/designer-form/src/main/java/com/fr/design/actions/file/export/EmbeddedFormExportExportAction.java
+++ b/designer-form/src/main/java/com/fr/design/actions/file/export/EmbeddedFormExportExportAction.java
@@ -1,5 +1,6 @@
package com.fr.design.actions.file.export;
+import com.fine.theme.icon.LazyIcon;
import com.fr.base.BaseUtils;
import com.fr.base.Parameter;
import com.fr.base.extension.FileExtension;
@@ -30,7 +31,7 @@ public class EmbeddedFormExportExportAction extends AbstractExportAction
this.setMenuKeySet(KeySetUtils.EMBEDDED_EXPORT);
this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setMnemonic(getMenuKeySet().getMnemonic());
- this.setSmallIcon(BaseUtils.readIcon("/com/fr/base/images/oem/logo.png"));
+ this.setSmallIcon(new LazyIcon("logo"));
}
@Override
diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/TabMoveCustomAction.java b/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/TabMoveCustomAction.java
index 8930c686c4..44f7646530 100644
--- a/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/TabMoveCustomAction.java
+++ b/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/TabMoveCustomAction.java
@@ -1,7 +1,7 @@
package com.fr.design.designer.creator.cardlayout;
+import com.fine.theme.icon.LazyIcon;
import com.fr.design.mainframe.FormDesigner;
-import com.fr.general.IOUtils;
/**
* Created by zhouping on 2017/2/9.
@@ -11,7 +11,7 @@ public class TabMoveCustomAction extends TabMoveAction {
public TabMoveCustomAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) {
super(t, xCardSwitchButton);
this.setName("");
- this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/control/refresh.png"));
+ this.setSmallIcon(new LazyIcon("refresh"));
}
}
diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/TabMoveNextAction.java b/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/TabMoveNextAction.java
index 6dfae2ddd7..b802fa1602 100644
--- a/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/TabMoveNextAction.java
+++ b/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/TabMoveNextAction.java
@@ -1,9 +1,9 @@
package com.fr.design.designer.creator.cardlayout;
+import com.fine.theme.icon.LazyIcon;
import com.fr.design.mainframe.FormDesigner;
import com.fr.form.ui.CardSwitchButton;
import com.fr.form.ui.container.cardlayout.WTabFitLayout;
-import com.fr.general.IOUtils;
/**
@@ -14,7 +14,7 @@ public class TabMoveNextAction extends TabMoveAction {
public TabMoveNextAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) {
super(t, xCardSwitchButton);
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Move_Tab_Next"));
- this.setSmallIcon(IOUtils.readIcon("com/fr/design/images/control/tab/next.png"));
+ this.setSmallIcon(new LazyIcon("triangle_right"));
}
@Override
diff --git a/designer-realize/src/main/java/com/fr/design/actions/edit/DeleteAction.java b/designer-realize/src/main/java/com/fr/design/actions/edit/DeleteAction.java
index c82bf748de..0065a8dc9f 100644
--- a/designer-realize/src/main/java/com/fr/design/actions/edit/DeleteAction.java
+++ b/designer-realize/src/main/java/com/fr/design/actions/edit/DeleteAction.java
@@ -4,6 +4,7 @@
package com.fr.design.actions.edit;
+import com.fine.theme.icon.LazyIcon;
import com.fr.design.actions.ElementCaseAction;
import com.fr.design.mainframe.ElementCasePane;
@@ -20,7 +21,7 @@ public class DeleteAction extends ElementCaseAction {
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_M_Edit_Delete"));
this.setMnemonic('D');
//Richie:删除菜单图标
- this.setSmallIcon("/com/fr/design/images/m_report/delete");
+ this.setSmallIcon(new LazyIcon("remove"));
// this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, 0));
}
diff --git a/designer-realize/src/main/java/com/fr/poly/actions/DeleteBlockAction.java b/designer-realize/src/main/java/com/fr/poly/actions/DeleteBlockAction.java
index 1acda00e68..a510be9105 100644
--- a/designer-realize/src/main/java/com/fr/poly/actions/DeleteBlockAction.java
+++ b/designer-realize/src/main/java/com/fr/poly/actions/DeleteBlockAction.java
@@ -3,6 +3,7 @@
*/
package com.fr.poly.actions;
+import com.fine.theme.icon.LazyIcon;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
@@ -26,7 +27,7 @@ public class DeleteBlockAction extends UpdateAction implements TemplateComponent
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_M_Edit_Delete"));
this.setMnemonic('D');
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0));
- this.setSmallIcon("/com/fr/design/images/m_report/delete");
+ this.setSmallIcon(new LazyIcon("remove"));
}
@Override