48 |
48 |
private javax.swing.JScrollPane jScrollPane1;
|
49 |
49 |
private javax.swing.JPanel lowerPanel;
|
50 |
50 |
protected javax.swing.JComboBox protocolCombo;
|
51 |
|
private javax.swing.JLabel protocolLabel;
|
|
51 |
protected javax.swing.JLabel protocolLabel;
|
52 |
52 |
private javax.swing.JPanel protocolPanel;
|
53 |
53 |
private javax.swing.JLabel replyLabel;
|
54 |
54 |
private javax.swing.JEditorPane replyText;
|
55 |
55 |
private javax.swing.JButton searchButton;
|
56 |
56 |
private JComboServer serverCombo;
|
57 |
|
private javax.swing.JLabel serverLabel;
|
|
57 |
protected javax.swing.JLabel serverLabel;
|
58 |
58 |
private javax.swing.JPanel serverPanel;
|
59 |
59 |
private javax.swing.JButton serverPropertiesButton;
|
60 |
60 |
private javax.swing.JPanel upperPanel;
|
... | ... | |
63 |
63 |
public ServerConnectPanel() {
|
64 |
64 |
initComponents();
|
65 |
65 |
initLabels();
|
66 |
|
initButtonSize();
|
|
66 |
initButtonSize();
|
67 |
67 |
initDefaultValues();
|
68 |
68 |
}
|
69 |
69 |
|
... | ... | |
72 |
72 |
* WARNING: Do NOT modify this code. The content of this method is
|
73 |
73 |
* always regenerated by the Form Editor.
|
74 |
74 |
*/
|
75 |
|
// <editor-fold defaultstate="collapsed" desc=" C?digo Generado ">
|
|
75 |
// <editor-fold defaultstate="collapsed" desc=" C?digo Generado ">
|
76 |
76 |
private void initComponents() {
|
77 |
77 |
java.awt.GridBagConstraints gridBagConstraints;
|
78 |
78 |
|
... | ... | |
210 |
210 |
lowerPanel.add(closeButton);
|
211 |
211 |
|
212 |
212 |
add(lowerPanel, java.awt.BorderLayout.SOUTH);
|
213 |
|
}// </editor-fold>
|
|
213 |
}// </editor-fold>
|
214 |
214 |
|
215 |
215 |
/**
|
216 |
216 |
* Rewrite the labels
|
217 |
217 |
*/
|
218 |
218 |
private void initLabels(){
|
219 |
|
serverLabel.setText(Messages.getText("serverURL"));
|
220 |
|
protocolLabel.setText(Messages.getText("protocols"));
|
|
219 |
serverLabel.setText(Messages.getText("serverURLCat"));
|
|
220 |
protocolLabel.setText(Messages.getText("protocolsGroup"));
|
221 |
221 |
dataBaseLabel.setText(Messages.getText("database"));
|
222 |
222 |
replyLabel.setText(Messages.getText("serverReply"));
|
223 |
223 |
connectButton.setText(Messages.getText("connectButton"));
|
... | ... | |
290 |
290 |
}
|
291 |
291 |
}
|
292 |
292 |
}
|
293 |
|
|
|
293 |
|
294 |
294 |
public void setPropertiesIcon(Icon icon){
|
295 |
295 |
serverPropertiesButton
|
296 |
296 |
.setIcon(icon);
|
297 |
297 |
}
|
298 |
|
|
|
298 |
|
299 |
299 |
/**
|
300 |
300 |
* Updates the protocol combo
|
301 |
301 |
*/
|
... | ... | |
307 |
307 |
}
|
308 |
308 |
|
309 |
309 |
public void updateServerByProtocol(){
|
310 |
|
IDiscoveryServiceDriver discoveryServiceDriver =
|
|
310 |
IDiscoveryServiceDriver discoveryServiceDriver =
|
311 |
311 |
(IDiscoveryServiceDriver)protocolCombo.getSelectedItem();
|
312 |
312 |
if (discoveryServiceDriver != null){
|
313 |
313 |
ServerData serverData = discoveryServiceDriver.getOneServer();
|
314 |
314 |
if (serverData != null){
|
315 |
315 |
serverCombo.setSelectedItem(serverData);
|
316 |
|
}
|
|
316 |
}
|
317 |
317 |
}
|
318 |
318 |
}
|
319 |
|
|
|
319 |
|
320 |
320 |
/**
|
321 |
321 |
* @return the selected server
|
322 |
322 |
*/
|
323 |
323 |
public ServerData getServer(){
|
324 |
|
return serverCombo.getSelectedServer();
|
|
324 |
return serverCombo.getSelectedServer();
|
325 |
325 |
}
|
326 |
|
|
|
326 |
|
327 |
327 |
public ServerData[] getAllServers(){
|
328 |
328 |
return serverCombo.getAllServers();
|
329 |
329 |
}
|
... | ... | |
359 |
359 |
}
|
360 |
360 |
|
361 |
361 |
/**
|
362 |
|
* Adds a listener to manage the panel events
|
|
362 |
* Adds a listener to manage the panel events
|
363 |
363 |
* @param listener
|
364 |
364 |
* Listener to add
|
365 |
365 |
*/
|
... | ... | |
376 |
376 |
closeButton.setActionCommand(CatalogConstants.CLOSE_BUTTON_ACTION_COMMAND);
|
377 |
377 |
serverPropertiesButton.addActionListener(listener);
|
378 |
378 |
serverPropertiesButton.setActionCommand(CatalogConstants.SERVERPROPERTIES_BUTTON_ACTION_COMMAND);
|
379 |
|
|
|
379 |
|
380 |
380 |
}
|
381 |
381 |
|
382 |
382 |
/**
|
... | ... | |
387 |
387 |
public void enableSearchButton(boolean isEnabled){
|
388 |
388 |
searchButton.setEnabled(isEnabled);
|
389 |
389 |
}
|
390 |
|
|
|
390 |
|
391 |
391 |
/**
|
392 |
392 |
* Enable or disable the server properties button
|
393 |
393 |
* @param isEnabled
|
... | ... | |
396 |
396 |
public void enableServerPropertiesButton(boolean isEnabled){
|
397 |
397 |
serverPropertiesButton.setEnabled(isEnabled);
|
398 |
398 |
}
|
399 |
|
|
|
399 |
|
400 |
400 |
/**
|
401 |
401 |
* Set visible the properties button
|
402 |
402 |
* @param isVisible
|
... | ... | |
405 |
405 |
public void setServerPropertiesButtonVisible(boolean isVisible){
|
406 |
406 |
serverPropertiesButton.setVisible(isVisible);
|
407 |
407 |
}
|
408 |
|
|
|
408 |
|
409 |
409 |
public void setServerTextEnabled(boolean isEnabled){
|
410 |
410 |
serverCombo.setEnabled(isEnabled);
|
411 |
411 |
}
|