Browse Source

Merge pull request #2198 in DESIGN/design from final/10.0 to persist/10.0

* commit '3cd85046f74eb20afb60ed27bfd815e83b462ef5':
  CHART-15451 国际化
  CHART-15451 增加无匹配的提示
  CHART-15451 日期判断需要是一种格式
  REPORT-38272 && REPORT-38287 && REPORT-37922【frm设计界面支持缩放】参数面板控件如果进行较大的缩放幅度,会遮挡部分
  REPORT-37870【共创】远程目录切换回本地,点击服务器-插件管理,页面显示异常;再打开一个模板,模板内容显示错乱
  REPORT-37869 共创 远程设计-断开后修改过的配置回退
  CHART-15259 release→final
persist/10.0
superman 4 years ago
parent
commit
30e6031cf6
  1. 1
      designer-base/src/main/java/com/fr/design/module/DesignModuleFactory.java
  2. 4
      designer-base/src/main/java/com/fr/env/RemoteEnvPane.java
  3. 5
      designer-chart/src/main/java/com/fr/design/chart/AutoChartTypePane.java
  4. 5
      designer-chart/src/main/java/com/fr/design/chart/ChartIcon.java
  5. 18
      designer-chart/src/main/java/com/fr/design/chart/auto/AutoTypeCalculate.java
  6. 8
      designer-form/src/main/java/com/fr/design/designer/beans/models/AddingModel.java
  7. 29
      designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java
  8. 8
      designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java
  9. 3
      designer-realize/src/main/java/com/fr/design/parameter/ParameterDefinitePane.java

1
designer-base/src/main/java/com/fr/design/module/DesignModuleFactory.java

@ -146,6 +146,7 @@ public class DesignModuleFactory {
try { try {
return (ParameterDesignerProvider) instance.formParaDesigner.newInstance(); return (ParameterDesignerProvider) instance.formParaDesigner.newInstance();
} catch (Exception e) { } catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
FineLoggerFactory.getLogger().error("error in form para designer"); FineLoggerFactory.getLogger().error("error in form para designer");
} }
} }

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

@ -460,7 +460,9 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
} catch (Exception e) { } catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage() , e); FineLoggerFactory.getLogger().error(e.getMessage() , e);
} }
textField.setText(name); if (StringUtils.isEmpty(textField.getText())) {
textField.setText(name);
}
} }
}.execute(); }.execute();
} }

5
designer-chart/src/main/java/com/fr/design/chart/AutoChartTypePane.java

