From 3a5752a973c29879760476b55c382067e03bf78a Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Wed, 23 Nov 2022 14:29:24 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-84427=20=E3=80=90=E6=9F=A5=E6=89=BE?= =?UTF-8?q?=E4=B8=8E=E6=9B=BF=E6=8D=A2=E3=80=91=E5=88=87=E6=8D=A2=E6=9F=A5?= =?UTF-8?q?=E6=89=BE=E5=86=85=E5=AE=B9=E4=BC=9A=E5=87=BA=E7=8E=B0=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E5=AE=9A=E4=BD=8D=E7=9A=84=E6=83=85=E5=86=B5=EF=BC=88?= =?UTF-8?q?=E7=89=B9=E6=AE=8A=E5=9C=BA=E6=99=AF=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../actions/replace/ui/ITReplaceSouthPanel.java | 2 +- .../design/actions/replace/ui/ITTableButton.java | 13 ------------- .../design/actions/replace/ui/ITTableEditor.java | 2 +- .../actions/replace/ui/ITTableEditorPane.java | 14 ++++++++++++++ 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceSouthPanel.java b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceSouthPanel.java index 2a555a4387..57b81077dd 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceSouthPanel.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceSouthPanel.java @@ -29,7 +29,7 @@ public class ITReplaceSouthPanel { RowSorter sorter = new TableRowSorter(itTableEditor) { @Override public boolean isSortable(int column) { - return column != CHECKBOX_INDEX || column != CONTENT_INDEX; + return column != CHECKBOX_INDEX && column != CONTENT_INDEX; } }; tableEditorPane.getEditTable().setRowSorter(sorter); diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableButton.java b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableButton.java index ce11d184d0..5cee5af04f 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableButton.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableButton.java @@ -38,19 +38,6 @@ public class ITTableButton extends AbstractCellEditor implements TableCellEditor paraButton = new UIButton("" + Toolkit.i18nText("Fine-Design_Chart_Location") + " "); paraButton.setVisible(true); paraButton.setBorderPainted(false); - paraButton.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - ITContent content = (ITContent) getEditTable().getValueAt(getEditTable().getEditingRow(), ITReplaceSouthPanel.CONTENT_INDEX); - if (StringUtils.isNotEmpty(GeneralUtils.objectToString(content.getTrlString()))) { - ITReplaceMainDialog.setITReplaceFlag(true); - TRL trl = new TRL(GeneralUtils.objectToString(content.getTrlString())); - DesignerContext.getDesignerFrame().openOrActiveTemplate(content.getTemplatePath()); - HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().navigate(trl); - } - ITReplaceMainDialog.setITReplaceFlag(false); - } - }); } diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditor.java b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditor.java index 7f4960d21b..d805d430ee 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditor.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditor.java @@ -94,7 +94,7 @@ public class ITTableEditor extends UITableModelAdapter { */ @Override public boolean isCellEditable(int row, int col) { - return col == ITReplaceSouthPanel.CONTENT_INDEX || col == ITReplaceSouthPanel.CHECKBOX_INDEX; + return col == ITReplaceSouthPanel.CHECKBOX_INDEX; } /** diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditorPane.java b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditorPane.java index f46ea95ac4..ef32da98d6 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditorPane.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditorPane.java @@ -1,17 +1,21 @@ package com.fr.design.actions.replace.ui; +import com.fr.base.TRL; import com.fr.design.actions.replace.info.base.ITContent; import com.fr.design.border.UIRoundedBorder; import com.fr.design.constants.UIConstants; import com.fr.design.dialog.BasicPane; +import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itableeditorpane.UITableEditAction; import com.fr.design.gui.itableeditorpane.UITableModelAdapter; import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.share.ui.base.MouseClickListener; +import com.fr.general.GeneralUtils; import com.fr.stable.StringUtils; @@ -75,6 +79,16 @@ public class ITTableEditorPane extends BasicPane { //改变面板的各个状态 changeComponentStatus(content, row, col); } + if (col == ITReplaceSouthPanel.CONTENT_INDEX) { + ITContent content = (ITContent) editTable.getValueAt(row, ITReplaceSouthPanel.CONTENT_INDEX); + if (StringUtils.isNotEmpty(GeneralUtils.objectToString(content.getTrlString()))) { + ITReplaceMainDialog.setITReplaceFlag(true); + TRL trl = new TRL(GeneralUtils.objectToString(content.getTrlString())); + DesignerContext.getDesignerFrame().openOrActiveTemplate(content.getTemplatePath()); + HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().navigate(trl); + } + ITReplaceMainDialog.setITReplaceFlag(false); + } } });