Browse Source

Merge branch 'release/11.0' of ssh://code.fineres.com:7999/~tommy/design into release/11.

bugfix/11.0
kuangshuai 3 years ago
parent
commit
c710ec5188
  1. 23
      designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java
  2. 4
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeEditorPane.java
  3. 19
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java
  4. 2
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetPopupPreviewPane.java

23
designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java

@ -326,16 +326,19 @@ public class ExportJavaScriptPane extends AbstractHyperLinkPane<ExportJavaScript
private UIButton browserButton; private UIButton browserButton;
public ExportTemplateChooser() { public ExportTemplateChooser() {
reportletNamePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
// 路径输入框 // 路径输入框
reportPathTextField = new UITextField(7); reportPathTextField = new UITextField(8);
reportPathTextField.setEnabled(false); reportPathTextField.setEnabled(false);
reportletNamePane.add(reportPathTextField, BorderLayout.WEST);
// 选择路径按钮 // 选择路径按钮
browserButton = new UIButton("..."); browserButton = new UIButton("...");
browserButton.setVisible(true); browserButton.setVisible(true);
reportletNamePane.add(browserButton, BorderLayout.EAST);
Component[][] templateChooserComponent = {{reportPathTextField, browserButton}};
double[] rowSize = {TableLayout.PREFERRED};
double[] columnSize = {TableLayout.FILL, 22};
reportletNamePane = TableLayoutHelper.createCommonTableLayoutPane(templateChooserComponent, rowSize, columnSize, 0);
browserButton.addActionListener(new ActionListener() { browserButton.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
@ -777,11 +780,13 @@ public class ExportJavaScriptPane extends AbstractHyperLinkPane<ExportJavaScript
if (currentTemplatePane.extendParametersCheckBox.isSelected()) { if (currentTemplatePane.extendParametersCheckBox.isSelected()) {
exportJavaScript.setParameters(null); exportJavaScript.setParameters(null);
} else { } else {
List<ParameterProvider> parameterList = parameterViewPane.update(); if (parameterViewPane != null) {
if (!parameterList.isEmpty()) { List<ParameterProvider> parameterList = parameterViewPane.update();
Parameter[] parameters = new Parameter[parameterList.size()]; if (!parameterList.isEmpty()) {
parameterList.toArray(parameters); Parameter[] parameters = new Parameter[parameterList.size()];
js.setParameters(parameters); parameterList.toArray(parameters);
js.setParameters(parameters);
}
} }
} }
exportJavaScript.addJS(js); exportJavaScript.addJS(js);

4
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeEditorPane.java

@ -267,6 +267,10 @@ public abstract class TemplateThemeEditorPane<T extends TemplateTheme> extends J
return nameTextField.checkValid(); return nameTextField.checkValid();
} }
public String getThemeName() {
return nameTextField.getText();
}
public List<Color> getCurrentColorScheme() { public List<Color> getCurrentColorScheme() {
return colorListPane.update(); return colorListPane.update();
} }

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

@ -60,6 +60,8 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends
private UIButton saveButton = new UIButton(); private UIButton saveButton = new UIButton();
private UIButton saveAsButton = new UIButton(); private UIButton saveAsButton = new UIButton();
private TemplateThemeProfileActionListener actionListener = new TemplateThemeProfileActionAdapter();
public TemplateThemeProfilePane(TemplateThemeConfig<T> config) { public TemplateThemeProfilePane(TemplateThemeConfig<T> config) {
super(); super();
this.config = config; this.config = config;
@ -112,6 +114,7 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends
return; return;
} }
saveButton.setEnabled(valid && isMutable); saveButton.setEnabled(valid && isMutable);
actionListener.onThemeNameChecked(themeEditorPane.getThemeName(), valid);
} }
}); });
@ -138,6 +141,7 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends
if (saveAsButton != null) { if (saveAsButton != null) {
saveAsButton.setEnabled(StringUtils.isNotEmpty(name)); saveAsButton.setEnabled(StringUtils.isNotEmpty(name));
} }
isPopulating = false; isPopulating = false;
} }
@ -330,4 +334,19 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends
this.dispose(); this.dispose();
} }
} }
public void addProfileActionListener(TemplateThemeProfileActionListener actionListener) {
if (actionListener != null) {
this.actionListener = actionListener;
}
}
public interface TemplateThemeProfileActionListener {
void onThemeNameChecked(String name, boolean valid);
}
public static class TemplateThemeProfileActionAdapter implements TemplateThemeProfileActionListener {
@Override
public void onThemeNameChecked(String name, boolean valid) { }
}
} }

2
designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetPopupPreviewPane.java

@ -162,7 +162,7 @@ public class OnlineWidgetPopupPreviewPane extends AbstractWidgetPopupPreviewPane
String themeName = widget.getThemeName(); String themeName = widget.getThemeName();
if (StringUtils.isNotEmpty(themeName)) { if (StringUtils.isNotEmpty(themeName)) {
suitableThemeNamePane.setVisible(true); suitableThemeNamePane.setVisible(true);
suitableThemeNameLabel.setText(themeName); suitableThemeNameLabel.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Share_Suitable_Theme_Prefix") + themeName);
} else { } else {
suitableThemeNamePane.setVisible(false); suitableThemeNamePane.setVisible(false);
} }

Loading…
Cancel
Save