use of org.netxms.base.InetAddressEx in project netxms by netxms.
the class VPNSubnets method createContents.
/* (non-Javadoc)
* @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
*/
@Override
protected Control createContents(Composite parent) {
Composite dialogArea = new Composite(parent, SWT.NONE);
connector = (VPNConnector) getElement().getAdapter(VPNConnector.class);
GridLayout layout = new GridLayout();
layout.verticalSpacing = WidgetHelper.OUTER_SPACING;
layout.marginWidth = 0;
layout.marginHeight = 0;
dialogArea.setLayout(layout);
GridData gd = new GridData();
gd.horizontalAlignment = SWT.FILL;
gd.grabExcessHorizontalSpace = true;
gd.verticalAlignment = SWT.FILL;
gd.grabExcessVerticalSpace = true;
dialogArea.setLayoutData(gd);
objectSelector = new ObjectSelector(dialogArea, SWT.NONE, true);
objectSelector.setLabel(Messages.get().VPNSubnets_PeerGateway);
objectSelector.setObjectClass(AbstractObject.class);
objectSelector.setObjectId(connector.getPeerGatewayId());
gd = new GridData();
gd.horizontalAlignment = SWT.FILL;
gd.grabExcessHorizontalSpace = true;
objectSelector.setLayoutData(gd);
objectSelector.addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
modified = true;
}
});
Composite clientArea = new Composite(dialogArea, SWT.NONE);
layout = new GridLayout();
layout.marginWidth = 0;
layout.marginHeight = 0;
layout.numColumns = 2;
gd = new GridData();
clientArea.setLayout(layout);
gd.horizontalAlignment = SWT.FILL;
gd.grabExcessHorizontalSpace = true;
gd.verticalAlignment = SWT.FILL;
gd.grabExcessVerticalSpace = true;
clientArea.setLayoutData(gd);
// networks lists
localNetworksElements = new ArrayList<InetAddressEx>(connector.getLocalSubnets());
remoteNetworksElements = new ArrayList<InetAddressEx>(connector.getRemoteSubnets());
createNetworkList(clientArea, Messages.get().VPNSubnets_LocalNetworks, localNetworksList, localNetworksElements);
createNetworkList(clientArea, Messages.get().VPNSubnets_RemoteNetworks, remoteNetworksList, remoteNetworksElements);
return dialogArea;
}
Aggregations