Browse Source

REPORT-23960 linux设计器-rhel系统,超级链接问题

feature/big-screen
pengda 5 years ago
parent
commit
b8177b3b48
  1. 16
      designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java

16
designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java

@ -3,7 +3,7 @@ package com.fr.design.mainframe;
import com.fr.base.Style; import com.fr.base.Style;
import com.fr.design.actions.utils.ReportActionUtils; import com.fr.design.actions.utils.ReportActionUtils;
import com.fr.design.designer.TargetComponent; import com.fr.design.designer.TargetComponent;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.gui.frpane.HyperlinkGroupPane; import com.fr.design.gui.frpane.HyperlinkGroupPane;
import com.fr.design.gui.frpane.HyperlinkGroupPaneActionProvider; import com.fr.design.gui.frpane.HyperlinkGroupPaneActionProvider;
import com.fr.general.FRFont; import com.fr.general.FRFont;
@ -24,7 +24,7 @@ import java.awt.Color;
*/ */
public class HyperlinkGroupPaneActionImpl implements HyperlinkGroupPaneActionProvider { public class HyperlinkGroupPaneActionImpl implements HyperlinkGroupPaneActionProvider {
private static HyperlinkGroupPaneActionProvider instance; private static HyperlinkGroupPaneActionProvider instance;
private static Selection selection ;
private HyperlinkGroupPaneActionImpl() { private HyperlinkGroupPaneActionImpl() {
} }
@ -40,7 +40,9 @@ public class HyperlinkGroupPaneActionImpl implements HyperlinkGroupPaneActionPro
ElementCasePane reportPane = (ElementCasePane)elementCasePane; ElementCasePane reportPane = (ElementCasePane)elementCasePane;
final TemplateElementCase report = reportPane.getEditingElementCase(); final TemplateElementCase report = reportPane.getEditingElementCase();
NameJavaScriptGroup nameHyperlinks = getNameJSGroup(reportPane, report); NameJavaScriptGroup nameHyperlinks = getNameJSGroup(reportPane, report);
selection = reportPane.getSelection();
hyperlinkGroupPane.populate(nameHyperlinks); hyperlinkGroupPane.populate(nameHyperlinks);
} }
private NameJavaScriptGroup getNameJSGroup(ElementCasePane reportPane, final TemplateElementCase report) { private NameJavaScriptGroup getNameJSGroup(ElementCasePane reportPane, final TemplateElementCase report) {
@ -67,13 +69,12 @@ public class HyperlinkGroupPaneActionImpl implements HyperlinkGroupPaneActionPro
} }
ElementCasePane reportPane = (ElementCasePane)jt.getCurrentElementCasePane(); ElementCasePane reportPane = (ElementCasePane)jt.getCurrentElementCasePane();
final TemplateElementCase report = reportPane.getEditingElementCase(); final TemplateElementCase report = reportPane.getEditingElementCase();
final Selection sel = reportPane.getSelection();
final NameJavaScriptGroup updateNameHyperlinks = hyperlinkGroupPane.updateJSGroup(); final NameJavaScriptGroup updateNameHyperlinks = hyperlinkGroupPane.updateJSGroup();
if (sel instanceof FloatSelection) { if (selection instanceof FloatSelection) {
FloatElement selectedFloatElement = report.getFloatElement(((FloatSelection)sel).getSelectedFloatName()); FloatElement selectedFloatElement = report.getFloatElement(((FloatSelection)selection).getSelectedFloatName());
selectedFloatElement.setNameHyperlinkGroup(updateNameHyperlinks); selectedFloatElement.setNameHyperlinkGroup(updateNameHyperlinks);
} else { } else {
ReportActionUtils.actionIterateWithCellSelection((CellSelection)sel, report, new ReportActionUtils.IterAction() { ReportActionUtils.actionIterateWithCellSelection((CellSelection)selection, report, new ReportActionUtils.IterAction() {
public void dealWith(CellElement editCellElement) { public void dealWith(CellElement editCellElement) {
Style elementStyle = editCellElement.getStyle(); Style elementStyle = editCellElement.getStyle();
FRFont frFont = elementStyle.getFRFont(); FRFont frFont = elementStyle.getFRFont();
@ -94,7 +95,6 @@ public class HyperlinkGroupPaneActionImpl implements HyperlinkGroupPaneActionPro
} }
}); });
} }
HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().fireTargetModified();
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().fireTargetModified();
} }
} }

Loading…
Cancel
Save