forked from fanruan/design
Browse Source
* commit '50756270be6f6567b6e500203b9185b107b07b27': 格式化代码 添加超链过滤helper类,处理单元格、图表超链下拉选项 修改雷达图警戒线、间隔背景bug 聚合报表和表单中,添加对超链下拉选项的过滤 更换不透明度控件,修改组件bugmaster
superman
7 years ago
11 changed files with 185 additions and 110 deletions
@ -0,0 +1,59 @@
|
||||
package com.fr.design.gui; |
||||
|
||||
import com.fr.design.file.HistoryTemplateListPane; |
||||
import com.fr.design.mainframe.BaseJForm; |
||||
import com.fr.design.mainframe.JTemplate; |
||||
import com.fr.general.ComparatorUtils; |
||||
import com.fr.general.Inter; |
||||
|
||||
/** |
||||
* Created by mengao on 2017/9/22. |
||||
* 单元格超链、图表超链在不同类型模版中,下拉选项不同 |
||||
*/ |
||||
public class HyperlinkFilterHelper { |
||||
|
||||
public static boolean whetherAddHyperlink4cell(String itemName) { |
||||
JTemplate jTemplate = getCurrentEditingTemplate(); |
||||
if (jTemplate == null) { |
||||
return false; |
||||
} |
||||
//先屏蔽掉这个,之后还有别的
|
||||
String[] names = {Inter.getLocText("FR-Hyperlink_Chart_Float")}; |
||||
for (String name : names) { |
||||
if (!jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName, name)) { |
||||
return false; |
||||
} |
||||
} |
||||
return whetherAddFormLink(jTemplate, itemName); |
||||
} |
||||
|
||||
public static boolean whetherAddHyperlink4Chart(String itemName) { |
||||
JTemplate jTemplate = getCurrentEditingTemplate(); |
||||
if (jTemplate == null) { |
||||
return false; |
||||
} |
||||
//先屏蔽掉这个,之后还有别的
|
||||
String[] names = {Inter.getLocText("FR-Hyperlink_Chart_Float"), Inter.getLocText("FR-Hyperlink_Chart_Cell")}; |
||||
for (String name : names) { |
||||
if (!jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName, name)) { |
||||
if (jTemplate.getEditingReportIndex() == BaseJForm.ELEMENTCASE_TAB && ComparatorUtils.equals(itemName, names[0])) { |
||||
//表单报表块中图表悬浮元素超链,只屏蔽联动悬浮元素
|
||||
return false; |
||||
} else if (jTemplate.getEditingReportIndex() == BaseJForm.FORM_TAB) { |
||||
//表单图表超链屏蔽掉联动悬浮元素和联动单元格
|
||||
return false; |
||||
} |
||||
} |
||||
} |
||||
return whetherAddFormLink(jTemplate, itemName); |
||||
} |
||||
|
||||
private static JTemplate getCurrentEditingTemplate() { |
||||
return HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); |
||||
} |
||||
|
||||
private static boolean whetherAddFormLink(JTemplate jTemplate, String itemName) { |
||||
String formName = Inter.getLocText("Hyperlink-Form_link"); |
||||
return !(jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName, formName)); |
||||
} |
||||
} |
Loading…
Reference in new issue