comboServers.addItem(server);
comboServers.addActionListener(this);
}
IServer server = getServer();
JLabel labelServer = ComponentFactory.getLabel(DcResources.getText("lblInternetServer"));
int stretchX = server.getSearchModes() != null && server.getSearchModes().size() > 0 ? 1 : 2;
JLabel labelSearch = ComponentFactory.getLabel(DcResources.getText("lblSearchFor"));
add(labelSearch, Layout.getGBC( 0, 0, 1, 1, 1.0, 1.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
new Insets(5, 5, 5, 5), 0, 0));
add(fldQuery, Layout.getGBC( 1, 0, stretchX, 1, 10.0, 10.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
new Insets(5, 5, 5, 5), 0, 0));
if (server.getSearchModes() != null && server.getSearchModes().size() > 0) {
comboModes.removeAllItems();
for (SearchMode mode : server.getSearchModes())
comboModes.addItem(mode);
add(comboModes, Layout.getGBC( 2, 0, 1, 1, 10.0, 10.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
new Insets(5, 5, 5, 5), 0, 0));
}
comboRegions.removeAllItems();
for (Region region : server.getRegions())
comboRegions.addItem(region);
buttonSearch = ComponentFactory.getButton(DcResources.getText("lblFind"));
buttonSearch.addActionListener(osf);
buttonSearch.setActionCommand("search");
buttonSearch.setMnemonic('F');
// servers panel
JPanel panelServers = new JPanel();
panelServers.setLayout(Layout.getGBL());
JButton btServerSettings = ComponentFactory.getIconButton(IconLibrary._icoSettings16);
btServerSettings.setActionCommand("serversettings");
btServerSettings.addActionListener(this);
panelServers.add(comboServers, Layout.getGBC( 0, 0, 1, 1, 100.0, 100.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
new Insets(5, 5, 5, 5), 0, 0));
if (server.getSettings() != null)
panelServers.add(btServerSettings, Layout.getGBC( 1, 0, 1, 1, 1.0, 10.0
,GridBagConstraints.EAST, GridBagConstraints.NONE,
new Insets(5, 0, 5, 0), 0, 0));