Browse Source

模板主题配置;单元格元素缩放,新增图标

newui
renekton 6 months ago
parent
commit
9b6a5200e0
  1. 6
      designer-base/src/main/java/com/fr/design/gui/icombobox/ColorSchemeComboBox.java
  2. 6
      designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java
  3. 3
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java
  4. 7
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPagesPane.java
  5. 7
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPane.java
  6. 5
      designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeProfileDialog.java
  7. 6
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/AbstractChartStylePane.java
  8. 2
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartFontPane.java
  9. 6
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartLabelStylePane.java
  10. 8
      designer-base/src/main/java/com/fr/design/mainframe/theme/ui/BreadcrumbBar.java
  11. 5
      designer-base/src/main/resources/com/fine/theme/icon/layout/layout_bottom.svg
  12. 6
      designer-base/src/main/resources/com/fine/theme/icon/layout/layout_left.svg
  13. 6
      designer-base/src/main/resources/com/fine/theme/icon/layout/layout_right.svg
  14. 5
      designer-base/src/main/resources/com/fine/theme/icon/layout/layout_top.svg
  15. 6
      designer-base/src/main/resources/com/fine/theme/icon/layout/layout_top_right.svg
  16. 7
      designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json
  17. 11
      designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java
  18. 7
      designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java
  19. 13
      designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java
  20. 5
      designer-realize/src/main/java/com/fr/design/condition/WidgetHighlightPane.java
  21. 6
      designer-realize/src/main/java/com/fr/design/widget/CellWidgetCardPane.java
  22. 6
      designer-realize/src/main/java/com/fr/design/widget/EastCellWidgetCardPane.java
  23. 23
      designer-realize/src/main/java/com/fr/design/widget/FloatWidgetManageCardPane.java

6
designer-base/src/main/java/com/fr/design/gui/icombobox/ColorSchemeComboBox.java

@ -252,7 +252,7 @@ public class ColorSchemeComboBox extends UIComboBox {
} else { } else {
FontMetrics fontMetrics = comp.getFontMetrics(comp.getFont()); FontMetrics fontMetrics = comp.getFontMetrics(comp.getFont());
//宽度是5倍的高加上4倍的留白 //宽度是5倍的高加上4倍的留白
double width = (HEIGHT - 2 * Y) * MAX_COUNT + BLANK * (MAX_COUNT - 1); double width = FineUIScale.scale((float) ((HEIGHT - 2 * Y) * MAX_COUNT + BLANK * (MAX_COUNT - 1)));
String fill = BLANK_SPACE; String fill = BLANK_SPACE;
//图形和文字之间留的宽度大于3倍的X //图形和文字之间留的宽度大于3倍的X
while (fontMetrics.stringWidth(fill) < width + 3 * X) { while (fontMetrics.stringWidth(fill) < width + 3 * X) {
@ -285,7 +285,7 @@ public class ColorSchemeComboBox extends UIComboBox {
double width = height * MAX_COUNT + BLANK * (MAX_COUNT - 1); double width = height * MAX_COUNT + BLANK * (MAX_COUNT - 1);
LinearGradientPaint linearGradientPaint = new LinearGradientPaint((float) X, (float) Y, (float) (X + width), (float) Y, new float[]{0f, 1f}, colors.toArray(new Color[colors.size()])); LinearGradientPaint linearGradientPaint = new LinearGradientPaint((float) X, (float) Y, (float) (X + width), (float) Y, new float[]{0f, 1f}, colors.toArray(new Color[colors.size()]));
g2d.setPaint(linearGradientPaint); g2d.setPaint(linearGradientPaint);
Rectangle2D rec = new Rectangle2D.Double(X, Y, width, height); Rectangle2D rec = new Rectangle2D.Double(FineUIScale.scale((float) X), FineUIScale.scale((float) Y), FineUIScale.scale((float) width), FineUIScale.scale((float) height));
g2d.fill(rec); g2d.fill(rec);
} }
@ -296,7 +296,7 @@ public class ColorSchemeComboBox extends UIComboBox {
double width = ((height + BLANK) * MAX_COUNT - size) / size; double width = ((height + BLANK) * MAX_COUNT - size) / size;
for (int i = 0; i < size; i++) { for (int i = 0; i < size; i++) {
g2d.setPaint(colors.get(i)); g2d.setPaint(colors.get(i));
Rectangle2D rec = new Rectangle2D.Double(X + (width + BLANK) * i, Y, width, height); Rectangle2D rec = new Rectangle2D.Double(FineUIScale.scale((float) (X + (width + BLANK) * i)), FineUIScale.scale((float) Y), FineUIScale.scale((float) width), FineUIScale.scale((float) height));
g2d.fill(rec); g2d.fill(rec);
} }
} }

6
designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java

@ -301,9 +301,9 @@ public class ExportJavaScriptPane extends AbstractHyperLinkPane<ExportJavaScript
this.setDefaultEditor(ParameterCombobox.class, new ParameterCombobox()); this.setDefaultEditor(ParameterCombobox.class, new ParameterCombobox());
this.setDefaultEditor(ParameterSettingButton.class, new ParameterSettingButton()); this.setDefaultEditor(ParameterSettingButton.class, new ParameterSettingButton());
this.setDefaultRenderer(ParameterSettingButton.class, new ParameterSettingButton()); this.setDefaultRenderer(ParameterSettingButton.class, new ParameterSettingButton());
this.createTable().getColumnModel().getColumn(2).setMaxWidth(60); this.createTable().getColumnModel().getColumn(2).setMaxWidth(FineUIScale.scale(60));
this.createTable().getColumnModel().getColumn(4).setMaxWidth(60); this.createTable().getColumnModel().getColumn(4).setMaxWidth(FineUIScale.scale(60));
this.createTable().getColumnModel().getColumn(5).setMaxWidth(50); this.createTable().getColumnModel().getColumn(5).setMaxWidth(FineUIScale.scale(50));
} }
@Override @Override

