Browse Source

Pull request #4060: REPORT-51292 mongodb插件-feature分支下点击确定后保存失效

Merge in DESIGN/design from ~PENGDA/design:feature/10.0 to feature/10.0

* commit '803a58287888453a0ca1d2c62c16876b5162efdb':
  REPORT-51292 mongodb插件-feature分支下点击确定后保存失效
feature/10.0
pengda 4 years ago
parent
commit
2590d1b6c6
  1. 14
      designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java

14
designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java

@ -73,6 +73,7 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
private UIComboBox charSetComboBox;
private String originalCharSet = null;
private JPanel mainPanel;
// Database pane
public DatabaseConnectionPane() {
this.initComponents();
@ -248,7 +249,7 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
@Override
public void populateBean(com.fr.data.impl.Connection ob) {
populateSubDatabaseConnectionBean((E) ob);
if (mainPanel() instanceof JDBCDefPane) {
if (mainPanel instanceof JDBCDefPane) {
return;
}
this.originalCharSet = ob.getOriginalCharsetName();
@ -264,7 +265,7 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
@Override
public com.fr.data.impl.Connection updateBean() {
E ob = updateSubDatabaseConnectionBean();
if (mainPanel() instanceof JDBCDefPane) {
if (mainPanel instanceof JDBCDefPane) {
return ob;
}
ob.setOriginalCharsetName(this.originalCharSet);
@ -306,13 +307,14 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
testPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 3, 4));
// Center
northPane.add(mainPanel(), BorderLayout.CENTER);
mainPanel = mainPanel();
northPane.add(mainPanel, BorderLayout.CENTER);
JPanel advancedPanel = FRGUIPaneFactory.createBorderLayout_L_Pane();
advancedPanel.setBorder(BorderFactory.createTitledBorder(
new ModLineBorder(ModLineBorder.TOP),
Toolkit.i18nText("Fine-Design_Basic_Advanced")
));
if (mainPanel() instanceof JDBCDefPane) {
if (mainPanel instanceof JDBCDefPane) {
ActionLabel actionLabel = new ActionLabel(Toolkit.i18nText("Fine-Design_Basic_ConnectionPool_Attr"));
actionLabel.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
@ -340,7 +342,7 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
}
private JDialog createJDialog() {
return JDBC.getAdvancedAttrPane() != null ? JDBC.getAdvancedAttrPane().showWindow(SwingUtilities.getWindowAncestor(mainPanel())) : null;
return JDBC.getAdvancedAttrPane() != null ? JDBC.getAdvancedAttrPane().showWindow(SwingUtilities.getWindowAncestor(mainPanel)) : null;
}
private void initDialogPane() {
@ -420,7 +422,7 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
private static JNDIDefPane jndiDefPane = new JNDIDefPane();
@Override
protected JPanel mainPanel() {
protected JPanel mainPanel() {
return jndiDefPane;
}

Loading…
Cancel
Save