Search in sources :

Example 1 with IProximitySettings

use of com.google.security.zynamics.zylib.gui.zygraph.settings.IProximitySettings in project binnavi by google.

the class AbstractZyGraph method showNodes.

public void showNodes(final Collection<NodeType> toShow, final Collection<NodeType> toHide, final boolean addNeighbours) {
    if (addNeighbours) {
        final IProximitySettings proxiSettings = getSettings().getProximitySettings();
        final Set<NodeType> neighbors = ProximityRangeCalculator.getNeighbors(this, toShow, proxiSettings.getProximityBrowsingChildren(), proxiSettings.getProximityBrowsingParents());
        toHide.removeAll(neighbors);
    }
    for (final NodeType node : sortLayers(toHide)) {
        Preconditions.checkNotNull(node, "Error: The list of nodes to hide contained an invalid node");
        ((IViewNode<?>) node.getRawNode()).setVisible(false);
    }
    if (addNeighbours) {
        showNeighbors(toShow);
    } else {
        for (final NodeType node : toShow) {
            Preconditions.checkNotNull(node, "The list of nodes to show contained an invalid node");
            ((IViewNode<?>) node.getRawNode()).setVisible(true);
        }
    }
    notifyVisibilityListeners();
}
Also used : IProximitySettings(com.google.security.zynamics.zylib.gui.zygraph.settings.IProximitySettings) IViewNode(com.google.security.zynamics.zylib.gui.zygraph.nodes.IViewNode)

Example 2 with IProximitySettings

use of com.google.security.zynamics.zylib.gui.zygraph.settings.IProximitySettings in project binnavi by google.

the class AbstractZyGraph method showNodes.

public void showNodes(final Collection<NodeType> toShow, final Collection<NodeType> toHide) {
    final IProximitySettings proxiSettings = getSettings().getProximitySettings();
    final Set<NodeType> neighbors = ProximityRangeCalculator.getNeighbors(this, toShow, proxiSettings.getProximityBrowsingChildren(), proxiSettings.getProximityBrowsingParents());
    toHide.removeAll(neighbors);
    for (final NodeType node : sortLayers(toHide)) {
        Preconditions.checkNotNull(node, "Error: The list of nodes to hide contained an invalid node");
        ((IViewNode<?>) node.getRawNode()).setVisible(false);
    }
    showNeighbors(toShow);
    notifyVisibilityListeners();
}
Also used : IProximitySettings(com.google.security.zynamics.zylib.gui.zygraph.settings.IProximitySettings) IViewNode(com.google.security.zynamics.zylib.gui.zygraph.nodes.IViewNode)

Aggregations

IViewNode (com.google.security.zynamics.zylib.gui.zygraph.nodes.IViewNode)2 IProximitySettings (com.google.security.zynamics.zylib.gui.zygraph.settings.IProximitySettings)2