3
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe.theme; package com.fr.design.mainframe.theme;
import com.fine.theme.utils.FineUIScale; import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.GraphHelper; import com.fr.base.GraphHelper;
import com.fr.base.theme.TemplateTheme; import com.fr.base.theme.TemplateTheme;
import com.fr.base.theme.TemplateThemeConfig; import com.fr.base.theme.TemplateThemeConfig;
@ -109,7 +110,7 @@ public class TemplateThemeBlock<T extends TemplateTheme> extends JPanel {
JPanel infoPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel infoPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
infoPane.setPreferredSize(new Dimension(CONTENT_WIDTH, INFO_HEIGHT)); infoPane.setPreferredSize(new Dimension(CONTENT_WIDTH, INFO_HEIGHT));
infoPane.setBackground(Color.WHITE); infoPane.setBackground(Color.WHITE);
infoPane.setBorder(BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L7,0,IntervalConstants.INTERVAL_L7)); infoPane.setBorder(new ScaledEmptyBorder(0, IntervalConstants.INTERVAL_L7,0,IntervalConstants.INTERVAL_L7));
UILabel titleLabel = new UILabel(name); UILabel titleLabel = new UILabel(name);
titleLabel.setToolTipText(name); titleLabel.setToolTipText(name);

7
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPagesPane.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.theme; package com.fr.design.mainframe.theme;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.theme.FormTheme; import com.fr.base.theme.FormTheme;
import com.fr.base.theme.FormThemeConfig; import com.fr.base.theme.FormThemeConfig;
@ -73,16 +74,16 @@ public class TemplateThemeGridPagesPane extends JPanel {
private void initializePane(@Nullable Window window) { private void initializePane(@Nullable Window window) {
setLayout(new BorderLayout()); setLayout(new BorderLayout());
setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10)); setBorder(new ScaledEmptyBorder(10, 10, 0, 10));
breadcrumbBar = new BreadcrumbBar(); breadcrumbBar = new BreadcrumbBar();
breadcrumbBar.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); breadcrumbBar.setBorder(new ScaledEmptyBorder(0, 0, 10, 0));
add(breadcrumbBar, BorderLayout.NORTH); add(breadcrumbBar, BorderLayout.NORTH);
contentPane = new JPanel(); contentPane = new JPanel();
contentPane.setBorder(new CompoundBorder( contentPane.setBorder(new CompoundBorder(
new TopLineBorder(new Color(0xE0E0E1), 1), new TopLineBorder(new Color(0xE0E0E1), 1),
BorderFactory.createEmptyBorder(10, 0, 0, 0))); new ScaledEmptyBorder(10, 0, 0, 0)));
cardLayout = new CardLayout(); cardLayout = new CardLayout();
contentPane.setLayout(cardLayout); contentPane.setLayout(cardLayout);
add(contentPane, BorderLayout.CENTER); add(contentPane, BorderLayout.CENTER);

