Browse Source

Merge pull request #4816 in DESIGN/design from release/11.0 to feature/x

* commit 'ce503b26e8e0be09843480f38b584ae03c3c2587':
  REPORT-54643 最新的persist分支安装设计器内存监控安装失败且会导致面板无法编辑  漏传代码
  REPORT-54643 最新的persist分支安装设计器内存监控安装失败且会导致面板无法编辑
  REPORT-54643  回退
  REPORT-54643  回退
  CHART-19719 图例交互修改 && CHART-19692 仪表盘固定大小最小值修改
  REPORT-54123 设计器报表块组件进入和退出编辑时单元格选中状态优化
  REPORT-54573  设计器本地预览报错400请求头过大
  REPORT-54643 最新的persist分支安装设计器内存监控安装失败且会导致面板无法编辑
  REPORT-54643 最新的persist分支安装设计器内存监控安装失败且会导致面板无法编辑
  REPORT-53902 远程设计无权限国际化显示不全
  REPORT-54545 富文本默认字体本地化问题
  REPORT-54574 远程设计环境不一致提示内容中,性能插件下的六个包被分别识别为了插件
research/11.0
superman 3 years ago
parent
commit
8a87da7fb2
  1. 19
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java
  2. 84
      designer-base/src/main/java/com/fr/design/mainframe/SafeWindowListener.java
  3. 2
      designer-base/src/main/java/com/fr/design/mainframe/form/FormECDesignerProvider.java
  4. 19
      designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java
  5. 3
      designer-base/src/main/java/com/fr/env/RemoteEnvPane.java
  6. 15
      designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java
  7. 1
      designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties
  8. 1
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties
  9. 1
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties
  10. 1
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties
  11. 1
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties
  12. 6
      designer-chart/src/main/java/com/fr/van/chart/designer/PlotFactory.java
  13. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/style/HeatMapRangeLegendPane.java
  14. 36
      designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java
  15. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartRangeLegendPane.java
  16. 21
      designer-chart/src/main/java/com/fr/van/chart/designer/style/VanLegendPaneWidthOutFixedCheck.java
  17. 21
      designer-chart/src/main/java/com/fr/van/chart/designer/style/VanLegendPaneWidthOutHighlight.java
  18. 2
      designer-chart/src/main/java/com/fr/van/chart/pie/RadiusCardLayoutPane.java
  19. 3
      designer-form/src/main/java/com/fr/design/mainframe/JForm.java
  20. 12
      designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java
  21. 3
      designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCaseDesigner.java

19
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java

@ -72,6 +72,8 @@ import com.fr.start.OemHandler;
import com.fr.workspace.WorkContext;
import com.fr.workspace.Workspace;
import com.fr.workspace.connect.WorkspaceConnectionInfo;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;
import org.jetbrains.annotations.Nullable;
@ -179,6 +181,8 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
private int contentHeight = (int) (java.awt.Toolkit.getDefaultToolkit().getScreenSize().getHeight());
private Map<WindowListener, SafeWindowListener> map = new HashMap<>();
private WindowAdapter windowAdapter = new WindowAdapter() {
@Override
@ -535,6 +539,21 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
}
}
@Override
public synchronized void addWindowListener(WindowListener l) {
SafeWindowListener safeWindowListener = new SafeWindowListener(l);
map.put(l, safeWindowListener);
super.addWindowListener(safeWindowListener);
}
@Override
public synchronized void removeWindowListener(WindowListener l) {
SafeWindowListener safeWindowListener = map.remove(l);
if (safeWindowListener != null) {
super.removeWindowListener(safeWindowListener);
}
}
private void addMacOsListener() {
OSSupportCenter.buildAction(new MacOsAddListenerAction(), SupportOSImpl.DOCK_QUIT);
}

84
designer-base/src/main/java/com/fr/design/mainframe/SafeWindowListener.java

