Search in sources :

Example 6 with AccessPoint

use of org.netxms.client.objects.AccessPoint in project netxms by netxms.

the class FindConnectionPoint method selectionChanged.

/* (non-Javadoc)
	 * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
	 */
@Override
public void selectionChanged(IAction action, ISelection selection) {
    if ((selection instanceof IStructuredSelection) && !selection.isEmpty()) {
        objects = new ArrayList<AbstractObject>();
        for (Object s : ((IStructuredSelection) selection).toList()) {
            if ((s instanceof Node) || (s instanceof Interface) || (s instanceof AccessPoint)) {
                action.setEnabled(true);
                objects.add((AbstractObject) s);
            }
        }
    } else {
        action.setEnabled(false);
        objects = null;
    }
}
Also used : AbstractObject(org.netxms.client.objects.AbstractObject) Node(org.netxms.client.objects.Node) AccessPoint(org.netxms.client.objects.AccessPoint) AbstractObject(org.netxms.client.objects.AbstractObject) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) Interface(org.netxms.client.objects.Interface)

Example 7 with AccessPoint

use of org.netxms.client.objects.AccessPoint in project netxms by netxms.

the class RadioInterfaces method refresh.

/**
 * Refresh content
 */
private void refresh() {
    Node node = (Node) session.findObjectById(rootObject, Node.class);
    if (node == null)
        return;
    List<RadioInterface> list = new ArrayList<RadioInterface>();
    for (AbstractObject o : node.getAllChilds(AbstractObject.OBJECT_ACCESSPOINT)) {
        if (o instanceof AccessPoint) {
            for (RadioInterface rif : ((AccessPoint) o).getRadios()) list.add(rif);
        }
    }
    viewer.setInput(list.toArray());
}
Also used : Node(org.netxms.client.objects.Node) AbstractObject(org.netxms.client.objects.AbstractObject) AccessPoint(org.netxms.client.objects.AccessPoint) ArrayList(java.util.ArrayList) RadioInterface(org.netxms.client.topology.RadioInterface)

Aggregations

AbstractObject (org.netxms.client.objects.AbstractObject)7 AccessPoint (org.netxms.client.objects.AccessPoint)7 Interface (org.netxms.client.objects.Interface)6 AbstractNode (org.netxms.client.objects.AbstractNode)4 Node (org.netxms.client.objects.Node)4 Sensor (org.netxms.client.objects.Sensor)3 ArrayList (java.util.ArrayList)2 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)2 NXCSession (org.netxms.client.NXCSession)2 Chassis (org.netxms.client.objects.Chassis)2 GenericObject (org.netxms.client.objects.GenericObject)2 MobileDevice (org.netxms.client.objects.MobileDevice)2 NetworkService (org.netxms.client.objects.NetworkService)2 NodeLink (org.netxms.client.objects.NodeLink)2 Rack (org.netxms.client.objects.Rack)2 ServiceCheck (org.netxms.client.objects.ServiceCheck)2 VPNConnector (org.netxms.client.objects.VPNConnector)2 Zone (org.netxms.client.objects.Zone)2 UnknownHostException (java.net.UnknownHostException)1 NumberFormat (java.text.NumberFormat)1