7
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPane.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe.theme; package com.fr.design.mainframe.theme;
import com.fine.theme.utils.FineUIScale; import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.theme.TemplateTheme; import com.fr.base.theme.TemplateTheme;
import com.fr.base.theme.TemplateThemeConfig; import com.fr.base.theme.TemplateThemeConfig;
import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.IntervalConstants;
@ -35,9 +36,9 @@ import java.util.Map;
public class TemplateThemeGridPane<T extends TemplateTheme> extends BasicPane { public class TemplateThemeGridPane<T extends TemplateTheme> extends BasicPane {
public static final int BLOCK_COUNT_ROW_LINE = 3; public static final int BLOCK_COUNT_ROW_LINE = 3;
public static final int BLOCK_GAP = IntervalConstants.INTERVAL_L1; public static final int BLOCK_GAP = IntervalConstants.INTERVAL_L1;
public static final int CONTENT_WIDTH = FineUIScale.scale(TemplateThemeBlock.CONTENT_WIDTH * BLOCK_COUNT_ROW_LINE + BLOCK_GAP * (BLOCK_COUNT_ROW_LINE - 1) + 10); public static final int CONTENT_WIDTH = TemplateThemeBlock.CONTENT_WIDTH * BLOCK_COUNT_ROW_LINE + FineUIScale.scale(BLOCK_GAP) * (BLOCK_COUNT_ROW_LINE - 1) + FineUIScale.scale(10);
public static final int BLOCK_ROWS_PER_PAGE = 3; public static final int BLOCK_ROWS_PER_PAGE = 3;
public static final int CONTENT_HEIGHT = FineUIScale.scale(Math.min(527, TemplateThemeBlock.CONTENT_HEIGHT * BLOCK_ROWS_PER_PAGE + BLOCK_GAP * (BLOCK_ROWS_PER_PAGE + 1))); public static final int CONTENT_HEIGHT = Math.min(FineUIScale.scale(527), TemplateThemeBlock.CONTENT_HEIGHT * BLOCK_ROWS_PER_PAGE + FineUIScale.scale(BLOCK_GAP) * (BLOCK_ROWS_PER_PAGE + 1));
public static final int ASYNC_FETCH_THEME_THREAD_COUNT = 10; public static final int ASYNC_FETCH_THEME_THREAD_COUNT = 10;
private final AsyncThemeFetcher<T> asyncThemeFetcher; private final AsyncThemeFetcher<T> asyncThemeFetcher;
@ -73,7 +74,7 @@ public class TemplateThemeGridPane<T extends TemplateTheme> extends BasicPane {
setLayout(FRGUIPaneFactory.createBorderLayout()); setLayout(FRGUIPaneFactory.createBorderLayout());
setPreferredSize(new Dimension(CONTENT_WIDTH, CONTENT_HEIGHT)); setPreferredSize(new Dimension(CONTENT_WIDTH, CONTENT_HEIGHT));
contentListPane.setBorder(BorderFactory.createEmptyBorder(BLOCK_GAP, 0, BLOCK_GAP, 10)); contentListPane.setBorder(new ScaledEmptyBorder(BLOCK_GAP, 0, BLOCK_GAP, 10));
contentListPane.setLayout(new GridLayout(0, BLOCK_COUNT_ROW_LINE, BLOCK_GAP, BLOCK_GAP)); contentListPane.setLayout(new GridLayout(0, BLOCK_COUNT_ROW_LINE, BLOCK_GAP, BLOCK_GAP));
fillContentListPane(); fillContentListPane();

5
designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeProfileDialog.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.theme.dialog; package com.fr.design.mainframe.theme.dialog;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.theme.TemplateTheme; import com.fr.base.theme.TemplateTheme;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
@ -27,8 +28,8 @@ import java.util.Set;
public class TemplateThemeProfileDialog<T extends TemplateTheme> extends TemplateThemeDialog { public class TemplateThemeProfileDialog<T extends TemplateTheme> extends TemplateThemeDialog {
public static TemplateThemeProfilePane<? extends TemplateTheme> currentVisibleProfilePane; public static TemplateThemeProfilePane<? extends TemplateTheme> currentVisibleProfilePane;
public static final int CONTENT_WIDTH = 1010; public static final int CONTENT_WIDTH = FineUIScale.scale(1010);
public static final int CONTENT_HEIGHT = 542; public static final int CONTENT_HEIGHT = FineUIScale.scale(542);
private final TemplateThemeProfilePane<T> profilePane; private final TemplateThemeProfilePane<T> profilePane;
public TemplateThemeProfileDialog(Window parent, TemplateThemeProfilePane<T> profilePane) { public TemplateThemeProfileDialog(Window parent, TemplateThemeProfilePane<T> profilePane) {

6
designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/AbstractChartStylePane.java

@ -1,5 +1,7 @@
package com.fr.design.mainframe.theme.edit.chart; package com.fr.design.mainframe.theme.edit.chart;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.theme.settings.ThemedChartStyle; import com.fr.base.theme.settings.ThemedChartStyle;
import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
@ -30,11 +32,11 @@ public abstract class AbstractChartStylePane extends BasicPane {
protected void initPane() { protected void initPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
double labelWidth = 90; double labelWidth = 90;
double totalWidth = 155; double totalWidth = 190;
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double[] columnSize = {labelWidth, totalWidth}; double[] columnSize = {labelWidth, totalWidth};
JPanel gapTableLayoutPane = TableLayoutHelper.createGapTableLayoutPane(getComponent(), getRows(p), columnSize, 5, LayoutConstants.VGAP_LARGE); JPanel gapTableLayoutPane = TableLayoutHelper.createGapTableLayoutPane(getComponent(), getRows(p), columnSize, 5, LayoutConstants.VGAP_LARGE);
gapTableLayoutPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0)); gapTableLayoutPane.setBorder(new ScaledEmptyBorder(0, 10, 0, 0));
UIScrollPane rightTopPane = new UIScrollPane(gapTableLayoutPane); UIScrollPane rightTopPane = new UIScrollPane(gapTableLayoutPane);
rightTopPane.setBorder(BorderFactory.createEmptyBorder()); rightTopPane.setBorder(BorderFactory.createEmptyBorder());
this.add(rightTopPane, BorderLayout.CENTER); this.add(rightTopPane, BorderLayout.CENTER);

2
designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartFontPane.java

@ -78,7 +78,7 @@ public class ChartFontPane extends BasicPane {
protected JPanel getContentPane(JPanel buttonPane) { protected JPanel getContentPane(JPanel buttonPane) {
double labelWidth = 90; double labelWidth = 90;
double totalWidth = 155; double totalWidth = 190;
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double[] rows = {p, p, p}; double[] rows = {p, p, p};
double[] columnSize = {labelWidth, totalWidth}; double[] columnSize = {labelWidth, totalWidth};

6
designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartLabelStylePane.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.theme.edit.chart; package com.fr.design.mainframe.theme.edit.chart;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.theme.settings.ThemedChartStyle; import com.fr.base.theme.settings.ThemedChartStyle;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ibutton.UIColorButton; import com.fr.design.gui.ibutton.UIColorButton;
@ -35,6 +36,11 @@ public class ChartLabelStylePane extends AbstractChartStylePane {
public String getUILabelText() { public String getUILabelText() {
return Toolkit.i18nText("Fine-Design_Chart_Label_Character"); return Toolkit.i18nText("Fine-Design_Chart_Label_Character");
} }
@Override
public Dimension getPreferredSize() {
return new Dimension(-1, FineUIScale.scale(100));
}
}; };
initListener(); initListener();
} }

8
designer-base/src/main/java/com/fr/design/mainframe/theme/ui/BreadcrumbBar.java

@ -1,5 +1,7 @@
package com.fr.design.mainframe.theme.ui; package com.fr.design.mainframe.theme.ui;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
@ -67,15 +69,15 @@ public class BreadcrumbBar extends JPanel {
protected Component createSeparator() { protected Component createSeparator() {
UILabel separator = new UILabel("/"); UILabel separator = new UILabel("/");
separator.setBorder(BorderFactory.createEmptyBorder(0, 8, 0, 8)); separator.setBorder(new ScaledEmptyBorder(0, 8, 0, 8));
separator.setPreferredSize(new Dimension(separator.getPreferredSize().width, 17)); separator.setPreferredSize(new Dimension(separator.getPreferredSize().width, FineUIScale.scale(17)));
return separator; return separator;
} }
protected JButton createBreadcrumb(String text) { protected JButton createBreadcrumb(String text) {
JButton button = new BreadcrumbButton(text); JButton button = new BreadcrumbButton(text);
button.setPreferredSize(new Dimension(button.getPreferredSize().width, 17)); button.setPreferredSize(new Dimension(button.getPreferredSize().width, FineUIScale.scale(17)));
return button; return button;
} }

5
designer-base/src/main/resources/com/fine/theme/icon/layout/layout_bottom.svg

@ -0,0 +1,5 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4 15C4 14.4477 4.44772 14 5 14H27C27.5523 14 28 14.4477 28 15V17C28 17.5523 27.5523 18 27 18H5C4.44772 18 4 17.5523 4 17V15Z" fill="#5493F2"/>
<path d="M4 7C4 6.44772 4.44772 6 5 6H27C27.5523 6 28 6.44772 28 7V9C28 9.55228 27.5523 10 27 10H5C4.44772 10 4 9.55228 4 9V7Z" fill="#5493F2"/>
<path d="M10 23C10 22.4477 10.4477 22 11 22H21C21.5523 22 22 22.4477 22 23V25C22 25.5523 21.5523 26 21 26H11C10.4477 26 10 25.5523 10 25V23Z" fill="#105DD1"/>
</svg>

After

Width:  |  Height:  |  Size: 560 B

6
designer-base/src/main/resources/com/fine/theme/icon/layout/layout_left.svg

@ -0,0 +1,6 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 15C12 14.4477 12.4477 14 13 14H27C27.5523 14 28 14.4477 28 15V17C28 17.5523 27.5523 18 27 18H13C12.4477 18 12 17.5523 12 17V15Z" fill="#5493F2"/>
<path d="M12 23C12 22.4477 12.4477 22 13 22H27C27.5523 22 28 22.4477 28 23V25C28 25.5523 27.5523 26 27 26H13C12.4477 26 12 25.5523 12 25V23Z" fill="#5493F2"/>
<path d="M12 7C12 6.44772 12.4477 6 13 6H27C27.5523 6 28 6.44772 28 7V9C28 9.55228 27.5523 10 27 10H13C12.4477 10 12 9.55228 12 9V7Z" fill="#5493F2"/>
<path d="M7 10C7.55228 10 8 10.4477 8 11L8 21C8 21.5523 7.55228 22 7 22L5 22C4.44771 22 4 21.5523 4 21L4 11C4 10.4477 4.44772 10 5 10L7 10Z" fill="#105DD1"/>
</svg>

After

Width:  |  Height:  |  Size: 730 B

6
designer-base/src/main/resources/com/fine/theme/icon/layout/layout_right.svg

@ -0,0 +1,6 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4 15C4 14.4477 4.44772 14 5 14H19C19.5523 14 20 14.4477 20 15V17C20 17.5523 19.5523 18 19 18H5C4.44772 18 4 17.5523 4 17V15Z" fill="#5493F2"/>
<path d="M4 23C4 22.4477 4.44772 22 5 22H19C19.5523 22 20 22.4477 20 23V25C20 25.5523 19.5523 26 19 26H5C4.44772 26 4 25.5523 4 25V23Z" fill="#5493F2"/>
<path d="M4 7C4 6.44772 4.44772 6 5 6H19C19.5523 6 20 6.44772 20 7V9C20 9.55228 19.5523 10 19 10H5C4.44772 10 4 9.55228 4 9V7Z" fill="#5493F2"/>
<path d="M27 10C27.5523 10 28 10.4477 28 11L28 21C28 21.5523 27.5523 22 27 22L25 22C24.4477 22 24 21.5523 24 21L24 11C24 10.4477 24.4477 10 25 10L27 10Z" fill="#105DD1"/>
</svg>

After

Width:  |  Height:  |  Size: 725 B

5
designer-base/src/main/resources/com/fine/theme/icon/layout/layout_top.svg

@ -0,0 +1,5 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4 23C4 22.4477 4.44772 22 5 22H27C27.5523 22 28 22.4477 28 23V25C28 25.5523 27.5523 26 27 26H5C4.44772 26 4 25.5523 4 25V23Z" fill="#5493F2"/>
<path d="M4 15C4 14.4477 4.44772 14 5 14H27C27.5523 14 28 14.4477 28 15V17C28 17.5523 27.5523 18 27 18H5C4.44772 18 4 17.5523 4 17V15Z" fill="#5493F2"/>
<path d="M10 7C10 6.44772 10.4477 6 11 6H21C21.5523 6 22 6.44772 22 7V9C22 9.55228 21.5523 10 21 10H11C10.4477 10 10 9.55228 10 9V7Z" fill="#105DD1"/>
</svg>

After

Width:  |  Height:  |  Size: 560 B

6
designer-base/src/main/resources/com/fine/theme/icon/layout/layout_top_right.svg

@ -0,0 +1,6 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4 15C4 14.4477 4.44772 14 5 14H19C19.5523 14 20 14.4477 20 15V17C20 17.5523 19.5523 18 19 18H5C4.44772 18 4 17.5523 4 17V15Z" fill="#5493F2"/>
<path d="M4 23C4 22.4477 4.44772 22 5 22H19C19.5523 22 20 22.4477 20 23V25C20 25.5523 19.5523 26 19 26H5C4.44772 26 4 25.5523 4 25V23Z" fill="#5493F2"/>
<path d="M4 7C4 6.44772 4.44772 6 5 6H19C19.5523 6 20 6.44772 20 7V9C20 9.55228 19.5523 10 19 10H5C4.44772 10 4 9.55228 4 9V7Z" fill="#5493F2"/>
<path d="M27 6C27.5523 6 28 6.44772 28 7L28 17C28 17.5523 27.5523 18 27 18L25 18C24.4477 18 24 17.5523 24 17L24 7C24 6.44771 24.4477 6 25 6L27 6Z" fill="#105DD1"/>
</svg>

After

Width:  |  Height:  |  Size: 718 B

7
designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json

@ -406,7 +406,12 @@
"information":"tip/information.svg", "information":"tip/information.svg",
"new_information":"tip/new_information.svg", "new_information":"tip/new_information.svg",
"success":"tip/success.svg", "success":"tip/success.svg",
"warning":"tip/warning.svg" "warning":"tip/warning.svg",
"layout_top": "layout/layout_top.svg",
"layout_bottom": "layout/layout_bottom.svg",
"layout_left": "layout/layout_left.svg",
"layout_right": "layout/layout_right.svg",
"layout_top_right": "layout/layout_top_right.svg"
} }
} }

11
designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java

@ -1,6 +1,7 @@
package com.fr.van.chart.designer.style; package com.fr.van.chart.designer.style;
import com.fine.swing.ui.layout.Column; import com.fine.swing.ui.layout.Column;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineLayoutBuilder; import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIScale; import com.fine.theme.utils.FineUIScale;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
@ -186,11 +187,11 @@ public class VanChartPlotLegendPane extends BasicPane {
Integer[] valueArray = {Constants.TOP, Constants.BOTTOM, Constants.LEFT, Constants.RIGHT, Constants.RIGHT_TOP}; Integer[] valueArray = {Constants.TOP, Constants.BOTTOM, Constants.LEFT, Constants.RIGHT, Constants.RIGHT_TOP};
Icon[] iconArray = { Icon[] iconArray = {
BaseUtils.readIcon("/com/fr/design/images/chart/ChartLegend/layout_top.png"), new LazyIcon("layout_top"),
BaseUtils.readIcon("/com/fr/design/images/chart/ChartLegend/layout_bottom.png"), new LazyIcon("layout_bottom"),
BaseUtils.readIcon("/com/fr/design/images/chart/ChartLegend/layout_left.png"), new LazyIcon("layout_left"),
BaseUtils.readIcon("/com/fr/design/images/chart/ChartLegend/layout_right.png"), new LazyIcon("layout_right"),
BaseUtils.readIcon("/com/fr/design/images/chart/ChartLegend/layout_top_right.png") new LazyIcon("layout_top_right")
}; };
location = new UIButtonGroup<Integer>(iconArray, valueArray); location = new UIButtonGroup<Integer>(iconArray, valueArray);

7
designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java

@ -1,6 +1,7 @@
package com.fr.van.chart.designer.style; package com.fr.van.chart.designer.style;
import com.fine.theme.utils.FineComponentsFactory; import com.fine.theme.utils.FineComponentsFactory;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIStyle; import com.fine.theme.utils.FineUIStyle;
import com.fr.base.BaseFormula; import com.fr.base.BaseFormula;
import com.fr.base.Utils; import com.fr.base.Utils;
@ -51,9 +52,9 @@ import static com.fine.swing.ui.layout.Layouts.row;
public class VanChartTitlePane extends AbstractVanChartScrollPane<VanChart> { public class VanChartTitlePane extends AbstractVanChartScrollPane<VanChart> {
private static final long serialVersionUID = -2438898431228882682L; private static final long serialVersionUID = -2438898431228882682L;
private static final int WIDTH = 165; private static final int WIDTH = FineUIScale.scale(165);
private static final int HEIGHT = 100; private static final int HEIGHT = FineUIScale.scale(100);
private static final int GAP = 20; private static final int GAP = FineUIScale.scale(20);
private UICheckBox isTitleVisible; private UICheckBox isTitleVisible;
private JPanel titlePane; private JPanel titlePane;

13
designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java

@ -9,6 +9,7 @@ import com.fr.design.dialog.BasicPane;
import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ibutton.UIToggleButton; 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.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
@ -46,7 +47,7 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
private UIButtonGroup<Integer> position; private UIButtonGroup<Integer> position;
private UIButtonGroup<Boolean> autoAdjust; private UIButtonGroup<Boolean> autoAdjust;
private UIButtonGroup<Integer> orientation; private UIButtonGroup<Integer> orientation;
private UIToggleButton tractionLine; private UICheckBox tractionLine;
private ColorSelectBox backgroundColor; private ColorSelectBox backgroundColor;
private VanChartBorderWithShapePane borderPane; private VanChartBorderWithShapePane borderPane;
@ -242,8 +243,14 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
} }
if (plot.isSupportLeadLine()) { if (plot.isSupportLeadLine()) {
tractionLine = new UIToggleButton(Toolkit.i18nText("Fine-Design_Chart_Show_Guideline")); tractionLine = new UICheckBox(Toolkit.i18nText("Fine-Design_Chart_Show_Guideline"));
panel.add(tractionLine, BorderLayout.SOUTH); Component[][] comps = new Component[1][2];
comps[0] = new Component[]{new UILabel(), tractionLine};
double[] row = new double[]{TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED};
double[] col = new double[]{TableLayout.FILL, TableLayout4VanChartHelper.EDIT_AREA_WIDTH};
getLabelPositionPane(comps, row, col);
panel.add(getLabelPositionPane(comps, row, col), BorderLayout.SOUTH);
initPositionListener(); initPositionListener();
} else if (PlotFactory.plotAutoAdjustLabelPosition(plot)) { } else if (PlotFactory.plotAutoAdjustLabelPosition(plot)) {
panel.add(FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3}, panel.add(FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},

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

@ -9,8 +9,7 @@ import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.widget.CellWidgetCardPane; import com.fr.design.widget.CellWidgetCardPane;
import com.fr.design.widget.EastCellWidgetCardPane; import com.fr.design.widget.FloatWidgetManageCardPane;
import com.fr.design.widget.WidgetManageCardPane;
import com.fr.design.widget.WidgetPane; import com.fr.design.widget.WidgetPane;
import com.fr.form.ui.*; import com.fr.form.ui.*;
@ -48,7 +47,7 @@ public class WidgetHighlightPane extends ConditionAttrSingleConditionPane<Highli
final WidgetPane widgetPane = new WidgetPane() { final WidgetPane widgetPane = new WidgetPane() {
@Override @Override
protected CellWidgetCardPane initWidgetCardPane(ElementCasePane pane) { protected CellWidgetCardPane initWidgetCardPane(ElementCasePane pane) {
return new EastCellWidgetCardPane(pane); return new FloatWidgetManageCardPane(pane);
} }
}; };
widgetPane.populate(widget); widgetPane.populate(widget);

6
designer-realize/src/main/java/com/fr/design/widget/CellWidgetCardPane.java

@ -36,7 +36,7 @@ public class CellWidgetCardPane extends BasicPane {
private WidgetMobilePane currentWidgetMobilePane; private WidgetMobilePane currentWidgetMobilePane;
//属性配置切换面板 //属性配置切换面板
private ArrayList<JPanel> paneList; private ArrayList<JPanel> paneList;
private BaseLayoutContainer tabsHeaderIconPane; protected BaseLayoutContainer tabsHeaderIconPane;
private BasicWidgetPropertySettingPane widgetPropertyPane; private BasicWidgetPropertySettingPane widgetPropertyPane;
//通用属性容器 //通用属性容器
@ -55,6 +55,10 @@ public class CellWidgetCardPane extends BasicPane {
private ElementCasePane pane; private ElementCasePane pane;
protected JPanel center;
protected CardLayout tabbedPane;
public CellWidgetCardPane(ElementCasePane pane) { public CellWidgetCardPane(ElementCasePane pane) {
this.pane = pane; this.pane = pane;
} }

6
designer-realize/src/main/java/com/fr/design/widget/EastCellWidgetCardPane.java

@ -19,12 +19,6 @@ import java.awt.Component;
*/ */
public class EastCellWidgetCardPane extends CellWidgetCardPane { public class EastCellWidgetCardPane extends CellWidgetCardPane {
private CardLayout tabbedPane;
private JPanel center;
private UIHeadGroup tabsHeaderIconPane;
public EastCellWidgetCardPane(ElementCasePane pane) { public EastCellWidgetCardPane(ElementCasePane pane) {
super(pane); super(pane);
} }

23
designer-realize/src/main/java/com/fr/design/widget/FloatWidgetManageCardPane.java

@ -0,0 +1,23 @@
package com.fr.design.widget;
import com.fr.design.mainframe.ElementCasePane;
/**
* @author Renekton
* @since on 2024/08/16
* Created on 2024/08/16
*/
public class FloatWidgetManageCardPane extends EastCellWidgetCardPane {
/**
* 悬浮窗控件管理
*/
public FloatWidgetManageCardPane(ElementCasePane pane) {
super(pane);
}
@Override
protected WidgetEventPane initWidgetEventPane(ElementCasePane pane){
return new WidgetEventPaneNoPop(pane);
}
}
Loading…
Cancel
Save