|
|
|
@ -20,6 +20,7 @@ import com.fr.form.ui.ChartEditor;
|
|
|
|
|
import com.fr.form.ui.Label; |
|
|
|
|
import com.fr.form.ui.Widget; |
|
|
|
|
|
|
|
|
|
import com.fr.form.ui.container.WBorderLayout; |
|
|
|
|
import com.fr.form.ui.container.WScaleLayout; |
|
|
|
|
import com.fr.form.ui.container.WTitleLayout; |
|
|
|
|
import com.fr.form.ui.widget.CRBoundsWidget; |
|
|
|
@ -74,7 +75,6 @@ public class SearchWidgetFormulaAction extends AbstractSearchWidgetFormulaAction
|
|
|
|
|
|
|
|
|
|
private void searchFormulaFromWidgetValue(Info info, List<FormulaInfo> formulaInfos) { |
|
|
|
|
Widget widget = (Widget) info.getContent().getReplaceObject(); |
|
|
|
|
|
|
|
|
|
if (widget instanceof WScaleLayout) { |
|
|
|
|
widget = ((CRBoundsWidget) ((WScaleLayout) widget).getWidget(0)).getWidget(); |
|
|
|
|
info.getContent().setReplaceObject(widget); |
|
|
|
@ -89,7 +89,7 @@ public class SearchWidgetFormulaAction extends AbstractSearchWidgetFormulaAction
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Widget tempWidget = (((WTitleLayout) widget).getBodyBoundsWidget()).getWidget(); |
|
|
|
|
if (tempWidget instanceof ChartEditor && ((ChartEditor) tempWidget).getChartCollection() instanceof ChartCollection) { |
|
|
|
|
if (isChartValid(tempWidget)) { |
|
|
|
|
SearchChartCollectionFormulaAction.getInstance().searchChartCollectionFormula(formulaInfos, info.getContent(), (ChartCollection) ((ChartEditor) tempWidget).getChartCollection()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -102,6 +102,9 @@ public class SearchWidgetFormulaAction extends AbstractSearchWidgetFormulaAction
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private boolean isChartValid(Widget tempWidget) { |
|
|
|
|
return tempWidget instanceof ChartEditor && ((ChartEditor) tempWidget).getChartCollection() instanceof ChartCollection; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public boolean isReplaceObjectExist(Info info) { |
|
|
|
|
return info.getContent() != null && info.getContent().getReplaceObject() != null; |
|
|
|
|