Browse Source

Merge branch 'release/10.0' of https://code.fineres.com/scm/~qinghui.liu/design into release/10.0

feature/big-screen
Qinghui.Liu 5 years ago
parent
commit
7413a41304
  1. 37
      designer-base/src/main/java/com/fr/design/ExtraDesignClassManager.java
  2. 32
      designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java
  3. 14
      designer-base/src/main/java/com/fr/design/fun/ChartWidgetOptionProvider.java
  4. 9
      designer-base/src/main/java/com/fr/design/fun/FormAdaptiveConfigUIProcessor.java
  5. 29
      designer-base/src/main/java/com/fr/design/fun/impl/AbstractChartWidgetOptionProvider.java
  6. 7
      designer-base/src/main/java/com/fr/design/mainframe/JFormSliderPane.java
  7. BIN
      designer-base/src/main/resources/com/fr/design/images/m_insert/auto_chart.png
  8. 12
      designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java
  9. 24
      designer-chart/src/main/java/com/fr/design/chart/AutoChartDialog.java
  10. 7
      designer-chart/src/main/java/com/fr/design/chart/ChartDialog.java
  11. 28
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java
  12. 5
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java
  13. 3
      designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotPane.java
  14. 43
      designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java
  15. 1
      designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapPlotPane.java
  16. BIN
      designer-chart/src/main/resources/com/fr/design/images/us_emptydata.png
  17. BIN
      designer-chart/src/main/resources/com/fr/design/images/zh_emptydata.png
  18. 18
      designer-form/src/main/java/com/fr/design/designer/creator/XAutoChartCreator.java
  19. 7
      designer-form/src/main/java/com/fr/design/designer/creator/XCheckBoxGroup.java
  20. 3
      designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java
  21. 7
      designer-form/src/main/java/com/fr/design/designer/creator/XRadioGroup.java
  22. 32
      designer-form/src/main/java/com/fr/design/designer/properties/mobile/ButtonGroupPropertyUI.java
  23. 35
      designer-form/src/main/java/com/fr/design/mainframe/FormArea.java
  24. 12
      designer-form/src/main/java/com/fr/design/mainframe/FormParaWidgetPane.java
  25. 12
      designer-form/src/main/java/com/fr/design/mainframe/JForm.java
  26. 83
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ButtonGroupDefinePane.java
  27. BIN
      designer-form/src/main/resources/com/fr/design/form/images/auto_chart_preview.png
  28. 3
      designer-realize/src/main/java/com/fr/design/actions/insert/cell/AutoChartCellAction.java
  29. 2
      designer-realize/src/main/java/com/fr/design/cell/editor/AutoChartCellEditor.java
  30. 7
      designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java
  31. 3
      designer-realize/src/main/java/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java
  32. 12
      designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCaseDesigner.java
  33. 28
      designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java
  34. 3
      designer-realize/src/main/java/com/fr/design/widget/CellWidgetCardPane.java
  35. 3
      designer-realize/src/main/java/com/fr/quickeditor/CellQuickEditor.java
  36. 3
      designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java

37
designer-base/src/main/java/com/fr/design/ExtraDesignClassManager.java

