From b41b368b560392f3551330c067967b285d21412f Mon Sep 17 00:00:00 2001 From: "Link.Zhao" Date: Tue, 29 Mar 2022 11:32:43 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-68392=E3=80=90=E8=BF=AD=E4=BB=A3?= =?UTF-8?q?=E3=80=91=E3=80=90=E8=B6=85=E9=93=BE=E8=AE=BE=E7=BD=AE=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E3=80=91=E8=B6=85=E9=93=BE=E6=95=B0=E9=87=8F=3D1?= =?UTF-8?q?=EF=BC=8C=E7=BC=96=E8=BE=91/=E6=8E=92=E5=BA=8F=EF=BC=8C?= =?UTF-8?q?=E4=BC=9A=E4=BF=AE=E6=94=B9=E5=8D=95=E5=85=83=E6=A0=BC=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=20REPORT-68335=E3=80=90=E8=BF=AD=E4=BB=A3=E3=80=91?= =?UTF-8?q?=E3=80=90=E8=B6=85=E9=93=BE=E8=AE=BE=E7=BD=AE=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E3=80=91=E8=B6=85=E9=93=BE=E5=88=97=E8=A1=A8=E6=95=B0=E9=87=8F?= =?UTF-8?q?n->1=E6=97=B6=EF=BC=8C=E5=8D=95=E5=85=83=E6=A0=BC=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E4=BC=9A=E5=8F=98=E5=8C=96=201=E3=80=81=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=88=A4=E6=96=AD=EF=BC=9A=E5=88=A4=E6=96=AD=E4=B8=8B?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E8=A7=A6=E5=8F=91=E7=9A=84=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/gui/controlpane/UIListControlPane.java | 12 ++++++++++++ .../mainframe/HyperlinkGroupPaneActionImpl.java | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListControlPane.java index 7ba536492..034847a70 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListControlPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListControlPane.java @@ -34,6 +34,9 @@ public abstract class UIListControlPane extends UIControlPane implements ListCon private CommonShortCutHandlers commonHandlers; private ListControlPaneHelper helper; + // 目前被触发的事件 + private ListDataEvent currentEvent; + public UIListControlPane() { super(); @@ -96,7 +99,9 @@ public abstract class UIListControlPane extends UIControlPane implements ListCon nameableList.getModel().addListDataListener(new ListDataListener() { @Override public void intervalAdded(ListDataEvent e) { + setCurrentEvent(e); saveSettings(); + setCurrentEvent(null); } @Override @@ -321,4 +326,11 @@ public abstract class UIListControlPane extends UIControlPane implements ListCon } + public ListDataEvent getCurrentEvent() { + return currentEvent; + } + + public void setCurrentEvent(ListDataEvent currentEvent) { + this.currentEvent = currentEvent; + } } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java b/designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java index 372614641..6de49767a 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java @@ -18,6 +18,7 @@ import com.fr.report.cell.FloatElement; import com.fr.report.elementcase.TemplateElementCase; import com.fr.stable.Constants; +import javax.swing.event.ListDataEvent; import java.awt.Color; /** @@ -88,7 +89,7 @@ public class HyperlinkGroupPaneActionImpl implements HyperlinkGroupPaneActionPro } // 首次添加超链接,将文字样式默认改为蓝色下划线 - if (updateNameHyperlinks.size() == 1 && hyperlinkGroupPane.getSelectedIndex() == 0) { + if (updateNameHyperlinks.size() == 1 && hyperlinkGroupPane.getCurrentEvent() != null && hyperlinkGroupPane.getCurrentEvent().getType() == ListDataEvent.INTERVAL_ADDED) { editCellElement.setStyle(elementStyle.deriveFRFont(frFont)); }