@ -0,0 +1,84 @@
package com.fr.design.mainframe;
import com.fr.log.FineLoggerFactory;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
/**
* 保证监听运行出错也不影响其他功能正常使用
*
* @author hades
* @version 10.0
* Created by hades on 2021/6/30
*/
public class SafeWindowListener implements WindowListener {
private final WindowListener windowListener;
public SafeWindowListener(WindowListener windowListener) {
this.windowListener = windowListener;
}
@Override
public void windowOpened(WindowEvent e) {
try {
windowListener.windowOpened(e);
} catch (Throwable throwable) {
FineLoggerFactory.getLogger().debug(throwable.getMessage(), throwable);
}
}
@Override
public void windowClosing(WindowEvent e) {
try {
windowListener.windowClosing(e);
} catch (Throwable throwable) {
FineLoggerFactory.getLogger().debug(throwable.getMessage(), throwable);
}
}
@Override
public void windowClosed(WindowEvent e) {
try {
windowListener.windowClosed(e);
} catch (Throwable throwable) {
FineLoggerFactory.getLogger().debug(throwable.getMessage(), throwable);
}
}
@Override
public void windowIconified(WindowEvent e) {
try {
windowListener.windowIconified(e);
} catch (Throwable throwable) {
FineLoggerFactory.getLogger().debug(throwable.getMessage(), throwable);
}
}
@Override
public void windowDeiconified(WindowEvent e) {
try {
windowListener.windowDeiconified(e);
} catch (Throwable throwable) {
FineLoggerFactory.getLogger().debug(throwable.getMessage(), throwable);
}
}
@Override
public void windowActivated(WindowEvent e) {
try {
windowListener.windowActivated(e);
} catch (Throwable throwable) {
FineLoggerFactory.getLogger().debug(throwable.getMessage(), throwable);
}
}
@Override
public void windowDeactivated(WindowEvent e) {
try {
windowListener.windowDeactivated(e);
} catch (Throwable throwable) {
FineLoggerFactory.getLogger().debug(throwable.getMessage(), throwable);
}
}
}

2
designer-base/src/main/java/com/fr/design/mainframe/form/FormECDesignerProvider.java

@ -90,4 +90,6 @@ public interface FormECDesignerProvider {
BufferedImage getElementCaseImage(Dimension elementCaseContainerSize);
void refreshPropertyPane();
void removeSelection();
}

19
designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java

