Search in sources :

Example 1 with AddSubnetDialog

use of org.netxms.ui.eclipse.objectmanager.dialogs.AddSubnetDialog in project netxms by netxms.

the class VPNSubnets method addTargetAddressListElement.

/**
 * Add element to subnet list
 */
private void addTargetAddressListElement(TableViewer elementList, List<InetAddressEx> elements) {
    AddSubnetDialog dlg = new AddSubnetDialog(getShell());
    if (dlg.open() == Window.OK) {
        InetAddressEx subnet = dlg.getSubnet();
        if (!elements.contains(subnet)) {
            elements.add(subnet);
            elementList.setInput(elements.toArray());
            modified = true;
        }
    }
}
Also used : AddSubnetDialog(org.netxms.ui.eclipse.objectmanager.dialogs.AddSubnetDialog) InetAddressEx(org.netxms.base.InetAddressEx)

Aggregations

InetAddressEx (org.netxms.base.InetAddressEx)1 AddSubnetDialog (org.netxms.ui.eclipse.objectmanager.dialogs.AddSubnetDialog)1