Index: trunk/mwdumper/src/org/mediawiki/dumper/gui/DumperGui.java |
— | — | @@ -6,6 +6,7 @@ |
7 | 7 | import java.io.InputStream; |
8 | 8 | import java.sql.Connection; |
9 | 9 | import java.sql.DriverManager; |
| 10 | +import java.sql.Statement; |
10 | 11 | |
11 | 12 | import org.mediawiki.dumper.Tools; |
12 | 13 | import org.mediawiki.importer.DumpWriter; |
— | — | @@ -15,15 +16,31 @@ |
16 | 17 | |
17 | 18 | public class DumperGui { |
18 | 19 | private DumperWindow gui; |
19 | | - private boolean running = false; |
| 20 | + |
| 21 | + // status |
| 22 | + public boolean running = false; |
| 23 | + public boolean connected = false; |
| 24 | + public boolean schemaReady = false; |
| 25 | + |
| 26 | + // other goodies |
| 27 | + String host = "localhost"; |
| 28 | + String port = "3306"; |
| 29 | + String username = "root"; |
| 30 | + String password = ""; |
| 31 | + |
| 32 | + String schema = "1.5"; |
| 33 | + String dbname = "wikidb"; |
| 34 | + String prefix = ""; |
| 35 | + |
20 | 36 | XmlDumpReader reader; |
21 | 37 | Connection conn; |
22 | 38 | |
23 | | - public boolean isConnected() { |
24 | | - return (conn != null); |
25 | | - } |
26 | | - |
27 | 39 | void connect(String host, String port, String username, String password) { |
| 40 | + assert !connected; |
| 41 | + assert conn == null; |
| 42 | + assert !running; |
| 43 | + assert !schemaReady; |
| 44 | + |
28 | 45 | try { |
29 | 46 | Class.forName("com.mysql.jdbc.Driver").newInstance(); |
30 | 47 | } catch (ClassNotFoundException ex) { |
— | — | @@ -33,6 +50,7 @@ |
34 | 51 | } catch (IllegalAccessException ex) { |
35 | 52 | ex.printStackTrace(); |
36 | 53 | } |
| 54 | + gui.setDatabaseStatus("Connecting..."); |
37 | 55 | try { |
38 | 56 | // fixme is there escaping? is this a url? fucking java bullshit |
39 | 57 | String url = |
— | — | @@ -43,28 +61,86 @@ |
44 | 62 | "&password=" + password; |
45 | 63 | System.err.println("Connecting to " + url); |
46 | 64 | conn = DriverManager.getConnection(url); |
47 | | - gui.connectionSucceeded(); |
| 65 | + connected = true; |
| 66 | + gui.setDatabaseStatus("Connected."); |
| 67 | + gui.showFields(); |
| 68 | + checkSchema(); |
48 | 69 | } catch (SQLException ex) { |
49 | | - conn = null; |
| 70 | + gui.setDatabaseStatus("Failed to connect."); |
50 | 71 | ex.printStackTrace(); |
51 | | - gui.connectionFailed(); |
52 | 72 | } |
| 73 | + |
| 74 | + assert (connected == (conn != null)); |
53 | 75 | } |
54 | 76 | |
55 | 77 | void disconnect() { |
| 78 | + assert connected; |
| 79 | + assert conn != null; |
| 80 | + assert !running; |
56 | 81 | try { |
57 | 82 | conn.close(); |
58 | 83 | conn = null; |
59 | | - gui.connectionClosed(); |
| 84 | + connected = false; |
| 85 | + gui.setDatabaseStatus("Disconnected."); |
| 86 | + gui.showFields(); |
| 87 | + checkSchema(); |
60 | 88 | } catch (SQLException ex) { |
61 | 89 | ex.printStackTrace(); |
62 | 90 | } |
| 91 | + assert !connected; |
| 92 | + assert conn == null; |
63 | 93 | } |
| 94 | + |
| 95 | + void setDbname(String dbname) { |
| 96 | + this.dbname = dbname; |
| 97 | + checkSchema(); |
| 98 | + } |
| 99 | + |
| 100 | + void checkSchema() { |
| 101 | + schemaReady = false; |
| 102 | + if (connected) { |
| 103 | + gui.setSchemaStatus("Checking..."); |
| 104 | + try { |
| 105 | + conn.setCatalog(dbname); |
| 106 | + String[] tables = testTables(); |
| 107 | + for (int i = 0; i < tables.length; i++) { |
| 108 | + Statement sql = conn.createStatement(); |
| 109 | + sql.execute("SELECT 1 FROM " + tables[i] + " LIMIT 0"); |
| 110 | + } |
| 111 | + schemaReady = true; |
| 112 | + gui.setSchemaStatus("Ready"); |
| 113 | + } catch (SQLException e) { |
| 114 | + gui.setSchemaStatus("Error: " + e.getMessage()); |
| 115 | + } |
| 116 | + } else { |
| 117 | + gui.setSchemaStatus("Not connected."); |
| 118 | + } |
| 119 | + gui.showFields(); |
| 120 | + assert !(schemaReady && !connected) : "Schema can't be ready if disconnected."; |
| 121 | + } |
| 122 | + |
| 123 | + String[] testTables() { |
| 124 | + if (schema.equals("1.4")) |
| 125 | + return new String[] { |
| 126 | + prefix + "cur", |
| 127 | + prefix + "old"}; |
| 128 | + else |
| 129 | + return new String[] { |
| 130 | + prefix + "page", |
| 131 | + prefix + "revision", |
| 132 | + prefix + "text"}; |
| 133 | + } |
64 | 134 | |
65 | | - void startImport(String inputFile) throws IOException { |
| 135 | + void startImport(String inputFile) throws IOException, SQLException { |
| 136 | + assert connected; |
| 137 | + assert conn != null; |
| 138 | + assert schemaReady; |
| 139 | + assert !running; |
| 140 | + |
66 | 141 | // TODO work right ;) |
67 | 142 | final InputStream stream = Tools.openInputFile(inputFile); |
68 | 143 | //DumpWriter writer = new MultiWriter(); |
| 144 | + conn.setCatalog(dbname); |
69 | 145 | SqlServerStream sqlStream = new SqlServerStream(conn); |
70 | 146 | DumpWriter writer = new SqlWriter15(sqlStream); |
71 | 147 | DumpWriter progress = gui.getProgressWriter(writer, 1000); |
— | — | @@ -72,7 +148,7 @@ |
73 | 149 | new Thread() { |
74 | 150 | public void run() { |
75 | 151 | running = true; |
76 | | - gui.start(); |
| 152 | + gui.showFields(); |
77 | 153 | gui.setProgress("Starting import..."); |
78 | 154 | try { |
79 | 155 | reader.readDump(); |
— | — | @@ -82,7 +158,7 @@ |
83 | 159 | } |
84 | 160 | running = false; |
85 | 161 | reader = null; |
86 | | - gui.stop(); |
| 162 | + gui.showFields(); |
87 | 163 | } |
88 | 164 | }.start(); |
89 | 165 | } |
Index: trunk/mwdumper/src/org/mediawiki/dumper/gui/DumperWindow.java |
— | — | @@ -13,8 +13,11 @@ |
14 | 14 | import java.awt.FileDialog; |
15 | 15 | import java.io.File; |
16 | 16 | import java.io.IOException; |
| 17 | +import java.sql.SQLException; |
17 | 18 | import javax.swing.JFileChooser; |
18 | 19 | import javax.swing.SwingUtilities; |
| 20 | +import javax.swing.event.DocumentEvent; |
| 21 | +import javax.swing.event.DocumentListener; |
19 | 22 | import org.mediawiki.importer.DumpWriter; |
20 | 23 | |
21 | 24 | /** |
— | — | @@ -24,91 +27,79 @@ |
25 | 28 | public class DumperWindow extends DumperWindowForm { |
26 | 29 | protected DumperGui backend; |
27 | 30 | |
28 | | - private static final int STOPPED = 0; |
29 | | - private static final int RUNNING = 1; |
30 | | - private int mode = STOPPED; |
31 | | - |
32 | 31 | /** Creates a new instance of DumperWindow */ |
33 | | - public DumperWindow(DumperGui backend) { |
34 | | - this.backend = backend; |
| 32 | + public DumperWindow(DumperGui aBackend) { |
| 33 | + super(); |
| 34 | + backend = aBackend; |
| 35 | + dbnameText.getDocument().addDocumentListener(new DocumentListener() { |
| 36 | + public void changedUpdate(DocumentEvent e) { |
| 37 | + backend.setDbname(dbnameText.getText()); |
| 38 | + } |
| 39 | + public void insertUpdate(DocumentEvent e) { |
| 40 | + backend.setDbname(dbnameText.getText()); |
| 41 | + } |
| 42 | + public void removeUpdate(DocumentEvent e) { |
| 43 | + backend.setDbname(dbnameText.getText()); |
| 44 | + } |
| 45 | + }); |
35 | 46 | } |
36 | 47 | |
37 | 48 | public DumpWriter getProgressWriter(DumpWriter sink, int interval) { |
38 | 49 | return new GraphicalProgressFilter(sink, interval, progressLabel); |
39 | 50 | } |
40 | 51 | |
41 | | - public void start() { |
42 | | - // disable the other fields... |
43 | | - setFieldsEnabled(false); |
44 | | - startButton.setText("Cancel"); |
45 | | - mode = RUNNING; |
| 52 | + /** |
| 53 | + * Update all the fields' enabled flags and button names. |
| 54 | + */ |
| 55 | + public void showFields() { |
| 56 | + showBrowseFields(); |
| 57 | + showDatabaseFields(); |
| 58 | + showSchemaFields(); |
| 59 | + showImportFields(); |
46 | 60 | } |
47 | 61 | |
48 | | - public void stop() { |
49 | | - startButton.setText("Start import"); |
50 | | - setFieldsEnabled(true); |
51 | | - mode = STOPPED; |
| 62 | + void showBrowseFields() { |
| 63 | + enableFields(new Component[] { fileText, browseButton }, |
| 64 | + !backend.running); |
52 | 65 | } |
53 | 66 | |
54 | | - void setFieldsEnabled(boolean val) { |
55 | | - final boolean _val = val; |
56 | | - SwingUtilities.invokeLater(new Runnable() { |
57 | | - public void run() { |
58 | | - Component[] widgets = new Component[] { |
59 | | - fileText, |
60 | | - browseButton, |
61 | | - |
62 | | - serverText, |
63 | | - portText, |
64 | | - userText, |
65 | | - passwordText, |
66 | | - connectButton, |
67 | | - |
68 | | - schema14Radio, |
69 | | - schema15Radio, |
70 | | - prefixText }; |
71 | | - for (int i = 0; i < widgets.length; i++) { |
72 | | - widgets[i].setEnabled(_val); |
73 | | - } |
74 | | - } |
75 | | - }); |
| 67 | + void showDatabaseFields() { |
| 68 | + enableFields(new Component[] { |
| 69 | + serverLabel, |
| 70 | + serverText, |
| 71 | + portLabel, |
| 72 | + portText, |
| 73 | + userLabel, |
| 74 | + userText, |
| 75 | + passwordLabel, |
| 76 | + passwordText}, |
| 77 | + !backend.running && !backend.connected); |
| 78 | + connectButton.setEnabled(!backend.running); |
| 79 | + connectButton.setText(backend.connected ? "Disconnect" : "Connect"); |
76 | 80 | } |
77 | 81 | |
78 | | - void setDatabaseFieldsEnabled(boolean val) { |
79 | | - final boolean _val = val; |
80 | | - SwingUtilities.invokeLater(new Runnable() { |
81 | | - public void run() { |
82 | | - Component[] widgets = new Component[] { |
83 | | - serverText, |
84 | | - portText, |
85 | | - userText, |
86 | | - passwordText}; |
87 | | - for (int i = 0; i < widgets.length; i++) { |
88 | | - widgets[i].setEnabled(_val); |
89 | | - } |
90 | | - startButton.setEnabled(!_val); |
91 | | - } |
92 | | - }); |
| 82 | + void showSchemaFields() { |
| 83 | + enableFields(new Component[] { |
| 84 | + schema14Radio, |
| 85 | + schema15Radio, |
| 86 | + prefixLabel, |
| 87 | + prefixText, |
| 88 | + dbnameLabel, |
| 89 | + dbnameText}, |
| 90 | + !backend.running && backend.connected); |
93 | 91 | } |
94 | 92 | |
95 | | - void connectionSucceeded() { |
96 | | - setProgress("Connected to server!"); |
97 | | - setDatabaseFieldsEnabled(false); |
98 | | - connectButton.setText("Disconnect"); |
| 93 | + void showImportFields() { |
| 94 | + startButton.setEnabled(backend.connected && backend.schemaReady); |
| 95 | + startButton.setText(backend.running ? "Cancel" : "Start import"); |
99 | 96 | } |
100 | 97 | |
101 | | - void connectionFailed() { |
102 | | - setProgress("Connection failed. :("); |
103 | | - setDatabaseFieldsEnabled(true); |
104 | | - connectButton.setText("Connect"); |
| 98 | + void enableFields(Component[] widgets, boolean val) { |
| 99 | + for (int i = 0; i < widgets.length; i++) { |
| 100 | + widgets[i].setEnabled(val); |
| 101 | + } |
105 | 102 | } |
106 | 103 | |
107 | | - void connectionClosed() { |
108 | | - setProgress("Connection closed."); |
109 | | - setDatabaseFieldsEnabled(true); |
110 | | - connectButton.setText("Connect"); |
111 | | - } |
112 | | - |
113 | 104 | /** |
114 | 105 | * Set the progress bar text asynchronously, eg from a background thread |
115 | 106 | */ |
— | — | @@ -121,6 +112,14 @@ |
122 | 113 | }); |
123 | 114 | } |
124 | 115 | |
| 116 | + public void setDatabaseStatus(String text) { |
| 117 | + dbStatusLabel.setText(text); |
| 118 | + } |
| 119 | + |
| 120 | + public void setSchemaStatus(String text) { |
| 121 | + schemaStatusLabel.setText(text); |
| 122 | + } |
| 123 | + |
125 | 124 | /* -- event handlers -- */ |
126 | 125 | |
127 | 126 | protected void onBrowseButtonActionPerformed(java.awt.event.ActionEvent evt) { |
— | — | @@ -134,7 +133,42 @@ |
135 | 134 | } |
136 | 135 | } |
137 | 136 | } |
| 137 | + protected void onConnectButtonActionPerformed(java.awt.event.ActionEvent evt) { |
| 138 | + if (backend.connected) |
| 139 | + backend.disconnect(); |
| 140 | + else |
| 141 | + backend.connect(serverText.getText(), |
| 142 | + portText.getText(), |
| 143 | + userText.getText(), |
| 144 | + passwordText.getText()); |
| 145 | + } |
138 | 146 | |
| 147 | + protected void onStartButtonActionPerformed(java.awt.event.ActionEvent evt) { |
| 148 | + if (backend.running) { |
| 149 | + backend.abort(); |
| 150 | + } else { |
| 151 | + try { |
| 152 | + backend.startImport(fileText.getText()); |
| 153 | + } catch (IOException e1) { |
| 154 | + // TODO Auto-generated catch block |
| 155 | + e1.printStackTrace(); |
| 156 | + } catch (SQLException e1) { |
| 157 | + // TODO Auto-generated catch block |
| 158 | + e1.printStackTrace(); |
| 159 | + } |
| 160 | + } |
| 161 | + } |
| 162 | + |
| 163 | + protected void onQuitItemActionPerformed(java.awt.event.ActionEvent evt) { |
| 164 | + System.exit(0); |
| 165 | + } |
| 166 | + |
| 167 | + protected void onDbnameTextActionPerformed(java.awt.event.ActionEvent evt) { |
| 168 | + backend.setDbname(dbnameText.getText()); |
| 169 | + } |
| 170 | + |
| 171 | + /* ---- more random crap ---- */ |
| 172 | + |
139 | 173 | File chooseFile(String message) { |
140 | 174 | String os = System.getProperty("os.name"); |
141 | 175 | boolean swingSucks = (os.equals("Mac OS X") || os.startsWith("Win")); |
— | — | @@ -172,31 +206,4 @@ |
173 | 207 | return chooser.getSelectedFile(); |
174 | 208 | } |
175 | 209 | |
176 | | - protected void onConnectButtonActionPerformed(java.awt.event.ActionEvent evt) { |
177 | | - if (backend.isConnected()) |
178 | | - backend.disconnect(); |
179 | | - else |
180 | | - backend.connect(serverText.getText(), |
181 | | - portText.getText(), |
182 | | - userText.getText(), |
183 | | - passwordText.getText()); |
184 | | - } |
185 | | - |
186 | | - protected void onStartButtonActionPerformed(java.awt.event.ActionEvent evt) { |
187 | | - if (mode == RUNNING) { |
188 | | - backend.abort(); |
189 | | - } else { |
190 | | - try { |
191 | | - backend.startImport(fileText.getText()); |
192 | | - } catch (IOException e1) { |
193 | | - // TODO Auto-generated catch block |
194 | | - e1.printStackTrace(); |
195 | | - } |
196 | | - } |
197 | | - } |
198 | | - |
199 | | - protected void onQuitItemActionPerformed(java.awt.event.ActionEvent evt) { |
200 | | - System.exit(0); |
201 | | - } |
202 | | - |
203 | 210 | } |
Index: trunk/mwdumper/src/org/mediawiki/dumper/gui/DumperWindowForm.java |
— | — | @@ -38,12 +38,16 @@ |
39 | 39 | passwordLabel = new javax.swing.JLabel(); |
40 | 40 | passwordText = new javax.swing.JPasswordField(); |
41 | 41 | connectButton = new javax.swing.JButton(); |
| 42 | + dbStatusLabel = new javax.swing.JLabel(); |
42 | 43 | schemaPanel = new javax.swing.JPanel(); |
43 | 44 | schemaLabel = new javax.swing.JLabel(); |
44 | 45 | schema14Radio = new javax.swing.JRadioButton(); |
45 | 46 | schema15Radio = new javax.swing.JRadioButton(); |
46 | 47 | prefixLabel = new javax.swing.JLabel(); |
47 | 48 | prefixText = new javax.swing.JTextField(); |
| 49 | + dbnameLabel = new javax.swing.JLabel(); |
| 50 | + dbnameText = new javax.swing.JTextField(); |
| 51 | + schemaStatusLabel = new javax.swing.JLabel(); |
48 | 52 | progressPanel = new javax.swing.JPanel(); |
49 | 53 | progressLabel = new javax.swing.JLabel(); |
50 | 54 | startButton = new javax.swing.JButton(); |
— | — | @@ -67,7 +71,7 @@ |
68 | 72 | filePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
69 | 73 | .add(filePanelLayout.createSequentialGroup() |
70 | 74 | .addContainerGap() |
71 | | - .add(fileText, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 402, Short.MAX_VALUE) |
| 75 | + .add(fileText, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 439, Short.MAX_VALUE) |
72 | 76 | .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
73 | 77 | .add(browseButton) |
74 | 78 | .addContainerGap()) |
— | — | @@ -104,6 +108,8 @@ |
105 | 109 | } |
106 | 110 | }); |
107 | 111 | |
| 112 | + dbStatusLabel.setText("Not connected."); |
| 113 | + |
108 | 114 | org.jdesktop.layout.GroupLayout databasePanelLayout = new org.jdesktop.layout.GroupLayout(databasePanel); |
109 | 115 | databasePanel.setLayout(databasePanelLayout); |
110 | 116 | databasePanelLayout.setHorizontalGroup( |
— | — | @@ -111,18 +117,21 @@ |
112 | 118 | .add(databasePanelLayout.createSequentialGroup() |
113 | 119 | .addContainerGap() |
114 | 120 | .add(databasePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
115 | | - .add(serverLabel) |
116 | | - .add(portLabel) |
117 | | - .add(passwordLabel) |
118 | | - .add(userLabel)) |
119 | | - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
120 | | - .add(databasePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false) |
121 | | - .add(passwordText) |
122 | | - .add(userText) |
123 | | - .add(portText) |
124 | | - .add(org.jdesktop.layout.GroupLayout.TRAILING, serverText, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 136, Short.MAX_VALUE) |
125 | | - .add(connectButton)) |
126 | | - .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) |
| 121 | + .add(dbStatusLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE) |
| 122 | + .add(databasePanelLayout.createSequentialGroup() |
| 123 | + .add(databasePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
| 124 | + .add(serverLabel) |
| 125 | + .add(portLabel) |
| 126 | + .add(passwordLabel) |
| 127 | + .add(userLabel)) |
| 128 | + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
| 129 | + .add(databasePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false) |
| 130 | + .add(passwordText) |
| 131 | + .add(userText) |
| 132 | + .add(portText) |
| 133 | + .add(org.jdesktop.layout.GroupLayout.TRAILING, serverText, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 136, Short.MAX_VALUE) |
| 134 | + .add(connectButton)))) |
| 135 | + .addContainerGap()) |
127 | 136 | ); |
128 | 137 | databasePanelLayout.setVerticalGroup( |
129 | 138 | databasePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
— | — | @@ -145,16 +154,20 @@ |
146 | 155 | .add(passwordText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) |
147 | 156 | .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
148 | 157 | .add(connectButton) |
149 | | - .addContainerGap(53, Short.MAX_VALUE)) |
| 158 | + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 17, Short.MAX_VALUE) |
| 159 | + .add(dbStatusLabel) |
| 160 | + .addContainerGap()) |
150 | 161 | ); |
151 | 162 | |
152 | 163 | schemaPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("MediaWiki schema")); |
153 | 164 | schemaLabel.setText("Table layout for version"); |
154 | 165 | |
| 166 | + schemaRadios.add(schema14Radio); |
155 | 167 | schema14Radio.setText("1.4 (cur, old)"); |
156 | 168 | schema14Radio.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); |
157 | 169 | schema14Radio.setMargin(new java.awt.Insets(0, 0, 0, 0)); |
158 | 170 | |
| 171 | + schemaRadios.add(schema15Radio); |
159 | 172 | schema15Radio.setSelected(true); |
160 | 173 | schema15Radio.setText("1.5 (page, revision, text)"); |
161 | 174 | schema15Radio.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); |
— | — | @@ -162,6 +175,17 @@ |
163 | 176 | |
164 | 177 | prefixLabel.setText("Table prefix"); |
165 | 178 | |
| 179 | + dbnameLabel.setText("Database"); |
| 180 | + |
| 181 | + dbnameText.setText("wikidb"); |
| 182 | + dbnameText.addActionListener(new java.awt.event.ActionListener() { |
| 183 | + public void actionPerformed(java.awt.event.ActionEvent evt) { |
| 184 | + dbnameTextActionPerformed(evt); |
| 185 | + } |
| 186 | + }); |
| 187 | + |
| 188 | + schemaStatusLabel.setText("Not connected."); |
| 189 | + |
166 | 190 | org.jdesktop.layout.GroupLayout schemaPanelLayout = new org.jdesktop.layout.GroupLayout(schemaPanel); |
167 | 191 | schemaPanel.setLayout(schemaPanelLayout); |
168 | 192 | schemaPanelLayout.setHorizontalGroup( |
— | — | @@ -170,19 +194,26 @@ |
171 | 195 | .addContainerGap() |
172 | 196 | .add(schemaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
173 | 197 | .add(schemaPanelLayout.createSequentialGroup() |
174 | | - .add(prefixLabel) |
175 | | - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
176 | | - .add(prefixText, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 90, Short.MAX_VALUE) |
177 | | - .addContainerGap(54, Short.MAX_VALUE)) |
| 198 | + .add(schemaStatusLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 260, Short.MAX_VALUE) |
| 199 | + .addContainerGap()) |
178 | 200 | .add(schemaPanelLayout.createSequentialGroup() |
179 | 201 | .add(schema15Radio) |
180 | | - .addContainerGap(54, Short.MAX_VALUE)) |
| 202 | + .addContainerGap(105, Short.MAX_VALUE)) |
181 | 203 | .add(schemaPanelLayout.createSequentialGroup() |
182 | 204 | .add(schema14Radio) |
183 | | - .addContainerGap(127, Short.MAX_VALUE)) |
| 205 | + .addContainerGap(178, Short.MAX_VALUE)) |
184 | 206 | .add(schemaPanelLayout.createSequentialGroup() |
185 | 207 | .add(schemaLabel) |
186 | | - .addContainerGap(80, Short.MAX_VALUE)))) |
| 208 | + .addContainerGap(131, Short.MAX_VALUE)) |
| 209 | + .add(schemaPanelLayout.createSequentialGroup() |
| 210 | + .add(schemaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
| 211 | + .add(prefixLabel) |
| 212 | + .add(dbnameLabel)) |
| 213 | + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
| 214 | + .add(schemaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
| 215 | + .add(dbnameText, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 90, Short.MAX_VALUE) |
| 216 | + .add(prefixText, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 90, Short.MAX_VALUE)) |
| 217 | + .add(105, 105, 105)))) |
187 | 218 | ); |
188 | 219 | schemaPanelLayout.setVerticalGroup( |
189 | 220 | schemaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
— | — | @@ -197,13 +228,18 @@ |
198 | 229 | .add(schemaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) |
199 | 230 | .add(prefixLabel) |
200 | 231 | .add(prefixText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) |
201 | | - .addContainerGap(93, Short.MAX_VALUE)) |
| 232 | + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
| 233 | + .add(schemaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) |
| 234 | + .add(dbnameLabel) |
| 235 | + .add(dbnameText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) |
| 236 | + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 27, Short.MAX_VALUE) |
| 237 | + .add(schemaStatusLabel) |
| 238 | + .addContainerGap()) |
202 | 239 | ); |
203 | 240 | |
204 | 241 | progressLabel.setText("Select a file..."); |
205 | 242 | |
206 | 243 | startButton.setText("Start import"); |
207 | | - startButton.setEnabled(false); |
208 | 244 | startButton.addActionListener(new java.awt.event.ActionListener() { |
209 | 245 | public void actionPerformed(java.awt.event.ActionEvent evt) { |
210 | 246 | startButtonActionPerformed(evt); |
— | — | @@ -217,7 +253,7 @@ |
218 | 254 | .add(progressPanelLayout.createSequentialGroup() |
219 | 255 | .addContainerGap() |
220 | 256 | .add(progressLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 383, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) |
221 | | - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
| 257 | + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 46, Short.MAX_VALUE) |
222 | 258 | .add(startButton) |
223 | 259 | .addContainerGap()) |
224 | 260 | ); |
— | — | @@ -256,7 +292,7 @@ |
257 | 293 | .add(org.jdesktop.layout.GroupLayout.LEADING, filePanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
258 | 294 | .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() |
259 | 295 | .add(databasePanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) |
260 | | - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 14, Short.MAX_VALUE) |
| 296 | + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
261 | 297 | .add(schemaPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) |
262 | 298 | .addContainerGap()) |
263 | 299 | ); |
— | — | @@ -266,16 +302,20 @@ |
267 | 303 | .addContainerGap() |
268 | 304 | .add(filePanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) |
269 | 305 | .add(22, 22, 22) |
270 | | - .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
271 | | - .add(databasePanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) |
272 | | - .add(schemaPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) |
273 | | - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
| 306 | + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false) |
| 307 | + .add(schemaPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
| 308 | + .add(databasePanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) |
| 309 | + .add(6, 6, 6) |
274 | 310 | .add(progressPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
275 | 311 | .addContainerGap()) |
276 | 312 | ); |
277 | 313 | pack(); |
278 | 314 | }// </editor-fold>//GEN-END:initComponents |
279 | 315 | |
| 316 | + private void dbnameTextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_dbnameTextActionPerformed |
| 317 | + onDbnameTextActionPerformed(evt); // i hate you, netbeans gui editor |
| 318 | + }//GEN-LAST:event_dbnameTextActionPerformed |
| 319 | + |
280 | 320 | private void browseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseButtonActionPerformed |
281 | 321 | onBrowseButtonActionPerformed(evt); // i hate you, netbeans gui editor |
282 | 322 | }//GEN-LAST:event_browseButtonActionPerformed |
— | — | @@ -307,6 +347,9 @@ |
308 | 348 | protected javax.swing.JButton browseButton; |
309 | 349 | protected javax.swing.JButton connectButton; |
310 | 350 | protected javax.swing.JPanel databasePanel; |
| 351 | + protected javax.swing.JLabel dbStatusLabel; |
| 352 | + protected javax.swing.JLabel dbnameLabel; |
| 353 | + protected javax.swing.JTextField dbnameText; |
311 | 354 | protected javax.swing.JMenu fileMenu; |
312 | 355 | protected javax.swing.JPanel filePanel; |
313 | 356 | protected javax.swing.JTextField fileText; |
— | — | @@ -325,6 +368,7 @@ |
326 | 369 | protected javax.swing.JLabel schemaLabel; |
327 | 370 | protected javax.swing.JPanel schemaPanel; |
328 | 371 | protected javax.swing.ButtonGroup schemaRadios; |
| 372 | + protected javax.swing.JLabel schemaStatusLabel; |
329 | 373 | protected javax.swing.JLabel serverLabel; |
330 | 374 | protected javax.swing.JTextField serverText; |
331 | 375 | protected javax.swing.JButton startButton; |
— | — | @@ -347,5 +391,9 @@ |
348 | 392 | protected void onQuitItemActionPerformed(java.awt.event.ActionEvent evt) { |
349 | 393 | // TODO add your handling code here: |
350 | 394 | } |
351 | | - |
| 395 | + |
| 396 | + protected void onDbnameTextActionPerformed(java.awt.event.ActionEvent evt) { |
| 397 | +// TODO add your handling code here: |
| 398 | + } |
| 399 | + |
352 | 400 | } |
Index: trunk/mwdumper/src/org/mediawiki/dumper/gui/DumperWindowForm.form |
— | — | @@ -48,7 +48,7 @@ |
49 | 49 | <Component id="filePanel" alignment="0" max="32767" attributes="0"/> |
50 | 50 | <Group type="102" alignment="0" attributes="0"> |
51 | 51 | <Component id="databasePanel" min="-2" max="-2" attributes="0"/> |
52 | | - <EmptySpace pref="14" max="32767" attributes="0"/> |
| 52 | + <EmptySpace max="32767" attributes="0"/> |
53 | 53 | <Component id="schemaPanel" min="-2" max="-2" attributes="0"/> |
54 | 54 | </Group> |
55 | 55 | </Group> |
— | — | @@ -62,11 +62,11 @@ |
63 | 63 | <EmptySpace max="-2" attributes="0"/> |
64 | 64 | <Component id="filePanel" min="-2" max="-2" attributes="0"/> |
65 | 65 | <EmptySpace min="-2" pref="22" max="-2" attributes="0"/> |
66 | | - <Group type="103" groupAlignment="0" attributes="0"> |
67 | | - <Component id="databasePanel" min="-2" max="-2" attributes="1"/> |
68 | | - <Component id="schemaPanel" min="-2" max="-2" attributes="1"/> |
| 66 | + <Group type="103" groupAlignment="0" max="-2" attributes="0"> |
| 67 | + <Component id="schemaPanel" max="32767" attributes="1"/> |
| 68 | + <Component id="databasePanel" alignment="0" max="32767" attributes="1"/> |
69 | 69 | </Group> |
70 | | - <EmptySpace max="-2" attributes="0"/> |
| 70 | + <EmptySpace min="-2" pref="6" max="-2" attributes="0"/> |
71 | 71 | <Component id="progressPanel" max="32767" attributes="0"/> |
72 | 72 | <EmptySpace max="-2" attributes="0"/> |
73 | 73 | </Group> |
— | — | @@ -81,7 +81,7 @@ |
82 | 82 | <Group type="103" groupAlignment="0" attributes="0"> |
83 | 83 | <Group type="102" alignment="0" attributes="0"> |
84 | 84 | <EmptySpace max="-2" attributes="0"/> |
85 | | - <Component id="fileText" pref="402" max="32767" attributes="0"/> |
| 85 | + <Component id="fileText" pref="439" max="32767" attributes="0"/> |
86 | 86 | <EmptySpace max="-2" attributes="0"/> |
87 | 87 | <Component id="browseButton" min="-2" max="-2" attributes="0"/> |
88 | 88 | <EmptySpace max="-2" attributes="0"/> |
— | — | @@ -132,20 +132,25 @@ |
133 | 133 | <Group type="102" alignment="0" attributes="0"> |
134 | 134 | <EmptySpace max="-2" attributes="0"/> |
135 | 135 | <Group type="103" groupAlignment="0" attributes="0"> |
136 | | - <Component id="serverLabel" alignment="0" min="-2" max="-2" attributes="0"/> |
137 | | - <Component id="portLabel" alignment="0" min="-2" max="-2" attributes="0"/> |
138 | | - <Component id="passwordLabel" alignment="0" min="-2" max="-2" attributes="0"/> |
139 | | - <Component id="userLabel" min="-2" max="-2" attributes="0"/> |
| 136 | + <Component id="dbStatusLabel" alignment="0" pref="205" max="32767" attributes="0"/> |
| 137 | + <Group type="102" alignment="0" attributes="0"> |
| 138 | + <Group type="103" groupAlignment="0" attributes="0"> |
| 139 | + <Component id="serverLabel" alignment="0" min="-2" max="-2" attributes="0"/> |
| 140 | + <Component id="portLabel" alignment="0" min="-2" max="-2" attributes="0"/> |
| 141 | + <Component id="passwordLabel" alignment="0" min="-2" max="-2" attributes="0"/> |
| 142 | + <Component id="userLabel" min="-2" max="-2" attributes="0"/> |
| 143 | + </Group> |
| 144 | + <EmptySpace max="-2" attributes="0"/> |
| 145 | + <Group type="103" groupAlignment="0" max="-2" attributes="0"> |
| 146 | + <Component id="passwordText" max="32767" attributes="1"/> |
| 147 | + <Component id="userText" max="32767" attributes="1"/> |
| 148 | + <Component id="portText" max="32767" attributes="1"/> |
| 149 | + <Component id="serverText" alignment="1" pref="136" max="32767" attributes="1"/> |
| 150 | + <Component id="connectButton" alignment="0" min="-2" max="-2" attributes="0"/> |
| 151 | + </Group> |
| 152 | + </Group> |
140 | 153 | </Group> |
141 | 154 | <EmptySpace max="-2" attributes="0"/> |
142 | | - <Group type="103" groupAlignment="0" max="-2" attributes="0"> |
143 | | - <Component id="passwordText" max="32767" attributes="1"/> |
144 | | - <Component id="userText" max="32767" attributes="1"/> |
145 | | - <Component id="portText" max="32767" attributes="1"/> |
146 | | - <Component id="serverText" alignment="1" pref="136" max="32767" attributes="1"/> |
147 | | - <Component id="connectButton" alignment="0" min="-2" max="-2" attributes="0"/> |
148 | | - </Group> |
149 | | - <EmptySpace max="32767" attributes="0"/> |
150 | 155 | </Group> |
151 | 156 | </Group> |
152 | 157 | </DimensionLayout> |
— | — | @@ -174,7 +179,9 @@ |
175 | 180 | </Group> |
176 | 181 | <EmptySpace max="-2" attributes="0"/> |
177 | 182 | <Component id="connectButton" min="-2" max="-2" attributes="0"/> |
178 | | - <EmptySpace pref="53" max="32767" attributes="0"/> |
| 183 | + <EmptySpace pref="17" max="32767" attributes="0"/> |
| 184 | + <Component id="dbStatusLabel" min="-2" max="-2" attributes="0"/> |
| 185 | + <EmptySpace max="-2" attributes="0"/> |
179 | 186 | </Group> |
180 | 187 | </Group> |
181 | 188 | </DimensionLayout> |
— | — | @@ -225,6 +232,11 @@ |
226 | 233 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="connectButtonActionPerformed"/> |
227 | 234 | </Events> |
228 | 235 | </Component> |
| 236 | + <Component class="javax.swing.JLabel" name="dbStatusLabel"> |
| 237 | + <Properties> |
| 238 | + <Property name="text" type="java.lang.String" value="Not connected."/> |
| 239 | + </Properties> |
| 240 | + </Component> |
229 | 241 | </SubComponents> |
230 | 242 | </Container> |
231 | 243 | <Container class="javax.swing.JPanel" name="schemaPanel"> |
— | — | @@ -239,27 +251,37 @@ |
240 | 252 | <Layout> |
241 | 253 | <DimensionLayout dim="0"> |
242 | 254 | <Group type="103" groupAlignment="0" attributes="0"> |
243 | | - <Group type="102" attributes="0"> |
| 255 | + <Group type="102" alignment="0" attributes="0"> |
244 | 256 | <EmptySpace max="-2" attributes="0"/> |
245 | 257 | <Group type="103" groupAlignment="0" attributes="0"> |
246 | | - <Group type="102" attributes="0"> |
247 | | - <Component id="prefixLabel" min="-2" max="-2" attributes="0"/> |
| 258 | + <Group type="102" alignment="0" attributes="0"> |
| 259 | + <Component id="schemaStatusLabel" pref="260" max="32767" attributes="0"/> |
248 | 260 | <EmptySpace max="-2" attributes="0"/> |
249 | | - <Component id="prefixText" pref="90" max="32767" attributes="0"/> |
250 | | - <EmptySpace pref="54" max="32767" attributes="0"/> |
251 | 261 | </Group> |
252 | 262 | <Group type="102" alignment="0" attributes="0"> |
253 | 263 | <Component id="schema15Radio" min="-2" max="-2" attributes="0"/> |
254 | | - <EmptySpace pref="54" max="32767" attributes="0"/> |
| 264 | + <EmptySpace pref="105" max="32767" attributes="0"/> |
255 | 265 | </Group> |
256 | 266 | <Group type="102" alignment="0" attributes="0"> |
257 | 267 | <Component id="schema14Radio" min="-2" max="-2" attributes="0"/> |
258 | | - <EmptySpace pref="127" max="32767" attributes="0"/> |
| 268 | + <EmptySpace pref="178" max="32767" attributes="0"/> |
259 | 269 | </Group> |
260 | 270 | <Group type="102" alignment="0" attributes="0"> |
261 | 271 | <Component id="schemaLabel" min="-2" max="-2" attributes="0"/> |
262 | | - <EmptySpace pref="80" max="32767" attributes="0"/> |
| 272 | + <EmptySpace pref="131" max="32767" attributes="0"/> |
263 | 273 | </Group> |
| 274 | + <Group type="102" alignment="0" attributes="0"> |
| 275 | + <Group type="103" groupAlignment="0" attributes="0"> |
| 276 | + <Component id="prefixLabel" alignment="0" min="-2" max="-2" attributes="0"/> |
| 277 | + <Component id="dbnameLabel" alignment="0" min="-2" max="-2" attributes="0"/> |
| 278 | + </Group> |
| 279 | + <EmptySpace max="-2" attributes="0"/> |
| 280 | + <Group type="103" groupAlignment="0" attributes="0"> |
| 281 | + <Component id="dbnameText" pref="90" max="32767" attributes="0"/> |
| 282 | + <Component id="prefixText" alignment="0" pref="90" max="32767" attributes="0"/> |
| 283 | + </Group> |
| 284 | + <EmptySpace min="-2" pref="105" max="-2" attributes="0"/> |
| 285 | + </Group> |
264 | 286 | </Group> |
265 | 287 | </Group> |
266 | 288 | </Group> |
— | — | @@ -278,7 +300,14 @@ |
279 | 301 | <Component id="prefixLabel" alignment="3" min="-2" max="-2" attributes="0"/> |
280 | 302 | <Component id="prefixText" alignment="3" min="-2" max="-2" attributes="0"/> |
281 | 303 | </Group> |
282 | | - <EmptySpace pref="93" max="32767" attributes="0"/> |
| 304 | + <EmptySpace max="-2" attributes="0"/> |
| 305 | + <Group type="103" groupAlignment="3" attributes="0"> |
| 306 | + <Component id="dbnameLabel" alignment="3" min="-2" max="-2" attributes="0"/> |
| 307 | + <Component id="dbnameText" alignment="3" min="-2" max="-2" attributes="0"/> |
| 308 | + </Group> |
| 309 | + <EmptySpace pref="27" max="32767" attributes="0"/> |
| 310 | + <Component id="schemaStatusLabel" min="-2" max="-2" attributes="0"/> |
| 311 | + <EmptySpace max="-2" attributes="0"/> |
283 | 312 | </Group> |
284 | 313 | </Group> |
285 | 314 | </DimensionLayout> |
— | — | @@ -291,6 +320,9 @@ |
292 | 321 | </Component> |
293 | 322 | <Component class="javax.swing.JRadioButton" name="schema14Radio"> |
294 | 323 | <Properties> |
| 324 | + <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> |
| 325 | + <ComponentRef name="schemaRadios"/> |
| 326 | + </Property> |
295 | 327 | <Property name="text" type="java.lang.String" value="1.4 (cur, old)"/> |
296 | 328 | <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> |
297 | 329 | <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> |
— | — | @@ -304,6 +336,9 @@ |
305 | 337 | </Component> |
306 | 338 | <Component class="javax.swing.JRadioButton" name="schema15Radio"> |
307 | 339 | <Properties> |
| 340 | + <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> |
| 341 | + <ComponentRef name="schemaRadios"/> |
| 342 | + </Property> |
308 | 343 | <Property name="selected" type="boolean" value="true"/> |
309 | 344 | <Property name="text" type="java.lang.String" value="1.5 (page, revision, text)"/> |
310 | 345 | <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> |
— | — | @@ -323,6 +358,24 @@ |
324 | 359 | </Component> |
325 | 360 | <Component class="javax.swing.JTextField" name="prefixText"> |
326 | 361 | </Component> |
| 362 | + <Component class="javax.swing.JLabel" name="dbnameLabel"> |
| 363 | + <Properties> |
| 364 | + <Property name="text" type="java.lang.String" value="Database"/> |
| 365 | + </Properties> |
| 366 | + </Component> |
| 367 | + <Component class="javax.swing.JTextField" name="dbnameText"> |
| 368 | + <Properties> |
| 369 | + <Property name="text" type="java.lang.String" value="wikidb"/> |
| 370 | + </Properties> |
| 371 | + <Events> |
| 372 | + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="dbnameTextActionPerformed"/> |
| 373 | + </Events> |
| 374 | + </Component> |
| 375 | + <Component class="javax.swing.JLabel" name="schemaStatusLabel"> |
| 376 | + <Properties> |
| 377 | + <Property name="text" type="java.lang.String" value="Not connected."/> |
| 378 | + </Properties> |
| 379 | + </Component> |
327 | 380 | </SubComponents> |
328 | 381 | </Container> |
329 | 382 | <Container class="javax.swing.JPanel" name="progressPanel"> |
— | — | @@ -333,7 +386,7 @@ |
334 | 387 | <Group type="102" alignment="0" attributes="0"> |
335 | 388 | <EmptySpace max="-2" attributes="0"/> |
336 | 389 | <Component id="progressLabel" min="-2" pref="383" max="-2" attributes="0"/> |
337 | | - <EmptySpace max="32767" attributes="0"/> |
| 390 | + <EmptySpace pref="46" max="32767" attributes="0"/> |
338 | 391 | <Component id="startButton" min="-2" max="-2" attributes="0"/> |
339 | 392 | <EmptySpace max="-2" attributes="0"/> |
340 | 393 | </Group> |
— | — | @@ -361,7 +414,6 @@ |
362 | 415 | <Component class="javax.swing.JButton" name="startButton"> |
363 | 416 | <Properties> |
364 | 417 | <Property name="text" type="java.lang.String" value="Start import"/> |
365 | | - <Property name="enabled" type="boolean" value="false"/> |
366 | 418 | </Properties> |
367 | 419 | <Events> |
368 | 420 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="startButtonActionPerformed"/> |