Browse Source

Merge remote-tracking branch 'origin/release/10.0' into release/10.0

feature/big-screen
Yvan 4 years ago
parent
commit
b0c36cb10e
  1. 17
      designer-base/src/main/java/com/fr/design/DesignerEnvManager.java
  2. 19
      designer-base/src/main/java/com/fr/design/parameter/ParameterArrayPane.java
  3. 18
      designer-base/src/main/java/com/fr/env/RemoteEnvPane.java
  4. 3
      designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableResultDataSeriesPane.java
  5. 1
      designer-chart/src/main/java/com/fr/van/chart/box/data/table/UIComboBoxWithEditLabel.java
  6. 2
      designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnConditionPane.java
  7. 17
      designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnLabelConditionPane.java
  8. 25
      designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelNoCheckPane.java
  9. 2
      designer-chart/src/main/resources/com/fr/design/editor/script/editor.js
  10. 2
      designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java

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

@ -418,21 +418,10 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
this.isHttps = isHttps;
}
public String getCertificatePath() {
return certificatePath;
}
public void setCertificatePath(String certificatePath) {
this.certificatePath = certificatePath;
}
public String getCertificatePass() {
return certificatePass;
}
public void setCertificatePass(String certificatePass) {
this.certificatePass = certificatePass;
}
@ -2015,11 +2004,13 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
private void writeHttpsParas(XMLPrintWriter writer) {
writer.startTAG(CAS_PARAS);
// 这边的密钥path和password没有用处了 当前已经全部储存在对应的WorkspaceConnectionInfo中
// 把历史遗留保存的全部置为空 防止显示明文密钥 后面删除 todo
if (StringUtils.isNotBlank(certificatePath)) {
writer.attr(CAS_CERTIFICATE_PATH, certificatePath);
writer.attr(CAS_CERTIFICATE_PATH, StringUtils.EMPTY);
}
if (StringUtils.isNotBlank(certificatePass)) {
writer.attr(CAS_CERTIFICATE_PASSWORD, certificatePass);
writer.attr(CAS_CERTIFICATE_PASSWORD, StringUtils.EMPTY);
}
if (isHttps) {
writer.attr("enable", true);

19
designer-base/src/main/java/com/fr/design/parameter/ParameterArrayPane.java

@ -7,7 +7,7 @@ import com.fr.design.gui.controlpane.JListControlPane;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.controlpane.NameableSelfCreator;
import com.fr.design.gui.controlpane.UnrepeatedNameHelper;
import com.fr.design.gui.ilist.ModNameActionListener;
import com.fr.design.i18n.Toolkit;
import com.fr.general.ComparatorUtils;
import com.fr.stable.Nameable;
import com.fr.stable.StringUtils;
@ -23,17 +23,12 @@ public class ParameterArrayPane extends JListControlPane {
*/
public ParameterArrayPane() {
super();
this.addModNameActionListener(new ModNameActionListener() {
public void nameModed(int index, String oldName, String newName) {
populateSelectedValue();
}
});
this.addModNameActionListener((index, oldName, newName) -> populateSelectedValue());
this.addEditingListener(new PropertyChangeAdapter() {
public void propertyChange() {
Parameter[] parameters = ParameterConfig.getInstance().getGlobalParameters();
String[] allListNames = nameableList.getAllNames();
allListNames[nameableList.getSelectedIndex()] = StringUtils.EMPTY;
allListNames[editingIndex] = StringUtils.EMPTY;
String tempName = getEditingName();
if (StringUtils.isEmpty(tempName)) {
nameableList.stopEditing();
@ -45,7 +40,7 @@ public class ParameterArrayPane extends JListControlPane {
&& isNameRepeated(new List[]{Arrays.asList(parameters), Arrays.asList(allListNames)}, tempName)) {
nameableList.stopEditing();
FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(ParameterArrayPane.this),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Duplicate_Parameter_Name"));
Toolkit.i18nText("Fine-Design_Basic_Duplicate_Parameter_Name"));
setIllegalIndex(editingIndex);
}
}
@ -55,7 +50,7 @@ public class ParameterArrayPane extends JListControlPane {
@Override
protected String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Engine_Schedule_Template_Parameter");
return Toolkit.i18nText("Fine-Design_Basic_Engine_Schedule_Template_Parameter");
}
/**
@ -65,7 +60,7 @@ public class ParameterArrayPane extends JListControlPane {
*/
public NameableCreator[] createNameableCreators() {
return new NameableCreator[]{
new NameableSelfCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Engine_Parameter_Name"), Parameter.class, ParameterPane.class) {
new NameableSelfCreator(Toolkit.i18nText("Fine-Design_Basic_Engine_Parameter_Name"), Parameter.class, ParameterPane.class) {
public Parameter createNameable(UnrepeatedNameHelper helper) {
// 返回参数设置面板.
return new Parameter(helper.createUnrepeatedName("p"));
@ -89,7 +84,7 @@ public class ParameterArrayPane extends JListControlPane {
// Nameable[]居然不能强转成Parameter[],一定要这么写...
Nameable[] res = this.update();
Parameter[] res_array = new Parameter[res.length];
java.util.Arrays.asList(res).toArray(res_array);
Arrays.asList(res).toArray(res_array);
return res_array;
}

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

@ -143,6 +143,12 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
* https 证书路径输入框
*/
private JPanel httpsCertFileInputPanel;
/**
* 当前远程工作目录是否为新创建的
*/
private boolean newCreated;
/**
* 主机名web应用Servlet端口监听器
*/
@ -327,12 +333,15 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
this.certPathInput.setText(certPath);
this.certSecretKeyInput.setText(certSecretKey);
this.rememberPwdCheckbox.setSelected(rememberPwd);
this.newCreated = ob.isNewCreated();
} else {
this.remoteWorkspaceURL = RemoteWorkspaceURL.createDefaultURL();
this.usernameInput.setText(StringUtils.EMPTY);
this.passwordInput.setText(StringUtils.EMPTY);
this.certPathInput.setText(StringUtils.EMPTY);
this.certSecretKeyInput.setText(StringUtils.EMPTY);
this.rememberPwdCheckbox.setSelected(true);
this.newCreated = true;
}
fillRemoteEnvURLField();
@ -364,7 +373,9 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
new String(this.certSecretKeyInput.getPassword()),
rememberPwd);
return RemoteDesignerWorkspaceInfo.create(connection);
RemoteDesignerWorkspaceInfo info = RemoteDesignerWorkspaceInfo.create(connection);
info.setNewCreated(newCreated);
return info;
}
@Override
@ -565,9 +576,6 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
@Override
protected TestConnectionResult doInBackground() throws Exception {
DesignerEnvManager.getEnvManager().setCertificatePath(connection.getCertPath());
DesignerEnvManager.getEnvManager().setCertificatePass(connection.getCertSecretKey());
try {
return TestConnectionResult.parse(WorkContext.getConnector().testConnection(connection), connection);
} catch (WorkspaceAuthException ignored) {

3
designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableResultDataSeriesPane.java

@ -15,10 +15,10 @@ import com.fr.stable.StringUtils;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.util.List;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.util.List;
public class BoxPlotTableResultDataSeriesPane extends AbstractTableDataContentPane {
@ -66,6 +66,7 @@ public class BoxPlotTableResultDataSeriesPane extends AbstractTableDataContentPa
private JPanel createUIComboBoxPane(UIComboBox comboBox, String title) {
UILabel label = new UILabel(title);
label.setPreferredSize(new Dimension(80, 20));
comboBox.setPreferredSize(new Dimension(100, 20));
JPanel panel = new JPanel();

1
designer-chart/src/main/java/com/fr/van/chart/box/data/table/UIComboBoxWithEditLabel.java

@ -31,6 +31,7 @@ public abstract class UIComboBoxWithEditLabel extends JPanel implements UIObserv
editLabel.setPreferredSize(new Dimension(80, 20));
comboBox = new UIComboBox();
comboBox.setPreferredSize(new Dimension(100, 20));
this.setLayout(new BorderLayout(4, 0));
this.add(editLabel, BorderLayout.WEST);

2
designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnConditionPane.java

@ -49,7 +49,7 @@ public class VanChartColumnConditionPane extends DataSeriesConditionPane{
classPaneMap.put(AttrBackground.class, new VanChartColumnSeriesColorConditionPane(this));
classPaneMap.put(AttrAlpha.class, new LabelAlphaPane(this));
classPaneMap.put(AttrBorder.class, new VanChartColumnLabelBorderPane(this));
classPaneMap.put(AttrLabel.class, new VanChartLabelConditionPane(this, plot));
classPaneMap.put(AttrLabel.class, new VanChartColumnLabelConditionPane(this, plot));
classPaneMap.put(AttrFloatColor.class, new VanChartFloatColorConditionPane(this));
classPaneMap.put(VanChartAttrTrendLine.class, new VanChartTrendLineConditionPane(this));
classPaneMap.put(AttrSeriesImageBackground.class, new VanChartSeriesImageBackgroundConditionPane(this));

17
designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnLabelConditionPane.java

@ -0,0 +1,17 @@
package com.fr.van.chart.column;
import com.fr.chart.chartattr.Plot;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.van.chart.designer.other.condition.item.VanChartLabelConditionPane;
import com.fr.van.chart.designer.style.label.VanChartPlotLabelPane;
public class VanChartColumnLabelConditionPane extends VanChartLabelConditionPane {
public VanChartColumnLabelConditionPane(ConditionAttributesPane conditionAttributesPane, Plot plot) {
super(conditionAttributesPane, plot);
}
protected VanChartPlotLabelPane createLabelPane() {
return new VanChartColumnPlotLabelNoCheckPane(getPlot(),null);
}
}

25
designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelNoCheckPane.java

@ -0,0 +1,25 @@
package com.fr.van.chart.column;
import com.fr.chart.chartattr.Plot;
import com.fr.plugin.chart.base.AttrLabel;
import com.fr.van.chart.designer.style.VanChartStylePane;
import java.awt.BorderLayout;
public class VanChartColumnPlotLabelNoCheckPane extends VanChartColumnPlotLabelPane {
public VanChartColumnPlotLabelNoCheckPane(Plot plot, VanChartStylePane parent) {
super(plot, parent);
}
protected void addComponents() {
this.setLayout(new BorderLayout());
this.add(getLabelPane(), BorderLayout.CENTER);
}
public void populate(AttrLabel attr) {
super.populate(attr);
getLabelShowCheckBox().setSelected(true);
getLabelPane().setVisible(true);
}
}

2
designer-chart/src/main/resources/com/fr/design/editor/script/editor.js

@ -157,7 +157,7 @@
return {
isAuto: this.model.isAuto,
content: value
content: BI.NicEditor.htmlDecode(value)
};
},

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

@ -384,7 +384,7 @@ public class EditingMouseListener extends MouseInputAdapter {
if (component.getCoverPane().getComponentCount() > 1) {
JComponent button1 = (JComponent) component.getCoverPane().getComponent(1);
int minX1 = button1.getX() + getParentPositionX(component, 0) - designer.getHorizontalScaleValue();
int minY1 = button1.getY() + getParentPositionY(component, 0) - designer.getVerticalScaleValue();
int minY1 = button1.getY() + getParentPositionY(component, 0) - designer.getVerticalScaleValue() + component.getY();
if (e.getX() + GAP - component.getInsets().left > minX1 && e.getX() - GAP - component.getInsets().left < minX1 + button1.getWidth()) {
if (e.getY() + GAP - component.getInsets().top > minY1 && e.getY() - GAP - component.getInsets().top < minY1 + button1.getHeight()) {
designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));

Loading…
Cancel
Save