diff --git a/designer-base/src/main/java/com/fr/base/svg/IconUtils.java b/designer-base/src/main/java/com/fr/base/svg/IconUtils.java index 45c11c60c0..4b5f1b8817 100644 --- a/designer-base/src/main/java/com/fr/base/svg/IconUtils.java +++ b/designer-base/src/main/java/com/fr/base/svg/IconUtils.java @@ -38,9 +38,8 @@ public class IconUtils { if (IOUtils.readResource(resource) != null) { return SVGIcon.readSVGIcon(resource); } - // 适配某些插件里是_normal.png、_selected.png的情况 - String pngResource = resource.replace(ICON_SUFFIX_SVG, ICON_SUFFIX_PNG); - return IOUtils.readIcon(pngResource); + // 适配插件 + return adjustPluginsPng(resource); } return IOUtils.readIcon(resource); } @@ -48,6 +47,17 @@ public class IconUtils { return readNoSuffixResource(resource, ICON_TYPE_NORMAL); } + /** + * 适配插件中使用_normal.png、_selected.png、_disabled.png的情况 + * @param resource 图片路径 + * @return Icon + */ + private static Icon adjustPluginsPng(String resource) { + String pngResource = resource.replace(ICON_SUFFIX_SVG, ICON_SUFFIX_PNG); + // 考虑到某些插件可能只会使用三种图标中的一部分,这里做个判断,不然就会因为资源不存在而报错 + return IOUtils.readResource(pngResource) == null ? new ImageIcon() : IOUtils.readIcon(pngResource); + } + /** * 尝试读取不带扩展名的图标,svg优先,其次png,最后gif,都没读到就打印错误日志,返回空白Icon * @param resource 图片路径 diff --git a/designer-chart/src/main/java/com/fr/design/chartx/component/MapAreaMatchPane.java b/designer-chart/src/main/java/com/fr/design/chartx/component/MapAreaMatchPane.java index a3e610460b..58068d10a8 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/component/MapAreaMatchPane.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/component/MapAreaMatchPane.java @@ -6,6 +6,7 @@ import com.fr.data.TableDataSource; import com.fr.data.TableDataSourceTailor; import com.fr.data.impl.EmbeddedTableData; import com.fr.data.impl.NameTableData; +import com.fr.decision.webservice.v10.map.geojson.helper.GEOMatchHelper; import com.fr.design.beans.BasicBeanPane; import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.datapane.TableDataComboBox; @@ -21,7 +22,6 @@ import com.fr.general.GeneralUtils; import com.fr.general.data.DataModel; import com.fr.log.FineLoggerFactory; import com.fr.plugin.chart.map.data.MapMatchResult; -import com.fr.plugin.chart.map.server.ChartGEOJSONHelper; import com.fr.script.Calculator; import com.fr.stable.StringUtils; @@ -246,7 +246,7 @@ public class MapAreaMatchPane extends BasicBeanPane { private void populateMatchData(Object[] columnData) { Set geoAreas = matchAreaTable.getItems(); - Map resultMap = ChartGEOJSONHelper.matchAreaList(columnData, geoAreas, matchResultTable.getCustomResult()); + Map resultMap = GEOMatchHelper.getInstance().matchAreaList(columnData, geoAreas, matchResultTable.getCustomResult()); Object[][] data = new Object[resultMap.size()][2]; diff --git a/designer-chart/src/main/java/com/fr/design/chartx/component/MatchAreaTable.java b/designer-chart/src/main/java/com/fr/design/chartx/component/MatchAreaTable.java index 9dd13e77fb..cde622464f 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/component/MatchAreaTable.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/component/MatchAreaTable.java @@ -1,8 +1,8 @@ package com.fr.design.chartx.component; +import com.fr.decision.webservice.v10.map.geojson.helper.GEOMatchHelper; import com.fr.design.i18n.Toolkit; import com.fr.general.GeneralUtils; -import com.fr.plugin.chart.map.server.ChartGEOJSONHelper; import javax.swing.AbstractCellEditor; import javax.swing.JTable; @@ -88,7 +88,7 @@ public class MatchAreaTable extends JTable { return; } int index = areaNameIndex.get(areaName); - String result = ChartGEOJSONHelper.matchArea(GeneralUtils.objectToString(areaName), items); + String result = GEOMatchHelper.getInstance().matchArea(GeneralUtils.objectToString(areaName), items, new HashMap<>()); getColumnModel().getColumn(1).getCellEditor().stopCellEditing(); this.setValueAt(result, index, 1); } diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartOtherPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartOtherPane.java index 54c010119d..4bc363306c 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartOtherPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartOtherPane.java @@ -111,7 +111,7 @@ public class ChartOtherPane extends AbstractChartAttrPane { public void populateBean(Chart chart) { interactivePane.populateBean(chart); if (ChartOtherPane.this.isHaveCondition()) { - VanChartRichEditorPane.refreshFieldNames(chart); + VanChartRichEditorPane.refreshCommonChartFieldNames(chart); conditionAttrPane.populateBean(chart); } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/other/VanChartCustomConditionAttrPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/other/VanChartCustomConditionAttrPane.java index da696fcce7..0631312c8c 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/other/VanChartCustomConditionAttrPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/custom/other/VanChartCustomConditionAttrPane.java @@ -39,7 +39,9 @@ public class VanChartCustomConditionAttrPane extends BasicScrollPane { layoutContentPane(); } if(conditionAttrPane != null) { - conditionAttrPane.populateBean((VanChartCustomPlot)chart.getPlot()); + conditionAttrPane.setChart(chart); + conditionAttrPane.populateBean(chart.getPlot()); + conditionAttrPane.tabChanged(); } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/other/VanChartCustomPlotConditionAttrTabPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/other/VanChartCustomPlotConditionAttrTabPane.java index cc0689d9c7..4cb5c652f6 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/other/VanChartCustomPlotConditionAttrTabPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/custom/other/VanChartCustomPlotConditionAttrTabPane.java @@ -1,11 +1,13 @@ package com.fr.van.chart.custom.other; +import com.fr.chart.chartattr.Chart; import com.fr.design.dialog.BasicPane; import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.custom.CustomPlotFactory; import com.fr.plugin.chart.custom.VanChartCustomPlot; import com.fr.plugin.chart.custom.type.CustomPlotType; import com.fr.van.chart.custom.component.VanChartCustomPlotTabPane; +import com.fr.van.chart.designer.component.richText.VanChartRichEditorPane; import com.fr.van.chart.designer.other.VanChartConditionAttrPane; import javax.swing.JPanel; @@ -16,10 +18,17 @@ import java.util.List; * Created by Fangjie on 2016/4/28. */ public class VanChartCustomPlotConditionAttrTabPane extends VanChartCustomPlotTabPane { + + private Chart chart; + public VanChartCustomPlotConditionAttrTabPane(VanChartCustomPlot plot, BasicPane parent) { super(plot, parent); } + public void setChart(Chart chart) { + this.chart = chart; + } + @Override protected void initTabTitle() { List customPlotList = plot.getCustomPlotList(); @@ -73,6 +82,18 @@ public class VanChartCustomPlotConditionAttrTabPane extends VanChartCustomPlotTa } } + protected void tabChanged() { + List customPlotList = plot.getCustomPlotList(); + int index = getSelectedIndex(); + + if (customPlotList.size() > index && paneList.size() > index) { + VanChartPlot chartPlot = customPlotList.get(index); + + CustomPlotType plotType = CustomPlotFactory.getCustomType(chartPlot); + VanChartRichEditorPane.refreshCustomChartTableFieldNames(chart, plotType); + } + } + @Override public VanChartCustomPlot updateBean() { return null; diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomPlotLabelTabPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomPlotLabelTabPane.java index 04b94ef5c1..ed1dd63ff0 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomPlotLabelTabPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomPlotLabelTabPane.java @@ -68,6 +68,21 @@ public class VanChartCustomPlotLabelTabPane extends VanChartCustomPlotTabPane customPlotList = plot.getCustomPlotList(); + int index = getSelectedIndex(); + + if (customPlotList.size() > index && paneList.size() > index) { + VanChartPlot chartPlot = customPlotList.get(index); + VanChartPlotLabelPane labelPane = (VanChartPlotLabelPane)paneList.get(index); + VanChartCustomStylePane stylePane = (VanChartCustomStylePane)labelPane.getParentPane(); + + if (stylePane != null) { + stylePane.refreshTableFieldNames(chartPlot); + } + } + } + @Override public VanChartCustomPlot updateBean() { return null; diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomPlotTooltipTabPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomPlotTooltipTabPane.java index 8595e84515..8cb4f49208 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomPlotTooltipTabPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomPlotTooltipTabPane.java @@ -67,6 +67,21 @@ public class VanChartCustomPlotTooltipTabPane extends VanChartCustomPlotTabPane< } } + protected void tabChanged() { + List customPlotList = plot.getCustomPlotList(); + int index = getSelectedIndex(); + + if (customPlotList.size() > index && paneList.size() > index) { + VanChartPlot chartPlot = customPlotList.get(index); + VanChartPlotTooltipPane tooltipPane = (VanChartPlotTooltipPane)paneList.get(index); + VanChartCustomStylePane stylePane = (VanChartCustomStylePane)tooltipPane.getParentPane(); + + if (stylePane != null) { + stylePane.refreshTableFieldNames(chartPlot); + } + } + } + @Override public VanChartCustomPlot updateBean() { return null; diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomStylePane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomStylePane.java index fcfdc64de5..a01cbf1cb5 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomStylePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomStylePane.java @@ -5,8 +5,11 @@ import com.fr.design.dialog.BasicPane; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.mainframe.chart.gui.style.series.ChartSeriesPane; import com.fr.plugin.chart.attr.plot.VanChartAxisPlot; +import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.custom.CustomPlotFactory; import com.fr.plugin.chart.custom.VanChartCustomPlot; +import com.fr.plugin.chart.custom.type.CustomPlotType; +import com.fr.van.chart.designer.component.richText.VanChartRichEditorPane; import com.fr.van.chart.designer.style.VanChartStylePane; import java.util.List; @@ -68,4 +71,12 @@ public class VanChartCustomStylePane extends VanChartStylePane { CustomPlotFactory.dataSheetSynchronization((VanChartCustomPlot) collection.getSelectedChart().getPlot()); } + public void refreshTableFieldNames(VanChartPlot plot) { + CustomPlotType plotType = CustomPlotFactory.getCustomType(plot); + VanChartRichEditorPane.refreshCustomChartTableFieldNames(getChart(), plotType); + } + + public void refreshTableFieldNames() { + + } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartFieldButton.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartFieldButton.java index 1e76d616cc..ba3925501b 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartFieldButton.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartFieldButton.java @@ -2,11 +2,11 @@ package com.fr.van.chart.designer.component.richText; import com.fr.base.BaseUtils; import com.fr.data.util.function.DataFunction; -import com.fr.data.util.function.NoneFunction; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIToggleButton; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; +import com.fr.plugin.chart.base.FirstFunction; import com.fr.plugin.chart.base.format.AttrTooltipDurationFormat; import com.fr.plugin.chart.base.format.AttrTooltipFormat; import com.fr.plugin.chart.base.format.IntervalTimeFormat; @@ -28,7 +28,7 @@ public class VanChartFieldButton extends JPanel { private static final Icon ADD_ICON = BaseUtils.readIcon("/com/fr/base/images/cell/control/add.png"); private static final int W = 200; - private static final int H = 28; + private static final int H = 24; private final String fieldName; private final String fieldId; @@ -40,7 +40,7 @@ public class VanChartFieldButton extends JPanel { private UIToggleButton fieldButton; private UIButton addButton; - private DataFunction dataFunction = new NoneFunction(); + private DataFunction dataFunction = new FirstFunction(); public VanChartFieldButton(String fieldName, AttrTooltipFormat format, VanChartFieldListener listener) { this(fieldName, format, false, false, listener); @@ -146,6 +146,9 @@ public class VanChartFieldButton extends JPanel { listener.addSelectedField(fieldName, fieldId); } }); + + fieldButton.setBorderPaintedOnlyWhenPressed(true); + addButton.setBorderPaintedOnlyWhenPressed(true); } private JPanel getContentPane() { @@ -160,7 +163,7 @@ public class VanChartFieldButton extends JPanel { double[] rowSize = {p}; double[] columnSize = {e, d}; - JPanel content = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 5, 0); + JPanel content = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 0, 0); content.setPreferredSize(new Dimension(W, H)); return content; diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartFieldListPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartFieldListPane.java index 61d7cfb257..02a62de3b6 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartFieldListPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartFieldListPane.java @@ -114,7 +114,7 @@ public class VanChartFieldListPane extends JPanel { addDefaultFieldButton(fieldPane); fieldPane.setPreferredSize(new Dimension(FIELD_ADD_W, getDefaultFieldButtonList().size() * FIELD_ADD_H)); - fieldPane.setBorder(BorderFactory.createEmptyBorder(10, 5, 0, 0)); + fieldPane.setBorder(BorderFactory.createEmptyBorder(5, 5, 0, 0)); return fieldPane; } diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichEditorPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichEditorPane.java index 69c93926c5..312c24e84b 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichEditorPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichEditorPane.java @@ -16,6 +16,8 @@ import com.fr.general.ComparatorUtils; import com.fr.general.IOUtils; import com.fr.log.FineLoggerFactory; import com.fr.plugin.chart.base.AttrTooltipRichText; +import com.fr.plugin.chart.custom.CustomDefinition; +import com.fr.plugin.chart.custom.type.CustomPlotType; import com.fr.plugin.chart.type.TextAlign; import com.fr.stable.StringUtils; import com.fr.van.chart.designer.PlotFactory; @@ -30,6 +32,8 @@ import java.util.Map; public class VanChartRichEditorPane { + private static final String PARAMS_SPLITTER = "|"; + private static final String NAME_SPACE = "Pool"; private static final String VARIABLE = "data"; @@ -46,21 +50,46 @@ public class VanChartRichEditorPane { return fieldNames; } - public static void refreshFieldNames(Chart chart) { - VanChartRichEditorPane.fieldNames = null; - + // 更新普通图表中指定plot的数据集字段 + public static void refreshCommonChartFieldNames(Chart chart) { if (chart == null) { return; } Plot plot = chart.getPlot(); - if (plot == null || !PlotFactory.plotSupportAddTableField(plot)) { + if (plot == null) { + return; + } + + VanChartRichEditorPane.fieldNames = null; + + if (!PlotFactory.plotSupportAddTableField(plot)) { return; } TopDefinitionProvider definition = chart.getFilterDefinition(); + VanChartRichEditorPane.refreshFieldNames(definition); + } + + // 更新组合图表中指定plot的数据集字段 + public static void refreshCustomChartTableFieldNames(Chart chart, CustomPlotType plotType) { + if (chart == null || plotType == null) { + return; + } + + VanChartRichEditorPane.fieldNames = null; + TopDefinitionProvider filterDefinition = chart.getFilterDefinition(); + + if (filterDefinition instanceof CustomDefinition) { + CustomDefinition customDefinition = (CustomDefinition) filterDefinition; + Map definitionProviderMap = customDefinition.getDefinitionProviderMap(); + VanChartRichEditorPane.refreshFieldNames(definitionProviderMap.get(plotType)); + } + } + // 更新富文本数据集字段 + public static void refreshFieldNames(TopDefinitionProvider definition) { if (definition == null) { return; } @@ -163,7 +192,7 @@ public class VanChartRichEditorPane { if (paramsMap != null) { for (Map.Entry entry : paramsMap.entrySet()) { paramsStr.append(entry.getKey()).append(":").append(entry.getValue()); - paramsStr.append("-"); + paramsStr.append(PARAMS_SPLITTER); } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartStylePane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartStylePane.java index bb8df99fdb..53619765c7 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartStylePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartStylePane.java @@ -78,6 +78,6 @@ public class VanChartStylePane extends ChartStylePane { } public void refreshTableFieldNames() { - VanChartRichEditorPane.refreshFieldNames(getChart()); + VanChartRichEditorPane.refreshCommonChartFieldNames(getChart()); } } \ No newline at end of file diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/tooltip/VanChartPlotTooltipPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/tooltip/VanChartPlotTooltipPane.java index aa86fb9a73..5f76337d67 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/tooltip/VanChartPlotTooltipPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/tooltip/VanChartPlotTooltipPane.java @@ -98,6 +98,9 @@ public class VanChartPlotTooltipPane extends BasicPane { return components; } + public VanChartStylePane getParentPane() { + return parent; + } protected void initTooltipContentPane(Plot plot){ tooltipContentPane = PlotFactory.createPlotTooltipContentPane(plot, parent, VanChartPlotTooltipPane.this); diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/VanChartMapSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/VanChartMapSeriesPane.java index 2d1cb2304c..a2adff77a7 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/VanChartMapSeriesPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/VanChartMapSeriesPane.java @@ -443,7 +443,7 @@ public class VanChartMapSeriesPane extends VanChartColorValueSeriesPane { //不透明度 private JPanel createPointAlphaPane() { - pointAlphaPane = new UINumberDragPane(0, 100); + pointAlphaPane = new UINumberDragPaneWithPercent(0, 100); return TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Report_Alpha"), pointAlphaPane); } diff --git a/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html b/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html index f62d7dbb2f..3434e1ae36 100644 --- a/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html +++ b/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html @@ -26,9 +26,11 @@ var initParams = Pool.data.getInitParams(); var align = Pool.data.getAlign(); + var insert_param; + var getDimensionIds = function (params) { var result = []; - var paramGroup = params.split("-"); + var paramGroup = params.split("|"); for (var i = 0, len = paramGroup.length; i < len; i++) { var [key, value] = paramGroup[i].split(":"); @@ -44,7 +46,7 @@ var getInitContent = function (params, initParams, align) { var editorService = BI.Services.getService("bi.service.design.chart.common.editor"); - var paramGroup = params.split("-"); + var paramGroup = params.split("|"); content = ""; @@ -88,7 +90,13 @@ {type: "bi.rich_editor_color_chooser"}, {type: "bi.rich_editor_align_left_button"}, {type: "bi.rich_editor_align_center_button"}, - {type: "bi.rich_editor_align_right_button"} + {type: "bi.rich_editor_align_right_button"}, + { + type: "bi.design.chart.common.editor.insert_param", + ref: function (_ref) { + insert_param = _ref; + } + } ] }, ref: function (_ref) { @@ -119,27 +127,11 @@ }; Pool.addField = function () { - var editorService = BI.Services.getService("bi.service.design.chart.common.editor"); - - var content = Pool.data.getContent(); - var isAuto = Pool.data.isAuto(); - var params = Pool.data.getParams(); var addition = Pool.data.getAddition(); - if (addition) { - // todo 暂时先处理成在content后加一行 - content += '

' + editorService.getEditorParamImage(addition) + '

'; + if (addition && insert_param) { + insert_param.selectedParam(addition); } - - rich_editor.editor.bindToolbar(rich_editor.bar); - - rich_editor.setValue({ - content: content, - isAuto: isAuto, - dimensionIds: getDimensionIds(params) - }); - - rich_editor.setFocus(); }; Pool.update = function () { diff --git a/designer-chart/src/main/resources/com/fr/design/editor/script/insertcombo/combo.insert_param.js b/designer-chart/src/main/resources/com/fr/design/editor/script/insertcombo/combo.insert_param.js index 7cf11f9ce9..2db38878c7 100644 --- a/designer-chart/src/main/resources/com/fr/design/editor/script/insertcombo/combo.insert_param.js +++ b/designer-chart/src/main/resources/com/fr/design/editor/script/insertcombo/combo.insert_param.js @@ -54,6 +54,7 @@ type: "bi.combo", direction: "bottom,left", isNeedAdjustWidth: true, + invisible: true, el: { type: "bi.vertical_adapt", items: [{ @@ -99,6 +100,11 @@ _getInstance: function () { return this.options.editor.selectedInstance || this.options.editor.getInstance(); + }, + + selectedParam: function (param) { + var editorService = BI.Services.getService("bi.service.design.chart.common.editor"); + this.addParam(param, editorService.encode); } }); diff --git a/designer-realize/src/main/java/com/fr/design/webattr/WriteToolBarPane.java b/designer-realize/src/main/java/com/fr/design/webattr/WriteToolBarPane.java index 7d878659dc..25ba62708c 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/WriteToolBarPane.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/WriteToolBarPane.java @@ -74,7 +74,7 @@ public class WriteToolBarPane extends AbstractEditToolBarPane { northPane.add(GUICoreUtils.createFlowPane(new Component[]{rptShowLocationLabel, centerRadioButton, leftRadioButton}, FlowLayout.LEFT)); colorBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Set_Face_Write_Current_Edit_Row_Background") + ":"); - colorBox.setSelected(true); + colorBox.setSelected(false); colorBox.addActionListener(colorListener); colorButton = new UIColorButton(BaseUtils.readIcon("/com/fr/design/images/gui/color/background.png")); northPane.add(GUICoreUtils.createFlowPane(new Component[]{colorBox, colorButton}, FlowLayout.LEFT));