Browse Source

Pull request #8359: REPORT-68392【迭代】【超链设置优化】超链数量=1,编辑/排序,会修改单元格样式

Merge in DESIGN/design from ~LINK.ZHAO/design:feature/x to feature/x

* commit 'b41b368b560392f3551330c067967b285d21412f':
  REPORT-68392【迭代】【超链设置优化】超链数量=1,编辑/排序,会修改单元格样式 REPORT-68335【迭代】【超链设置优化】超链列表数量n->1时,单元格样式会变化 1、添加判断:判断下当前触发的事件类型
feature/x
Link.Zhao 3 years ago
parent
commit
2d87a6847b
  1. 12
      designer-base/src/main/java/com/fr/design/gui/controlpane/UIListControlPane.java
  2. 3
      designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java

12
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;
}
}

3
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));
}

Loading…
Cancel
Save