Browse Source

Merge pull request #4021 in DESIGN/design from feature/10.0 to feature/x

* commit 'd79936cb6a626ef21bcc4808d6d3e23d0cac53e2':
  FineJOptionPane
  conflict
  REPORT-51153 数据连接界面优化-url全部删除后,各配置项不会自动清空
  REPORT-51126 数据连接界面优化-端口的联动有点问题
research/11.0
superman 4 years ago
parent
commit
0a2a778945
  1. 6
      designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java
  2. 11
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java
  3. 14
      designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java
  4. 3
      designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java
  5. 3
      designer-realize/src/main/java/com/fr/design/mainframe/app/CptxApp.java
  6. 3
      designer-realize/src/main/java/com/fr/design/mainframe/app/FormApp.java

6
designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java

@ -463,7 +463,12 @@ public class JDBCDefPane extends JPanel {
dbNameTextField.setText(StringUtils.EMPTY); dbNameTextField.setText(StringUtils.EMPTY);
} }
enableSubDocListener(); enableSubDocListener();
return;
} }
hostTextField.setText(StringUtils.EMPTY);
portTextField.setText(StringUtils.EMPTY);
dbNameTextField.setText(StringUtils.EMPTY);
enableSubDocListener();
} }
private void enableSubDocListener() { private void enableSubDocListener() {
@ -486,6 +491,7 @@ public class JDBCDefPane extends JPanel {
portTextField.setText(port.replaceAll(e.getKeyChar() + "", "")); portTextField.setText(port.replaceAll(e.getKeyChar() + "", ""));
if (!isPortValid(portTextField.getText())) { if (!isPortValid(portTextField.getText())) {
portTextField.setText(""); portTextField.setText("");
updateURL();
} }
} }
} }

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

