Revision 43020 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/exportto/swing/prov/jdbc/panel/JDBCConnectionPanel.java
JDBCConnectionPanel.java | ||
---|---|---|
24 | 24 |
package org.gvsig.exportto.swing.prov.jdbc.panel; |
25 | 25 |
|
26 | 26 |
import javax.swing.JComponent; |
27 |
import javax.swing.JPanel; |
|
28 | 27 |
import org.gvsig.exportto.swing.prov.jdbc.ExporttoJDBCOptions; |
29 | 28 |
|
30 | 29 |
import org.slf4j.Logger; |
... | ... | |
35 | 34 |
import org.gvsig.fmap.dal.exception.ValidateDataParametersException; |
36 | 35 |
import org.gvsig.fmap.dal.serverexplorer.db.DBServerExplorerParameters; |
37 | 36 |
import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters; |
37 |
import org.gvsig.fmap.dal.swing.DALSwingLocator; |
|
38 |
import org.gvsig.fmap.dal.swing.DataSwingManager; |
|
38 | 39 |
import org.gvsig.tools.ToolsLocator; |
39 | 40 |
import org.gvsig.tools.i18n.I18nManager; |
40 | 41 |
|
... | ... | |
48 | 49 |
private static final long serialVersionUID = -3278172717881233447L; |
49 | 50 |
|
50 | 51 |
private static final Logger LOG = LoggerFactory.getLogger(JDBCConnectionPanel.class); |
51 |
private org.gvsig.fmap.mapcontrol.dal.jdbc.JDBCConnectionPanel connectionPanel = null;
|
|
52 |
private org.gvsig.fmap.dal.swing.jdbc.JDBCConnectionPanel connectionPanel;
|
|
52 | 53 |
private final ExporttoJDBCOptions provider; |
53 | 54 |
|
54 |
|
|
55 | 55 |
public JDBCConnectionPanel(ExporttoJDBCOptions provider) { |
56 | 56 |
this.provider = provider; |
57 | 57 |
initComponents(); |
58 | 58 |
} |
59 | 59 |
|
60 | 60 |
private void initComponents() { |
61 |
this.connectionPanel = new org.gvsig.fmap.mapcontrol.dal.jdbc.JDBCConnectionPanel(); |
|
61 |
DataSwingManager manager = DALSwingLocator.getSwingManager(); |
|
62 |
this.connectionPanel = manager.createJDBCConnectionPanel(); |
|
62 | 63 |
} |
63 | 64 |
|
65 |
@Override |
|
64 | 66 |
public void enterPanel() { |
65 | 67 |
// Default do nothing |
66 | 68 |
} |
... | ... | |
69 | 71 |
return this.connectionPanel.getServerExplorerParameters(); |
70 | 72 |
} |
71 | 73 |
|
74 |
@Override |
|
72 | 75 |
public String getPanelTitle() { |
73 | 76 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
74 | 77 |
return i18nManager.getTranslation("connection_params"); |
75 | 78 |
} |
76 | 79 |
|
80 |
@Override |
|
77 | 81 |
public boolean isValidPanel() throws ExporttoPanelValidationException { |
78 | 82 |
DBServerExplorerParameters connection = this.connectionPanel.getServerExplorerParameters(); |
79 | 83 |
try { |
... | ... | |
86 | 90 |
} |
87 | 91 |
} |
88 | 92 |
|
93 |
@Override |
|
89 | 94 |
public JComponent asJComponent() { |
90 |
return this.connectionPanel; |
|
95 |
return this.connectionPanel.asJComponent();
|
|
91 | 96 |
} |
92 | 97 |
|
93 | 98 |
} |
Also available in: Unified diff