Browse Source

REPORT-84427 【查找与替换】切换查找内容会出现无法定位的情况(特殊场景)

release/11.0
Destiny.Lin 2 years ago
parent
commit
3a5752a973
  1. 2
      designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceSouthPanel.java
  2. 13
      designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableButton.java
  3. 2
      designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditor.java
  4. 14
      designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditorPane.java

2
designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceSouthPanel.java

@ -29,7 +29,7 @@ public class ITReplaceSouthPanel {
RowSorter<ITTableEditor> sorter = new TableRowSorter<ITTableEditor>(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);

13
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("<html><font color = 'rgb(61,153,249)'>" + Toolkit.i18nText("Fine-Design_Chart_Location") + "</font> ");
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);
}
});
}

2
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;
}
/**

14
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<T> 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);
}
}
});

Loading…
Cancel
Save