@ -6,6 +6,7 @@ import com.fr.chart.web.ChartHyperPoplink;
import com.fr.chart.web.ChartHyperRelateCellLink ;
import com.fr.chart.web.ChartHyperRelateFloatLink ;
import com.fr.design.ExtraDesignClassManager ;
import com.fr.design.base.mode.DesignModeContext ;
import com.fr.design.beans.BasicBeanPane ;
import com.fr.design.chart.javascript.ChartEmailPane ;
import com.fr.design.chart.series.SeriesCondition.impl.ChartHyperPoplinkPane ;
@ -78,14 +79,11 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane {
constructor = creator . getUpdatePane ( ) . getConstructor ( HashMap . class , boolean . class ) ;
return constructor . newInstance ( getHyperLinkEditorMap ( ) , false ) ;
} catch ( InstantiationException e ) {
FineLoggerFactory . getLogger ( ) . error ( e . getMessage ( ) , e ) ;
} catch ( IllegalAccessException e ) {
} catch ( InstantiationException | IllegalAccessException | InvocationTargetException e ) {
FineLoggerFactory . getLogger ( ) . error ( e . getMessage ( ) , e ) ;
} catch ( NoSuchMethodException e ) {
FineLoggerFactory . getLogger ( ) . warn ( e . getMessage ( ) , e ) ;
return super . createPaneByCreators ( creator ) ;
} catch ( InvocationTargetException e ) {
FineLoggerFactory . getLogger ( ) . error ( e . getMessage ( ) , e ) ;
}
return null ;
}
@ -144,9 +142,11 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane {
return new NameJavaScriptGroup ( res_array ) ;
}
public void populate ( Plot plot ) {
setPlot ( plot ) ;
HashMap paneMap = getHyperlinkMap ( plot ) ;
private void refreshNameableCreator ( ) {
if ( DesignModeContext . isDuchampMode ( ) ) {
return ;
}
HashMap paneMap = getHyperlinkMap ( ) ;
//安装平台内打开插件时,添加相应按钮
Set < HyperlinkProvider > providers = ExtraDesignClassManager . getInstance ( ) . getArray ( HyperlinkProvider . XML_TAG ) ;
@ -166,6 +166,12 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane {
}
refreshNameableCreator ( creators ) ;
}
public void populate ( Plot plot ) {
setPlot ( plot ) ;
refreshNameableCreator ( ) ;
java . util . List < NameObject > nameObjects = new ArrayList < NameObject > ( ) ;
@ -174,8 +180,7 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane {
NameJavaScript javaScript = nameGroup . getNameHyperlink ( i ) ;
if ( javaScript ! = null & & javaScript . getJavaScript ( ) ! = null ) {
JavaScript script = javaScript . getJavaScript ( ) ;
UIMenuNameableCreator uiMenuNameableCreator = new UIMenuNameableCreator ( javaScript . getName ( ) , script , getUseMap ( paneMap , script . getClass ( ) ) ) ;
nameObjects . add ( new NameObject ( uiMenuNameableCreator . getName ( ) , uiMenuNameableCreator . getObj ( ) ) ) ;
nameObjects . add ( new NameObject ( javaScript . getName ( ) , script ) ) ;
}
}
@ -188,7 +193,7 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane {
return plot . getHotHyperLink ( ) ;
}
protected HashMap getHyperlinkMap ( Plot plot ) {
protected HashMap getHyperlinkMap ( ) {
HashMap < Class , Class > map = new HashMap < Class , Class > ( ) ;
map . put ( ReportletHyperlink . class , ReportletHyperlinkPane . class ) ;