localPanel1.setBackground(SystemColor.control);
localPanel3.setBackground(SystemColor.control);
localPanel2.setBackground(SystemColor.control);
localPanel4.setBackground(SystemColor.control);
localPanel2.add(createLabel("Recent:"));
this.recent = new Choice();
try
{
this.settings = ConnectionDialogCommon.loadRecentConnectionSettings();
}
catch (IOException localIOException)
{
localIOException.printStackTrace();
}
this.recent.add(ConnectionDialogCommon.emptySettingName);
Enumeration localEnumeration = this.settings.elements();
while (localEnumeration.hasMoreElements())
this.recent.add(((ConnectionSetting)localEnumeration.nextElement()).getName());
this.recent.addItemListener(new ItemListener()
{
public void itemStateChanged(ItemEvent paramItemEvent)
{
String str = (String)paramItemEvent.getItem();
ConnectionSetting localConnectionSetting = (ConnectionSetting)ConnectionDialog.this.settings.get(str);
if (localConnectionSetting != null)
{
ConnectionDialog.this.mName.setText(localConnectionSetting.getName());
ConnectionDialog.this.mDriver.setText(localConnectionSetting.getDriver());
ConnectionDialog.this.mURL.setText(localConnectionSetting.getUrl());
ConnectionDialog.this.mUser.setText(localConnectionSetting.getUser());
ConnectionDialog.this.mPassword.setText(localConnectionSetting.getPassword());
}
}
});
localPanel3.add(this.recent);
Button localButton = new Button("Clr");
localButton.setActionCommand("Clear");
localButton.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent paramActionEvent)
{
ConnectionDialogCommon.deleteRecentConnectionSettings();
ConnectionDialog.access$002(ConnectionDialog.this, new Hashtable());
ConnectionDialog.this.recent.removeAll();
ConnectionDialog.this.recent.add(ConnectionDialogCommon.emptySettingName);
ConnectionDialog.this.mName.setText(null);
}
});
localPanel5.add(localButton);
localPanel2.add(createLabel("Setting Name:"));
this.mName = new TextField("");
localPanel3.add(this.mName);
localPanel2.add(createLabel("Type:"));
this.types = new Choice();
this.connTypes = ConnectionDialogCommon.getTypes();
for (int i = 0; i < this.connTypes.length; i++)
this.types.add(this.connTypes[i][0]);
this.types.addItemListener(this);
localPanel3.add(this.types);