@ -63,6 +63,8 @@ public class AutoChartTypePane extends ChartWizardPane implements CallbackEvent
private AutoProgressBar connectionBar; private AutoProgressBar connectionBar;
private SwingWorker worker; private SwingWorker worker;
private static final String MESSAGE = Toolkit.i18nText("Fine-Design_Chart_Auto_No_Match");
public AutoChartTypePane() { public AutoChartTypePane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
initButtonGroup(); initButtonGroup();
@ -226,6 +228,9 @@ public class AutoChartTypePane extends ChartWizardPane implements CallbackEvent
chartResultModel.addElement(autoChartIcon); chartResultModel.addElement(autoChartIcon);
} }
chartViewList.setSelectedIndex(0); chartViewList.setSelectedIndex(0);
} else {
FineJOptionPane.showMessageDialog(AutoChartTypePane.this, MESSAGE,
Toolkit.i18nText("Fine-Design_Basic_Message"), JOptionPane.INFORMATION_MESSAGE, UIManager.getIcon("OptionPane.informationIcon"));
} }
} catch (Exception e) { } catch (Exception e) {
if (!(e instanceof CancellationException)) { if (!(e instanceof CancellationException)) {

5
designer-chart/src/main/java/com/fr/design/chart/ChartIcon.java

@ -1,12 +1,12 @@
package com.fr.design.chart; package com.fr.design.chart;
import com.fr.base.ScreenResolution;
import com.fr.base.chart.BaseChartPainter; import com.fr.base.chart.BaseChartPainter;
import com.fr.base.chart.chartdata.CallbackEvent; import com.fr.base.chart.chartdata.CallbackEvent;
import com.fr.base.chart.result.WebChartIDInfo; import com.fr.base.chart.result.WebChartIDInfo;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chartx.attr.ChartProvider; import com.fr.chartx.attr.ChartProvider;
import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.script.Calculator; import com.fr.script.Calculator;
import com.fr.stable.xml.XMLPrintWriter; import com.fr.stable.xml.XMLPrintWriter;
import com.fr.stable.xml.XMLable; import com.fr.stable.xml.XMLable;
@ -79,7 +79,8 @@ public class ChartIcon implements Icon, XMLable {
BaseChartPainter chartPainter = getChartPainter(); BaseChartPainter chartPainter = getChartPainter();
int resolution = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().getJTemplateResolution(); //插入图表的宽度是固定的,resolution直接获取屏幕分辨率,resolution现在只会影响到老图表
int resolution = ScreenResolution.getScreenResolution();
Graphics2D g2d = (Graphics2D) g; Graphics2D g2d = (Graphics2D) g;
Paint oldPaint = g2d.getPaint(); Paint oldPaint = g2d.getPaint();

18
designer-chart/src/main/java/com/fr/design/chart/auto/AutoTypeCalculate.java

@ -102,22 +102,22 @@ public class AutoTypeCalculate {
} }
private static boolean isNumberData(List<String> values) { private static boolean isNumberData(List<String> values) {
for (String value : values) { for (Pattern pattern : dataPatterns) {
if (!isNumberData(value)) { if (isNumberData(values, pattern)) {
return false; return true;
} }
} }
return true; return false;
} }
private static boolean isNumberData(String value) { private static boolean isNumberData(List<String> values, Pattern pattern) {
for (Pattern pattern : dataPatterns) { for (String value : values) {
Matcher matcher = pattern.matcher(value); Matcher matcher = pattern.matcher(value);
if (matcher.matches()) { if (!matcher.matches()) {
return true; return false;
} }
} }
return false; return true;
} }
private static List<ColumnInfo> calculateField(String tableName, List<String> columns) { private static List<ColumnInfo> calculateField(String tableName, List<String> columns) {

8
designer-form/src/main/java/com/fr/design/designer/beans/models/AddingModel.java

@ -133,13 +133,13 @@ public class AddingModel {
Rectangle rect = ComponentUtils.getRelativeBounds(container); Rectangle rect = ComponentUtils.getRelativeBounds(container);
if (!ComparatorUtils.equals(container.getOuterLayout(), container.getBackupParent())) { if (!ComparatorUtils.equals(container.getOuterLayout(), container.getBackupParent())) {
added = container.getLayoutAdapter().addBean(creator, added = container.getLayoutAdapter().addBean(creator,
x + designer.getArea().getHorizontalValue(), x + designer.getHorizontalScaleValue(),
y + designer.getArea().getVerticalValue()); y + designer.getVerticalScaleValue() );
return added; return added;
} }
added = container.getLayoutAdapter().addBean(creator, added = container.getLayoutAdapter().addBean(creator,
x + designer.getArea().getHorizontalValue() - rect.x, x + designer.getHorizontalScaleValue() - rect.x,
y + designer.getArea().getVerticalValue() - rect.y); y + designer.getVerticalScaleValue() - rect.y);
return added; return added;
} }
} }

29
designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java

@ -11,7 +11,13 @@ import com.fr.design.designer.beans.location.Direction;
import com.fr.design.designer.beans.location.Location; import com.fr.design.designer.beans.location.Location;
import com.fr.design.designer.beans.models.SelectionModel; import com.fr.design.designer.beans.models.SelectionModel;
import com.fr.design.designer.beans.models.StateModel; import com.fr.design.designer.beans.models.StateModel;
import com.fr.design.designer.creator.*; import com.fr.design.designer.creator.XChartEditor;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XCreatorUtils;
import com.fr.design.designer.creator.XEditorHolder;
import com.fr.design.designer.creator.XElementCase;
import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWFitLayout;
import com.fr.design.designer.creator.cardlayout.XCardSwitchButton; import com.fr.design.designer.creator.cardlayout.XCardSwitchButton;
import com.fr.design.designer.creator.cardlayout.XWCardLayout; import com.fr.design.designer.creator.cardlayout.XWCardLayout;
import com.fr.design.form.util.XCreatorConstants; import com.fr.design.form.util.XCreatorConstants;
@ -22,14 +28,20 @@ import com.fr.design.icon.IconPathConstants;
import com.fr.design.utils.ComponentUtils; import com.fr.design.utils.ComponentUtils;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.utils.gui.LayoutUtils; import com.fr.design.utils.gui.LayoutUtils;
import com.fr.share.ShareConstants; import com.fr.share.ShareConstants;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*;
import javax.swing.BorderFactory;
import javax.swing.JComponent;
import javax.swing.JPopupMenu;
import javax.swing.JWindow;
import javax.swing.SwingUtilities;
import javax.swing.event.MouseInputAdapter; import javax.swing.event.MouseInputAdapter;
import java.awt.*; import java.awt.Color;
import java.awt.Container;
import java.awt.Cursor;
import java.awt.Rectangle;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
/** /**
@ -165,10 +177,13 @@ public class EditingMouseListener extends MouseInputAdapter {
if (designer.isDrawLineMode()) { if (designer.isDrawLineMode()) {
designer.updateDrawLineMode(e); designer.updateDrawLineMode(e);
} else { } else {
int relativeX = Math.max(0, designer.getRelativeX(e.getX()));
int relativeY = Math.max(0, designer.getRelativeY(e.getY()));
if (selectionModel.hasSelectionComponent() if (selectionModel.hasSelectionComponent()
&& selectionModel.getSelection().getRelativeBounds().contains( && selectionModel.getSelection().getRelativeBounds().contains(
designer.getArea().getHorizontalValue() + e.getX(), designer.getHorizontalScaleValue() + relativeX,
designer.getArea().getVerticalValue() + e.getY())) { designer.getVerticalScaleValue() + relativeY)) {
lastPressEvent = e; lastPressEvent = e;
lastXCreator = selectionModel.getSelection().getSelectedCreator(); lastXCreator = selectionModel.getSelection().getSelectedCreator();
} else { } else {

8
designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java

@ -409,8 +409,8 @@ public class FormDesignerUI extends ComponentUI {
clipg = g.create( clipg = g.create(
-designer.getHorizontalScaleValue(), -designer.getHorizontalScaleValue(),
-designer.getVerticalScaleValue() + designer.getParaHeight(), -designer.getVerticalScaleValue() + designer.getParaHeight(),
(int) ((parent.getSize().width + designer.getArea().getHorizontalValue()) / designer.getScale()), parent.getSize().width + designer.getHorizontalScaleValue(),
(int) ((parent.getSize().height + designer.getArea().getVerticalValue()) / designer.getScale())); parent.getSize().height + designer.getVerticalScaleValue());
designer.paintContent(clipg); designer.paintContent(clipg);
paintWatermark((Graphics2D) clipg); paintWatermark((Graphics2D) clipg);
@ -435,8 +435,8 @@ public class FormDesignerUI extends ComponentUI {
Graphics clipg1; Graphics clipg1;
clipg1 = g.create(-designer.getHorizontalScaleValue(), clipg1 = g.create(-designer.getHorizontalScaleValue(),
-designer.getVerticalScaleValue(), -designer.getVerticalScaleValue(),
(int) ((parent.getSize().width + designer.getArea().getHorizontalValue()) / designer.getScale()), parent.getSize().width + designer.getHorizontalScaleValue(),
(int) ((designer.getParaHeight() + designer.getArea().getVerticalValue()) / designer.getScale())); designer.getParaHeight() + designer.getVerticalScaleValue());
designer.paintPara(clipg1); designer.paintPara(clipg1);
clipg1.dispose(); clipg1.dispose();

3
designer-realize/src/main/java/com/fr/design/parameter/ParameterDefinitePane.java

@ -95,7 +95,8 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus
setComponentBg(this); setComponentBg(this);
paraDesignEditor = DesignModuleFactory.getFormParaDesigner(); paraDesignEditor = DesignModuleFactory.getFormParaDesigner();
if (paraDesignEditor == null) { if (paraDesignEditor == null) {
return; // 为空时 设置默认值
paraDesignEditor = new FormParaDesigner();
} }
paraDesignEditor.initWidgetToolbarPane(); paraDesignEditor.initWidgetToolbarPane();

Loading…
Cancel
Save