Browse Source

Merge pull request #4088 in DESIGN/design from feature/10.0 to research/10.0

* commit '2103940ee944d0f0e3ec4b7501b9e5815a2d9ef7':
  REPORT-51292 mongodb插件-feature分支下点击确定后保存失效
research/10.0
superman 4 years ago
parent
commit
eb1fdbeffa
  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