@ -39,6 +39,7 @@ import java.lang.reflect.Method;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
@ -59,6 +60,21 @@ public class VersionCheckUtils {
private static final String ID = "id";
private static final String VERSION = "version";
private static final String NAME = "name";
private static final Set<String> pluginsNeedIgnore = new HashSet<>();
static {
pluginsNeedIgnore.addAll(Arrays.asList(
"com.fr.plugin.performance.newexecutetool",
"com.fr.plugin.performance.newline",
"com.fr.plugin.performance.pdfstream",
"com.fr.plugin.performance.dzstartemptyfile",
"com.fr.plugin.performance.treenode.button.optimization",
"com.fr.plugin.performance.druid",
"com.fr.plugin.performance.reducecalculation",
"com.fr.plugin.performance.fasttree",
"com.fr.plugin.performance.paralleldsloader",
"com.fr.plugin.cloud.analytics.v10"
));
}
public static boolean versionCheck(String envName) {
@ -236,6 +252,9 @@ public class VersionCheckUtils {
continue;
}
String remotePluginID = remotePlugin.getString(ID);
if (pluginsNeedIgnore.contains(remotePluginID)) {
continue;
}
if (localPluginsMap.containsKey(remotePluginID)) {
if (ComparatorUtils.equals(localPluginsMap.get(remotePluginID).getVersion(), remotePlugin.getString(VERSION))) {
continue;

3
designer-base/src/main/java/com/fr/env/RemoteEnvPane.java vendored

@ -15,6 +15,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ipasswordfield.UIPassWordField;
import com.fr.design.gui.ipasswordfield.UIPasswordFieldWithFixedLength;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayoutHelper;
@ -653,7 +654,7 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
dialog = new JDialog((Dialog) SwingUtilities.getWindowAncestor(RemoteEnvPane.this), Toolkit.i18nText("Fine-Design_Basic_Dialog_Message_Title"), true);
dialog.setSize(new Dimension(308, 132));
dialog.setSize(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.env.RemoteEnvPane.dialog"));
okButton.setEnabled(false);
JPanel jp = new JPanel();
JPanel upPane = new JPanel();

15
designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java

@ -6,6 +6,7 @@ import com.fr.module.Activator;
import com.fr.module.ModuleRole;
import com.fr.stable.EncodeConstants;
import com.fr.stable.ProductConstants;
import com.fr.stable.StringUtils;
import com.fr.startup.FineWebApplicationInitializer;
import com.fr.third.springframework.web.SpringServletContainerInitializer;
import com.fr.third.springframework.web.context.support.AnnotationConfigWebApplicationContext;
@ -26,6 +27,8 @@ import java.util.Set;
*/
public class FineEmbedServerActivator extends Activator {
private static final String TOMCAT_MAX_HEADER_SIZE = "tomcat-maxHttpHeaderSize";
private Tomcat tomcat;
@Override
@ -68,6 +71,7 @@ public class FineEmbedServerActivator extends Activator {
// 8.5.x 请求参数带特殊字符被tomcat拒绝 []|{}^\`"<>
tomcat.getConnector().setProperty("relaxedQueryChars", "[]|{}^&#x5c;&#x60;&quot;&lt;&gt;");
setMaxPostSize();
setMaxHttpHeaderSize();
String docBase = new File(WorkContext.getCurrent().getPath()).getParent();
//内置的上下文使用工程目录比如webroot
@ -102,6 +106,17 @@ public class FineEmbedServerActivator extends Activator {
}
}
private void setMaxHttpHeaderSize() {
String value = System.getProperty(TOMCAT_MAX_HEADER_SIZE);
if (StringUtils.isNotEmpty(value)) {
try {
tomcat.getConnector().setProperty("maxHttpHeaderSize", value);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
}
private void stopServerActivator() {

1
designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties

@ -3,3 +3,4 @@ com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=630*185
com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=630*31
com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=630*280
com.fr.design.report.ReportColumnsPane=800*600
com.fr.env.RemoteEnvPane.dialog=458*132

1
designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties

@ -2,3 +2,4 @@ com.fr.design.mainframe.check.CheckButton=280*118
com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=610*185
com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=610*31
com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=610*280
com.fr.env.RemoteEnvPane.dialog=458*132

1
designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties

@ -2,3 +2,4 @@ com.fr.design.mainframe.check.CheckButton=230*118
com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=490*185
com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=490*35
com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=490*280
com.fr.env.RemoteEnvPane.dialog=458*132

1
designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties

@ -3,3 +3,4 @@ com.fr.design.mainframe.check.CheckButton=250*118
com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=385*185
com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=385*31
com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=385*280
com.fr.env.RemoteEnvPane.dialog=308*132

1
designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties

@ -2,3 +2,4 @@ com.fr.design.mainframe.check.CheckButton=250*118
com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=385*185
com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=385*31
com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=385*280
com.fr.env.RemoteEnvPane.dialog=308*132

6
designer-chart/src/main/java/com/fr/van/chart/designer/PlotFactory.java

@ -34,7 +34,7 @@ import com.fr.van.chart.designer.style.MapRangeLegendPane;
import com.fr.van.chart.designer.style.VanChartPlotLegendPane;
import com.fr.van.chart.designer.style.VanChartRangeLegendPane;
import com.fr.van.chart.designer.style.VanChartStylePane;
import com.fr.van.chart.designer.style.VanLegendPaneWidthOutHighlight;
import com.fr.van.chart.designer.style.VanLegendPaneWidthOutFixedCheck;
import com.fr.van.chart.designer.style.label.VanChartGaugePlotLabelPane;
import com.fr.van.chart.designer.style.label.VanChartPiePlotLabelPane;
import com.fr.van.chart.designer.style.label.VanChartPlotLabelDetailPane;
@ -128,8 +128,8 @@ public class PlotFactory {
private static Map<Class<? extends Plot>, Class<? extends VanChartPlotLegendPane>> legendMap = new HashMap<Class<? extends Plot>, Class<? extends VanChartPlotLegendPane>>();
static {
legendMap.put(VanChartGaugePlot.class, VanLegendPaneWidthOutHighlight.class);
legendMap.put(VanChartMultiPiePlot.class, VanLegendPaneWidthOutHighlight.class);
legendMap.put(VanChartGaugePlot.class, VanLegendPaneWidthOutFixedCheck.class);
legendMap.put(VanChartMultiPiePlot.class, VanLegendPaneWidthOutFixedCheck.class);
legendMap.put(VanChartScatterPlot.class, VanChartRangeLegendPane.class);
legendMap.put(VanChartBubblePlot.class, VanChartRangeLegendPane.class);
legendMap.put(VanChartMapPlot.class, MapRangeLegendPane.class);

2
designer-chart/src/main/java/com/fr/van/chart/designer/style/HeatMapRangeLegendPane.java

@ -17,6 +17,6 @@ public class HeatMapRangeLegendPane extends MapRangeLegendPane {
}
protected JPanel createCommonLegendPane(){
return this.createLegendPaneWithoutHighlight();
return this.createLegendPaneWithoutFixedCheck();
}
}

36
designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java

@ -72,9 +72,9 @@ public class VanChartPlotLegendPane extends BasicPane {
//private LimitPane limitPane;
//高亮显示的按钮
private UILabel highlightLabel;
private UIButtonGroup<Boolean> highlightButton;
private JPanel highlightPane;
private UILabel fixedCheckLabel;
private UICheckBox fixedCheck;
private JPanel fixedCheckPane;
private VanChartStylePane parent;
@ -91,8 +91,8 @@ public class VanChartPlotLegendPane extends BasicPane {
this.plot = plot;
}
public JPanel getHighlightPane() {
return highlightPane;
public JPanel getFixedCheckPane() {
return fixedCheckPane;
}
public VanChartStylePane getLegendPaneParent() {
@ -135,7 +135,7 @@ public class VanChartPlotLegendPane extends BasicPane {
});
}
protected JPanel createLegendPaneWithoutHighlight() {
protected JPanel createLegendPaneWithoutFixedCheck() {
borderPane = new VanChartBorderWithRadiusPane();
backgroundPane = creatBackgroundPane();
@ -162,11 +162,11 @@ public class VanChartPlotLegendPane extends BasicPane {
protected JPanel createLegendPane() {
borderPane = new VanChartBorderWithRadiusPane();
backgroundPane = creatBackgroundPane();
highlightPane = createHighlightPane();
fixedCheckPane = createFixedCheckPane();
JPanel panel = new JPanel();
panel.setLayout(new BorderLayout());
panel.add(createDisplayStrategy(), BorderLayout.CENTER);
panel.add(highlightPane, BorderLayout.SOUTH);
panel.add(fixedCheckPane, BorderLayout.SOUTH);
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
@ -319,9 +319,9 @@ public class VanChartPlotLegendPane extends BasicPane {
// return limitPane;
}
private JPanel createHighlightPane() {
highlightButton = new UIButtonGroup<>(new String[]{Toolkit.i18nText("Fine-Design_Chart_On"), Toolkit.i18nText("Fine-Design_Chart_Off")}, new Boolean[]{true, false});
highlightLabel = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Highlight"));
private JPanel createFixedCheckPane() {
fixedCheck = new UICheckBox(Toolkit.i18nText("Fine-Engine_Chart_Open_Fixed_Display"));
fixedCheckLabel = new UILabel(Toolkit.i18nText("Fine-Engine_Chart_Fixed_Display"));
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
@ -329,7 +329,7 @@ public class VanChartPlotLegendPane extends BasicPane {
double[] rowSize = {p, p};
Component[][] components = new Component[][]{
new Component[]{null, null},
new Component[]{highlightLabel, highlightButton}
new Component[]{fixedCheckLabel, fixedCheck}
};
return TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize);
}
@ -408,8 +408,8 @@ public class VanChartPlotLegendPane extends BasicPane {
//legend.setLimitAttribute(limitPane.updateBean());
legend.setFloatPercentX(customFloatPositionPane.getFloatPosition_x());
legend.setFloatPercentY(customFloatPositionPane.getFloatPosition_y());
if (highlightButton != null && highlightButton.getSelectedItem() != null) {
legend.setHighlight(highlightButton.getSelectedItem());
if (fixedCheck != null) {
legend.setHighlight(fixedCheck.isSelected());
}
}
@ -431,11 +431,11 @@ public class VanChartPlotLegendPane extends BasicPane {
maxProportion.populateBean(legend.getMaxHeight());
//区域显示策略 恢复用注释。取消注释。
//limitPane.populateBean(legend.getLimitAttribute());
if (highlightButton != null) {
highlightButton.setSelectedItem(legend.isHighlight());
if (fixedCheck != null) {
fixedCheck.setSelected(legend.isHighlight());
boolean largeDataModel = PlotFactory.largeDataModel(plot);
highlightButton.setEnabled(!largeDataModel);
highlightLabel.setEnabled(!largeDataModel);
fixedCheck.setEnabled(!largeDataModel);
fixedCheckLabel.setEnabled(!largeDataModel);
}
}

2
designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartRangeLegendPane.java

@ -114,7 +114,7 @@ public class VanChartRangeLegendPane extends VanChartPlotLegendPane {
}
private void checkHighlightVisible() {
JPanel highlightPane = this.getHighlightPane();
JPanel highlightPane = this.getFixedCheckPane();
if (highlightPane != null) {
highlightPane.setVisible(legendType != LegendType.GRADUAL);

21
designer-chart/src/main/java/com/fr/van/chart/designer/style/VanLegendPaneWidthOutFixedCheck.java

@ -0,0 +1,21 @@
package com.fr.van.chart.designer.style;
import javax.swing.JPanel;
/**
* Created by eason on 2016/12/14.
*/
public class VanLegendPaneWidthOutFixedCheck extends VanChartPlotLegendPane{
public VanLegendPaneWidthOutFixedCheck(){
}
public VanLegendPaneWidthOutFixedCheck(VanChartStylePane parent){
super(parent);
}
protected JPanel createLegendPane(){
return this.createLegendPaneWithoutFixedCheck();
}
}

21
designer-chart/src/main/java/com/fr/van/chart/designer/style/VanLegendPaneWidthOutHighlight.java

@ -1,21 +0,0 @@
package com.fr.van.chart.designer.style;
import javax.swing.JPanel;
/**
* Created by eason on 2016/12/14.
*/
public class VanLegendPaneWidthOutHighlight extends VanChartPlotLegendPane{
public VanLegendPaneWidthOutHighlight(){
}
public VanLegendPaneWidthOutHighlight(VanChartStylePane parent){
super(parent);
}
protected JPanel createLegendPane(){
return this.createLegendPaneWithoutHighlight();
}
}

2
designer-chart/src/main/java/com/fr/van/chart/pie/RadiusCardLayoutPane.java

@ -42,7 +42,7 @@ public class RadiusCardLayoutPane extends BasicBeanPane<Plot> {
Map<String, Component> paneList = new HashMap<String, Component>();
radiusType = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Auto"), Toolkit.i18nText("Fine-Design_Chart_Fixed")});
radius = new UISpinnerWithPx(100);
radius = new UISpinnerWithPx(1, Double.MAX_VALUE, 1, 100);
radiusContent = new JPanel(new BorderLayout());
radiusContent.add(radius, BorderLayout.CENTER);

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

@ -917,6 +917,9 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
ecTabAction();
} else {
formDesign.setReportBlockEditing(false);
if (elementCaseDesign != null) {
elementCaseDesign.removeSelection();
}
formTabAction();
}
refreshToolArea();

12
designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java

@ -5,6 +5,7 @@ package com.fr.design.cell.editor;
import com.fr.base.BaseFormula;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.base.Utils;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter;
@ -61,6 +62,11 @@ public class RichTextToolBar extends BasicPane{
private static final Dimension BUTTON_SIZE = new Dimension(24, 20);
/**
* 富文本字体下拉框默认首选字体 非设计器UI界面字体
*/
private static final FRFont DEFAULT_FONT = FRContext.getDefaultValues().getFRFont().applySize(13);
private UIComboBox fontNameComboBox;
private UIComboBox fontSizeComboBox;
private UIToggleButton bold;
@ -153,11 +159,11 @@ public class RichTextToolBar extends BasicPane{
}
private void bindListener(){
FRFont defaultFont = (this.textPane != null) ? FRFont.getInstance(this.textPane.getFont()) : RichTextPane.DEFAUL_FONT;
// 这里下拉框默认选中字体 不由UI界面字体决定 两套不同体系
fontNameComboBox.addItemListener(fontNameItemListener);
fontNameComboBox.setSelectedItem(defaultFont.getFamily());
fontNameComboBox.setSelectedItem(DEFAULT_FONT.getFamily());
fontSizeComboBox.addItemListener(fontSizeItemListener);
fontSizeComboBox.setSelectedItem(scaleDown(defaultFont.getSize()));
fontSizeComboBox.setSelectedItem(scaleDown(DEFAULT_FONT.getSize()));
bold.addActionListener(blodChangeAction);
italic.addActionListener(itaChangeAction);

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

@ -297,10 +297,13 @@ public class FormElementCaseDesigner
/**
* 移除选择
*/
@Override
public void removeSelection() {
TemplateElementCase templateElementCase = this.elementCasePane.getEditingElementCase();
if (templateElementCase instanceof WorkSheet) {
((WorkSheet) templateElementCase).setPaintSelection(false);
} else if (templateElementCase instanceof FormElementCase) {
this.elementCasePane.setSelection(new CellSelection(0, 0, 0, 0));
}
elementCasePane.repaint();
}

Loading…
Cancel
Save