From e977f6fc6fdd31a44e21c0a39dc9aa2076121c87 Mon Sep 17 00:00:00 2001 From: obo Date: Mon, 27 Mar 2023 15:54:51 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-92439=20mac=E4=B8=8B-=E5=B1=95=E5=BC=80?= =?UTF-8?q?=E6=94=B6=E8=B5=B7=E5=9B=BE=E6=A0=87=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/base/svg/SVGIcon.java | 8 ++--- .../icontainer/UIEastResizableContainer.java | 8 ++--- .../gui/icontainer/UIResizableContainer.java | 32 +++++++++---------- .../mainframe/EastRegionContainerPane.java | 8 ++--- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/designer-base/src/main/java/com/fr/base/svg/SVGIcon.java b/designer-base/src/main/java/com/fr/base/svg/SVGIcon.java index a15b2118d3..613b6ddbde 100644 --- a/designer-base/src/main/java/com/fr/base/svg/SVGIcon.java +++ b/designer-base/src/main/java/com/fr/base/svg/SVGIcon.java @@ -1,6 +1,6 @@ package com.fr.base.svg; -import com.fr.design.utils.SvgPaintWorker; +import com.fr.design.utils.SvgPainter; import com.fr.general.IOUtils; import javax.swing.Icon; @@ -37,12 +37,12 @@ public class SVGIcon implements Icon { public void paintIcon(Component c, Graphics g, int x, int y) { if (HI_DPI_SURPORT) { Graphics2D graphics = (Graphics2D) g.create(x, y, image.getWidth(null), image.getHeight(null)); - new SvgPaintWorker(graphics) { + new SvgPainter(graphics) { @Override - protected void doPrint() { + protected void doPaint() { this.drawImage(image, 0, 0, null); } - }.execute(); + }.paint(); graphics.dispose(); } else { g.drawImage(image, x, y, null); diff --git a/designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java b/designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java index 5029ccf98d..d078b747fb 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java +++ b/designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java @@ -5,7 +5,7 @@ import com.fr.design.base.mode.DesignModeContext; import com.fr.design.constants.UIConstants; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.mainframe.DesignerContext; -import com.fr.design.utils.SvgPaintWorker; +import com.fr.design.utils.SvgPainter; import com.fr.design.utils.gui.GUICoreUtils; import javax.swing.JComponent; @@ -338,12 +338,12 @@ public class UIEastResizableContainer extends JPanel { } } //如果环境支持高清化,在调整缩放比例时绘制svg会影响到位置的变化,若图标无确定裁剪位置,则需要进行调整 - new SvgPaintWorker(g) { + new SvgPainter(g) { @Override - protected void doPrint() { + protected void doPaint() { this.drawImage(button, 10, 7, null); } - }.execute(); + }.paint(); } } } \ No newline at end of file diff --git a/designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java b/designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java index ceaabe56e6..20109fff1e 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java +++ b/designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java @@ -3,7 +3,7 @@ package com.fr.design.gui.icontainer; import com.fr.base.vcs.DesignerMode; import com.fr.design.constants.UIConstants; import com.fr.design.mainframe.DesignerContext; -import com.fr.design.utils.SvgPaintWorker; +import com.fr.design.utils.SvgPainter; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.stable.Constants; @@ -421,24 +421,24 @@ public class UIResizableContainer extends JPanel { Image upButton = (upModel == UIConstants.MODEL_NORMAL ? UIConstants.DRAG_UP_NORMAL : UIConstants.DRAG_UP_PRESS); Image downButton = (downModel == UIConstants.MODEL_NORMAL ? UIConstants.DRAG_DOWN_NORMAL : UIConstants.DRAG_DOWN_PRESS); g.drawImage(UIConstants.DRAG_BAR_LIGHT, 0, 0, getWidth(), getHeight(), null); - new SvgPaintWorker(g) { + new SvgPainter(g) { @Override - protected void doPrint() { + protected void doPaint() { this.drawImage(UIConstants.DRAG_LINE, (getWidth() - toolPaneHeight) / 2, 3, null); } - }.execute(); - new SvgPaintWorker(g) { + }.paint(); + new SvgPainter(g) { @Override - protected void doPrint() { + protected void doPaint() { this.drawImage(upButton, ARROW_MARGIN, 0, null); } - }.execute(); - new SvgPaintWorker(g) { + }.paint(); + new SvgPainter(g) { @Override - protected void doPrint() { + protected void doPaint() { this.drawImage(downButton, (getWidth() - toolPaneHeight - ARROW_MARGIN), 0, null); } - }.execute(); + }.paint(); } } @@ -535,12 +535,12 @@ public class UIResizableContainer extends JPanel { button = UIConstants.DRAG_LEFT_PRESS; } } - new SvgPaintWorker(g) { + new SvgPainter(g) { @Override - protected void doPrint() { + protected void doPaint() { this.drawImage(button, -6, ARROW_MARGIN_VERTICAL, VerticalToolPane.this); } - }.execute(); + }.paint(); } else { g.drawImage(UIConstants.DRAG_BAR_LIGHT, 0, 0, toolPaneHeight, getHeight(), null); if (containerWidth == toolPaneHeight) { @@ -556,12 +556,12 @@ public class UIResizableContainer extends JPanel { button = UIConstants.DRAG_RIGHT_PRESS; } } - new SvgPaintWorker(g) { + new SvgPainter(g) { @Override - protected void doPrint() { + protected void doPaint() { this.drawImage(button, 10, ARROW_MARGIN_VERTICAL, VerticalToolPane.this); } - }.execute(); + }.paint(); } if (isLeftRightDragEnabled) { g.drawImage(UIConstants.DRAG_DOT_VERTICAL, 2, getHeight() / 2, 5, toolPaneHeight, null); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java index 858e76048d..0d3dfcae84 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java @@ -19,7 +19,7 @@ import com.fr.design.notification.SnapChat; import com.fr.design.notification.SnapChatFactory; import com.fr.design.ui.util.UIUtil; import com.fr.design.utils.DesignUtils; -import com.fr.design.utils.SvgPaintWorker; +import com.fr.design.utils.SvgPainter; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUIPaintUtils; import com.fr.log.FineLoggerFactory; @@ -1314,12 +1314,12 @@ public class EastRegionContainerPane extends UIEastResizableContainer { } else { button = UIConstants.POP_BUTTON_UP; } - new SvgPaintWorker(g) { + new SvgPainter(g) { @Override - protected void doPrint() { + protected void doPaint() { this.drawImage(button, (ARROW_RANGE_START + 8), 4, null); } - }.execute(); + }.paint(); } }