@ -4,6 +4,7 @@
package com.fr.design.mainframe; package com.fr.design.mainframe;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.chart.exception.ChartNotFoundException;
import com.fr.design.DesignModelAdapter; import com.fr.design.DesignModelAdapter;
import com.fr.design.DesignState; import com.fr.design.DesignState;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
@ -1074,6 +1075,16 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
JOptionPane.WARNING_MESSAGE, JOptionPane.WARNING_MESSAGE,
UIManager.getIcon("OptionPane.errorIcon") UIManager.getIcon("OptionPane.errorIcon")
); );
if (this.getSelectedJTemplate() == null) {
addAndActivateJTemplate();
}
} catch (ChartNotFoundException e) {
FineJOptionPane.showMessageDialog(this,
Toolkit.i18nText("Fine-Design_Chart_Not_Found_Exception"),
Toolkit.i18nText("Fine-Design_Basic_Error"),
JOptionPane.ERROR_MESSAGE,
UIManager.getIcon("OptionPane.errorIcon"));
if (this.getSelectedJTemplate() == null) { if (this.getSelectedJTemplate() == null) {
addAndActivateJTemplate(); addAndActivateJTemplate();
} }

14
designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java

@ -7,6 +7,7 @@ package com.fr.design.mainframe;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.chart.BaseChartCollection; import com.fr.base.chart.BaseChartCollection;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.charttypes.ChartTypeManager;
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.designer.TargetComponent; import com.fr.design.designer.TargetComponent;
@ -14,9 +15,12 @@ import com.fr.design.gui.chart.BaseChartPropertyPane;
import com.fr.design.gui.chart.ChartEditPaneProvider; import com.fr.design.gui.chart.ChartEditPaneProvider;
import com.fr.design.gui.frpane.UITitlePanel; import com.fr.design.gui.frpane.UITitlePanel;
import com.fr.design.mainframe.chart.ChartEditPane; import com.fr.design.mainframe.chart.ChartEditPane;
import com.fr.design.utils.gui.GUICoreUtils;
import javax.swing.*; import javax.swing.BorderFactory;
import java.awt.*; import javax.swing.Icon;
import java.awt.BorderLayout;
import java.awt.Component;
public class ChartPropertyPane extends BaseChartPropertyPane { public class ChartPropertyPane extends BaseChartPropertyPane {
@ -91,10 +95,16 @@ public class ChartPropertyPane extends BaseChartPropertyPane {
* @param ePane 面板 * @param ePane 面板
*/ */
public void populateChartPropertyPane(ChartCollection collection, TargetComponent<?> ePane) { public void populateChartPropertyPane(ChartCollection collection, TargetComponent<?> ePane) {
String chartID = collection.getSelectedChartProvider(ChartProvider.class).getID();
updateChartEditPane(collection.getSelectedChartProvider(ChartProvider.class).getID()); updateChartEditPane(collection.getSelectedChartProvider(ChartProvider.class).getID());
setSupportCellData(true); setSupportCellData(true);
this.container.setEPane(ePane); this.container.setEPane(ePane);
if (ChartTypeManager.getInstance().chartExit(chartID)) {
chartEditPane.populate(collection); chartEditPane.populate(collection);
} else {
GUICoreUtils.setEnabled(chartEditPane, false);
}
} }
/** /**

3
designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java

@ -5,6 +5,7 @@ import com.fr.base.Style;
import com.fr.base.TempNameStyle; import com.fr.base.TempNameStyle;
import com.fr.base.extension.FileExtension; import com.fr.base.extension.FileExtension;
import com.fr.base.io.XMLEncryptUtils; import com.fr.base.io.XMLEncryptUtils;
import com.fr.chart.exception.ChartNotFoundException;
import com.fr.config.ServerPreferenceConfig; import com.fr.config.ServerPreferenceConfig;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.actions.server.StyleListAction; import com.fr.design.actions.server.StyleListAction;
@ -63,7 +64,7 @@ class CptApp extends AbstractWorkBookApp {
namestyle.clear(); namestyle.clear();
try { try {
tpl.readStream(file.asInputStream()); tpl.readStream(file.asInputStream());
} catch (DecryptTemplateException e) { } catch (DecryptTemplateException | ChartNotFoundException e) {
throw e; throw e;
} catch (RemoteDesignPermissionDeniedException exp) { } catch (RemoteDesignPermissionDeniedException exp) {
FineLoggerFactory.getLogger().error(Toolkit.i18nText("Fine-Design_Basic_Template_Permission_Denied") + file, exp); FineLoggerFactory.getLogger().error(Toolkit.i18nText("Fine-Design_Basic_Template_Permission_Denied") + file, exp);

3
designer-realize/src/main/java/com/fr/design/mainframe/app/CptxApp.java

@ -3,6 +3,7 @@ package com.fr.design.mainframe.app;
import com.fr.base.extension.FileExtension; import com.fr.base.extension.FileExtension;
import com.fr.base.frpx.exception.FRPackageRunTimeException; import com.fr.base.frpx.exception.FRPackageRunTimeException;
import com.fr.base.frpx.exception.InvalidWorkBookException; import com.fr.base.frpx.exception.InvalidWorkBookException;
import com.fr.chart.exception.ChartNotFoundException;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.exception.DecryptTemplateException; import com.fr.exception.DecryptTemplateException;
import com.fr.exception.RemoteDesignPermissionDeniedException; import com.fr.exception.RemoteDesignPermissionDeniedException;
@ -37,7 +38,7 @@ class CptxApp extends AbstractWorkBookApp {
long time = System.currentTimeMillis(); long time = System.currentTimeMillis();
tpl = new WorkBookX(inputStream); tpl = new WorkBookX(inputStream);
FineLoggerFactory.getLogger().error("cost: " + (System.currentTimeMillis() - time) + " ms"); FineLoggerFactory.getLogger().error("cost: " + (System.currentTimeMillis() - time) + " ms");
} catch (DecryptTemplateException e) { } catch (DecryptTemplateException | ChartNotFoundException e) {
throw e; throw e;
} catch (RemoteDesignPermissionDeniedException exp) { } catch (RemoteDesignPermissionDeniedException exp) {
FineLoggerFactory.getLogger().error(Toolkit.i18nText("Fine-Design_Basic_Template_Permission_Denied") + file, exp); FineLoggerFactory.getLogger().error(Toolkit.i18nText("Fine-Design_Basic_Template_Permission_Denied") + file, exp);

3
designer-realize/src/main/java/com/fr/design/mainframe/app/FormApp.java

@ -2,6 +2,7 @@ package com.fr.design.mainframe.app;
import com.fr.base.Parameter; import com.fr.base.Parameter;
import com.fr.base.io.XMLEncryptUtils; import com.fr.base.io.XMLEncryptUtils;
import com.fr.chart.exception.ChartNotFoundException;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.AbstractAppProvider; import com.fr.design.mainframe.AbstractAppProvider;
@ -86,7 +87,7 @@ class FormApp extends AbstractAppProvider {
FineLoggerFactory.getLogger().info(Toolkit.i18nText("Fine-Design_Report_Template_Opening_And_Waiting", file.getName()) + "..."); FineLoggerFactory.getLogger().info(Toolkit.i18nText("Fine-Design_Report_Template_Opening_And_Waiting", file.getName()) + "...");
try { try {
tpl.readStream(file.asInputStream()); tpl.readStream(file.asInputStream());
} catch (DecryptTemplateException e) { } catch (DecryptTemplateException | ChartNotFoundException e) {
throw e; throw e;
} catch (RemoteDesignPermissionDeniedException exp) { } catch (RemoteDesignPermissionDeniedException exp) {
FineLoggerFactory.getLogger().error(Toolkit.i18nText("Fine-Design_Basic_Template_Permission_Denied") + file, exp); FineLoggerFactory.getLogger().error(Toolkit.i18nText("Fine-Design_Basic_Template_Permission_Denied") + file, exp);

Loading…
Cancel
Save