final int leftWidth,
final int rightWidth,
final boolean wizard,
final Map<Host, Widget> newInsideIpComboBoxHash,
final Map<Host, Widget> newOutsideIpComboBoxHash) {
final DrbdXml dxml = getBrowser().getDrbdXml();
for (final Host pHost : new HashSet<Host>(getCluster().getProxyHosts())) {
final String section = Tools.getString("ResourceInfo.Proxy") + pHost.getName();
final JPanel sectionPanel = getParamPanel(section);
addSectionPanel(section, wizard, sectionPanel);
enableSection(section, !DrbdProxy.PROXY, wizard);
sectionPanel.setBackground(AppDefaults.LIGHT_ORANGE);
final Value[] proxyNetInterfaces = getNetInterfaces(pHost.getBrowser());
/* inside ip */
if (proxyNetInterfaces == null) {
//TODO: just textfield
}
final Widget iIpWi = widgetFactory.createInstance(
Widget.Type.COMBOBOX,
Widget.NO_DEFAULT,
proxyNetInterfaces,
Widget.NO_REGEXP,
rightWidth,
Widget.NO_ABBRV,
new AccessMode(AccessMode.ADMIN, AccessMode.NORMAL),
Widget.NO_BUTTON);
iIpWi.setAlwaysEditable(!pHost.isConnected());
newInsideIpComboBoxHash.put(pHost, iIpWi);
final JLabel insideIpLabel = new JLabel(Tools.getString("ResourceInfo.ProxyInsideIp"));
iIpWi.setLabel(insideIpLabel, Tools.getString("ResourceInfo.ProxyInsideIp.ToolTip"));
final JPanel panel = new JPanel();
addField(panel, insideIpLabel, iIpWi.getComponent(), leftWidth, rightWidth, 0);
panel.setBackground(AppDefaults.LIGHT_ORANGE);
panel.setLayout(new SpringLayout());
sectionPanel.add(panel);
/* outside ip */
final Widget oIpWi = widgetFactory.createInstance(
Widget.Type.COMBOBOX,
Widget.NO_DEFAULT,
proxyNetInterfaces,
Widget.NO_REGEXP,
rightWidth,
Widget.NO_ABBRV,
new AccessMode(AccessMode.ADMIN, AccessMode.NORMAL),
Widget.NO_BUTTON);
oIpWi.setAlwaysEditable(!pHost.isConnected());
newOutsideIpComboBoxHash.put(pHost, oIpWi);
final JLabel outsideIpLabel = new JLabel(Tools.getString("ResourceInfo.ProxyOutsideIp"));
oIpWi.setLabel(outsideIpLabel, Tools.getString("ResourceInfo.ProxyOutsideIp.ToolTip"));
addField(panel, outsideIpLabel, oIpWi.getComponent(), leftWidth, rightWidth, 0);
SpringUtilities.makeCompactGrid(panel, 2, 2, /* rows, cols */
1, 1, /* initX, initY */
1, 1); /* xPad, yPad */
optionsPanel.add(sectionPanel);
}
for (final Host host : getHosts()) {
final HostProxy hostProxy = dxml.getHostProxy(host.getName(), getName());
Value insideIpSaved = null;
Value outsideIpSaved = null;
final Host proxyHost;
if (hostProxy != null) {
insideIpSaved = hostProxy.getInsideIp();