Browse Source

Merge pull request #12627 in DESIGN/design from release/11.0 to final/11.0

* commit '8d111a5a2e8c6639c65e51b256c13b37be27657f':
  REPORT-98466 FileNodeConstants中使用List存储文件类型可能导致重复
  REPORT-103732 海外版本地图组件的GIS图层优化-fvs下标准自动配置切换问题
  加个注释 #none
  REPORT-101812 fix: 国际化文本截断
  fix: 保留“=” #none
  fix: 替换图表用到的TinyFormulaPane #REPORT-102440
  REPORT-103247 设计器更新后,未删除原来的【特殊字符导出优化】
  REPORT-102440 fix:清除公式内容后不显示"$$$"
  REPORT-102520 fix:代码质量
  REPORT-102520 fix:面板样式优化
  REPORT-96204 根据pr建议优化代码
  REPORT-96204 GISLayerType中GAO_DE_API命名回退下,考虑兼容问题,重构相关操作放后面
  REPORT-96204 FRBI海外版本地图组件的GIS图层优化
  REPORT-96204 FRBI海外版本地图组件的GIS图层优化
  REPORT-79271 feat:兼容处理调整为新增功能点
  REPORT-79271 feat:考虑兼容
  REPORT-79271 feat:FVS支持图表单元格数据来源
  REPORT-96966 fix: 显示字段下拉框
new-design
superman 1 year ago
parent
commit
be6e1575db
  1. 17
      designer-base/src/main/java/com/fr/design/formula/DefaultTinyFormulaPane.java
  2. 8
      designer-base/src/main/java/com/fr/design/formula/TinyFormulaPane.java
  3. 11
      designer-base/src/main/java/com/fr/design/gui/itree/filetree/FileNodeConstants.java
  4. 40
      designer-base/src/main/java/com/fr/design/mainframe/chart/mode/ChartEditContext.java
  5. 17
      designer-chart/src/main/java/com/fr/design/chart/report/GisMapReportDataContentPane.java
  6. 15
      designer-chart/src/main/java/com/fr/design/chart/report/MapMoreReportIndexPane.java
  7. 16
      designer-chart/src/main/java/com/fr/design/chart/report/MapReportDataSinglePane.java
  8. 5
      designer-chart/src/main/java/com/fr/design/chartx/component/MultiTinyFormulaPane.java
  9. 3
      designer-chart/src/main/java/com/fr/design/chartx/component/MultiTinyFormulaPaneWithUISpinner.java
  10. 9
      designer-chart/src/main/java/com/fr/design/chartx/component/correlation/TinyFormulaPaneEditorComponent.java
  11. 17
      designer-chart/src/main/java/com/fr/design/chartx/data/map/LineMapAreaLngLatPaneWithTinyFormula.java
  12. 9
      designer-chart/src/main/java/com/fr/design/chartx/data/map/PointMapAreaLngLatPaneWithTinyFormula.java
  13. 3
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/AreaMapCellDataFieldsPane.java
  14. 5
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/GaugeCellDataFieldsPane.java
  15. 3
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/LineMapCellDataFieldsPane.java
  16. 3
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiPieCellDataFieldsPane.java
  17. 3
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/SingleCategoryCellDataFieldsPane.java
  18. 9
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/StructureCellDataFieldsPane.java
  19. 5
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/WordCloudCellDataFieldsPane.java
  20. 3
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java
  21. 23
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java
  22. 17
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java
  23. 11
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotReportDataContentPane.java
  24. 7
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java
  25. 12
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/StockPlotReportDataContentPane.java
  26. 5
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java
  27. 12
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartAxisTitlePane.java
  28. 3
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/ColorPickerPaneWithFormula.java
  29. 3
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/ColorPickerPaneWithMaxMin.java
  30. 3
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/MapColorPickerPaneWithFormula.java
  31. 11
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/title/ChartTitlePane.java
  32. 5
      designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartReportDataPane.java
  33. 3
      designer-chart/src/main/java/com/fr/van/chart/box/data/report/BoxPlotReportResultDataSeriesPane.java
  34. 3
      designer-chart/src/main/java/com/fr/van/chart/box/data/report/TinyFormulaWithEditLabel.java
  35. 10
      designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnSeriesPane.java
  36. 4
      designer-chart/src/main/java/com/fr/van/chart/designer/data/OneDimensionalPlotReportDataContentPane.java
  37. 7
      designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java
  38. 5
      designer-chart/src/main/java/com/fr/van/chart/designer/other/zoom/ZoomPane.java
  39. 3
      designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java
  40. 3
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java
  41. 7
      designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAlertValuePane.java
  42. 6
      designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartCustomIntervalBackgroundPane.java
  43. 4
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/GanttReportDataContentPane.java
  44. 3
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/TinyFormulaWithButtonPane.java
  45. 4
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/link/GanttLinkReportDataContentPane.java
  46. 3
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/report/AreaPane.java
  47. 7
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/report/LongLatAreaPane.java
  48. 3
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/report/VanAreaMapPlotReportDataContentPane.java
  49. 94
      designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java
  50. 6
      designer-chart/src/main/java/com/fr/van/chart/multilayer/data/MultiPiePlotReportDataContentPane.java
  51. 9
      designer-chart/src/main/java/com/fr/van/chart/structure/desinger/data/StructurePlotReportDataContentPane.java
  52. 6
      designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/data/WordCloudPlotReportDataContentPane.java
  53. 30
      designer-realize/src/main/java/com/fr/design/report/ExportUniversalPane.java

17
designer-base/src/main/java/com/fr/design/formula/DefaultTinyFormulaPane.java

@ -0,0 +1,17 @@
package com.fr.design.formula;
import com.fr.base.BaseFormula;
/**
* @author Carlson
* @version 11.0
* Created by Carlson on 2023/8/14 17:15
* @description 默认的公式输入面板包含一个输入框和一个F(x)按钮清空公式内容后不会显示$$$主要在图表配置面板里使用
**/
public class DefaultTinyFormulaPane extends TinyFormulaPane{
@Override
protected void populateTextField(BaseFormula fm) {
formulaTextField.setText(fm.getContent());
}
}

8
designer-base/src/main/java/com/fr/design/formula/TinyFormulaPane.java

@ -11,9 +11,11 @@ import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import javax.swing.BorderFactory;
import javax.swing.*; import javax.swing.JPanel;
import java.awt.*; import java.awt.BorderLayout;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;

11
designer-base/src/main/java/com/fr/design/gui/itree/filetree/FileNodeConstants.java