@ -8,6 +8,7 @@ import com.fr.base.BaseUtils;
import com.fr.common.annotations.Open; import com.fr.common.annotations.Open;
import com.fr.design.data.datapane.TableDataNameObjectCreator; import com.fr.design.data.datapane.TableDataNameObjectCreator;
import com.fr.design.fun.CellWidgetOptionProvider; import com.fr.design.fun.CellWidgetOptionProvider;
import com.fr.design.fun.ChartWidgetOptionProvider;
import com.fr.design.fun.FormWidgetOptionProvider; import com.fr.design.fun.FormWidgetOptionProvider;
import com.fr.design.fun.MobileWidgetStyleProvider; import com.fr.design.fun.MobileWidgetStyleProvider;
import com.fr.design.fun.ParameterWidgetOptionProvider; import com.fr.design.fun.ParameterWidgetOptionProvider;
@ -193,6 +194,42 @@ public class ExtraDesignClassManager extends AbstractExtraClassManager implement
return result.toArray(new WidgetOption[result.size()]); return result.toArray(new WidgetOption[result.size()]);
} }
public Map<Class<? extends Widget>, Class<?>> getChartWidgetOptionsMap() {
Set<ChartWidgetOptionProvider> set = getArray(ChartWidgetOptionProvider.XML_TAG);
Map<Class<? extends Widget>, Class<?>> map = new HashMap<>();
for (ChartWidgetOptionProvider provider : set) {
map.put(provider.classForWidget(), provider.appearanceForWidget());
}
return map;
}
public WidgetOption[] getBeforeChartWidgetOptions() {
return getChartUnits(true);
}
public WidgetOption[] getAfterChartWidgetOptions() {
return getChartUnits(false);
}
private WidgetOption[] getChartUnits(boolean isBefore) {
Set<ChartWidgetOptionProvider> set = getArray(ChartWidgetOptionProvider.XML_TAG);
if (set.isEmpty()) {
return new WidgetOption[0];
}
Set<WidgetOption> result = new HashSet<>();
for (ChartWidgetOptionProvider provider : set) {
if (provider.isBefore() == isBefore) {
WidgetOption option = WidgetOptionFactory.createByWidgetClass(
provider.nameForWidget(),
BaseUtils.readIcon(provider.iconPathForWidget()),
provider.classForWidget()
);
result.add(option);
}
}
return result.toArray(new WidgetOption[result.size()]);
}
public WidgetOption[] getCellWidgetOptions() { public WidgetOption[] getCellWidgetOptions() {
Set<CellWidgetOptionProvider> set = getArray(CellWidgetOptionProvider.XML_TAG); Set<CellWidgetOptionProvider> set = getArray(CellWidgetOptionProvider.XML_TAG);

32
designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java

@ -22,7 +22,6 @@ import com.fr.design.data.tabledata.wrapper.TemplateTableDataWrapper;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.gui.iprogressbar.AutoProgressBar; import com.fr.design.gui.iprogressbar.AutoProgressBar;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
import com.fr.design.parameter.ParameterInputPane; import com.fr.design.parameter.ParameterInputPane;
import com.fr.file.ProcedureConfig; import com.fr.file.ProcedureConfig;
@ -484,15 +483,9 @@ public abstract class DesignTableDataManager {
if (ArrayUtils.isEmpty(parameters)) { if (ArrayUtils.isEmpty(parameters)) {
parameters = tabledata.getParameters(Calculator.createCalculator()); parameters = tabledata.getParameters(Calculator.createCalculator());
} }
final Map<String, Object> parameterMap = new HashMap<>(); Map<String, Object> parameterMap = new HashMap<>();
if (needInputParams(isMustInputParameters, parameters)) { if (needInputParams(isMustInputParameters, parameters)) {
final ParameterInputPane pPane = new ParameterInputPane(parameters); showParaWindow(parameterMap, parameters);
pPane.showSmallWindow(new JFrame(), new DialogActionAdapter() {
@Override
public void doOk() {
parameterMap.putAll(pPane.update());
}
}).setVisible(true);
} else { } else {
for (ParameterProvider parameter : parameters) { for (ParameterProvider parameter : parameters) {
parameterMap.put(parameter.getName(), parameter.getValue()); parameterMap.put(parameter.getName(), parameter.getValue());
@ -583,15 +576,10 @@ public abstract class DesignTableDataManager {
return storeProcedure.creatLazyDataModel(); return storeProcedure.creatLazyDataModel();
} }
ParameterProvider[] inParameters = DataOperator.getInstance().getStoreProcedureParameters(storeProcedure); ParameterProvider[] inParameters = DataOperator.getInstance().getStoreProcedureParameters(storeProcedure);
final Map<String, Object> parameterMap = new HashMap<String, Object>(); Map<String, Object> parameterMap = new HashMap<>();
if (inParameters.length > 0 && !ComparatorUtils.equals(threadLocal.get(), NO_PARAMETER)) {// 检查Parameter. if (inParameters.length > 0 && !ComparatorUtils.equals(threadLocal.get(), NO_PARAMETER)) {// 检查Parameter.
final ParameterInputPane pPane = new ParameterInputPane(inParameters);
pPane.showSmallWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() { showParaWindow(parameterMap, inParameters);
@Override
public void doOk() {
parameterMap.putAll(pPane.update());
}
}).setVisible(true);
} }
storeProcedure.setFirstExpand(false); storeProcedure.setFirstExpand(false);
@ -601,6 +589,16 @@ public abstract class DesignTableDataManager {
return DataOperator.getInstance().previewProcedureDataModel(storeProcedure, parameterMap, 0); return DataOperator.getInstance().previewProcedureDataModel(storeProcedure, parameterMap, 0);
} }
private static void showParaWindow(final Map<String, Object> parameterMap, ParameterProvider[] inParameters) {
final ParameterInputPane pPane = new ParameterInputPane(inParameters);
pPane.showSmallWindow(new JFrame(), new DialogActionAdapter() {
@Override
public void doOk() {
parameterMap.putAll(pPane.update());
}
}).setVisible(true);
}
public static void setThreadLocal(String value) { public static void setThreadLocal(String value) {
threadLocal.set(value); threadLocal.set(value);
} }

14
designer-base/src/main/java/com/fr/design/fun/ChartWidgetOptionProvider.java

@ -0,0 +1,14 @@
package com.fr.design.fun;
/**
* @author Bjorn
* @version 10.0
* Created by Bjorn on 2020-06-12
*/
public interface ChartWidgetOptionProvider extends ParameterWidgetOptionProvider {
String XML_TAG = "ChartWidgetOptionProvider";
//在图表区域的开头还是结尾插入
boolean isBefore();
}

9
designer-base/src/main/java/com/fr/design/fun/FormAdaptiveConfigUIProcessor.java

@ -25,13 +25,10 @@ public interface FormAdaptiveConfigUIProcessor extends Immutable {
ShortCut getConfigShortCut(JTemplate jTemplate); ShortCut getConfigShortCut(JTemplate jTemplate);
/** /**
* 绘制自适应下报表块在表单界面中显示图片 * 是否开启表单滑块缩放功能
* @param size 绘制尺寸 * @return 是否开启表单滑块缩放
* @param elementCasePane 报表块内容对象
* @return 自适应下报表块在表单界面中显示的图片
*/ */
BufferedImage paintFormElementCaseImage(Dimension size, JComponent elementCasePane); boolean openFormSliderZoom();
/** /**
* 获取新自适应下字体显示的dpi * 获取新自适应下字体显示的dpi

29
designer-base/src/main/java/com/fr/design/fun/impl/AbstractChartWidgetOptionProvider.java

@ -0,0 +1,29 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.ChartWidgetOptionProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/**
* @author Bjorn
* @version 10.0
* Created by Bjorn on 2020-06-12
*/
@API(level = ChartWidgetOptionProvider.CURRENT_LEVEL)
public abstract class AbstractChartWidgetOptionProvider extends AbstractProvider implements ChartWidgetOptionProvider {
public int currentAPILevel() {
return CURRENT_LEVEL;
}
@Override
public String mark4Provider() {
return getClass().getName();
}
@Override
public boolean isBefore() {
return false;
}
}

7
designer-base/src/main/java/com/fr/design/mainframe/JFormSliderPane.java

@ -88,6 +88,8 @@ public class JFormSliderPane extends JPanel {
private UIRadioButton customButton; private UIRadioButton customButton;
//拖动条处理和button、直接输入不一样 //拖动条处理和button、直接输入不一样
private boolean isButtonOrIsTxt = true; private boolean isButtonOrIsTxt = true;
//是否选中指定的几个缩放等级,避免触发不必要的事件
private boolean selectSpecified = false;
private FormPopupPane dialog; private FormPopupPane dialog;
private int upButtonX; private int upButtonX;
private JPanel dialogContentPanel; private JPanel dialogContentPanel;
@ -288,6 +290,9 @@ public class JFormSliderPane extends JPanel {
refreshBottun(val); refreshBottun(val);
JFormattedTextField textField = ((JSpinner.NumberEditor) showValSpinner.getEditor()).getTextField(); JFormattedTextField textField = ((JSpinner.NumberEditor) showValSpinner.getEditor()).getTextField();
textField.setCaretPosition(showValSpinner.getValue().toString().length()); textField.setCaretPosition(showValSpinner.getValue().toString().length());
if (!selectSpecified) {
customButton.setSelected(true);
}
} }
}; };
@ -317,7 +322,9 @@ public class JFormSliderPane extends JPanel {
public void itemStateChanged(ItemEvent e) { public void itemStateChanged(ItemEvent e) {
JRadioButton temp = (JRadioButton) e.getSource(); JRadioButton temp = (JRadioButton) e.getSource();
if (temp.isSelected()) { if (temp.isSelected()) {
selectSpecified = true;
showValSpinner.setValue(Integer.valueOf(temp.getText().substring(0, temp.getText().indexOf("%")))); showValSpinner.setValue(Integer.valueOf(temp.getText().substring(0, temp.getText().indexOf("%"))));
selectSpecified = false;
} }
} }
}; };

BIN
designer-base/src/main/resources/com/fr/design/images/m_insert/auto_chart.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 B

After

Width:  |  Height:  |  Size: 423 B

12
designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java

@ -104,6 +104,7 @@ import java.util.Iterator;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.awt.event.ActionListener;
import static com.fr.chart.charttypes.ChartTypeManager.DEFAULT_PRIORITY; import static com.fr.chart.charttypes.ChartTypeManager.DEFAULT_PRIORITY;
import static com.fr.chart.charttypes.ChartTypeManager.DEPRECATED_CHART_PRIORITY; import static com.fr.chart.charttypes.ChartTypeManager.DEPRECATED_CHART_PRIORITY;
@ -259,17 +260,21 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
* *
* @param paneList pane容器 * @param paneList pane容器
*/ */
public void addPlotTypePaneList(List<FurtherBasicBeanPane<? extends ChartProvider>> paneList, Map<String, Map<String, FurtherBasicBeanPane<? extends ChartProvider>>> allChartTypePane) { public void addPlotTypePaneList(List<FurtherBasicBeanPane<? extends ChartProvider>> paneList,
Map<String, Map<String, FurtherBasicBeanPane<? extends ChartProvider>>> allChartTypePane,
ActionListener autoButtonListener) {
List<Integer> priorityList = getPriorityInOrder(); List<Integer> priorityList = getPriorityInOrder();
for (Integer aPriorityList : priorityList) { for (Integer aPriorityList : priorityList) {
String priority = String.valueOf(aPriorityList); String priority = String.valueOf(aPriorityList);
addPlotTypePaneList(priority, paneList, allChartTypePane); addPlotTypePaneList(priority, paneList, allChartTypePane, autoButtonListener);
} }
} }
public void addPlotTypePaneList(String priority, List<FurtherBasicBeanPane<? extends ChartProvider>> paneList, Map<String, Map<String, FurtherBasicBeanPane<? extends ChartProvider>>> allChartTypePane) { public void addPlotTypePaneList(String priority, List<FurtherBasicBeanPane<? extends ChartProvider>> paneList,
Map<String, Map<String, FurtherBasicBeanPane<? extends ChartProvider>>> allChartTypePane,
ActionListener autoButtonListener) {
if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority)) { if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority)) {
@ -286,6 +291,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
continue; continue;
} }
pane.reLayout(plotID); pane.reLayout(plotID);
pane.registerButtonListener(autoButtonListener);
paneList.add(pane); paneList.add(pane);
if (allChartTypePane.get(priority) == null) { if (allChartTypePane.get(priority) == null) {

24
designer-chart/src/main/java/com/fr/design/chart/AutoChartDialog.java

@ -1,7 +1,11 @@
package com.fr.design.chart; package com.fr.design.chart;
import com.fr.base.chart.BaseChartCollection; import com.fr.base.chart.BaseChartCollection;
import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chartx.TwoTuple;
import com.fr.design.i18n.Toolkit;
import com.fr.plugin.chart.vanchart.VanChart;
import java.awt.Component; import java.awt.Component;
import java.awt.Dialog; import java.awt.Dialog;
@ -46,10 +50,30 @@ public class AutoChartDialog extends ChartDialog {
}; };
} }
protected String getDialogTitle() {
return Toolkit.i18nText("Fine-Design_Chart_Auto_Recommended_Chart");
}
/** /**
* 更新新建的图表 ChartCollection * 更新新建的图表 ChartCollection
*/ */
public void populate(BaseChartCollection cc) { public void populate(BaseChartCollection cc) {
super.populate(cc); super.populate(cc);
ChartCollection chartCollection = (ChartCollection) getChartCollection();
VanChart vanChart = chartCollection.getSelectedChartProvider(VanChart.class);
if (vanChart == null) {
return;
}
TopDefinitionProvider filterDefinition = vanChart.getFilterDefinition();
if (filterDefinition == null) {
return;
}
TwoTuple<String, String[]> tableNameAndDataFields = filterDefinition.getTableNameAndDataFields();
if (tableNameAndDataFields == null) {
return;
}
String tableName = tableNameAndDataFields.getFirst();
String[] dataFields = tableNameAndDataFields.getSecond();
autoChartTypePane.populate(tableName, dataFields);
} }
} }

