|
|
@ -11,13 +11,13 @@ import com.fr.design.file.HistoryTemplateListCache; |
|
|
|
import com.fr.design.gui.controlpane.NameObjectCreator; |
|
|
|
import com.fr.design.gui.controlpane.NameObjectCreator; |
|
|
|
import com.fr.design.gui.controlpane.NameableCreator; |
|
|
|
import com.fr.design.gui.controlpane.NameableCreator; |
|
|
|
import com.fr.design.gui.frpane.BaseHyperlinkGroup; |
|
|
|
import com.fr.design.gui.frpane.BaseHyperlinkGroup; |
|
|
|
import com.fr.design.gui.frpane.HyperLinkGroupFilter; |
|
|
|
|
|
|
|
import com.fr.design.mainframe.BaseJForm; |
|
|
|
import com.fr.design.mainframe.BaseJForm; |
|
|
|
import com.fr.design.mainframe.JTemplate; |
|
|
|
import com.fr.design.mainframe.JTemplate; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
import com.fr.js.FormHyperlinkProvider; |
|
|
|
import com.fr.js.FormHyperlinkProvider; |
|
|
|
import com.fr.js.JavaScript; |
|
|
|
import com.fr.js.JavaScript; |
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
|
|
|
|
import com.fr.stable.Filter; |
|
|
|
import com.fr.stable.bridge.StableFactory; |
|
|
|
import com.fr.stable.bridge.StableFactory; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -46,10 +46,10 @@ public class ChartHyperlinkGroup extends BaseHyperlinkGroup { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public HyperLinkGroupFilter getFilter() { |
|
|
|
public Filter<Class<? extends JavaScript>> getFilter() { |
|
|
|
return new HyperLinkGroupFilter() { |
|
|
|
return new Filter<Class<? extends JavaScript>>() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public boolean filter(Class<? extends JavaScript> clazz) { |
|
|
|
public boolean accept(Class<? extends JavaScript> clazz) { |
|
|
|
JTemplate template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); |
|
|
|
JTemplate template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); |
|
|
|
if (template == null) { |
|
|
|
if (template == null) { |
|
|
|
return false; |
|
|
|
return false; |
|
|
@ -78,25 +78,23 @@ public class ChartHyperlinkGroup extends BaseHyperlinkGroup { |
|
|
|
} |
|
|
|
} |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 兼容老图表 |
|
|
|
|
|
|
|
* @param object |
|
|
|
|
|
|
|
* @return |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public boolean filter(Object object) { |
|
|
|
public Filter<Object> getOldFilter() { |
|
|
|
|
|
|
|
return new Filter<Object>() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public boolean accept(Object object) { |
|
|
|
JTemplate template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); |
|
|
|
JTemplate template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); |
|
|
|
if (template == null) { |
|
|
|
if (template == null) { |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (template.isJWorkBook()) { |
|
|
|
if (template.isJWorkBook()) { |
|
|
|
// 如果是普通报表单元格,那么没有 FormHyperlink 选项
|
|
|
|
// 如果是普通报表单元格,那么没有 FormHyperlink 选项
|
|
|
|
FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class); |
|
|
|
FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class); |
|
|
|
//返回true表示可用,返回false表示不可用
|
|
|
|
//返回true表示可用,返回false表示不可用
|
|
|
|
return !ComparatorUtils.equals(object.getClass(), formHyperlink.getClass()); |
|
|
|
return !ComparatorUtils.equals(object.getClass(), formHyperlink.getClass()); |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// 如果是决策报表
|
|
|
|
// 如果是决策报表
|
|
|
|
Class[] classes = new Class[]{ChartHyperRelateCellLink.class, ChartHyperRelateFloatLink.class}; |
|
|
|
Class[] classes = new Class[]{ChartHyperRelateCellLink.class, ChartHyperRelateFloatLink.class}; |
|
|
|