@ -11,9 +11,8 @@ import com.fr.plugin.observer.PluginEventListener;
import com.fr.report.ExtraReportClassManager; import com.fr.report.ExtraReportClassManager;
import com.fr.report.fun.ReportSupportedFileProvider; import com.fr.report.fun.ReportSupportedFileProvider;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.LinkedHashSet;
import java.util.Set; import java.util.Set;
import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock;
@ -23,7 +22,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
*/ */
public class FileNodeConstants { public class FileNodeConstants {
private static List<String> supportFileType; private static Set<String> supportFileType;
private static ReadWriteLock rwl = new ReentrantReadWriteLock(); private static ReadWriteLock rwl = new ReentrantReadWriteLock();
private FileNodeConstants() { private FileNodeConstants() {
@ -47,16 +46,14 @@ public class FileNodeConstants {
private static void addAppExtensions(FileExtension[] extensions) { private static void addAppExtensions(FileExtension[] extensions) {
for (int i = 0, size = extensions.length; i < size; i++) { for (int i = 0, size = extensions.length; i < size; i++) {
if (!supportFileType.contains(extensions[i].getExtension())) { supportFileType.add(extensions[i].getExtension());
supportFileType.add(extensions[i].getExtension());
}
} }
} }
private static void initSupportedTypes() { private static void initSupportedTypes() {
try { try {
rwl.writeLock().lock(); rwl.writeLock().lock();
supportFileType = new ArrayList<String>(); supportFileType = new LinkedHashSet<>();
//通过插件扩展的 //通过插件扩展的
Set<ReportSupportedFileProvider> providers = ExtraReportClassManager.getInstance().getArray(ReportSupportedFileProvider.XML_TAG); Set<ReportSupportedFileProvider> providers = ExtraReportClassManager.getInstance().getArray(ReportSupportedFileProvider.XML_TAG);
for (ReportSupportedFileProvider provider : providers) { for (ReportSupportedFileProvider provider : providers) {

40
designer-base/src/main/java/com/fr/design/mainframe/chart/mode/ChartEditContext.java

@ -3,6 +3,9 @@ package com.fr.design.mainframe.chart.mode;
import com.fr.common.annotations.Open; import com.fr.common.annotations.Open;
import com.fr.design.base.mode.DesignModeContext; import com.fr.design.base.mode.DesignModeContext;
import java.util.HashSet;
import java.util.Set;
/** /**
* @author shine * @author shine
* @version 10.0 * @version 10.0
@ -13,6 +16,19 @@ public class ChartEditContext {
private static ChartEditMode current = ChartEditMode.NORMAL; private static ChartEditMode current = ChartEditMode.NORMAL;
private static final Set<DuchampFeature> features = new HashSet<>();
/**
* 功能点枚举
*/
public enum DuchampFeature {
SUPPORT_REPORT_DATA
}
/**
* 切换图表编辑模式
* @param mode 图表编辑模式
*/
public static void switchTo(ChartEditMode mode) { public static void switchTo(ChartEditMode mode) {
current = mode; current = mode;
} }
@ -33,4 +49,28 @@ public class ChartEditContext {
public static boolean supportTheme() { public static boolean supportTheme() {
return !DesignModeContext.isDuchampMode(); return !DesignModeContext.isDuchampMode();
} }
/**
* 注册功能点
*/
public static void addDuchampFeature(DuchampFeature feature) {
features.add(feature);
}
/**
* 移除功能点
*/
public static void removeDuchampFeature(DuchampFeature feature) {
features.remove(feature);
}
/**
* 当前模式下是否支持单元格数据来源
*/
public static boolean supportReportData() {
if (normalMode()) {
return true;
}
return features.contains(DuchampFeature.SUPPORT_REPORT_DATA);
}
} }

17
designer-chart/src/main/java/com/fr/design/chart/report/GisMapReportDataContentPane.java

@ -10,6 +10,7 @@ import com.fr.design.constants.LayoutConstants;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.frpane.UICorrelationPane; import com.fr.design.gui.frpane.UICorrelationPane;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
@ -18,14 +19,18 @@ import com.fr.design.gui.itable.UITableEditor;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.JTable;
import javax.swing.SwingConstants;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import java.awt.*; import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.FocusAdapter; import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent; import java.awt.event.FocusEvent;
import java.util.ArrayList; import java.util.ArrayList;
@ -53,8 +58,8 @@ public class GisMapReportDataContentPane extends FurtherBasicBeanPane<GisMapRepo
this.setLayout(new BorderLayout(0, 0)); this.setLayout(new BorderLayout(0, 0));
addressType = new UIButtonGroup<String>(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Address"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_LatLng")}); addressType = new UIButtonGroup<String>(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Address"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_LatLng")});
lnglatOrder = new UIButtonGroup<String>(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Longitude_First"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Latitude_First")}); lnglatOrder = new UIButtonGroup<String>(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Longitude_First"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Latitude_First")});
addressPane = new TinyFormulaPane(); addressPane = new DefaultTinyFormulaPane();
addressNamePane = new TinyFormulaPane(); addressNamePane = new DefaultTinyFormulaPane();
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = new double[]{p, f}; double[] columnSize = new double[]{p, f};
@ -259,7 +264,7 @@ public class GisMapReportDataContentPane extends FurtherBasicBeanPane<GisMapRepo
} }
editorComponent = field; editorComponent = field;
} else { } else {
TinyFormulaPane tinyPane = new TinyFormulaPane() { TinyFormulaPane tinyPane = new DefaultTinyFormulaPane() {
@Override @Override
public void okEvent() { public void okEvent() {
seriesPane.stopCellEditing(); seriesPane.stopCellEditing();

15
designer-chart/src/main/java/com/fr/design/chart/report/MapMoreReportIndexPane.java

@ -9,17 +9,22 @@ import com.fr.design.beans.BasicBeanPane;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.frpane.UICorrelationPane; import com.fr.design.gui.frpane.UICorrelationPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itable.UITableEditor; import com.fr.design.gui.itable.UITableEditor;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.JComponent;
import java.awt.*; import javax.swing.JPanel;
import javax.swing.JTable;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.event.FocusAdapter; import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent; import java.awt.event.FocusEvent;
import java.util.ArrayList; import java.util.ArrayList;
@ -54,7 +59,7 @@ public class MapMoreReportIndexPane extends BasicBeanPane<MapSingleLayerReportDe
northPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Area_Name") + ":")); northPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Area_Name") + ":"));
areaNamePane = new TinyFormulaPane(); areaNamePane = new DefaultTinyFormulaPane();
areaNamePane.setPreferredSize(new Dimension(120, 20)); areaNamePane.setPreferredSize(new Dimension(120, 20));
northPane.add(areaNamePane); northPane.add(areaNamePane);
@ -152,7 +157,7 @@ public class MapMoreReportIndexPane extends BasicBeanPane<MapSingleLayerReportDe
field.setText(Utils.objectToString(value)); field.setText(Utils.objectToString(value));
} }
} else { } else {
TinyFormulaPane tinyPane = new TinyFormulaPane() { TinyFormulaPane tinyPane = new DefaultTinyFormulaPane() {
@Override @Override
public void okEvent() { public void okEvent() {
tabPane.stopCellEditing(); tabPane.stopCellEditing();

16
designer-chart/src/main/java/com/fr/design/chart/report/MapReportDataSinglePane.java

@ -9,18 +9,24 @@ import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.frpane.UICorrelationPane; import com.fr.design.gui.frpane.UICorrelationPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itable.UITableEditor; import com.fr.design.gui.itable.UITableEditor;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import javax.swing.*; import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.JTable;
import javax.swing.SwingConstants;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import java.awt.*; import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.event.FocusAdapter; import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent; import java.awt.event.FocusEvent;
import java.util.ArrayList; import java.util.ArrayList;
@ -51,7 +57,7 @@ public class MapReportDataSinglePane extends FurtherBasicBeanPane<MapSingleLayer
northPane.setLayout(new FlowLayout(FlowLayout.CENTER)); northPane.setLayout(new FlowLayout(FlowLayout.CENTER));
northPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Area_Name") + ":", SwingConstants.RIGHT)); northPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Area_Name") + ":", SwingConstants.RIGHT));
areaNamePane = new TinyFormulaPane(); areaNamePane = new DefaultTinyFormulaPane();
areaNamePane.setPreferredSize(new Dimension(120, 20)); areaNamePane.setPreferredSize(new Dimension(120, 20));
northPane.add(areaNamePane); northPane.add(areaNamePane);
@ -193,7 +199,7 @@ public class MapReportDataSinglePane extends FurtherBasicBeanPane<MapSingleLayer
} }
editorComponent = field; editorComponent = field;
} else { } else {
TinyFormulaPane tinyPane = new TinyFormulaPane() { TinyFormulaPane tinyPane = new DefaultTinyFormulaPane() {
@Override @Override
public void okEvent() { public void okEvent() {
seriesPane.stopCellEditing(); seriesPane.stopCellEditing();

5
designer-chart/src/main/java/com/fr/design/chartx/component/MultiTinyFormulaPane.java

@ -2,6 +2,7 @@ package com.fr.design.chartx.component;
import com.fr.chartx.data.field.ColumnField; import com.fr.chartx.data.field.ColumnField;
import com.fr.design.chartx.fields.AbstractCellDataFieldsPane; import com.fr.design.chartx.fields.AbstractCellDataFieldsPane;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
/** /**
@ -16,12 +17,12 @@ public class MultiTinyFormulaPane extends AbstractMultiComponentPane<TinyFormula
@Override @Override
protected TinyFormulaPane createFirstFieldComponent() { protected TinyFormulaPane createFirstFieldComponent() {
return new TinyFormulaPane(); return new DefaultTinyFormulaPane();
} }
@Override @Override
protected TinyFormulaPane createOtherFieldComponent() { protected TinyFormulaPane createOtherFieldComponent() {
return new TinyFormulaPane(); return new DefaultTinyFormulaPane();
} }
@Override @Override

3
designer-chart/src/main/java/com/fr/design/chartx/component/MultiTinyFormulaPaneWithUISpinner.java

@ -2,6 +2,7 @@ package com.fr.design.chartx.component;
import com.fr.chartx.data.field.ColumnField; import com.fr.chartx.data.field.ColumnField;
import com.fr.design.chartx.fields.AbstractCellDataFieldsPane; import com.fr.design.chartx.fields.AbstractCellDataFieldsPane;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
/** /**
@ -10,7 +11,7 @@ import com.fr.design.formula.TinyFormulaPane;
public class MultiTinyFormulaPaneWithUISpinner extends AbstractMultiComponentPaneWithUISpinner<TinyFormulaPane> { public class MultiTinyFormulaPaneWithUISpinner extends AbstractMultiComponentPaneWithUISpinner<TinyFormulaPane> {
@Override @Override
protected TinyFormulaPane createJComponent() { protected TinyFormulaPane createJComponent() {
return new TinyFormulaPane(); return new DefaultTinyFormulaPane();
} }
@Override @Override

9
designer-chart/src/main/java/com/fr/design/chartx/component/correlation/TinyFormulaPaneEditorComponent.java

@ -1,9 +1,9 @@
package com.fr.design.chartx.component.correlation; package com.fr.design.chartx.component.correlation;
import com.fr.base.BaseFormula;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.frpane.UICorrelationPane; import com.fr.design.gui.frpane.UICorrelationPane;
@ -20,17 +20,12 @@ public class TinyFormulaPaneEditorComponent extends AbstractEditorComponent<Tiny
@Override @Override
public TinyFormulaPane getTableCellEditorComponent(final UICorrelationPane parent, JTable table, boolean isSelected, final int row, int column) { public TinyFormulaPane getTableCellEditorComponent(final UICorrelationPane parent, JTable table, boolean isSelected, final int row, int column) {
TinyFormulaPane editorComponent = new TinyFormulaPane() { TinyFormulaPane editorComponent = new DefaultTinyFormulaPane() {
@Override @Override
public void okEvent() { public void okEvent() {
parent.stopCellEditing(); parent.stopCellEditing();
parent.fireTargetChanged(); parent.fireTargetChanged();
} }
@Override
protected void populateTextField(BaseFormula fm) {
formulaTextField.setText(fm.getContent());
}
}; };
editorComponent.setBackground(UIConstants.FLESH_BLUE); editorComponent.setBackground(UIConstants.FLESH_BLUE);

17
designer-chart/src/main/java/com/fr/design/chartx/data/map/LineMapAreaLngLatPaneWithTinyFormula.java

@ -2,6 +2,7 @@ package com.fr.design.chartx.data.map;
import com.fr.chartx.data.field.diff.LineMapColumnFieldCollection; import com.fr.chartx.data.field.diff.LineMapColumnFieldCollection;
import com.fr.design.chartx.fields.AbstractCellDataFieldsPane; import com.fr.design.chartx.fields.AbstractCellDataFieldsPane;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
@ -28,8 +29,8 @@ public class LineMapAreaLngLatPaneWithTinyFormula extends AbstractAreaLngLatPane
@Override @Override
protected JPanel createAreaPane() { protected JPanel createAreaPane() {
if (fromArea_tab0 == null) { if (fromArea_tab0 == null) {
fromArea_tab0 = new TinyFormulaPane(); fromArea_tab0 = new DefaultTinyFormulaPane();
toArea_tab0 = new TinyFormulaPane(); toArea_tab0 = new DefaultTinyFormulaPane();
} }
return createPane( return createPane(
new String[]{Toolkit.i18nText("Fine-Design_Chart_Start_Area_Name"), new String[]{Toolkit.i18nText("Fine-Design_Chart_Start_Area_Name"),
@ -41,12 +42,12 @@ public class LineMapAreaLngLatPaneWithTinyFormula extends AbstractAreaLngLatPane
@Override @Override
protected JPanel createAreaLngLatPane() { protected JPanel createAreaLngLatPane() {
if (fromArea_tab1 == null) { if (fromArea_tab1 == null) {
fromArea_tab1 = new TinyFormulaPane(); fromArea_tab1 = new DefaultTinyFormulaPane();
fromLng_tab1 = new TinyFormulaPane(); fromLng_tab1 = new DefaultTinyFormulaPane();
fromLat_tab1 = new TinyFormulaPane(); fromLat_tab1 = new DefaultTinyFormulaPane();
toArea_tab1 = new TinyFormulaPane(); toArea_tab1 = new DefaultTinyFormulaPane();
toLng_tab1 = new TinyFormulaPane(); toLng_tab1 = new DefaultTinyFormulaPane();
toLat_tab1 = new TinyFormulaPane(); toLat_tab1 = new DefaultTinyFormulaPane();
} }
return createPane( return createPane(
new String[]{ new String[]{

9
designer-chart/src/main/java/com/fr/design/chartx/data/map/PointMapAreaLngLatPaneWithTinyFormula.java

@ -2,6 +2,7 @@ package com.fr.design.chartx.data.map;
import com.fr.chartx.data.field.diff.PointMapColumnFieldCollection; import com.fr.chartx.data.field.diff.PointMapColumnFieldCollection;
import com.fr.design.chartx.fields.AbstractCellDataFieldsPane; import com.fr.design.chartx.fields.AbstractCellDataFieldsPane;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
@ -23,7 +24,7 @@ public class PointMapAreaLngLatPaneWithTinyFormula extends AbstractAreaLngLatPan
@Override @Override
protected JPanel createAreaPane() { protected JPanel createAreaPane() {
if (area_tab0 == null) { if (area_tab0 == null) {
area_tab0 = new TinyFormulaPane(); area_tab0 = new DefaultTinyFormulaPane();
} }
return createPane( return createPane(
new String[]{Toolkit.i18nText("Fine-Design_Chart_Area_Name")}, new String[]{Toolkit.i18nText("Fine-Design_Chart_Area_Name")},
@ -34,9 +35,9 @@ public class PointMapAreaLngLatPaneWithTinyFormula extends AbstractAreaLngLatPan
@Override @Override
protected JPanel createAreaLngLatPane() { protected JPanel createAreaLngLatPane() {
if (area_tab1 == null) { if (area_tab1 == null) {
area_tab1 = new TinyFormulaPane(); area_tab1 = new DefaultTinyFormulaPane();
lng_tab1 = new TinyFormulaPane(); lng_tab1 = new DefaultTinyFormulaPane();
lat_tab1 = new TinyFormulaPane(); lat_tab1 = new DefaultTinyFormulaPane();
} }
return createPane( return createPane(
new String[]{Toolkit.i18nText("Fine-Design_Chart_Area_Name"), Toolkit.i18nText("Fine-Design_Chart_Longitude"), Toolkit.i18nText("Fine-Design_Chart_Latitude")}, new String[]{Toolkit.i18nText("Fine-Design_Chart_Area_Name"), Toolkit.i18nText("Fine-Design_Chart_Longitude"), Toolkit.i18nText("Fine-Design_Chart_Latitude")},

3
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/AreaMapCellDataFieldsPane.java

@ -1,6 +1,7 @@
package com.fr.design.chartx.fields.diff; package com.fr.design.chartx.fields.diff;
import com.fr.chartx.data.field.diff.AreaMapColumnFieldCollection; import com.fr.chartx.data.field.diff.AreaMapColumnFieldCollection;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
@ -28,7 +29,7 @@ public class AreaMapCellDataFieldsPane extends AbstractCellDataFieldsWithSeriesV
private TinyFormulaPane createAreaName() { private TinyFormulaPane createAreaName() {
if (areaName == null) { if (areaName == null) {
areaName = new TinyFormulaPane(); areaName = new DefaultTinyFormulaPane();
} }
return areaName; return areaName;
} }

5
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/GaugeCellDataFieldsPane.java

@ -3,6 +3,7 @@ package com.fr.design.chartx.fields.diff;
import com.fr.chartx.data.field.diff.GaugeColumnFieldCollection; import com.fr.chartx.data.field.diff.GaugeColumnFieldCollection;
import com.fr.design.chartx.component.AbstractSingleFilterPane; import com.fr.design.chartx.component.AbstractSingleFilterPane;
import com.fr.design.chartx.fields.AbstractCellDataFieldsPane; import com.fr.design.chartx.fields.AbstractCellDataFieldsPane;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.TableLayout4VanChartHelper;
@ -22,8 +23,8 @@ public class GaugeCellDataFieldsPane extends AbstractCellDataFieldsPane<GaugeCol
@Override @Override
protected void initComponents() { protected void initComponents() {
category = new TinyFormulaPane(); category = new DefaultTinyFormulaPane();
value = new TinyFormulaPane(); value = new DefaultTinyFormulaPane();
filterPane = new AbstractSingleFilterPane() { filterPane = new AbstractSingleFilterPane() {
@Override @Override

3
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/LineMapCellDataFieldsPane.java

@ -2,6 +2,7 @@ package com.fr.design.chartx.fields.diff;
import com.fr.chartx.data.field.diff.LineMapColumnFieldCollection; import com.fr.chartx.data.field.diff.LineMapColumnFieldCollection;
import com.fr.design.chartx.data.map.LineMapAreaLngLatPaneWithTinyFormula; import com.fr.design.chartx.data.map.LineMapAreaLngLatPaneWithTinyFormula;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -35,7 +36,7 @@ public class LineMapCellDataFieldsPane extends AbstractCellDataFieldsWithSeriesV
@Override @Override
protected TinyFormulaPane[] formulaPanes() { protected TinyFormulaPane[] formulaPanes() {
if (lineName == null) { if (lineName == null) {
lineName = new TinyFormulaPane(); lineName = new DefaultTinyFormulaPane();
} }
return new TinyFormulaPane[]{ return new TinyFormulaPane[]{
lineName lineName

3
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiPieCellDataFieldsPane.java

@ -3,6 +3,7 @@ package com.fr.design.chartx.fields.diff;
import com.fr.chartx.data.field.diff.MultiPieColumnFieldCollection; import com.fr.chartx.data.field.diff.MultiPieColumnFieldCollection;
import com.fr.design.chartx.component.MultiTinyFormulaPaneWithUISpinner; import com.fr.design.chartx.component.MultiTinyFormulaPaneWithUISpinner;
import com.fr.design.chartx.fields.AbstractCellDataFieldsPane; import com.fr.design.chartx.fields.AbstractCellDataFieldsPane;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
@ -33,7 +34,7 @@ public class MultiPieCellDataFieldsPane extends AbstractCellDataFieldsPane<Multi
protected void initComponents() { protected void initComponents() {
nameField = new UITextField(); nameField = new UITextField();
levelPane = new MultiTinyFormulaPaneWithUISpinner(); levelPane = new MultiTinyFormulaPaneWithUISpinner();
value = new TinyFormulaPane(); value = new DefaultTinyFormulaPane();
super.initComponents(); super.initComponents();
} }

3
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/SingleCategoryCellDataFieldsPane.java

@ -3,6 +3,7 @@ package com.fr.design.chartx.fields.diff;
import com.fr.chartx.data.field.ColumnField; import com.fr.chartx.data.field.ColumnField;
import com.fr.chartx.data.field.diff.MultiCategoryColumnFieldCollection; import com.fr.chartx.data.field.diff.MultiCategoryColumnFieldCollection;
import com.fr.design.chartx.component.CategorySeriesFilterPane; import com.fr.design.chartx.component.CategorySeriesFilterPane;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
@ -29,7 +30,7 @@ public class SingleCategoryCellDataFieldsPane extends AbstractCellDataFieldsWith
@Override @Override
protected void initComponents() { protected void initComponents() {
categoryPane = new TinyFormulaPane(); categoryPane = new DefaultTinyFormulaPane();
filterPane = new CategorySeriesFilterPane(); filterPane = new CategorySeriesFilterPane();
UILabel label = new BoldFontTextLabel(Toolkit.i18nText("Fine-Design_Chart_Style_Category")); UILabel label = new BoldFontTextLabel(Toolkit.i18nText("Fine-Design_Chart_Style_Category"));

9
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/StructureCellDataFieldsPane.java

@ -2,6 +2,7 @@ package com.fr.design.chartx.fields.diff;
import com.fr.chartx.data.field.diff.StructureColumnFieldCollection; import com.fr.chartx.data.field.diff.StructureColumnFieldCollection;
import com.fr.design.chartx.fields.AbstractCellDataFieldsPane; import com.fr.design.chartx.fields.AbstractCellDataFieldsPane;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
@ -24,10 +25,10 @@ public class StructureCellDataFieldsPane extends AbstractCellDataFieldsPane<Stru
@Override @Override
protected void initComponents() { protected void initComponents() {
seriesName = new UITextField(); seriesName = new UITextField();
nodeName = new TinyFormulaPane(); nodeName = new DefaultTinyFormulaPane();
nodeId = new TinyFormulaPane(); nodeId = new DefaultTinyFormulaPane();
parentId = new TinyFormulaPane(); parentId = new DefaultTinyFormulaPane();
nodeValue = new TinyFormulaPane(); nodeValue = new DefaultTinyFormulaPane();
super.initComponents(); super.initComponents();
} }

5
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/WordCloudCellDataFieldsPane.java

@ -2,6 +2,7 @@ package com.fr.design.chartx.fields.diff;
import com.fr.chartx.data.field.diff.WordCloudColumnFieldCollection; import com.fr.chartx.data.field.diff.WordCloudColumnFieldCollection;
import com.fr.design.chartx.fields.AbstractCellDataFieldsPane; import com.fr.design.chartx.fields.AbstractCellDataFieldsPane;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
@ -20,8 +21,8 @@ public class WordCloudCellDataFieldsPane extends AbstractCellDataFieldsPane<Word
@Override @Override
protected void initComponents() { protected void initComponents() {
name = new UITextField(); name = new UITextField();
wordName = new TinyFormulaPane(); wordName = new DefaultTinyFormulaPane();
wordValue = new TinyFormulaPane(); wordValue = new DefaultTinyFormulaPane();
super.initComponents(); super.initComponents();
} }

3
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java

@ -14,6 +14,7 @@ import com.fr.chart.chartattr.SwitchTitle;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.AttrScrollPane; import com.fr.design.dialog.AttrScrollPane;
import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ibutton.UIToggleButton; import com.fr.design.gui.ibutton.UIToggleButton;
@ -249,7 +250,7 @@ public class ChangeConfigPane extends BasicBeanPane<ChartCollection> {
result = Utils.objectToString(content); result = Utils.objectToString(content);
} }
} }
TinyFormulaPane title = new TinyFormulaPane(); TinyFormulaPane title = new DefaultTinyFormulaPane();
title.populateBean(result); title.populateBean(result);
switchTitles.add(title); switchTitles.add(title);
switchTitlePane.add(title, collection.getChartName(chartIndex)); switchTitlePane.add(title, collection.getChartName(chartIndex));

23
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java

@ -2,6 +2,7 @@ package com.fr.design.mainframe.chart.gui.data;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.chartx.data.DataLayoutHelper;
import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.gui.frpane.UIComboBoxPane; import com.fr.design.gui.frpane.UIComboBoxPane;
@ -61,14 +62,20 @@ public class NormalChartDataPane extends DataContentsPane {
JPanel contentPane = new JPanel(new BorderLayout()); JPanel contentPane = new JPanel(new BorderLayout());
dataPane = new UIComboBoxPane<ChartCollection>() { dataPane = new UIComboBoxPane<ChartCollection>() {
protected void initLayout() { protected void initLayout() {
this.setLayout(new BorderLayout(LayoutConstants.HGAP_LARGE,6)); this.setLayout(new BorderLayout(ChartEditContext.normalMode() ? LayoutConstants.HGAP_LARGE : 0,6));
JPanel northPane = new JPanel(new BorderLayout(LayoutConstants.HGAP_LARGE,0)); if (ChartEditContext.supportReportData()) {
northPane.add(jcb, BorderLayout.CENTER); JPanel northPane;
UILabel label1 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Source")); if (ChartEditContext.normalMode()) {
label1.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH,ChartDataPane.LABEL_HEIGHT)); northPane = new JPanel(new BorderLayout(LayoutConstants.HGAP_LARGE, 0));
northPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{jcb, null, null, label1, null})); northPane.add(jcb, BorderLayout.CENTER);
northPane.setBorder(BorderFactory.createEmptyBorder(0,5,0,8)); UILabel label1 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Source"));
if (ChartEditContext.normalMode()) { label1.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH,ChartDataPane.LABEL_HEIGHT));
northPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{jcb, null, null, label1, null}));
northPane.setBorder(BorderFactory.createEmptyBorder(0,5,0,8));
} else {
northPane = DataLayoutHelper.createDataLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Source"), jcb);
northPane.setBorder(BorderFactory.createEmptyBorder(0, DataLayoutHelper.LEFT_GAP, 0, DataLayoutHelper.RIGHT_GAP));
}
this.add(northPane, BorderLayout.NORTH); this.add(northPane, BorderLayout.NORTH);
} }
this.add(cardPane, BorderLayout.CENTER); this.add(cardPane, BorderLayout.CENTER);

17
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java

@ -8,6 +8,7 @@ import com.fr.chart.chartdata.SeriesDefinition;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.frpane.UICorrelationPane; import com.fr.design.gui.frpane.UICorrelationPane;
import com.fr.design.gui.itable.UITable; import com.fr.design.gui.itable.UITable;
@ -15,10 +16,15 @@ import com.fr.design.gui.itable.UITableEditor;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import javax.swing.*; import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import javax.swing.JTable;
import javax.swing.border.Border; import javax.swing.border.Border;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import java.awt.*; import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@ -171,17 +177,12 @@ public abstract class AbstractReportDataContentPane extends BasicBeanPane<ChartC
private TinyFormulaPane getEditorComponent() { private TinyFormulaPane getEditorComponent() {
editorComponent = null; editorComponent = null;
if (editorComponent == null) { if (editorComponent == null) {
editorComponent = new TinyFormulaPane() { editorComponent = new DefaultTinyFormulaPane() {
@Override @Override
public void okEvent() { public void okEvent() {
seriesPane.stopCellEditing(); seriesPane.stopCellEditing();
seriesPane.fireTargetChanged(); seriesPane.fireTargetChanged();
} }
@Override
protected void populateTextField(BaseFormula fm) {
formulaTextField.setText(fm.getContent());
}
}; };
editorComponent.setBackground(UIConstants.FLESH_BLUE); editorComponent.setBackground(UIConstants.FLESH_BLUE);

11
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotReportDataContentPane.java

@ -1,11 +1,11 @@
package com.fr.design.mainframe.chart.gui.data.report; package com.fr.design.mainframe.chart.gui.data.report;
import com.fr.base.BaseFormula;
import com.fr.base.chart.chartdata.TopDefinitionProvider; import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.Bar2DPlot; import com.fr.chart.chartattr.Bar2DPlot;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartdata.NormalReportDataDefinition; import com.fr.chart.chartdata.NormalReportDataDefinition;
import com.fr.chart.chartdata.SeriesDefinition; import com.fr.chart.chartdata.SeriesDefinition;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
@ -18,9 +18,9 @@ import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener; import javax.swing.event.DocumentListener;
import java.util.List;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Dimension; import java.awt.Dimension;
import java.util.List;
public class CategoryPlotReportDataContentPane extends AbstractReportDataContentPane { public class CategoryPlotReportDataContentPane extends AbstractReportDataContentPane {
protected static final int PRE_WIDTH = 210; protected static final int PRE_WIDTH = 210;
@ -45,7 +45,7 @@ public class CategoryPlotReportDataContentPane extends AbstractReportDataContent
this.add(panel, "0,6,1,4"); } this.add(panel, "0,6,1,4"); }
protected TinyFormulaPane initCategoryBox(final String leftLabel) { protected TinyFormulaPane initCategoryBox(final String leftLabel) {
TinyFormulaPane categoryName = new TinyFormulaPane() { TinyFormulaPane categoryName = new DefaultTinyFormulaPane() {
@Override @Override
protected void initLayout() { protected void initLayout() {
this.setLayout(new BorderLayout(4, 0)); this.setLayout(new BorderLayout(4, 0));
@ -61,11 +61,6 @@ public class CategoryPlotReportDataContentPane extends AbstractReportDataContent
this.add(formulaTextFieldButton, BorderLayout.EAST); this.add(formulaTextFieldButton, BorderLayout.EAST);
} }
@Override
protected void populateTextField(BaseFormula fm) {
formulaTextField.setText(fm.getContent());
}
public void okEvent() { public void okEvent() {
checkBoxUse(); checkBoxUse();
} }

7
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java

@ -4,6 +4,7 @@ import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.MeterPlot; import com.fr.chart.chartattr.MeterPlot;
import com.fr.chart.chartdata.MeterReportDefinition; import com.fr.chart.chartdata.MeterReportDefinition;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
@ -73,8 +74,8 @@ public class MeterPlotReportDataContentPane extends AbstractReportDataContentPan
protected Component[][] getShowComponents() { protected Component[][] getShowComponents() {
return new Component[][]{ return new Component[][]{
new Component[]{new UILabel(getCateNameString()), getSingCatePane()}, new Component[]{new UILabel(getCateNameString()), getSingCatePane()},
new Component[]{new UILabel(getNValueString()), singValuePane = new TinyFormulaPane()}, new Component[]{new UILabel(getNValueString()), singValuePane = new DefaultTinyFormulaPane()},
new Component[]{new UILabel(TARGET_VALUE), customPane = new TinyFormulaPane()} new Component[]{new UILabel(TARGET_VALUE), customPane = new DefaultTinyFormulaPane()}
}; };
} }
@ -148,6 +149,6 @@ public class MeterPlotReportDataContentPane extends AbstractReportDataContentPan
} }
protected Component getSingCatePane() { protected Component getSingCatePane() {
return singCatePane = new TinyFormulaPane(); return singCatePane = new DefaultTinyFormulaPane();
} }
} }

12
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/StockPlotReportDataContentPane.java

@ -10,6 +10,7 @@ import com.fr.chart.chartdata.StockLabel;
import com.fr.chart.chartdata.StockReportDefinition; import com.fr.chart.chartdata.StockReportDefinition;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.frpane.UICorrelationPane; import com.fr.design.gui.frpane.UICorrelationPane;
import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.gui.ilable.BoldFontTextLabel;
@ -20,13 +21,14 @@ import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.FRFont; import com.fr.general.FRFont;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.JTable;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.plaf.TableUI; import javax.swing.plaf.TableUI;
import java.awt.*; import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@ -56,7 +58,7 @@ public class StockPlotReportDataContentPane extends AbstractReportDataContentPan
public StockPlotReportDataContentPane(ChartDataPane parent) { public StockPlotReportDataContentPane(ChartDataPane parent) {
initEveryPane(); initEveryPane();
axisTime = new TinyFormulaPane() { axisTime = new DefaultTinyFormulaPane() {
@Override @Override
protected void initLayout() { protected void initLayout() {
this.setLayout(new BorderLayout(4, 0)); this.setLayout(new BorderLayout(4, 0));
@ -217,7 +219,7 @@ public class StockPlotReportDataContentPane extends AbstractReportDataContentPan
public StockTableEditor() { public StockTableEditor() {
labelComponent = new UITextField(); labelComponent = new UITextField();
formulaComponent = new TinyFormulaPane() { formulaComponent = new DefaultTinyFormulaPane() {
@Override @Override
public void okEvent() { public void okEvent() {
seriesPane.stopCellEditing(); seriesPane.stopCellEditing();

5
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java

@ -4,6 +4,7 @@ import com.fr.base.Utils;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.MeterPlot; import com.fr.chart.chartattr.MeterPlot;
import com.fr.chart.chartdata.MeterTableDefinition; import com.fr.chart.chartdata.MeterTableDefinition;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.gui.ilable.BoldFontTextLabel;
@ -21,12 +22,12 @@ import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.BoxLayout; import javax.swing.BoxLayout;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.util.List;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Component; import java.awt.Component;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.event.ItemEvent; import java.awt.event.ItemEvent;
import java.awt.event.ItemListener; import java.awt.event.ItemListener;
import java.util.List;
/** /**
* 仪表盘, 属性表, 数据集数据界面. * 仪表盘, 属性表, 数据集数据界面.
@ -59,7 +60,7 @@ public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane
nameBox.setSelectedIndex(nameBox.getItemCount() -1); nameBox.setSelectedIndex(nameBox.getItemCount() -1);
valueBox = new UIComboBox(); valueBox = new UIComboBox();
targetBox = new UIComboBox(); targetBox = new UIComboBox();
custom = new TinyFormulaPane(); custom = new DefaultTinyFormulaPane();
filterPane = new ChartDataFilterPane(new MeterPlot(), parent); filterPane = new ChartDataFilterPane(new MeterPlot(), parent);
boxPane = new JPanel(); boxPane = new JPanel();

12
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartAxisTitlePane.java

@ -8,6 +8,7 @@ import com.fr.chart.chartattr.Axis;
import com.fr.chart.chartattr.Title; import com.fr.chart.chartattr.Title;
import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
@ -15,12 +16,15 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.FRFont; import com.fr.general.FRFont;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import javax.swing.*; import javax.swing.Icon;
import java.awt.*; import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
@ -39,7 +43,7 @@ public class ChartAxisTitlePane extends BasicPane{
private void initComponents(){ private void initComponents(){
isAxisTitleVisable = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis_Title")); isAxisTitleVisable = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis_Title"));
axisTitleContentPane = new TinyFormulaPane(); axisTitleContentPane = new DefaultTinyFormulaPane();
axisTitleAttrPane = new ChartTextAttrPane(); axisTitleAttrPane = new ChartTextAttrPane();
axisTitleAttrPane.populate(FRFont.getInstance("Microsoft YaHei", Font.PLAIN, 9)); axisTitleAttrPane.populate(FRFont.getInstance("Microsoft YaHei", Font.PLAIN, 9));
Icon[] alignmentIconArray = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), Icon[] alignmentIconArray = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"),

3
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/ColorPickerPaneWithFormula.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.chart.gui.style.series; package com.fr.design.mainframe.chart.gui.style.series;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
@ -31,7 +32,7 @@ public class ColorPickerPaneWithFormula extends UIColorPickerPane{
} }
protected JComponent getNewTextFieldComponent(int i,String value){ protected JComponent getNewTextFieldComponent(int i,String value){
TinyFormulaPane textField = new TinyFormulaPane(); TinyFormulaPane textField = new DefaultTinyFormulaPane();
textField.setBounds(0, i * 2 * TEXTFIELD_HEIGHT, TEXTFIELD_WIDTH, TEXTFIELD_HEIGHT); textField.setBounds(0, i * 2 * TEXTFIELD_HEIGHT, TEXTFIELD_WIDTH, TEXTFIELD_HEIGHT);
textField.getUITextField().setText(value); textField.getUITextField().setText(value);
return textField; return textField;

3
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/ColorPickerPaneWithMaxMin.java

@ -2,6 +2,7 @@ package com.fr.design.mainframe.chart.gui.style.series;
import com.fr.base.BaseFormula; import com.fr.base.BaseFormula;
import com.fr.chart.chartglyph.MapHotAreaColor; import com.fr.chart.chartglyph.MapHotAreaColor;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
@ -110,7 +111,7 @@ public class ColorPickerPaneWithMaxMin extends ColorPickerPaneWithFormula {
} }
} }
public class TinyFormulaPaneWithEnable extends TinyFormulaPane { public class TinyFormulaPaneWithEnable extends DefaultTinyFormulaPane {
@Override @Override
public void setEnabled(boolean enabled) { public void setEnabled(boolean enabled) {
super.setEnabled(enabled); super.setEnabled(enabled);

3
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/MapColorPickerPaneWithFormula.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.chart.gui.style.series; package com.fr.design.mainframe.chart.gui.style.series;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
@ -27,7 +28,7 @@ public class MapColorPickerPaneWithFormula extends UIColorPickerPane4Map {
} }
protected JComponent getNewTextFieldComponent(int i,String value){ protected JComponent getNewTextFieldComponent(int i,String value){
TinyFormulaPane textField = new TinyFormulaPane(); TinyFormulaPane textField = new DefaultTinyFormulaPane();
textField.setBounds(0, i * 2 * TEXTFIELD_HEIGHT, TEXTFIELD_WIDTH, TEXTFIELD_HEIGHT); textField.setBounds(0, i * 2 * TEXTFIELD_HEIGHT, TEXTFIELD_WIDTH, TEXTFIELD_HEIGHT);
textField.getUITextField().setText(value); textField.getUITextField().setText(value);
return textField; return textField;

11
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/title/ChartTitlePane.java

@ -9,6 +9,7 @@ import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Title; import com.fr.chart.chartattr.Title;
import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicScrollPane; import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
@ -19,13 +20,15 @@ import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.design.mainframe.chart.gui.style.ChartBackgroundNoImagePane; import com.fr.design.mainframe.chart.gui.style.ChartBackgroundNoImagePane;
import com.fr.design.mainframe.chart.gui.style.ChartBorderPane; import com.fr.design.mainframe.chart.gui.style.ChartBorderPane;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.Icon;
import java.awt.*; import javax.swing.JPanel;
import javax.swing.JSeparator;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
@ -95,7 +98,7 @@ public class ChartTitlePane extends BasicScrollPane<Chart> {
} }
private JPanel createDefaultAttrPane(){ private JPanel createDefaultAttrPane(){
titleContent = new TinyFormulaPane(); titleContent = new DefaultTinyFormulaPane();
textAttrPane = new ChartTextAttrPane(); textAttrPane = new ChartTextAttrPane();
Icon[] alignmentIconArray = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), Icon[] alignmentIconArray = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"),
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"),

5
designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartReportDataPane.java

@ -2,6 +2,7 @@ package com.fr.extended.chart;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
@ -42,8 +43,8 @@ public abstract class AbstractExtendedChartReportDataPane<T extends AbstractData
} }
if (hasCustomFieldPane()) { if (hasCustomFieldPane()) {
seriesPane = new TinyFormulaPane(); seriesPane = new DefaultTinyFormulaPane();
valuePane = new TinyFormulaPane(); valuePane = new DefaultTinyFormulaPane();
components[len] = new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Series_Name"), SwingConstants.LEFT), seriesPane}; components[len] = new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Series_Name"), SwingConstants.LEFT), seriesPane};
components[len + 1] = new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_Value"), SwingConstants.LEFT), valuePane}; components[len + 1] = new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_Value"), SwingConstants.LEFT), valuePane};
} }

3
designer-chart/src/main/java/com/fr/van/chart/box/data/report/BoxPlotReportResultDataSeriesPane.java

@ -1,6 +1,7 @@
package com.fr.van.chart.box.data.report; package com.fr.van.chart.box.data.report;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
@ -72,7 +73,7 @@ public class BoxPlotReportResultDataSeriesPane extends AbstractReportDataContent
private TinyFormulaPane createTinyFormulaPaneWithTitle(final String title) { private TinyFormulaPane createTinyFormulaPaneWithTitle(final String title) {
return new TinyFormulaPane() { return new DefaultTinyFormulaPane() {
protected void initLayout() { protected void initLayout() {
this.setLayout(new BorderLayout(4, 0)); this.setLayout(new BorderLayout(4, 0));

3
designer-chart/src/main/java/com/fr/van/chart/box/data/report/TinyFormulaWithEditLabel.java

@ -2,6 +2,7 @@ package com.fr.van.chart.box.data.report;
import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.mainframe.chart.gui.UIEditLabel; import com.fr.design.mainframe.chart.gui.UIEditLabel;
@ -29,7 +30,7 @@ public abstract class TinyFormulaWithEditLabel extends JPanel implements UIObser
}; };
editLabel.setPreferredSize(new Dimension(75, 20)); editLabel.setPreferredSize(new Dimension(75, 20));
tinyFormulaPane = new TinyFormulaPane(); tinyFormulaPane = new DefaultTinyFormulaPane();
this.setLayout(new BorderLayout(4, 0)); this.setLayout(new BorderLayout(4, 0));
this.add(editLabel, BorderLayout.WEST); this.add(editLabel, BorderLayout.WEST);

10
designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnSeriesPane.java

@ -3,13 +3,13 @@ package com.fr.van.chart.column;
import com.fr.base.background.ImageBackground; import com.fr.base.background.ImageBackground;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr; import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.design.gui.frpane.UINumberDragPaneWithPercent;
import com.fr.design.gui.ispinner.chart.UISpinnerWithPx;
import com.fr.design.i18n.Toolkit;
import com.fr.design.gui.frpane.UINumberDragPane; import com.fr.design.gui.frpane.UINumberDragPane;
import com.fr.design.gui.frpane.UINumberDragPaneWithPercent;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.ispinner.chart.UISpinnerWithPx;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.backgroundpane.ImageBackgroundQuickPane; import com.fr.design.mainframe.backgroundpane.ImageBackgroundQuickPane;
@ -91,8 +91,8 @@ public class VanChartColumnSeriesPane extends VanChartAbstractPlotSeriesPane {
panel1.add(columnWidth, BorderLayout.CENTER); panel1.add(columnWidth, BorderLayout.CENTER);
Component[][] components2 = new Component[][]{ Component[][] components2 = new Component[][]{
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Gap_Series")),seriesGap}, new Component[]{FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_Gap_Series")),seriesGap},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Gap_Category")),categoryGap}, new Component[]{FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_Gap_Category")),categoryGap},
}; };
JPanel panel2 = TableLayout4VanChartHelper.createGapTableLayoutPane(components2, row, col); JPanel panel2 = TableLayout4VanChartHelper.createGapTableLayoutPane(components2, row, col);

4
designer-chart/src/main/java/com/fr/van/chart/designer/data/OneDimensionalPlotReportDataContentPane.java

@ -1,7 +1,7 @@
package com.fr.van.chart.designer.data; package com.fr.van.chart.designer.data;
import com.fr.chart.chartdata.MeterReportDefinition; import com.fr.chart.chartdata.MeterReportDefinition;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
@ -39,7 +39,7 @@ public class OneDimensionalPlotReportDataContentPane extends MeterPlotReportData
protected Component[][] getShowComponents() { protected Component[][] getShowComponents() {
return new Component[][]{ return new Component[][]{
new Component[]{new UILabel(getCateNameString()), getSingCatePane()}, new Component[]{new UILabel(getCateNameString()), getSingCatePane()},
new Component[]{new UILabel(getNValueString()), singValuePane = new TinyFormulaPane()}, new Component[]{new UILabel(getNValueString()), singValuePane = new DefaultTinyFormulaPane()},
}; };
} }

7
designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java

@ -7,6 +7,7 @@ import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr; import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chart.chartglyph.ConditionCollection; import com.fr.chart.chartglyph.ConditionCollection;
import com.fr.chartx.attr.LargeDataModeType; import com.fr.chartx.attr.LargeDataModeType;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.frpane.UINumberDragPane; import com.fr.design.gui.frpane.UINumberDragPane;
import com.fr.design.gui.frpane.UINumberDragPaneWithPercent; import com.fr.design.gui.frpane.UINumberDragPaneWithPercent;
@ -251,8 +252,8 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
private JPanel createScaleAxisPane() { private JPanel createScaleAxisPane() {
zoomResize = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Change"), Toolkit.i18nText("Fine-Design_Chart_Non_Adjustment")}); zoomResize = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Change"), Toolkit.i18nText("Fine-Design_Chart_Non_Adjustment")});
from = new TinyFormulaPane(); from = new DefaultTinyFormulaPane();
to = new TinyFormulaPane(); to = new DefaultTinyFormulaPane();
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Widget_Boundary")), zoomResize}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Widget_Boundary")), zoomResize},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_From")), from}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_From")), from},
@ -497,7 +498,7 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
protected JPanel createAnimationPane() { protected JPanel createAnimationPane() {
isChartAnimation = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Open"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Close")}); isChartAnimation = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Open"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Close")});
chartAnimationLabel = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Animation_Effects")); chartAnimationLabel = FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_Animation_Effects"));
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;

5
designer-chart/src/main/java/com/fr/van/chart/designer/other/zoom/ZoomPane.java

@ -4,6 +4,7 @@ import com.fr.chartx.attr.ZoomAttribute;
import com.fr.chartx.attr.ZoomInitialDisplayType; import com.fr.chartx.attr.ZoomInitialDisplayType;
import com.fr.chartx.attr.ZoomModeType; import com.fr.chartx.attr.ZoomModeType;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
@ -140,8 +141,8 @@ public class ZoomPane extends BasicBeanPane<ZoomAttribute> {
final JPanel topPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components1, new double[]{p}, columnSize); final JPanel topPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components1, new double[]{p}, columnSize);
leftFormulaPane = new TinyFormulaPane(); leftFormulaPane = new DefaultTinyFormulaPane();
rightFormulaPane = new TinyFormulaPane(); rightFormulaPane = new DefaultTinyFormulaPane();
Component[][] components2 = new Component[][]{ Component[][] components2 = new Component[][]{
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Left_Boundary")), leftFormulaPane}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Left_Boundary")), leftFormulaPane},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Right_Boundary")), rightFormulaPane} new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Right_Boundary")), rightFormulaPane}

3
designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java

@ -5,6 +5,7 @@ import com.fr.base.BaseUtils;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.chart.base.TextAttr; import com.fr.chart.base.TextAttr;
import com.fr.chartx.config.info.constant.ConfigType; import com.fr.chartx.config.info.constant.ConfigType;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.frpane.UIBubbleFloatPane; import com.fr.design.gui.frpane.UIBubbleFloatPane;
import com.fr.design.gui.frpane.UINumberDragPane; import com.fr.design.gui.frpane.UINumberDragPane;
@ -152,7 +153,7 @@ public class VanChartTitlePane extends AbstractVanChartScrollPane<VanChart> {
} }
private JPanel createTitleContentPane(double[] row, double[] col) { private JPanel createTitleContentPane(double[] row, double[] col) {
titleContent = new TinyFormulaPane(); titleContent = new DefaultTinyFormulaPane();
useHtml = new UIToggleButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Html")); useHtml = new UIToggleButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Html"));
UIComponentUtils.setLineWrap(useHtml); UIComponentUtils.setLineWrap(useHtml);
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{

3
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java

@ -8,6 +8,7 @@ import com.fr.chart.base.TextAttr;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Title; import com.fr.chart.chartattr.Title;
import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.frpane.UINumberDragPane; import com.fr.design.gui.frpane.UINumberDragPane;
import com.fr.design.gui.frpane.UINumberDragPaneWithPercent; import com.fr.design.gui.frpane.UINumberDragPaneWithPercent;
@ -157,7 +158,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
showTitle = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Use_Show"), Toolkit.i18nText("Fine-Design_Chart_Hidden")}); showTitle = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Use_Show"), Toolkit.i18nText("Fine-Design_Chart_Hidden")});
titleAlignPane = isXAxis ? getXAxisTitleAlignPane() : getYAxisTitleAlignPane(); titleAlignPane = isXAxis ? getXAxisTitleAlignPane() : getYAxisTitleAlignPane();
titleAlignPane.setSelectedItem(Constants.CENTER); titleAlignPane.setSelectedItem(Constants.CENTER);
titleContent = new TinyFormulaPane(); titleContent = new DefaultTinyFormulaPane();
titleUseHtml = new UIToggleButton(Toolkit.i18nText("Fine-Design_Chart_Html")); titleUseHtml = new UIToggleButton(Toolkit.i18nText("Fine-Design_Chart_Html"));
UIComponentUtils.setLineWrap(titleUseHtml); UIComponentUtils.setLineWrap(titleUseHtml);
titleTextAttrPane = getChartTextAttrPane(); titleTextAttrPane = getChartTextAttrPane();

7
designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAlertValuePane.java

@ -5,14 +5,15 @@ import com.fr.base.Utils;
import com.fr.chart.base.AttrColor; import com.fr.chart.base.AttrColor;
import com.fr.chart.base.AttrLineStyle; import com.fr.chart.base.AttrLineStyle;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.ispinner.chart.UISpinnerWithPx; import com.fr.design.gui.ispinner.chart.UISpinnerWithPx;
import com.fr.design.i18n.Toolkit;
import com.fr.design.gui.style.FRFontPane; import com.fr.design.gui.style.FRFontPane;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
@ -86,7 +87,7 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> {
} }
private void initComponents() { private void initComponents() {
alertValue = new TinyFormulaPane(); alertValue = new DefaultTinyFormulaPane();
//設置大小,防止文本過長導致界面“變形” //設置大小,防止文本過長導致界面“變形”
alertValue.setPreferredSize(new Dimension(VALUE_WD, HT)); alertValue.setPreferredSize(new Dimension(VALUE_WD, HT));
@ -95,7 +96,7 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> {
lineWidthSpinner = new UISpinnerWithPx(LINE_WIDTH_MIN_VALUE, Integer.MAX_VALUE, LINE_WIDTH_DIERTA_VALUE, LINE_WIDTH_DEFAULT_VALUE); lineWidthSpinner = new UISpinnerWithPx(LINE_WIDTH_MIN_VALUE, Integer.MAX_VALUE, LINE_WIDTH_DIERTA_VALUE, LINE_WIDTH_DEFAULT_VALUE);
alertLineColor = new ColorSelectBox(PREFERRED_WIDTH); alertLineColor = new ColorSelectBox(PREFERRED_WIDTH);
alertTextPosition = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Axis_Top"), Toolkit.i18nText("Fine-Design_Chart_Axis_Bottom")}); alertTextPosition = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Axis_Top"), Toolkit.i18nText("Fine-Design_Chart_Axis_Bottom")});
alertText = new TinyFormulaPane(); alertText = new DefaultTinyFormulaPane();
//設置大小,防止文本過長導致界面“變形” //設置大小,防止文本過長導致界面“變形”
alertText.setPreferredSize(new Dimension(TEXT_WD, HT)); alertText.setPreferredSize(new Dimension(TEXT_WD, HT));

6
designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartCustomIntervalBackgroundPane.java

@ -3,6 +3,7 @@ package com.fr.van.chart.designer.style.background;
import com.fr.base.BaseFormula; import com.fr.base.BaseFormula;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.frpane.UINumberDragPane; import com.fr.design.gui.frpane.UINumberDragPane;
import com.fr.design.gui.frpane.UINumberDragPaneWithPercent; import com.fr.design.gui.frpane.UINumberDragPaneWithPercent;
@ -13,7 +14,6 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.style.color.ColorSelectBox; import com.fr.design.style.color.ColorSelectBox;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.plugin.chart.VanChartAttrHelper; import com.fr.plugin.chart.VanChartAttrHelper;
import com.fr.plugin.chart.attr.axis.VanChartCustomIntervalBackground; import com.fr.plugin.chart.attr.axis.VanChartCustomIntervalBackground;
import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.TableLayout4VanChartHelper;
@ -48,8 +48,8 @@ public class VanChartCustomIntervalBackgroundPane extends BasicBeanPane<VanChart
} }
private JPanel createContentPane() { private JPanel createContentPane() {
bottomValue = new TinyFormulaPane(); bottomValue = new DefaultTinyFormulaPane();
topValue = new TinyFormulaPane(); topValue = new DefaultTinyFormulaPane();
bottomValue.setPreferredSize(new Dimension(124,20)); bottomValue.setPreferredSize(new Dimension(124,20));
topValue.setPreferredSize(new Dimension(124,20)); topValue.setPreferredSize(new Dimension(124,20));
color = new ColorSelectBox(100); color = new ColorSelectBox(100);

4
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/GanttReportDataContentPane.java

@ -2,12 +2,12 @@ package com.fr.van.chart.gantt.designer.data.data.component;
import com.fr.base.chart.chartdata.TopDefinitionProvider; import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
import com.fr.plugin.chart.gantt.data.VanGanttReportDefinition; import com.fr.plugin.chart.gantt.data.VanGanttReportDefinition;
import com.fr.van.chart.gantt.designer.data.data.GanttDataPaneHelper; import com.fr.van.chart.gantt.designer.data.data.GanttDataPaneHelper;
@ -54,7 +54,7 @@ public class GanttReportDataContentPane extends AbstractReportDataContentPane{
} }
private TinyFormulaPane createTinyFormulaPaneWithTitle(final String title) { private TinyFormulaPane createTinyFormulaPaneWithTitle(final String title) {
return new TinyFormulaPane() { return new DefaultTinyFormulaPane() {
@Override @Override
protected void initLayout() { protected void initLayout() {
this.setLayout(new BorderLayout(4, 0)); this.setLayout(new BorderLayout(4, 0));

3
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/TinyFormulaWithButtonPane.java

@ -2,6 +2,7 @@ package com.fr.van.chart.gantt.designer.data.data.component;
import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.mainframe.chart.gui.UIEditLabel; import com.fr.design.mainframe.chart.gui.UIEditLabel;
@ -41,7 +42,7 @@ public abstract class TinyFormulaWithButtonPane extends JPanel implements UIObse
}; };
editLabel.setPreferredSize(new Dimension(80,20)); editLabel.setPreferredSize(new Dimension(80,20));
tinyFormulaPane = new TinyFormulaPane(); tinyFormulaPane = new DefaultTinyFormulaPane();
UIButton button = new UIButton(IOUtils.readIcon(iconUrl)); UIButton button = new UIButton(IOUtils.readIcon(iconUrl));
button.setPreferredSize(new Dimension(20, 20)); button.setPreferredSize(new Dimension(20, 20));

4
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/link/GanttLinkReportDataContentPane.java

@ -2,12 +2,12 @@ package com.fr.van.chart.gantt.designer.data.link;
import com.fr.base.chart.chartdata.TopDefinitionProvider; import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
import com.fr.plugin.chart.gantt.data.VanGanttLinkReportDefinition; import com.fr.plugin.chart.gantt.data.VanGanttLinkReportDefinition;
import com.fr.van.chart.gantt.designer.data.data.GanttDataPaneHelper; import com.fr.van.chart.gantt.designer.data.data.GanttDataPaneHelper;
@ -41,7 +41,7 @@ public class GanttLinkReportDataContentPane extends AbstractReportDataContentPan
} }
private TinyFormulaPane createTinyFormulaPaneWithTitle(final String title) { private TinyFormulaPane createTinyFormulaPaneWithTitle(final String title) {
return new TinyFormulaPane() { return new DefaultTinyFormulaPane() {
@Override @Override
protected void initLayout() { protected void initLayout() {
this.setLayout(new BorderLayout(4, 0)); this.setLayout(new BorderLayout(4, 0));

3
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/report/AreaPane.java

@ -1,6 +1,7 @@
package com.fr.van.chart.map.designer.data.component.report; package com.fr.van.chart.map.designer.data.component.report;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
@ -25,7 +26,7 @@ public class AreaPane extends AbstractReportDataContentPane {
} }
protected JPanel createContentPane() { protected JPanel createContentPane() {
areaName = new TinyFormulaPane(); areaName = new DefaultTinyFormulaPane();
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {f, COMPONENT_WIDTH}; double[] columnSize = {f, COMPONENT_WIDTH};

7
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/report/LongLatAreaPane.java

@ -1,6 +1,7 @@
package com.fr.van.chart.map.designer.data.component.report; package com.fr.van.chart.map.designer.data.component.report;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
@ -26,9 +27,9 @@ public class LongLatAreaPane extends AreaPane {
@Override @Override
protected JPanel createContentPane() { protected JPanel createContentPane() {
areaName = new TinyFormulaPane(); areaName = new DefaultTinyFormulaPane();
longitude = new TinyFormulaPane(); longitude = new DefaultTinyFormulaPane();
latitude = new TinyFormulaPane(); latitude = new DefaultTinyFormulaPane();
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {f, COMPONENT_WIDTH}; double[] columnSize = {f, COMPONENT_WIDTH};

3
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/report/VanAreaMapPlotReportDataContentPane.java

@ -3,6 +3,7 @@ package com.fr.van.chart.map.designer.data.contentpane.report;
import com.fr.base.chart.chartdata.TopDefinitionProvider; import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartdata.SeriesDefinition; import com.fr.chart.chartdata.SeriesDefinition;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
@ -30,7 +31,7 @@ public class VanAreaMapPlotReportDataContentPane extends AbstractReportDataConte
} }
protected void initAreaName() { protected void initAreaName() {
areaName = new TinyFormulaPane() { areaName = new DefaultTinyFormulaPane() {
@Override @Override
protected void initLayout() { protected void initLayout() {
this.setLayout(new BorderLayout(4, 0)); this.setLayout(new BorderLayout(4, 0));

94
designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java

@ -3,14 +3,17 @@ package com.fr.van.chart.map.designer.type;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.design.mainframe.chart.mode.ChartEditContext;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext;
import com.fr.plugin.chart.base.GisLayer; import com.fr.plugin.chart.base.GisLayer;
import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.plugin.chart.map.VanChartMapPlot;
import com.fr.plugin.chart.map.server.MapLayerConfigManager; import com.fr.plugin.chart.map.server.MapLayerConfigManager;
@ -29,6 +32,7 @@ import java.awt.CardLayout;
import java.awt.Component; import java.awt.Component;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.event.ItemEvent; import java.awt.event.ItemEvent;
import java.util.Locale;
/** /**
* @author Bjorn * @author Bjorn
@ -39,8 +43,16 @@ public class GisLayerPane extends JPanel implements UIObserver {
private UIButtonGroup gisButton; private UIButtonGroup gisButton;
private JPanel layerPaneCheckPane; private JPanel layerPaneCheckPane;
private UIComboBox gisGaoDeLayer;
private UIComboBox gisLayer; /**
* 标准图层
*/
private UIComboBox standardLayers;
/**
* 自定义图层
*/
private UIComboBox customLayers;
private JPanel layerCardPane; private JPanel layerCardPane;
private WMSLayerPane wmsLayerPane; private WMSLayerPane wmsLayerPane;
@ -48,7 +60,7 @@ public class GisLayerPane extends JPanel implements UIObserver {
private UIComboBox zoomLevel; private UIComboBox zoomLevel;
private String[] layers = MapLayerConfigManager.getLayerItems(); private String[] layers = MapLayerConfigManager.getCustomLayerItems();
public GisLayerPane() { public GisLayerPane() {
initComps(); initComps();
@ -86,15 +98,12 @@ public class GisLayerPane extends JPanel implements UIObserver {
gisButton = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Mode_Auto"), gisButton = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Mode_Auto"),
Toolkit.i18nText("Fine-Design_Form_Widget_Style_Standard"), Toolkit.i18nText("Fine-Design_Chart_Custom")}); Toolkit.i18nText("Fine-Design_Form_Widget_Style_Standard"), Toolkit.i18nText("Fine-Design_Chart_Custom")});
gisButton.setSelectedIndex(ChartEditContext.supportTheme() ? 0 : 1); gisButton.setSelectedIndex(ChartEditContext.supportTheme() ? 0 : 1);
gisGaoDeLayer = new UIComboBox(MapLayerConfigManager.getGaoDeLayerItems());
gisButton.addActionListener(event -> { gisButton.addActionListener(event -> {
refreshZoomLevel(); refreshZoomLevel();
checkLayerCardPane(); checkLayerCardPane();
}); });
gisGaoDeLayer.addItemListener(event -> refreshZoomLevel()); initLayer();
initCustomGISLayerPane();
initLayerCardPane(); initLayerCardPane();
layerPaneCheckPane = new JPanel(new CardLayout()) { layerPaneCheckPane = new JPanel(new CardLayout()) {
@ -104,15 +113,15 @@ public class GisLayerPane extends JPanel implements UIObserver {
return new Dimension(0, 0); return new Dimension(0, 0);
} }
if (isStandardGis()) { if (isStandardGis()) {
return gisGaoDeLayer.getPreferredSize(); return standardLayers.getPreferredSize();
} else { } else {
return gisLayer.getPreferredSize(); return customLayers.getPreferredSize();
} }
} }
}; };
layerPaneCheckPane.add(new JPanel(), "auto"); layerPaneCheckPane.add(new JPanel(), "auto");
layerPaneCheckPane.add(gisGaoDeLayer, "standard"); layerPaneCheckPane.add(standardLayers, "standard");
layerPaneCheckPane.add(gisLayer, "custom"); layerPaneCheckPane.add(customLayers, "custom");
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
@ -142,7 +151,7 @@ public class GisLayerPane extends JPanel implements UIObserver {
if (isStandardGis() || isAuto()) { if (isStandardGis() || isAuto()) {
return new Dimension(0, 0); return new Dimension(0, 0);
} }
String itemName = Utils.objectToString(gisLayer.getSelectedItem()); String itemName = Utils.objectToString(customLayers.getSelectedItem());
if (MapLayerConfigManager.isCustomLayer(itemName)) { if (MapLayerConfigManager.isCustomLayer(itemName)) {
return tileLayerPane.getPreferredSize(); return tileLayerPane.getPreferredSize();
} else if (MapLayerConfigManager.isCustomWmsLayer(itemName)) { } else if (MapLayerConfigManager.isCustomWmsLayer(itemName)) {
@ -163,10 +172,12 @@ public class GisLayerPane extends JPanel implements UIObserver {
} }
} }
private void initCustomGISLayerPane() { private void initLayer() {
gisLayer = new UIComboBox(layers); standardLayers = new UIComboBox(MapLayerConfigManager.getStandardLayerItems());
customLayers = new UIComboBox(layers);
gisLayer.addItemListener(e -> standardLayers.addItemListener(event -> refreshZoomLevel());
customLayers.addItemListener(e ->
{ {
if (e.getStateChange() == ItemEvent.SELECTED) { if (e.getStateChange() == ItemEvent.SELECTED) {
checkCustomLayerCardPane(); checkCustomLayerCardPane();
@ -175,7 +186,7 @@ public class GisLayerPane extends JPanel implements UIObserver {
} }
); );
gisLayer.addPopupMenuListener(new PopupMenuListener() { customLayers.addPopupMenuListener(new PopupMenuListener() {
public void popupMenuCanceled(PopupMenuEvent e) { public void popupMenuCanceled(PopupMenuEvent e) {
} }
@ -184,12 +195,12 @@ public class GisLayerPane extends JPanel implements UIObserver {
public void popupMenuWillBecomeVisible(PopupMenuEvent e) { public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
String selected = Utils.objectToString(gisLayer.getSelectedItem()); String selected = Utils.objectToString(customLayers.getSelectedItem());
ZoomLevel zoomSelected = (ZoomLevel) zoomLevel.getSelectedItem(); ZoomLevel zoomSelected = (ZoomLevel) zoomLevel.getSelectedItem();
gisLayer.setModel(new DefaultComboBoxModel(MapLayerConfigManager.getLayerItems())); customLayers.setModel(new DefaultComboBoxModel(MapLayerConfigManager.getCustomLayerItems()));
gisLayer.setSelectedItem(selected); customLayers.setSelectedItem(selected);
zoomLevel.setSelectedItem(zoomSelected); zoomLevel.setSelectedItem(zoomSelected);
} }
}); });
@ -201,15 +212,15 @@ public class GisLayerPane extends JPanel implements UIObserver {
if (isAuto()) { if (isAuto()) {
levels = MapStatusPane.ZOOM_LEVELS; levels = MapStatusPane.ZOOM_LEVELS;
} else if (isStandardGis()) { } else if (isStandardGis()) {
if (gisGaoDeLayer.getSelectedIndex() == gisGaoDeLayer.getItemCount() - 1) { if (standardLayers.getSelectedIndex() == standardLayers.getItemCount() - 1) {
levels = MapStatusPane.ZOOM_LEVELS; levels = MapStatusPane.ZOOM_LEVELS;
} else { } else {
levels = MapStatusPane.GAODE_ZOOM_LEVELS; levels = MapStatusPane.GAODE_ZOOM_LEVELS;
} }
} else { } else {
if (ComparatorUtils.equals(gisLayer.getSelectedItem(), Toolkit.i18nText("Fine-Design_Chart_Layer_Blue"))) { if (ComparatorUtils.equals(customLayers.getSelectedItem(), Toolkit.i18nText("Fine-Design_Chart_Layer_Blue"))) {
levels = MapStatusPane.BLUE_ZOOM_LEVELS; levels = MapStatusPane.BLUE_ZOOM_LEVELS;
} else if (ComparatorUtils.equals(gisLayer.getSelectedItem(), Toolkit.i18nText("Fine-Design_Chart_Layer_GaoDe"))) { } else if (ComparatorUtils.equals(customLayers.getSelectedItem(), Toolkit.i18nText("Fine-Design_Chart_Layer_GaoDe"))) {
levels = MapStatusPane.GAODE_ZOOM_LEVELS; levels = MapStatusPane.GAODE_ZOOM_LEVELS;
} else { } else {
levels = MapStatusPane.ZOOM_LEVELS; levels = MapStatusPane.ZOOM_LEVELS;
@ -233,7 +244,7 @@ public class GisLayerPane extends JPanel implements UIObserver {
private void checkCustomLayerCardPane() { private void checkCustomLayerCardPane() {
CardLayout cardLayout = (CardLayout) layerCardPane.getLayout(); CardLayout cardLayout = (CardLayout) layerCardPane.getLayout();
cardLayout.show(layerCardPane, Utils.objectToString(gisLayer.getSelectedItem())); cardLayout.show(layerCardPane, Utils.objectToString(customLayers.getSelectedItem()));
} }
public void resetGisLayer(VanChartMapPlot mapPlot) { public void resetGisLayer(VanChartMapPlot mapPlot) {
@ -256,8 +267,12 @@ public class GisLayerPane extends JPanel implements UIObserver {
switch (layer.getGisLayerType()) { switch (layer.getGisLayerType()) {
case AUTO: case AUTO:
gisButton.setSelectedIndex(0); gisButton.setSelectedIndex(0);
layer.setGisLayerType(GISLayerType.AUTO);
layer.setLayerName(GISLayerType.getLocString(GISLayerType.AUTO));
//dealWithTemplateTheme(layer);
break; break;
case GAO_DE_API: case GAO_DE_API:
populateStandardGis(layer);
case LAYER_NULL: case LAYER_NULL:
populateStandardGis(layer); populateStandardGis(layer);
break; break;
@ -272,16 +287,22 @@ public class GisLayerPane extends JPanel implements UIObserver {
private void populateStandardGis(GisLayer layer) { private void populateStandardGis(GisLayer layer) {
gisButton.setSelectedIndex(1); gisButton.setSelectedIndex(1);
String layerName = layer.getLayerName();
if (layer.getGisLayerType() == GISLayerType.LAYER_NULL) { if (layer.getGisLayerType() == GISLayerType.LAYER_NULL) {
gisGaoDeLayer.setSelectedIndex(gisGaoDeLayer.getItemCount() - 1); standardLayers.setSelectedIndex(standardLayers.getItemCount() - 1);
} else { } else {
gisGaoDeLayer.setSelectedItem(layer.getGaoDeGisType().getTypeName()); if(Locale.CHINA.equals(GeneralContext.getLocale())) {
standardLayers.setSelectedItem(layerName);
layer.setGaoDeGisType(GaoDeGisType.parseByLocaleName(layerName));
} else {
standardLayers.setSelectedItem(layerName);
}
} }
} }
private void populateCustomGis(GisLayer layer) { private void populateCustomGis(GisLayer layer) {
gisButton.setSelectedIndex(2); gisButton.setSelectedIndex(2);
gisLayer.setSelectedItem(layer.getShowItemName()); customLayers.setSelectedItem(layer.getShowItemName());
switch (layer.getGisLayerType()) { switch (layer.getGisLayerType()) {
case CUSTOM_WMS_LAYER: case CUSTOM_WMS_LAYER:
@ -297,6 +318,7 @@ public class GisLayerPane extends JPanel implements UIObserver {
if (isAuto()) { if (isAuto()) {
layer.setGisLayerType(GISLayerType.AUTO); layer.setGisLayerType(GISLayerType.AUTO);
layer.setLayerName(GISLayerType.getLocString(GISLayerType.AUTO)); layer.setLayerName(GISLayerType.getLocString(GISLayerType.AUTO));
adaptEditingTemplateTheme(layer);
} else if (isStandardGis()) { } else if (isStandardGis()) {
updateStandardGis(layer); updateStandardGis(layer);
} else { } else {
@ -305,9 +327,9 @@ public class GisLayerPane extends JPanel implements UIObserver {
} }
private void updateStandardGis(GisLayer layer) { private void updateStandardGis(GisLayer layer) {
String layerName = Utils.objectToString(gisGaoDeLayer.getSelectedItem()); String layerName = Utils.objectToString(standardLayers.getSelectedItem());
layer.setLayerName(layerName); layer.setLayerName(layerName);
if (gisGaoDeLayer.getSelectedIndex() == gisGaoDeLayer.getItemCount() - 1) { if (standardLayers.getSelectedIndex() == standardLayers.getItemCount() - 1) {
layer.setGisLayerType(MapLayerConfigManager.getGisLayerType(layerName)); layer.setGisLayerType(MapLayerConfigManager.getGisLayerType(layerName));
} else { } else {
layer.setGisLayerType(GISLayerType.GAO_DE_API); layer.setGisLayerType(GISLayerType.GAO_DE_API);
@ -316,7 +338,7 @@ public class GisLayerPane extends JPanel implements UIObserver {
} }
private void updateCustomGis(GisLayer layer) { private void updateCustomGis(GisLayer layer) {
String layerName = Utils.objectToString(gisLayer.getSelectedItem()); String layerName = Utils.objectToString(customLayers.getSelectedItem());
layer.setLayerName(layerName); layer.setLayerName(layerName);
layer.setGisLayerType(MapLayerConfigManager.getGisLayerType(layerName)); layer.setGisLayerType(MapLayerConfigManager.getGisLayerType(layerName));
@ -329,4 +351,18 @@ public class GisLayerPane extends JPanel implements UIObserver {
break; break;
} }
} }
/**
* 切换图层时根据主题切换图层名称
*
* @param layer 图层
*/
private void adaptEditingTemplateTheme(GisLayer layer) {
JTemplate<?, ?> currentEditingTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
if(JTemplate.isValid(currentEditingTemplate)) {
boolean dark = currentEditingTemplate.getTemplateTheme().isDark();
String name = dark ? Toolkit.i18nText("Fine-Design_Chart_Layer_Black") : Toolkit.i18nText("Fine-Design_Chart_Layer_MapBox");
layer.setLayerName(name);
}
}
} }

6
designer-chart/src/main/java/com/fr/van/chart/multilayer/data/MultiPiePlotReportDataContentPane.java

@ -4,6 +4,7 @@ import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.ispinner.UISpinner;
@ -12,7 +13,6 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
import com.fr.plugin.chart.multilayer.data.MultiPieReportDataDefinition; import com.fr.plugin.chart.multilayer.data.MultiPieReportDataDefinition;
import com.fr.stable.AssistUtils; import com.fr.stable.AssistUtils;
@ -135,7 +135,7 @@ public class MultiPiePlotReportDataContentPane extends AbstractReportDataContent
components_center[i] = new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Level") + String.valueOf(i+1)), levelNameList.get(i)}; components_center[i] = new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Level") + String.valueOf(i+1)), levelNameList.get(i)};
} }
value = new TinyFormulaPane(); value = new DefaultTinyFormulaPane();
components_center[levelNum] = new Component[]{new JSeparator(), null}; components_center[levelNum] = new Component[]{new JSeparator(), null};
components_center[levelNum+1] = new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_Value")), value}; components_center[levelNum+1] = new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_Value")), value};
@ -158,7 +158,7 @@ public class MultiPiePlotReportDataContentPane extends AbstractReportDataContent
private void initLevelNameList() { private void initLevelNameList() {
levelNameList = new ArrayList<TinyFormulaPane>(); levelNameList = new ArrayList<TinyFormulaPane>();
for (int i = 0; i < levelNum; i++){ for (int i = 0; i < levelNum; i++){
levelNameList.add(new TinyFormulaPane()); levelNameList.add(new DefaultTinyFormulaPane());
} }
} }

9
designer-chart/src/main/java/com/fr/van/chart/structure/desinger/data/StructurePlotReportDataContentPane.java

@ -2,6 +2,7 @@ package com.fr.van.chart.structure.desinger.data;
import com.fr.base.chart.chartdata.TopDefinitionProvider; import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
@ -33,11 +34,11 @@ public class StructurePlotReportDataContentPane extends AbstractReportDataConten
double[] columnSize = {p, f}; double[] columnSize = {p, f};
double[] rowSize = {p, p, p, p, p}; double[] rowSize = {p, p, p, p, p};
nodeName = new TinyFormulaPane(); nodeName = new DefaultTinyFormulaPane();
nodeID = new TinyFormulaPane(); nodeID = new DefaultTinyFormulaPane();
parentID = new TinyFormulaPane(); parentID = new DefaultTinyFormulaPane();
seriesName = new UITextField(); seriesName = new UITextField();
nodeValue = new TinyFormulaPane(); nodeValue = new DefaultTinyFormulaPane();
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Node_Name")), nodeName}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Node_Name")), nodeName},

6
designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/data/WordCloudPlotReportDataContentPane.java

@ -2,13 +2,13 @@ package com.fr.van.chart.wordcloud.designer.data;
import com.fr.base.chart.chartdata.TopDefinitionProvider; import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
import com.fr.plugin.chart.wordcloud.data.WordCloudReportDefinition; import com.fr.plugin.chart.wordcloud.data.WordCloudReportDefinition;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
@ -32,8 +32,8 @@ public class WordCloudPlotReportDataContentPane extends AbstractReportDataConten
double[] rowSize = { p, p, p}; double[] rowSize = { p, p, p};
name = new UITextField(); name = new UITextField();
wordName = new TinyFormulaPane(); wordName = new DefaultTinyFormulaPane();
wordValue = new TinyFormulaPane(); wordValue = new DefaultTinyFormulaPane();
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_MultiPie_Series_Name")), name}, new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_MultiPie_Series_Name")), name},

30
designer-realize/src/main/java/com/fr/design/report/ExportUniversalPane.java

@ -1,25 +1,17 @@
package com.fr.design.report; package com.fr.design.report;
import com.fr.base.CustomConfig; import com.fr.base.CustomConfig;
import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.ActionLabel;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.LocaleLinkProvider; import com.fr.design.i18n.LocaleLinkProvider;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.BrowseUtils;
import com.fr.io.attr.ReportExportAttr; import com.fr.io.attr.ReportExportAttr;
import com.fr.transaction.Configurations; import com.fr.transaction.Configurations;
import com.fr.transaction.WorkerFacade; import com.fr.transaction.WorkerFacade;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/** /**
* 通用 * 通用
@ -42,7 +34,6 @@ public class ExportUniversalPane extends BasicPane {
private static final String HELP_URL = LocaleLinkProvider.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT); private static final String HELP_URL = LocaleLinkProvider.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT);
private UICheckBox specialCharacterExport;
// 密码支持公式 // 密码支持公式
private UICheckBox passwordSupportFormula; private UICheckBox passwordSupportFormula;
@ -51,25 +42,6 @@ public class ExportUniversalPane extends BasicPane {
this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
JPanel outerNorthPane = FRGUIPaneFactory.createTitledBorderPane(Toolkit.i18nText("Fine-Design_Report_Universal_Export_Config")); JPanel outerNorthPane = FRGUIPaneFactory.createTitledBorderPane(Toolkit.i18nText("Fine-Design_Report_Universal_Export_Config"));
JPanel northPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); JPanel northPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane();
JPanel specialCharacterExportPane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane();
specialCharacterExport = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Universal_Export_Special_Character"));
specialCharacterExport.setSelected(true);
specialCharacterExportPane.add(specialCharacterExport);
northPane.add(specialCharacterExportPane);
JPanel labelPane = new JPanel(new BorderLayout());
labelPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));
UILabel centerLabel = new UILabel(Toolkit.i18nText("Fine-Design_Report_Universal_Export_Special_Character_Tip"));
centerLabel.setForeground(Color.GRAY);
ActionLabel rightLabel = new ActionLabel(Toolkit.i18nText("Fine-Design_Report_Universal_Export_More_Alternative_Fonts"), UIConstants.FLESH_BLUE);
rightLabel.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
BrowseUtils.browser(HELP_URL);
}
});
labelPane.add(centerLabel, BorderLayout.CENTER);
labelPane.add(rightLabel, BorderLayout.EAST);
northPane.add(labelPane);
JPanel passwordSupportPane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane(); JPanel passwordSupportPane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane();
passwordSupportFormula = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Universal_Export_Password_Support_Formula")); passwordSupportFormula = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Universal_Export_Password_Support_Formula"));
passwordSupportFormula.setSelected(false); passwordSupportFormula.setSelected(false);
@ -90,7 +62,6 @@ public class ExportUniversalPane extends BasicPane {
* @param reportExportAttr 报表导出属性 * @param reportExportAttr 报表导出属性
*/ */
public void populate(ReportExportAttr reportExportAttr) { public void populate(ReportExportAttr reportExportAttr) {
this.specialCharacterExport.setSelected(CustomConfig.getInstance().isOptimizedSpecialCharacterExport());
this.passwordSupportFormula.setSelected(reportExportAttr.isPwdSupportFormula()); this.passwordSupportFormula.setSelected(reportExportAttr.isPwdSupportFormula());
} }
@ -103,7 +74,6 @@ public class ExportUniversalPane extends BasicPane {
Configurations.modify(new WorkerFacade(CustomConfig.class) { Configurations.modify(new WorkerFacade(CustomConfig.class) {
@Override @Override
public void run() { public void run() {
CustomConfig.getInstance().setOptimizedSpecialCharacterExport(specialCharacterExport.isSelected());
reportExportAttr.setPwdSupportFormula(passwordSupportFormula.isSelected()); reportExportAttr.setPwdSupportFormula(passwordSupportFormula.isSelected());
} }
}); });

Loading…
Cancel
Save