7
designer-chart/src/main/java/com/fr/design/chart/ChartDialog.java

@ -5,6 +5,7 @@ import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
import com.fr.design.gui.chart.MiddleChartDialog; import com.fr.design.gui.chart.MiddleChartDialog;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.i18n.Toolkit;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.third.joda.time.DateTime; import com.fr.third.joda.time.DateTime;
@ -46,7 +47,7 @@ public class ChartDialog extends MiddleChartDialog {
createTime = DateTime.now().toString("yyyy-MM-dd HH:mm:ss"); createTime = DateTime.now().toString("yyyy-MM-dd HH:mm:ss");
this.setModal(true); this.setModal(true);
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
setTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_M_Popup_Chart_Type")); setTitle(getDialogTitle());
this.applyClosingAction(); this.applyClosingAction();
this.applyEscapeAction(); this.applyEscapeAction();
@ -73,6 +74,10 @@ public class ChartDialog extends MiddleChartDialog {
GUICoreUtils.setWindowCenter(getOwner(), this); GUICoreUtils.setWindowCenter(getOwner(), this);
} }
protected String getDialogTitle() {
return Toolkit.i18nText("Fine-Design_Chart_M_Popup_Chart_Type");
}
protected Component initCenterPane() { protected Component initCenterPane() {
chartTypePane = new ChartTypePane(); chartTypePane = new ChartTypePane();
return chartTypePane; return chartTypePane;

28
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java

@ -9,9 +9,7 @@ import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.gui.chart.MiddleChartDialog; import com.fr.design.gui.chart.MiddleChartDialog;
import com.fr.design.gui.frpane.UIComboBoxPane; import com.fr.design.gui.frpane.UIComboBoxPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.chart.AbstractChartAttrPane; import com.fr.design.mainframe.chart.AbstractChartAttrPane;
import com.fr.design.mainframe.chart.ChartEditPane; import com.fr.design.mainframe.chart.ChartEditPane;
@ -39,6 +37,7 @@ import java.awt.event.ItemListener;
/** /**
* 图表 属性表, 类型选择 界面. * 图表 属性表, 类型选择 界面.
*
* @author kunsnat E-mail:kunsnat@gmail.com * @author kunsnat E-mail:kunsnat@gmail.com
* @version 创建时间2012-12-26 上午10:56:51 * @version 创建时间2012-12-26 上午10:56:51
*/ */
@ -47,10 +46,11 @@ public class ChartTypePane extends AbstractChartAttrPane{
private ChartTypeButtonPane buttonPane; private ChartTypeButtonPane buttonPane;
private ChartEditPane editPane; private ChartEditPane editPane;
private ChartCollection editingCollection; private ChartCollection editingCollection;
private UIButton autoButton; private ActionListener autoButtonListener;
@Override @Override
protected JPanel createContentPane() { protected JPanel createContentPane() {
initButtonListener();
JPanel content = new JPanel(new BorderLayout()); JPanel content = new JPanel(new BorderLayout());
buttonPane = new ChartTypeButtonPane(this); buttonPane = new ChartTypeButtonPane(this);
@ -88,11 +88,6 @@ public class ChartTypePane extends AbstractChartAttrPane{
buttonPane.setEditingChartPane(chartTypeComBox); buttonPane.setEditingChartPane(chartTypeComBox);
if(ChartTypeManager.AUTO_CHART) {
initAutoButton();
content.add(autoButton, BorderLayout.SOUTH);
}
return content; return content;
} }
@ -105,16 +100,15 @@ public class ChartTypePane extends AbstractChartAttrPane{
/** /**
* 界面标题 * 界面标题
*
* @return 界面标题 * @return 界面标题
*/ */
public String title4PopupWindow() { public String title4PopupWindow() {
return PaneTitleConstants.CHART_TYPE_TITLE; return PaneTitleConstants.CHART_TYPE_TITLE;
} }
private void initAutoButton(){ public void initButtonListener() {
//TODO @Bjorn 视觉样式优化 autoButtonListener = new ActionListener() {
autoButton = new UIButton(Toolkit.i18nText("Fine-Design_Chart_M_Popup_Auto_Chart_Type"));
autoButton.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
final MiddleChartDialog autoChartDialog = DesignModuleFactory.getAutoChartDialog(DesignerContext.getDesignerFrame()); final MiddleChartDialog autoChartDialog = DesignModuleFactory.getAutoChartDialog(DesignerContext.getDesignerFrame());
@ -127,7 +121,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
}); });
autoChartDialog.setVisible(true); autoChartDialog.setVisible(true);
} }
}); };
} }
class ComboBoxPane extends UIComboBoxPane<ChartProvider> { class ComboBoxPane extends UIComboBoxPane<ChartProvider> {
@ -137,7 +131,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
protected List<FurtherBasicBeanPane<? extends ChartProvider>> initPaneList() { protected List<FurtherBasicBeanPane<? extends ChartProvider>> initPaneList() {
List<FurtherBasicBeanPane<? extends ChartProvider>> paneList = new ArrayList<FurtherBasicBeanPane<? extends ChartProvider>>(); List<FurtherBasicBeanPane<? extends ChartProvider>> paneList = new ArrayList<FurtherBasicBeanPane<? extends ChartProvider>>();
allChartTypePane = new LinkedHashMap<String, Map<String, FurtherBasicBeanPane<? extends ChartProvider>>>(); allChartTypePane = new LinkedHashMap<String, Map<String, FurtherBasicBeanPane<? extends ChartProvider>>>();
ChartTypeInterfaceManager.getInstance().addPlotTypePaneList(paneList, allChartTypePane); ChartTypeInterfaceManager.getInstance().addPlotTypePaneList(paneList, allChartTypePane, autoButtonListener);
return paneList; return paneList;
} }
@ -150,6 +144,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
* 不同图表切换分同一个selected的不同图表切换和不同selected的不同图表切换 * 不同图表切换分同一个selected的不同图表切换和不同selected的不同图表切换
* 如果是切换图表的某个图表发生变化则collection的选择下标不会变 * 如果是切换图表的某个图表发生变化则collection的选择下标不会变
* 如果是切换图表的不同图表之间切换则collection的选择下标会改变 * 如果是切换图表的不同图表之间切换则collection的选择下标会改变
*
* @param chart * @param chart
*/ */
public void updateBean(ChartProvider chart) { public void updateBean(ChartProvider chart) {
@ -323,6 +318,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
/** /**
* 面板重构 * 面板重构
*
* @param lastPlotID * @param lastPlotID
* @param collection * @param collection
*/ */
@ -373,6 +369,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
/** /**
* 所有图表的类型界面 * 所有图表的类型界面
*
* @return 类型界面 * @return 类型界面
*/ */
public FurtherBasicBeanPane[] getPaneList() { public FurtherBasicBeanPane[] getPaneList() {
@ -381,6 +378,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
/** /**
* 当前选中的图表的index * 当前选中的图表的index
*
* @return 当前选中的图表的index * @return 当前选中的图表的index
*/ */
public int getSelectedIndex() { public int getSelectedIndex() {
@ -389,6 +387,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
/** /**
* 返回选中的图表的index * 返回选中的图表的index
*
* @return 选中的图标的序号 * @return 选中的图标的序号
*/ */
public int getSelectedChartIndex() { public int getSelectedChartIndex() {
@ -397,6 +396,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
/** /**
* 设置下编辑的面板 * 设置下编辑的面板
*
* @param currentEditPane 设置下编辑的面板 * @param currentEditPane 设置下编辑的面板
*/ */
public void registerChartEditPane(ChartEditPane currentEditPane) { public void registerChartEditPane(ChartEditPane currentEditPane) {

5
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java

@ -22,6 +22,7 @@ import java.util.List;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color; import java.awt.Color;
import java.awt.Component; import java.awt.Component;
import java.awt.event.ActionListener;
public abstract class AbstractChartTypePane<T extends ChartProvider> extends FurtherBasicBeanPane<T> { public abstract class AbstractChartTypePane<T extends ChartProvider> extends FurtherBasicBeanPane<T> {
@ -240,4 +241,8 @@ public abstract class AbstractChartTypePane<T extends ChartProvider> extends Fur
public ChartProvider getDefaultChart() { public ChartProvider getDefaultChart() {
return BarIndependentChart.barChartTypes[0]; return BarIndependentChart.barChartTypes[0];
} }
public void registerButtonListener(ActionListener autoButtonListener) {
}
} }

3
designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotPane.java

@ -61,7 +61,8 @@ public class VanChartCustomPlotPane extends AbstractVanChartTypePane {
return new Component[][]{ return new Component[][]{
new Component[]{typePane}, new Component[]{typePane},
new Component[]{stylePane}, new Component[]{stylePane},
new Component[]{contentPane} new Component[]{contentPane},
new Component[]{buttonPane},
}; };
} }

43
designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java

@ -1,5 +1,6 @@
package com.fr.van.chart.designer.type; package com.fr.van.chart.designer.type;
import com.fr.base.BaseUtils;
import com.fr.chart.base.AttrFillStyle; import com.fr.chart.base.AttrFillStyle;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Legend; import com.fr.chart.chartattr.Legend;
@ -7,13 +8,16 @@ 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.chart.chartglyph.DataSheet; import com.fr.chart.chartglyph.DataSheet;
import com.fr.chart.charttypes.ChartTypeManager;
import com.fr.chartx.data.AbstractDataDefinition; import com.fr.chartx.data.AbstractDataDefinition;
import com.fr.chartx.data.ChartDataDefinitionProvider; import com.fr.chartx.data.ChartDataDefinitionProvider;
import com.fr.chartx.data.field.AbstractColumnFieldCollection; import com.fr.chartx.data.field.AbstractColumnFieldCollection;
import com.fr.chartx.data.field.diff.MultiCategoryColumnFieldCollection; import com.fr.chartx.data.field.diff.MultiCategoryColumnFieldCollection;
import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.MultilineLabel; import com.fr.design.gui.ilable.MultilineLabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane; import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.design.mainframe.chart.info.ChartInfoCollector; import com.fr.design.mainframe.chart.info.ChartInfoCollector;
@ -25,21 +29,53 @@ import com.fr.plugin.chart.base.VanChartTools;
import com.fr.plugin.chart.base.VanChartZoom; import com.fr.plugin.chart.base.VanChartZoom;
import com.fr.plugin.chart.vanchart.VanChart; import com.fr.plugin.chart.vanchart.VanChart;
import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color; import java.awt.Color;
import java.awt.Component; import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ActionListener;
public abstract class AbstractVanChartTypePane extends AbstractChartTypePane<Chart> { public abstract class AbstractVanChartTypePane extends AbstractChartTypePane<Chart> {
private static final long serialVersionUID = 7743244512351499265L; private static final long serialVersionUID = 7743244512351499265L;
private UICheckBox largeModelCheckBox; private UICheckBox largeModelCheckBox;
protected JPanel buttonPane;
protected UIButton autoButton;
private boolean samePlot; private boolean samePlot;
protected boolean isSamePlot() { protected boolean isSamePlot() {
return samePlot; return samePlot;
} }
public AbstractVanChartTypePane() {
buttonPane = new JPanel();
buttonPane.setLayout(new BorderLayout());
if (ChartTypeManager.AUTO_CHART) {
autoButton = new UIButton(Toolkit.i18nText("Fine-Design_Chart_Auto_Recommended_Chart"),
BaseUtils.readIcon("/com/fr/design/images/m_insert/auto_chart.png")) {
@Override
public Dimension getPreferredSize() {
return new Dimension((int) super.getPreferredSize().getWidth(), 25);
}
};
buttonPane.setBorder((BorderFactory.createEmptyBorder(5, 0, 0, 0)));
buttonPane.add(autoButton);
}
}
@Override
protected Component[][] getPaneComponents(JPanel typePane) {
return new Component[][]{
new Component[]{typePane},
new Component[]{buttonPane},
new Component[]{stylePane},
};
}
//新图表暂时还没有平面3d,渐变高光等布局。 //新图表暂时还没有平面3d,渐变高光等布局。
@Override @Override
protected String[] getTypeLayoutPath() { protected String[] getTypeLayoutPath() {
@ -237,4 +273,11 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane<Cha
newPlot.setConditionCollection((ConditionCollection) oldPlot.getConditionCollection().clone()); newPlot.setConditionCollection((ConditionCollection) oldPlot.getConditionCollection().clone());
} }
} }
@Override
public void registerButtonListener(ActionListener autoButtonListener) {
if (autoButton != null) {
autoButton.addActionListener(autoButtonListener);
}
}
} }

1
designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapPlotPane.java

@ -42,6 +42,7 @@ public class VanChartMapPlotPane extends AbstractVanChartTypePane {
} }
return new Component[][]{ return new Component[][]{
new Component[]{typePane}, new Component[]{typePane},
new Component[]{buttonPane},
new Component[]{sourceChoosePane} new Component[]{sourceChoosePane}
}; };
} }

BIN
designer-chart/src/main/resources/com/fr/design/images/us_emptydata.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 21 KiB

BIN
designer-chart/src/main/resources/com/fr/design/images/zh_emptydata.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 25 KiB

18
designer-form/src/main/java/com/fr/design/designer/creator/XAutoChartCreator.java

@ -2,6 +2,7 @@ package com.fr.design.designer.creator;
import com.fr.base.GraphHelper; import com.fr.base.GraphHelper;
import com.fr.base.chart.BaseChartCollection; import com.fr.base.chart.BaseChartCollection;
import com.fr.common.annotations.Open;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.gui.chart.MiddleChartComponent; import com.fr.design.gui.chart.MiddleChartComponent;
import com.fr.design.gui.chart.MiddleChartDialog; import com.fr.design.gui.chart.MiddleChartDialog;
@ -11,21 +12,23 @@ import com.fr.design.mainframe.EditingMouseListener;
import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormDesigner;
import com.fr.design.module.DesignModuleFactory; import com.fr.design.module.DesignModuleFactory;
import com.fr.form.ui.ChartAutoEditor; import com.fr.form.ui.ChartAutoEditor;
import com.fr.general.IOUtils;
import com.fr.stable.Constants;
import com.fr.stable.bridge.StableFactory; import com.fr.stable.bridge.StableFactory;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.Color;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.Graphics; import java.awt.Graphics;
import java.awt.Rectangle;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage;
/** /**
* @author Bjorn * @author Bjorn
* @version 10.0 * @version 10.0
* Created by Bjorn on 2020-05-26 * Created by Bjorn on 2020-05-26
*/ */
@Open
public class XAutoChartCreator extends XChartEditor { public class XAutoChartCreator extends XChartEditor {
private MiddleChartDialog autoChartDialog; private MiddleChartDialog autoChartDialog;
@ -76,6 +79,7 @@ public class XAutoChartCreator extends XChartEditor {
initChart(autoChartDialog.getChartCollection()); initChart(autoChartDialog.getChartCollection());
formDesigner.fireTargetModified(); formDesigner.fireTargetModified();
} }
@Override @Override
public void doCancel() { public void doCancel() {
editingMouseListener.stopEditing(); editingMouseListener.stopEditing();
@ -99,9 +103,13 @@ public class XAutoChartCreator extends XChartEditor {
public void paint(Graphics g) { public void paint(Graphics g) {
//TODO @Bjorn 视觉样式优化 BufferedImage bufferedImage = IOUtils.readImage("com/fr/design/form/images/auto_chart_preview.png");
g.setColor(Color.RED); GraphHelper.paintImage(
GraphHelper.fill(g, new Rectangle(0, 0, getWidth(), getHeight())); g, this.getWidth(), this.getHeight(), bufferedImage,
Constants.IMAGE_ADJUST,
0,
0, -1, -1
);
super.paint(g); super.paint(g);
} }

7
designer-form/src/main/java/com/fr/design/designer/creator/XCheckBoxGroup.java

@ -3,7 +3,9 @@
*/ */
package com.fr.design.designer.creator; package com.fr.design.designer.creator;
import com.fr.design.designer.properties.mobile.ButtonGroupPropertyUI;
import com.fr.design.form.util.XCreatorConstants; import com.fr.design.form.util.XCreatorConstants;
import com.fr.design.fun.WidgetPropertyUIProvider;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.widget.editors.DictionaryEditor; import com.fr.design.mainframe.widget.editors.DictionaryEditor;
@ -87,4 +89,9 @@ public class XCheckBoxGroup extends XFieldEditor {
protected String getIconName() { protected String getIconName() {
return "checkbox_group_16.png"; return "checkbox_group_16.png";
} }
@Override
public WidgetPropertyUIProvider[] getWidgetPropertyUIProviders() {
return new WidgetPropertyUIProvider[] {new ButtonGroupPropertyUI(this)};
}
} }

3
designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java

@ -19,7 +19,6 @@ import com.fr.form.parameter.FormSubmitButton;
import com.fr.form.ui.Button; import com.fr.form.ui.Button;
import com.fr.form.ui.CardAddButton; import com.fr.form.ui.CardAddButton;
import com.fr.form.ui.CardSwitchButton; import com.fr.form.ui.CardSwitchButton;
import com.fr.form.ui.ChartAutoEditor;
import com.fr.form.ui.CheckBox; import com.fr.form.ui.CheckBox;
import com.fr.form.ui.CheckBoxGroup; import com.fr.form.ui.CheckBoxGroup;
import com.fr.form.ui.ComboBox; import com.fr.form.ui.ComboBox;
@ -170,12 +169,12 @@ public class XCreatorUtils {
extraObjectMap.clear(); extraObjectMap.clear();
extraObjectMap.putAll(ExtraDesignClassManager.getInstance().getParameterWidgetOptionsMap()); extraObjectMap.putAll(ExtraDesignClassManager.getInstance().getParameterWidgetOptionsMap());
extraObjectMap.putAll(ExtraDesignClassManager.getInstance().getFormWidgetOptionsMap()); extraObjectMap.putAll(ExtraDesignClassManager.getInstance().getFormWidgetOptionsMap());
extraObjectMap.putAll(ExtraDesignClassManager.getInstance().getChartWidgetOptionsMap());
} }
private static void putExtraEditor() { private static void putExtraEditor() {
if (DesignModuleFactory.getChartEditorClass() != null) { if (DesignModuleFactory.getChartEditorClass() != null) {
objectMap.put(DesignModuleFactory.getChartEditorClass(), XChartEditor.class); objectMap.put(DesignModuleFactory.getChartEditorClass(), XChartEditor.class);
objectMap.put(ChartAutoEditor.class, XAutoChartCreator.class);
} }
} }

7
designer-form/src/main/java/com/fr/design/designer/creator/XRadioGroup.java

@ -12,6 +12,8 @@ import javax.swing.ButtonGroup;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.JRadioButton; import javax.swing.JRadioButton;
import com.fr.design.designer.properties.mobile.ButtonGroupPropertyUI;
import com.fr.design.fun.WidgetPropertyUIProvider;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.widget.editors.DictionaryEditor; import com.fr.design.mainframe.widget.editors.DictionaryEditor;
import com.fr.design.mainframe.widget.editors.InChangeBooleanEditor; import com.fr.design.mainframe.widget.editors.InChangeBooleanEditor;
@ -83,4 +85,9 @@ public class XRadioGroup extends XFieldEditor {
protected String getIconName() { protected String getIconName() {
return "button_group_16.png"; return "button_group_16.png";
} }
@Override
public WidgetPropertyUIProvider[] getWidgetPropertyUIProviders() {
return new WidgetPropertyUIProvider[] {new ButtonGroupPropertyUI(this)};
}
} }

32
designer-form/src/main/java/com/fr/design/designer/properties/mobile/ButtonGroupPropertyUI.java

@ -0,0 +1,32 @@
package com.fr.design.designer.properties.mobile;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XFieldEditor;
import com.fr.design.dialog.BasicPane;
import com.fr.design.fun.impl.AbstractWidgetPropertyUIProvider;
import com.fr.design.gui.itable.AbstractPropertyTable;
import com.fr.design.widget.ui.designer.mobile.ButtonGroupDefinePane;
public class ButtonGroupPropertyUI extends AbstractWidgetPropertyUIProvider {
private XCreator xCreator;
public ButtonGroupPropertyUI(XFieldEditor xButtonGroupEditor) {
this.xCreator = xButtonGroupEditor;
}
@Override
public AbstractPropertyTable createWidgetAttrTable() {
return null;
}
@Override
public BasicPane createWidgetAttrPane() {
return new ButtonGroupDefinePane(xCreator);
}
@Override
public String tableTitle() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Mobile_Attr");
}
}

35
designer-form/src/main/java/com/fr/design/mainframe/FormArea.java

@ -2,12 +2,14 @@ package com.fr.design.mainframe;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.common.inputevent.InputEventBaseOnOS; import com.fr.common.inputevent.InputEventBaseOnOS;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.designer.beans.events.DesignerEvent; import com.fr.design.designer.beans.events.DesignerEvent;
import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWBorderLayout; import com.fr.design.designer.creator.XWBorderLayout;
import com.fr.design.designer.creator.XWFitLayout; import com.fr.design.designer.creator.XWFitLayout;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.fun.FormAdaptiveConfigUIProcessor;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UIBasicSpinner; import com.fr.design.gui.ispinner.UIBasicSpinner;
import com.fr.design.gui.itextfield.UINumberField; import com.fr.design.gui.itextfield.UINumberField;
@ -49,7 +51,6 @@ import java.awt.event.MouseWheelEvent;
import java.awt.event.MouseWheelListener; import java.awt.event.MouseWheelListener;
public class FormArea extends JComponent implements ScrollRulerComponent { public class FormArea extends JComponent implements ScrollRulerComponent {
private static final double SLIDER_FLOAT = 400.0; private static final double SLIDER_FLOAT = 400.0;
private static final double SLIDER_MIN = 10.0; private static final double SLIDER_MIN = 10.0;
public static final double DEFAULT_SLIDER = 100.0; public static final double DEFAULT_SLIDER = 100.0;
@ -76,6 +77,7 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
private int resolution = ScreenResolution.getScreenResolution(); private int resolution = ScreenResolution.getScreenResolution();
private double screenValue; private double screenValue;
public FormScrollBar getHorScrollBar() { public FormScrollBar getHorScrollBar() {
return horScrollBar; return horScrollBar;
} }
@ -113,6 +115,13 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
this.designer.addMouseWheelListener(showValSpinnerMouseWheelListener); this.designer.addMouseWheelListener(showValSpinnerMouseWheelListener);
} }
private boolean openSliderZoom(){
FormAdaptiveConfigUIProcessor adaptiveConfigUI = ExtraDesignClassManager.getInstance().getSingle(FormAdaptiveConfigUIProcessor.MARK_STRING);
if (adaptiveConfigUI != null) {
return adaptiveConfigUI.openFormSliderZoom();
}
return false;
}
public void onMobileAttrModified() { public void onMobileAttrModified() {
FormMobileAttr formMobileAttr = designer.getTarget().getFormMobileAttr(); FormMobileAttr formMobileAttr = designer.getTarget().getFormMobileAttr();
if (formMobileAttr.isMobileOnly()) { if (formMobileAttr.isMobileOnly()) {
@ -142,7 +151,7 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
double f = TableLayout.FILL; double f = TableLayout.FILL;
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double[] rowSize = {f}; double[] rowSize = {f};
double[] columnSize = {p, f, p, p, p, p, p, f, p}; double[] columnSize = {p, f, p, p, p, p, p, p};
UILabel tipsPane = new UILabel("form"); UILabel tipsPane = new UILabel("form");
tipsPane.setPreferredSize(new Dimension(200, 0)); tipsPane.setPreferredSize(new Dimension(200, 0));
widthPane = new UINumberField(); widthPane = new UINumberField();
@ -150,18 +159,24 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
heightPane = new UINumberField(); heightPane = new UINumberField();
heightPane.setPreferredSize(new Dimension(60, 0)); heightPane.setPreferredSize(new Dimension(60, 0));
// slidePane = new UINumberSlidePane(SLIDER_MIN, SLIDER_FLOAT);
// slidePane.setPreferredSize(new Dimension(260,20));
slidePane = JFormSliderPane.getInstance(); slidePane = JFormSliderPane.getInstance();
slidePane.setPreferredSize(new Dimension(200, 20)); slidePane.setPreferredSize(new Dimension(375, 20));
JPanel resizePane = TableLayoutHelper.createCommonTableLayoutPane(new JComponent[][]{{ tipsPane, new UILabel(), widthPane, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Indent_Pixel")), new UILabel("x"), heightPane, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Indent_Pixel")), new UILabel(), slidePane }}, rowSize, columnSize, RESIZE_PANE_GAP); JPanel resizePane = TableLayoutHelper.createCommonTableLayoutPane(
new JComponent[][]{{tipsPane, new UILabel(), widthPane,
new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Indent_Pixel")),
new UILabel("x"), heightPane,
new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Indent_Pixel")),
slidePane}}, rowSize, columnSize, RESIZE_PANE_GAP);
this.add(FormRulerLayout.BOTTOM, resizePane); this.add(FormRulerLayout.BOTTOM, resizePane);
setWidgetsConfig(); setWidgetsConfig();
boolean needOpenSliderZoom = openSliderZoom();
// 先初始话滑块及对应事件,然后获取分辨率调整容器的显示大小 // 先初始话滑块及对应事件,然后获取分辨率调整容器的显示大小
slidePane.setEnabled(false); slidePane.setEnabled(needOpenSliderZoom);
slidePane.setVisible(false); slidePane.setVisible(needOpenSliderZoom);
// initTransparent(); if (needOpenSliderZoom) {
initTransparent();
}
initCalculateSize(); initCalculateSize();
} }

12
designer-form/src/main/java/com/fr/design/mainframe/FormParaWidgetPane.java

@ -34,6 +34,10 @@ import javax.swing.JComponent;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.JSeparator; import javax.swing.JSeparator;
import javax.swing.SwingConstants; import javax.swing.SwingConstants;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color; import java.awt.Color;
import java.awt.Dimension; import java.awt.Dimension;
@ -42,10 +46,6 @@ import java.awt.event.ComponentAdapter;
import java.awt.event.ComponentEvent; import java.awt.event.ComponentEvent;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
/** /**
* @author null * @author null
@ -440,7 +440,9 @@ public class FormParaWidgetPane extends JPanel {
private WidgetOption[] loadChartOptions() { private WidgetOption[] loadChartOptions() {
if (chartOptions == null) { if (chartOptions == null) {
chartOptions = DesignModuleFactory.getExtraWidgetOptions(); ExtraDesignClassManager instance = ExtraDesignClassManager.getInstance();
WidgetOption[] widgetOptions = ArrayUtils.addAll(instance.getBeforeChartWidgetOptions(), DesignModuleFactory.getExtraWidgetOptions());
chartOptions = ArrayUtils.addAll(widgetOptions, instance.getAfterChartWidgetOptions());
} }
return chartOptions; return chartOptions;
} }

12
designer-form/src/main/java/com/fr/design/mainframe/JForm.java

@ -154,6 +154,12 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
return elementCaseDesign.getEditingElementCasePane(); return elementCaseDesign.getEditingElementCasePane();
} }
public FormECDesignerProvider getElementCaseDesign() {
return elementCaseDesign;
}
@Override @Override
public JComponent getCurrentReportComponentPane() { public JComponent getCurrentReportComponentPane() {
return null; return null;
@ -886,7 +892,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
/** /**
* 格子编辑组件 * 格子编辑组件
*/ */
private FormECDesignerProvider initElementCaseDesign() { protected FormECDesignerProvider initElementCaseDesign() {
HashMap<String, Class> designerClass = new HashMap<String, Class>(); HashMap<String, Class> designerClass = new HashMap<String, Class>();
designerClass.put(Constants.ARG_0, FormElementCaseProvider.class); designerClass.put(Constants.ARG_0, FormElementCaseProvider.class);
@ -902,7 +908,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
/** /**
* 整个报表块编辑区域 * 整个报表块编辑区域
*/ */
private FormECCompositeProvider initComposite() { protected FormECCompositeProvider initComposite() {
Object[] compositeArg = new Object[]{this, elementCaseDesign, formDesign.getElementCaseContainer()}; Object[] compositeArg = new Object[]{this, elementCaseDesign, formDesign.getElementCaseContainer()};
HashMap<String, Class> compoClass = new HashMap<String, Class>(); HashMap<String, Class> compoClass = new HashMap<String, Class>();
compoClass.put(Constants.ARG_0, BaseJForm.class); compoClass.put(Constants.ARG_0, BaseJForm.class);
@ -929,7 +935,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
}); });
} }
private void saveImage() { protected void saveImage() {
//触发一次保存, 把缩略图保存起来 //触发一次保存, 把缩略图保存起来
JForm.this.fireTargetModified(); JForm.this.fireTargetModified();
//用formDesign的size是为了当报表块被拉伸时, 它对应的背景图片需要足够大才不会显示成空白 //用formDesign的size是为了当报表块被拉伸时, 它对应的背景图片需要足够大才不会显示成空白

83
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ButtonGroupDefinePane.java

@ -0,0 +1,83 @@
package com.fr.design.widget.ui.designer.mobile;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.FormDesigner;
import com.fr.form.ui.ButtonGroup;
import javax.swing.*;
import java.awt.*;
public class ButtonGroupDefinePane extends MobileWidgetDefinePane {
private XCreator xCreator; // 当前选中控件的xCreator
private UISpinner maxShowRowsSpinner;
public ButtonGroupDefinePane(XCreator xCreator) {
this.xCreator = xCreator;
}
@Override
public void initPropertyGroups(Object source) {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
UILabel maxShowRowsLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design-Mobile_Max_Show_Rows"), SwingConstants.LEFT);
this.maxShowRowsSpinner = new UISpinner(0, Integer.MAX_VALUE, 1, 5);
Component[][] components = new Component[][]{
new Component[] {maxShowRowsLabel, maxShowRowsSpinner}
};
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
double[] rowSize = {p};
double[] columnSize = {p,f};
int[][] rowCount = {{1, 1}};
final JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 30, LayoutConstants.VGAP_LARGE);
panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
final JPanel panelWrapper = FRGUIPaneFactory.createBorderLayout_S_Pane();
panelWrapper.add(panel, BorderLayout.NORTH);
UIExpandablePane folderPane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20, panelWrapper);
this.add(folderPane, BorderLayout.NORTH);
this.repaint();
}
private void bindListeners2Widgets() {
reInitAllListeners();
AttributeChangeListener changeListener = new AttributeChangeListener() {
@Override
public void attributeChange() {
update();
}
};
this.addAttributeChangeListener(changeListener);
}
/**
* 后台初始化所有事件.
*/
private void reInitAllListeners() {
initListener(this);
}
@Override
public void populate(FormDesigner designer) {
ButtonGroup buttonGroup = (ButtonGroup)xCreator.toData();
this.maxShowRowsSpinner.setValue(buttonGroup.getMaxShowRows());
// 数据 populate 完成后,再设置监听
this.bindListeners2Widgets();
}
@Override
public void update() {
ButtonGroup buttonGroup = (ButtonGroup)xCreator.toData();
buttonGroup.setMaxShowRows((int) maxShowRowsSpinner.getValue());
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); // 触发设计器保存按钮亮起来
}
}

BIN
designer-form/src/main/resources/com/fr/design/form/images/auto_chart_preview.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

3
designer-realize/src/main/java/com/fr/design/actions/insert/cell/AutoChartCellAction.java

@ -2,6 +2,7 @@ package com.fr.design.actions.insert.cell;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.chart.chartattr.AutoChartCollection; import com.fr.chart.chartattr.AutoChartCollection;
import com.fr.common.annotations.Open;
import com.fr.design.actions.core.WorkBookSupportable; import com.fr.design.actions.core.WorkBookSupportable;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
@ -14,6 +15,7 @@ import javax.swing.KeyStroke;
* @version 10.0 * @version 10.0
* Created by Bjorn on 2020-05-28 * Created by Bjorn on 2020-05-28
*/ */
@Open
public class AutoChartCellAction extends AbstractCellAction implements WorkBookSupportable { public class AutoChartCellAction extends AbstractCellAction implements WorkBookSupportable {
public AutoChartCellAction() { public AutoChartCellAction() {
@ -29,7 +31,6 @@ public class AutoChartCellAction extends AbstractCellAction implements WorkBookS
this.setMenuKeySet(INSERT_AUTO_CHART); this.setMenuKeySet(INSERT_AUTO_CHART);
this.setName(getMenuKeySet().getMenuKeySetName() + "..."); this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setMnemonic(getMenuKeySet().getMnemonic()); this.setMnemonic(getMenuKeySet().getMnemonic());
//TODO @Bjorn 视觉样式优化icon
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_insert/auto_chart.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_insert/auto_chart.png"));
} }

2
designer-realize/src/main/java/com/fr/design/cell/editor/AutoChartCellEditor.java

@ -1,5 +1,6 @@
package com.fr.design.cell.editor; package com.fr.design.cell.editor;
import com.fr.common.annotations.Open;
import com.fr.design.gui.chart.MiddleChartDialog; import com.fr.design.gui.chart.MiddleChartDialog;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.module.DesignModuleFactory; import com.fr.design.module.DesignModuleFactory;
@ -12,6 +13,7 @@ import java.awt.Window;
* @version 10.0 * @version 10.0
* Created by Bjorn on 2020-05-28 * Created by Bjorn on 2020-05-28
*/ */
@Open
public class AutoChartCellEditor extends ChartCellEditor { public class AutoChartCellEditor extends ChartCellEditor {
public AutoChartCellEditor(ElementCasePane<? extends TemplateElementCase> ePane) { public AutoChartCellEditor(ElementCasePane<? extends TemplateElementCase> ePane) {

7
designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java

@ -9,7 +9,6 @@ import com.fr.base.Formula;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.Style; import com.fr.base.Style;
import com.fr.base.vcs.DesignerMode; import com.fr.base.vcs.DesignerMode;
import com.fr.chart.chartattr.AutoChartCollection;
import com.fr.design.DesignState; import com.fr.design.DesignState;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
@ -53,8 +52,6 @@ import com.fr.design.cell.bar.DynamicScrollBar;
import com.fr.design.cell.clipboard.CellElementsClip; import com.fr.design.cell.clipboard.CellElementsClip;
import com.fr.design.cell.clipboard.ElementsTransferable; import com.fr.design.cell.clipboard.ElementsTransferable;
import com.fr.design.cell.clipboard.FloatElementsClip; import com.fr.design.cell.clipboard.FloatElementsClip;
import com.fr.design.cell.editor.AutoChartCellEditor;
import com.fr.design.cell.editor.AutoChartFloatEditor;
import com.fr.design.cell.editor.BiasTextPainterCellEditor; import com.fr.design.cell.editor.BiasTextPainterCellEditor;
import com.fr.design.cell.editor.CellEditor; import com.fr.design.cell.editor.CellEditor;
import com.fr.design.cell.editor.ChartCellEditor; import com.fr.design.cell.editor.ChartCellEditor;
@ -402,8 +399,6 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
grid.setDefaultFloatEditor(chartClass, new ChartFloatEditor()); grid.setDefaultFloatEditor(chartClass, new ChartFloatEditor());
} }
grid.setDefaultCellEditor(AutoChartCollection.class, new AutoChartCellEditor(this));
grid.setDefaultFloatEditor(AutoChartCollection.class, new AutoChartFloatEditor());
addExtraCellEditor(grid); addExtraCellEditor(grid);
@ -427,7 +422,7 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
editor = (CellEditor) c.newInstance(); editor = (CellEditor) c.newInstance();
} catch (NoSuchMethodException e) { } catch (NoSuchMethodException e) {
try { try {
c = clazz.getConstructor(ElementCase.class); c = clazz.getConstructor(ElementCasePane.class);
editor = (CellEditor) c.newInstance(this); editor = (CellEditor) c.newInstance(this);
} catch (Exception e1) { } catch (Exception e1) {
FineLoggerFactory.getLogger().error(e1.getMessage(), e1); FineLoggerFactory.getLogger().error(e1.getMessage(), e1);

3
designer-realize/src/main/java/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java

@ -147,8 +147,11 @@ public class ErrorInfoLogAppender extends AppenderSkeleton {
} }
}; };
try { try {
//如果bookPath是null,ResourceIOUtils会因为无法读取文件夹的流输出error日志,输出日志会再次走到这里,引起死循环
if (StringUtils.isNotBlank(bookPath)) {
file.readStream(new ByteArrayInputStream(WorkContext.getWorkResource().readFully(StableUtils.pathJoin(ProjectConstants.REPORTLETS_NAME, bookPath)))); file.readStream(new ByteArrayInputStream(WorkContext.getWorkResource().readFully(StableUtils.pathJoin(ProjectConstants.REPORTLETS_NAME, bookPath))));
return file.getTemplateID(); return file.getTemplateID();
}
} catch (Exception ignore) { } catch (Exception ignore) {
} }

12
designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCaseDesigner.java

@ -5,7 +5,6 @@ package com.fr.design.mainframe.form;
import com.fr.base.vcs.DesignerMode; import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignState; import com.fr.design.DesignState;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.actions.AllowAuthorityEditAction; import com.fr.design.actions.AllowAuthorityEditAction;
import com.fr.design.actions.ExitAuthorityEditAction; import com.fr.design.actions.ExitAuthorityEditAction;
import com.fr.design.base.mode.DesignModeContext; import com.fr.design.base.mode.DesignModeContext;
@ -26,7 +25,6 @@ import com.fr.design.menu.NameSeparator;
import com.fr.design.menu.ShortCut; import com.fr.design.menu.ShortCut;
import com.fr.design.menu.ToolBarDef; import com.fr.design.menu.ToolBarDef;
import com.fr.design.present.ConditionAttributesGroupPane; import com.fr.design.present.ConditionAttributesGroupPane;
import com.fr.design.fun.FormAdaptiveConfigUIProcessor;
import com.fr.design.selection.SelectableElement; import com.fr.design.selection.SelectableElement;
import com.fr.design.selection.Selectedable; import com.fr.design.selection.Selectedable;
import com.fr.design.selection.SelectionListener; import com.fr.design.selection.SelectionListener;
@ -65,9 +63,8 @@ public class FormElementCaseDesigner
public FormElementCaseDesigner(T sheet, Form form) { public FormElementCaseDesigner(T sheet, Form form) {
super(sheet); super(sheet);
elementCasePane = initElementCasePane(sheet, form);
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
elementCasePane = new FormElementCasePaneDelegate((FormElementCase) sheet, form);
elementCasePane.setSelection(getDefaultSelectElement()); elementCasePane.setSelection(getDefaultSelectElement());
this.add(elementCasePane, BorderLayout.CENTER); this.add(elementCasePane, BorderLayout.CENTER);
elementCasePane.addTargetModifiedListener(new TargetModifiedListener() { elementCasePane.addTargetModifiedListener(new TargetModifiedListener() {
@ -80,6 +77,9 @@ public class FormElementCaseDesigner
} }
protected FormElementCasePaneDelegate initElementCasePane(T sheet, Form form){
return new FormElementCasePaneDelegate((FormElementCase) sheet, form);
}
@Override @Override
public void setTarget(T t) { public void setTarget(T t) {
@ -126,10 +126,6 @@ public class FormElementCaseDesigner
*/ */
@Override @Override
public BufferedImage getElementCaseImage(Dimension size) { public BufferedImage getElementCaseImage(Dimension size) {
FormAdaptiveConfigUIProcessor adaptiveConfigUI = ExtraDesignClassManager.getInstance().getSingle(FormAdaptiveConfigUIProcessor.MARK_STRING);
if (adaptiveConfigUI != null) {
return adaptiveConfigUI.paintFormElementCaseImage(size, this.elementCasePane);
}
BufferedImage image = null; BufferedImage image = null;
try { try {
image = new java.awt.image.BufferedImage(size.width, size.height, image = new java.awt.image.BufferedImage(size.width, size.height,

28
designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java

@ -2,13 +2,16 @@ package com.fr.design.mainframe.socketio;
import com.fr.config.RemoteConfigEvent; import com.fr.config.RemoteConfigEvent;
import com.fr.decision.webservice.utils.DecisionServiceConstants; import com.fr.decision.webservice.utils.DecisionServiceConstants;
import com.fr.design.DesignerEnvManager;
import com.fr.design.EnvChangeEntrance; import com.fr.design.EnvChangeEntrance;
import com.fr.design.dialog.FineJOptionPane; import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.loghandler.DesignerLogger; import com.fr.design.mainframe.loghandler.DesignerLogger;
import com.fr.design.ui.util.UIUtil; import com.fr.design.ui.util.UIUtil;
import com.fr.event.Event;
import com.fr.event.EventDispatcher; import com.fr.event.EventDispatcher;
import com.fr.event.Listener;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.report.RemoteDesignConstants; import com.fr.report.RemoteDesignConstants;
import com.fr.serialization.SerializerHelper; import com.fr.serialization.SerializerHelper;
@ -16,6 +19,7 @@ import com.fr.stable.ArrayUtils;
import com.fr.third.apache.log4j.spi.LoggingEvent; import com.fr.third.apache.log4j.spi.LoggingEvent;
import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContext;
import com.fr.workspace.Workspace; import com.fr.workspace.Workspace;
import com.fr.workspace.WorkspaceEvent;
import com.fr.workspace.base.WorkspaceConstants; import com.fr.workspace.base.WorkspaceConstants;
import com.fr.workspace.connect.WorkspaceConnection; import com.fr.workspace.connect.WorkspaceConnection;
import com.fr.workspace.server.socket.SocketInfoOperator; import com.fr.workspace.server.socket.SocketInfoOperator;
@ -30,6 +34,20 @@ import java.net.URL;
public class DesignerSocketIO { public class DesignerSocketIO {
static {
EventDispatcher.listen(WorkspaceEvent.LostConnect, new Listener<Workspace>() {
@Override
public void on(Event event, Workspace param) {
// 远程设计websocket不支持wss 所以断开无法提醒
// 使用远程设计的心跳断开来提醒断开
if (DesignerEnvManager.getEnvManager().isHttps()) {
showConnectionLostDialog();
}
}
});
}
enum Status { enum Status {
Connected, Connected,
Disconnected, Disconnected,
@ -143,6 +161,13 @@ public class DesignerSocketIO {
* socket 只用推日志和通知配置变更 * socket 只用推日志和通知配置变更
*/ */
if (status != Status.Disconnecting) { if (status != Status.Disconnecting) {
showConnectionLostDialog();
}
status = Status.Disconnected;
}
};
private static void showConnectionLostDialog() {
try { try {
UIUtil.invokeAndWaitIfNeeded(new Runnable() { UIUtil.invokeAndWaitIfNeeded(new Runnable() {
@Override @Override
@ -160,9 +185,6 @@ public class DesignerSocketIO {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
} }
} }
status = Status.Disconnected;
}
};
//配置变更监听器 //配置变更监听器
private static final Emitter.Listener modifyConfig = new Emitter.Listener() { private static final Emitter.Listener modifyConfig = new Emitter.Listener() {

3
designer-realize/src/main/java/com/fr/design/widget/CellWidgetCardPane.java

@ -136,6 +136,9 @@ public class CellWidgetCardPane extends BasicPane {
//todo //todo
} }
}); });
if (rn == null) {
return;
}
DataModify<? extends Widget> definePane = rn.getDefinePane(); DataModify<? extends Widget> definePane = rn.getDefinePane();
attriCardPane.add(definePane.toSwingComponent(), rn.getCardName()); attriCardPane.add(definePane.toSwingComponent(), rn.getCardName());
attriCardLayout.show(attriCardPane, rn.getCardName()); attriCardLayout.show(attriCardPane, rn.getCardName());

3
designer-realize/src/main/java/com/fr/quickeditor/CellQuickEditor.java

@ -187,7 +187,8 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
selectedIndex = comboBox.getSelectedIndex(); selectedIndex = comboBox.getSelectedIndex();
comboBox.setPopupVisible(false); comboBox.setPopupVisible(false);
comboBox.repaint(); comboBox.repaint();
if (selectedIndex < cellInsertActions.length) { // comboBox.getSelectedIndex()可能返回-1
if (selectedIndex != -1 && selectedIndex < cellInsertActions.length) {
cellInsertActions[selectedIndex].actionPerformed(e); cellInsertActions[selectedIndex].actionPerformed(e);
} }
comboBox.setSelectedIndex(currentSelectedIndex); comboBox.setSelectedIndex(currentSelectedIndex);

3
designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java

@ -350,6 +350,9 @@ public class DesignerActivator extends Activator {
Set<ElementUIProvider> providers = ExtraDesignClassManager.getInstance().getArray(ElementUIProvider.MARK_STRING); Set<ElementUIProvider> providers = ExtraDesignClassManager.getInstance().getArray(ElementUIProvider.MARK_STRING);
for (ElementUIProvider provider : providers) { for (ElementUIProvider provider : providers) {
try { try {
if (provider.quickEditor() == null) {
continue;
}
ActionFactory.registerCellEditor(provider.targetObjectClass(), provider.quickEditor().newInstance()); ActionFactory.registerCellEditor(provider.targetObjectClass(), provider.quickEditor().newInstance());
} catch (Exception e) { } catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);

Loading…
Cancel
Save